Core Concepts#
The three-phase workflow#
Every analysis in launchcontainers follows the same three phases:
lc prepare → lc run → lc qc
- prepare
Reads your config files and subject/session list from
basedir/code/. Validates that all required input files exist for each subject/session. Creates the analysis directory underBIDS/derivatives/, writes frozen copies of your configs into it, and generates per-subject HPC launch scripts.- run
Reads the prepared analysis directory — not your original config files. Submits the generated scripts to the HPC scheduler (SLURM, SGE, or local).
- qc
After jobs finish, checks whether all expected output files were produced. Prints a pass/fail table, writes logs, and produces a
failed_subseslist.tsvso that failed subjects can be re-submitted immediately.
The analysis directory as the source of truth#
A key design principle is that the analysis directory produced by
prepare is fully self-contained and reproducible. Once prepare runs,
run and qc only need its path — they never re-read
your original basedir/code/ files.
BIDS/derivatives/
rtppreproc-1.2.0-3.0.3/
analysis-main/
config/
lc_config.yaml ← frozen copy of your input config
subseslist_input.tsv ← original input subseslist
subseslist.tsv ← cleaned (blocking failures excluded)
logs/
prepare_TIMESTAMP.log
run_TIMESTAMP.log
qc_TIMESTAMP.log
scripts/
run_sub-01_ses-T01.sh
run_sub-01_ses-T02.sh
results/
sub-01/ses-T01/
...
failed_subseslist.tsv ← written by qc on any failures
Issue severity levels#
During prepare, each subject/session check returns a list of issues
with one of three severity levels:
Severity |
Meaning |
Behaviour |
|---|---|---|
|
A required file is missing; cannot proceed |
Subject/session excluded from the run |
|
Suspicious but not fatal |
Subject/session included; issue logged |
|
Issue can be resolved programmatically |
Fix function is called automatically |
Supported pipelines#
Container-based (DWI / structural)#
These pipelines run inside Apptainer/Singularity containers.
Container key |
Purpose |
|---|---|
|
DWI preprocessing (legacy RTP) |
|
FreeSurfer reconstruction and ROI operation |
|
DWI preprocessing (legacy RTP) |
|
DWI tractography (legacy RTP) |
|
DWI preprocessing (RTP2) |
|
DWI tractography (RTP2) |
|
fMRI Preprocessing, including anatomical MRI processing with FreeSurfer |
|
PRF prepare , preparing the events.tsv, getting preprocessed bold time series |
|
PRF modeling, based on mrVista from Stanford |
|
Visulizing PRFresult on spheres and surface |
Analysis-based (fMRI)#
These pipelines are managed by the PREPARER_REGISTRY and do not
require a container.
Type key |
Purpose |
|---|---|
|
First-level GLM (nilearn-based) |
|
MP2RAGE T1w image processing before freesurfer |
|
NORDIC denoising on fMRI data using nordic_raw repo |
|
NORDIC denoising on DWI data using nordic_raw repo |
|
any analysis can be coded into single session running warappers. |
Supported hosts#
Host key |
Scheduler |
Notes |
|---|---|---|
|
SLURM |
|
|
SGE |
|
|
bash |
Serial or parallel via concurrent.futures |