Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

neuromaestro run

neuromaestro run [OPTIONS]

Required Arguments

ArgumentDescriptionExample
--subjectsSubject IDs — comma-separated string or path to a text file (one ID per line, or comma-separated)001,002 or subjects.txt
--inputInput data directory/data/BIDS
--outputOutput base directory/data/processed
--workWork base directory (logs, database, temp files)/data/work
--config-dirPath to config directory — must contain config.yaml, hpc_config.yaml, and project_config/. Optional if $NEUROMAESTRO_CONFIG_DIR is set./data/config
--projectProject name — loads {project}_config.yaml from --config-dir/project_config/my_study
--sessionSession or wave ID01

Processing Options

The pipeline uses two categories of multi-step pipelines:

OptionValuesDescription
--prepunzip | recon | unzip_reconData preparation
--intermedvolume | volume,bfc | ...Intermed tasks (comma-separated). Staged prep tasks wait for these when given. Omit it only when the intermed outputs already exist from an earlier run
--bids-preprest | dwi | rest,dwiBIDS pipeline preprocessing
--bids-postrest | dwi | rest,dwiBIDS pipeline postprocessing
--staged-prepemomatching | stopsignal | emomatching,stopsignal,workingmemoryStaged pipeline preprocessing
--staged-postemomatching | stopsignal | emomatching,stopsignal,workingmemoryStaged pipeline postprocessing
--mriqcindividual | group | allQuality control (MRIQC)

Pipeline section names (e.g. rest, dwi, emomatching) must match section names defined in config.yaml.


Task Expansion Rules

For full dependency and parallel execution behavior, see Pipeline Reference → CLI Flags Overview.


Execution Options

OptionDescription
--dry-runPrint the DAG execution plan and a summary without submitting. Wrapper scripts are still written to {--work}/{project}/log/wrapper/ so you can inspect them.
--resumeSkip subjects whose outputs already pass checks in {project}_checks.yaml. Submits full count with warning if file is missing.
--skip-preflightSkip pre-flight config schema checks.
--skip-bids-validationSkip BIDS format validation (runs automatically when --bids-prep or --mriqc individual/all is used without --prep) and the check that each subject has a directory in --input (which --prep runs skip anyway).
--waitWait for all submitted jobs to complete before exiting
--polling-interval NSeconds between SLURM status polls when --wait is active (default: 60)

Passing Subjects

Comma-separated:

--subjects 001,002,003

Repeated pipeline flags (both forms are equivalent):

--staged-prep emomatching,stopsignal
--staged-prep emomatching --staged-prep stopsignal

This applies to the pipeline flags only. --subjects takes a single value: given twice, only the last one is used.

From a text file (one ID per line, or comma-separated):

# one per line
printf "001\n002\n003" > subjects.txt

# or comma-separated
echo "001,002,003" > subjects.txt

neuromaestro run --subjects subjects.txt ...

The subject prefix (sub-) comes from the project config prefix field; do not include it in subject IDs.

Subject IDs may contain only letters, digits, ., _ and -, and must start with a letter or digit. run stops with an error naming any other ID, because IDs end up in generated job scripts and log paths.

run also stops, before anything is submitted, when a subject has no <prefix><id> entry in --input, so a mistyped ID such as 001 for sub-0001 fails at once instead of in every job. The check reads the input directory once and is skipped when that directory holds no <prefix> entries at all, when --prep is given (its input is raw data, not one folder per subject), or with --skip-bids-validation.


--dry-run

Prints the DAG execution plan (each task with the tasks it waits for) and a summary, and writes every wrapper script, but does not queue anything. It does not print sbatch commands. Each wrapper in {--work}/{project}/log/wrapper/ records its full submission command in a # Submission Command: comment near the top. Use it to:


--resume

Before submitting each task’s array job, the pipeline calls OutputChecker to find which subjects already have valid outputs. Only pending subjects are included in the array. If a task has no pending subjects at all, it is skipped entirely and downstream tasks are submitted without a dependency on it.

If {project}_checks.yaml is missing, --resume prints a warning and has no effect: all subjects are submitted.

--resume does not filter subjects during --dry-run. The dry-run plan and wrappers always include every subject passed to --subjects.