AFQ.utils.bin#

Attributes#

Functions#

pyafq_str_to_val(t)

val_to_formal(v)

arg_dict_formatted(dictionary)

dict_to_json(dictionary)

func_dict_to_arg_dict([func_dict, logger])

cli_args_to_kwargs(cli_args, default_arg_dict, ...)

Convert parsed argparse arguments into kwargs for the AFQ API.

_find_gradient_file(dwi, exts, name)

_start_metadata(default_arg_dict)

_write_metadata(afq_metadata_file, default_arg_dict)

parse_config_run_afq(dwi, bval, bvec, t1, o_folder, ...)

run_bids_afq(bids_dir, analysis_level, ...[, ...])

BIDS-App style entry point

generate_json(json_folder[, overwrite, logger])

Module Contents#

AFQ.utils.bin.pyafq_str_to_val(t)[source]#
AFQ.utils.bin.val_to_formal(v)[source]#
AFQ.utils.bin.arg_dict_formatted(dictionary)[source]#
AFQ.utils.bin.qsi_prep_ignore_params = ['bids_path', 'bids_filters', 'dwi_preproc_pipeline', 'participant_labels', 'output_dir'][source]#
AFQ.utils.bin.dict_to_json(dictionary)[source]#
AFQ.utils.bin.func_dict_to_arg_dict(func_dict=None, logger=None)[source]#
AFQ.utils.bin._PARTICIPANT_CLI_ONLY = ['dwi', 'bvec', 'bval', 't1', 'o_folder', 'verbose', 'dry_run', 'to_call'][source]#
AFQ.utils.bin._BIDS_CLI_ONLY = ['bids_dir', 'analysis_level', 'participant_label', 'session_id', 'dwi_preproc_pipeline',...[source]#
AFQ.utils.bin.cli_args_to_kwargs(cli_args, default_arg_dict, cli_only_args)[source]#

Convert parsed argparse arguments into kwargs for the AFQ API.

Parameters:
cli_argsargparse.Namespace

Parsed command line arguments.

default_arg_dictdict

Output of func_dict_to_arg_dict. Updated in place.

cli_only_argslist of str

Arguments for the CLI and mandatory arguments for AFQ that are not passed into the AFQ tasks system.

Returns:
kwargsdict

Keyword arguments to pass to ParticipantAFQ or GroupAFQ. Tractography and segmentation parameters are nested under tracking_params and segmentation_params respectively.

AFQ.utils.bin._find_gradient_file(dwi, exts, name)[source]#
AFQ.utils.bin._start_metadata(default_arg_dict)[source]#
AFQ.utils.bin._write_metadata(afq_metadata_file, default_arg_dict)[source]#
AFQ.utils.bin.parse_config_run_afq(dwi, bval, bvec, t1, o_folder, default_arg_dict, cli_args, to_call='export_all', logger=None, verbose=False, dry_run=False)[source]#
AFQ.utils.bin.run_bids_afq(bids_dir, analysis_level, default_arg_dict, cli_args, participant_label=None, session_id=None, dwi_preproc_pipeline='all', t1_preproc_pipeline=None, bids_filter_file=None, nprocs=1, parallel_engine='serial', skip_bids_validation=False, to_call='all', logger=None, verbose=False, dry_run=False)[source]#

BIDS-App style entry point

Parameters:
bids_dirstr

Root of the BIDS dataset (containing derivatives/).

analysis_level{“participant”, “group”}

participant runs the pipeline for each subject/session. group runs all and combines participant-level tract profiles into a single tract_profiles.csv.

AFQ.utils.bin.generate_json(json_folder, overwrite=False, logger=None)[source]#