Skip to content

Basic usage

Before running the pipeline, make sure you have completed the following:

  1. Prerequisites installed?

    Verify that nextflow and either docker or apptainer are installed and working. See the installation guide for detailed instructions.

  2. BIDS data validated?

    Your data must be organized in BIDS format with the participants.tsv file containing the age column. See the inputs guide for details.

  3. FreeSurfer license available?

  4. Know which analysis you want to run?

    Decide which profiles you need based on your research goals. See the Understanding the profiles guide.

  5. Will you have access to the internet during processing?

    Internet access is not required to run the pipeline. However, by default, the pipeline will download some dependencies during execution. If you plan on running it on a machine without internet access (e.g., an HPC cluster), head over to the running with no internet access section.

If you’re new to the pipeline, start with this basic command for diffusion MRI preprocessing and tractography:

Terminal window
nextflow run scilus/sf-pediatric -r 0.2.2 \
--input /absolute/path/to/your/BIDS_directory \
--outdir /absolute/path/to/results \
-profile docker,tracking \
-resume

Every pipeline run needs at least these three parameters:

  1. --input - Path to your BIDS directory

    Your data must follow BIDS format with a participants.tsv file containing an age column.

  2. --outdir - Where to save results

    Results can be large (several GB per subject), so choose a location with sufficient space. We recommend naming the output directory with the version number (e.g., --outdir /path/to/results/sf-pediatric-v0.2.2)

  3. -profile - Which profiles to run

    Terminal window
    # Always include a container system (docker/apptainer) + processing profiles
    -profile docker,tracking
    -profile apptainer,tracking,segmentation,connectomics

    See the profiles guide for detailed information on choosing profiles.

Terminal window
# For HCP-like protocol (b-values: 1500 and 3000)
nextflow run scilus/sf-pediatric -r 0.2.2 \
--input /path/to/BIDS \
--outdir /path/to/results \
--dti_shells "0 1500" \
--fodf_shells "0 1500 3000" \
-profile docker,tracking \
-resume

For more details, see --dti_shells and --fodf_shells parameters.

Sometimes, you might want to process only a subset of subjects from your complete BIDS dataset. This is entirely possible using the --participant_label parameter.

Terminal window
# Process only sub-01 and sub-02
nextflow run scilus/sf-pediatric -r 0.2.2 \
--input /path/to/BIDS \
--outdir /path/to/results \
--participant_label "sub-01,sub-02" \
-profile docker,tracking \
-resume

The pipeline will create the following structure in your current working directory (assuming your --outdir is located in this directory):

  • Directorywork/ # Temporary files (can be deleted after successful run)
  • Directorysf-pediatric-v0.2.2/ # Your results (specified by —outdir)
    • dataset_description.json
    • participants.tsv
    • Directorymultiqc/ # Quality control reports
    • Directorysub-01/
      • Directoryses-01/
        • Directoryanat/ # Anatomical images (T1w/T2w processing)
        • Directorydwi/ # Diffusion images and tractography
        • Directoryfigures/ # QC visualizations
        • Directorymultiqc/ # Subject-specific QC
        • Directoryxfm/ # Image transformations
  • .nextflow.log # Log file (check this if errors occur)
  • Directory.nextflow/ # Nextflow cache (enables -resume)

For a detailed description of each output file, see the outputs guide.