Inputs and metadata¶
Prepare the images and metadata required by the selected workflow before starting processing. Image filenames identify files; acquisition parameters and explicit associations determine how those files are processed.
Adult BIDS datasets¶
Organize each visit in the Brain Imaging Data Structure (BIDS). Every adult route uses the T1w in anat/. Add func/ for resting-state measurements and perf/ for CBF. The example shows a visit with all three modalities.
bids/
dataset_description.json
demographics.csv
sub-001/
ses-baseline/
anat/
sub-001_ses-baseline_T1w.nii.gz
sub-001_ses-baseline_T1w.json
func/
sub-001_ses-baseline_task-rest_bold.nii.gz
sub-001_ses-baseline_task-rest_bold.json
perf/
sub-001_ses-baseline_asl.nii.gz
sub-001_ses-baseline_asl.json
sub-001_ses-baseline_aslcontext.tsv
Session directories are optional. Include T2w images and fieldmaps when acquired, with their applicable metadata and associations. The adult workflow currently requires anatomy in the selected session; it does not automatically reuse anatomy from another visit.
Required demographics¶
A demographic table is required before processing, including anatomical-only and HCP-only runs. Use demographics.tsv, demographics.csv, or participants.tsv in the BIDS root, or pass --demographics /path/to/table.csv to the adult entry point. Explicit paths take precedence; automatic discovery checks the filenames in the order listed above.
The preferred table has one row per participant/session:
SubID,SesID,Age,Sex,SiteID,Group,QC_Passed
sub-001,ses-baseline,30.5,Female,SiteA,HC,Yes
sub-001,ses-followup,32.0,Female,SiteA,HC,No
sub-002,ses-baseline,45,Male,SiteB,DX,Yes
| Column | Requirement |
|---|---|
SubID |
Participant identifier matching sub-*; leading zeros are preserved |
SesID |
Session identifier matching ses-*; leave empty only for sessionless data |
Age |
Age at this scan in years, finite and between 0 and 120 |
Sex |
0 = Female; 1 = Male. Explicit F/Female and M/Male are accepted and normalized to 0/1. Other values are rejected |
SiteID |
Acquisition site/scanner group supplied by the study |
Group |
Required for website CSVs. Use HC for a healthy control or DX for the study's clinical group. |
QC_Passed |
Required for website CSVs. Use the team's review decision, Yes or No. |
For BIDS-style tables, the equivalent headers are participant_id, session_id, age, sex, and site_id. SubjectID, SessionID, site, and ScannerID are also recognized aliases. Do not supply two aliases of the same field in one table. The website exporter reads the two review fields. Database QC tables use their own column schema.
A participant-level table without a session column can be used when each selected participant has only one visit. Multiple visits require explicit session rows; baseline age is never reused automatically for follow-up scans. Duplicate keys, missing required columns, missing values (including NA, n/a, and unknown), invalid ages, and unsupported sex codes produce actionable errors. Site IDs are not inferred from the database name.
The dataset roster includes both table rows and discovered subject/session folders. A participant listed in the table but missing T1w is reported during preflight and remains visible in QC. Correct all selected demographic/T1w errors before starting a batch; no workers are launched when this cohort check fails.
Resting-state BOLD metadata¶
Each selected resting-state acquisition must be a readable 4D NIfTI with at least 80 volumes in that run. A run with 79 fails, and a run with 80 may proceed to metadata and quality checks. For infants, the count is measured after the configured initial discard. Adult and infant motion and downstream model checks still apply. If the reported count is too small, verify the acquisition, export and task label against the scanner record. Recover the complete acquisition or exclude the visit from the selected cohort. Padding a time series or joining separate runs changes the data.
| Information | Requirement |
|---|---|
| Repetition time | Supply RepetitionTime in seconds, consistent with the acquisition |
| Distortion-correction metadata | Supply measured phase-encoding/readout information and valid fieldmap associations |
| Slice timing | Supply SliceTiming or the confirmed acquisition order required by the selected entry point |
Raw ASL metadata and M0¶
Provide the ASL NIfTI, its acquisition JSON and an *_aslcontext.tsv with a volume_type row for each volume in acquisition order. Use the acquired control/label pairs or a delta-M series. Supply ArterialSpinLabelingType, PostLabelingDelay, RepetitionTimePreparation and M0Type. PCASL and CASL also require LabelingDuration. Enter timing in seconds. The preparation time must be finite and positive.
Recorded M0Type |
What to provide |
|---|---|
Included |
Mark the M0 volumes as m0scan in the context table. |
Separate |
Add the separate *_m0scan.nii.gz, its acquisition metadata and the BIDS association to this ASL scan (via IntendedFor in the M0 JSON). |
Estimate |
Supply the protocol's positive numeric M0Estimate in the ASL metadata. |
Absent |
Declare the recorded absence. Confirm that the acquisition supports the requested quantitative BASIL output before using it for scoring. |
The resting-state 80-volume threshold does not apply to ASL. The context must match the scan, label/control counts must agree, and the selected calibration must support quantitative CBF. With absent M0, controls and an explicit BackgroundSuppression=false are required. Resolve a missing or ambiguous M0 association using the acquisition record.
M0 volumes must share the same preparation time. When ASL and M0 timing differ, use the per-volume times or separate M0 sidecar appropriate to that acquisition.
Validate the dataset¶
Check the dataset against the BIDS specification using the BIDS Validator, then run LMBC preparation checks. LMBC indexing uses BIDSLayout(validate=False); its preflight checks do not replace full BIDS validation.
Anatomical inputs must be readable volumes with valid geometry and usable voxel data. For a geometry, unreadable file or ambiguous acquisition error, check the identified visit, re-export the original scan if necessary, and confirm which anatomical image, sidecar or fieldmap belongs to that run.
Missing demographics and acquisition parameters must be recovered from an appropriate source. Do not infer phase-encoding direction from an AP/PA filename or infer multiband acquisition solely from a short TR.
Infant iBEAT inputs¶
The infant workflow accepts an Input/ directory, a tab-separated database batch file, and completed iBEAT reconstructions. Each batch row identifies one BOLD run and its associated anatomy, reconstruction, and optional reference and fieldmap images. Age is specified in months.
The reconstruction must include matched physical-space reference, tissue, and brain-mask volumes together with bilateral inner, outer, and middle VTK surfaces. At least one raw T1w or T2w image is required. Surface and volume correspondence is validated; renaming an unrelated raw image as the iBEAT reference does not satisfy this requirement.
Applicable JSON sidecars take precedence over batch metadata. Batch fields supply required values when those values are absent from JSON. Invalid JSON metadata raise an error rather than silently falling back to a batch value. See the infant workflow for the complete directory layout and batch-field requirements.
Optional reference and fieldmap inputs¶
An acquired SBRef and fieldmaps are independently optional in the infant workflow. Without an SBRef binding, the first retained BOLD volume is used as the motion scout. When neither fieldmap is bound, susceptibility distortion correction is skipped. A configured missing file or incomplete fieldmap pair is an input error.
The current default is DiscardVolumes=0. Singleband BOLD receives slice-timing correction when its required metadata are available; multiband BOLD skips slice-timing correction under the current recipe. An acquired SBRef does not determine the BOLD acquisition type.
Input and output separation¶
Keep source data, temporary work, and final outputs separate. Use read-only input mounts for container execution and retain the original sidecars. Before starting a real run, verify participant/session selection, anatomical associations, acquisition metadata, and resource availability.
Other input formats¶
A generic fMRIPrep or sMRIPrep derivatives importer is not available. Derivative images must not be relabeled as raw BIDS inputs. Use the raw ASL workflow for CBF. Diffusion MRI supports discovery and input checks. Supply the matching b-values and b-vectors for the acquired volumes. The resting-state frame threshold does not apply. This workflow does not produce diffusion phenotypes. See Implementation and validation status.