Command line interface
contactseg Command-line interface
The following can also be seen by entering contactseg -h into your terminal.
These are all the required and optional arguments contactseg accepts in order to run flexibly on many different input data types and with many options, but in most cases only the required arguments are needed.
usage: contactseg [-h]
[--participant-label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]
[--exclude_participant_label EXCLUDE_PARTICIPANT_LABEL [EXCLUDE_PARTICIPANT_LABEL ...]]
[--derivatives DERIVATIVES [DERIVATIVES ...]]
[--skip_bids_validation] [--run_all_folds RUN_ALL_FOLDS]
[--transform] [--label] [--use-gpu] [--manual_reg_matrix]
[--contacts-qc] [--exclude-label-map] [--non_interpolated]
[--pybidsdb-dir PATH] [--pybidsdb-reset]
[--filter-post_ct ENTITY[:METHOD][=VALUE]
[ENTITY[:METHOD][=VALUE] ...]]
[--filter-pre_t1w ENTITY[:METHOD][=VALUE]
[ENTITY[:METHOD][=VALUE] ...]]
[--wildcards-post_ct WILDCARD [WILDCARD ...]]
[--wildcards-pre_t1w WILDCARD [WILDCARD ...]]
[--path-post_ct PATH] [--path-pre_t1w PATH]
[--help-snakemake] [--force-output]
bids_dir output_dir {participant}
Positional Arguments
- bids_dir
The directory with the input dataset formatted according to the BIDS standard.
- output_dir
The directory where the output files should be stored. If you are running group level analysis this folder should be prepopulated with the results of the participant level analysis.
- analysis_level
Possible choices: participant
Level of the analysis that will be performed.
Named Arguments
- --participant-label, --participant_label
The label(s) of the participant(s) that should be analyzed. The label corresponds to sub-<participant_label> from the BIDS spec.
- --exclude_participant_label, --exclude-participant-label
The label(s) of the participant(s) that should be excluded. The label corresponds to sub-<participant_label> from the BIDS spec.
- --derivatives
Path(s) to a derivatives dataset, for folder(s) that contains multiple derivatives datasets.
Default:
False- --skip_bids_validation, --skip-bids-validation
Skip validation of BIDS dataset. BIDS validation is performed by default.
Default:
False- --run_all_folds, --run-all-folds
Specify whether to use all 5 folds of the model trained for inference.
Default:
False- --transform
Whether predicted coordinates should be transformed.
Default:
False- --label
Whether predicted coordinates should be labelled by electrode.
Default:
False- --use-gpu, --use_gpu
Enable GPU for inference.
Default:
False- --manual_reg_matrix, --manual-reg-matrix
Path to .txt file with the registration matrix.
Default:
False- --contacts-qc, --contacts_qc
Produces html qc plots to show labelled contacts over the ct and t1w images (default: False)
Default:
False- --exclude-label-map, --exclude_label_map
Exludes the label mapping code for the qc plots only displaying the acronyms (default: False)
Default:
False- --non_interpolated, --non-interpolated
Do not resample images during registration (default: False)
Default:
False- --pybidsdb-dir, --pybidsdb_dir
Optional path to directory of SQLite databasefile for PyBIDS. If directory is passed and folder exists, indexing is skipped. If pybidsdb_reset is called, indexing will persist
- --pybidsdb-reset, --pybidsdb_reset
Reindex existing PyBIDS SQLite database
Default:
False- --help-snakemake, --help_snakemake
Options to Snakemake can also be passed directly at the command-line, use this to print Snakemake usage
- --force-output, --force_output
Force output in a new directory that already has contents
Default:
False
BIDS FILTERS
Update filters for input components. Each filter can be specified as a ENTITY=VALUE pair to select an value directly. To use regex filtering, ENTITY:match=REGEX or ENTITY:search=REGEX can be used for re.match() or re.search() respectively. Regex can also be used to select multiple values, e.g. ‘session:match=01|02’. ENTITY:required and ENTITY:none can be used to require or prohibit presence of an entity in selected paths, respectively. ENTITY:optional can be used to remove a filter.
- --filter-post_ct, --filter_post_ct
(default: suffix=ct session=post extension=.nii.gz)
- --filter-pre_t1w, --filter_pre_t1w
(default: suffix=T1w extension=.nii.gz datatype=anat session=pre run=02)
INPUT WILDCARDS
Provide entities to be used as wildcards.
- --wildcards-post_ct, --wildcards_post_ct
(default: subject run)
- --wildcards-pre_t1w, --wildcards_pre_t1w
(default: subject acquisition reconstruction)
PATH OVERRIDE
Options for overriding BIDS by specifying absolute paths that include wildcards, e.g.: /path/to/my_data/{subject}/t1.nii.gz
- --path-post_ct, --path_post_ct
- --path-pre_t1w, --path_pre_t1w
Snakemake command-line interface
In addition to the above command-line arguments, Snakemake arguments are also be passed at the contactseg command-line.
The most critical of these is the --cores or -c argument, which is a required argument for contactseg.
The complete list of Snakemake arguments are below, and mostly act to determine your environment and App behaviours. They will likely only need to be used for running in cloud environments or troubleshooting. These can be listed from the command-line with contactseg --help-snakemake.