Running NiQuery¶
Command line interface¶
niquery¶
CLI for working with OpenNeuro BOLD runs.
Usage
niquery [OPTIONS] COMMAND [ARGS]...
aggregate¶
Aggregate NIfTI files listed in the input file into a new DataLad dataset.
Clones the corresponding OpenNeuro datasets, and downloads only those files listed towards the creation of the new dataset.
IN_FILENAME path NIfTI filename list filename
OUT_DIRNAME path Output dirname
NAME str Name of the dataset
Usage
niquery aggregate [OPTIONS] IN_FILENAME OUT_DIRNAME NAME
Options
- -f, --force¶
Allow overwriting output files or writing to non-empty directories.
Arguments
- IN_FILENAME¶
Required argument
- OUT_DIRNAME¶
Required argument
- NAME¶
Required argument
analyze¶
Analyze modality-specific files in datasets to extract relevant features.
Analyzes the modality-specific data files contained in the records of each
dataset in the input directory. The suffix indicates what files will be
analyzed. The features computed include the number of volumes of each file.
IN_DIRNAME path Input dirname
OUT_DIRNAME path Output dirname
SUFFIX str Modality suffix to consider
Usage
niquery analyze [OPTIONS] IN_DIRNAME OUT_DIRNAME
Options
- --suffix <suffix>¶
Required Modality suffixes to consider
- -f, --force¶
Allow overwriting output files or writing to non-empty directories.
Arguments
- IN_DIRNAME¶
Required argument
- OUT_DIRNAME¶
Required argument
collect¶
Collect datasets’ file information using the remotes and IDs read from the input file.
For each queried dataset, the list of files is stored in a delimiter-separated file, along with the ‘remote’, ‘id’, ‘filename’, ‘size’, ‘directory’, ‘annexed’, ‘key’, ‘urls’, and ‘fullpath’ features.
IN_FILENAME path Dataset list filename
OUT_DIRNAME path Output dirname
MODALITY str Modalities to consider
SPECIES str Species to consider
Usage
niquery collect [OPTIONS] IN_FILENAME OUT_DIRNAME
Options
- --species <species>¶
Required Species to consider
- --modality <modality>¶
Required Modalities to consider
- -f, --force¶
Allow overwriting output files or writing to non-empty directories.
Arguments
- IN_FILENAME¶
Required argument
- OUT_DIRNAME¶
Required argument
index¶
Index existing dataset information from a remote server.
The remote server needs to offer a GraphQL API.
The ‘remote’, ‘id’, ‘name’, ‘species’, ‘tag’, ‘dataset_doi’, ‘modalities’, and ‘tasks’ features of the available datasets are stored in the output file using a delimiter-separated format.
REMOTE str Remote server name OUT_FILENAME path Output filename
Usage
niquery index [OPTIONS] REMOTE OUT_FILENAME
Options
- -f, --force¶
Allow overwriting output files or writing to non-empty directories.
Arguments
- REMOTE¶
Required argument
- OUT_FILENAME¶
Required argument
select¶
Select relevant BOLD runs based on constraints.
Selects relevant fMRI BOLD runs based on the following set of constraints:
Criterion 1: no single dataset shall contribute more than a fraction of the total number of runs.
Criterion 2: each BOLD run shall have between a minimum and maximum number of timepoints (inclusive).
Results are stored using a delimiter-separated format.
IN_DIRNAME path Input dirname
OUT_FILENAME path Output data list filename
SEED integer Random seed. Use the format ‘YYYYMMDD’ for a date
Usage
niquery select [OPTIONS] IN_DIRNAME OUT_FILENAME SEED
Options
- --total-runs <total_runs>¶
Number of total runs
- Default:
4000
- --contr-fraction <contr_fraction>¶
Allowed contribution fraction for runs per dataset over the total runs
- Default:
0.05
- --min-timepoints <min_timepoints>¶
Minimum number of BOLD timepoints per dataset
- Default:
300
- --max-timepoints <max_timepoints>¶
Maximum number BOLD timepoints per dataset
- Default:
1200
- -f, --force¶
Allow overwriting output files or writing to non-empty directories.
Arguments
- IN_DIRNAME¶
Required argument
- OUT_FILENAME¶
Required argument
- SEED¶
Required argument