Skip to content

io_bids

Subworkflow loading files from a BIDS directory. It is used in conjunction with the IO_READBIDS module which uses the scilpy CLI script to parse the BIDS directory and fetch the metadata.

------------- Current supported files/metadata -------------

Files:
- T1w
- White matter parcellation from FreeSurfer.
- Grey matter parcellation from FreeSurfer.
- Diffusion weighted images (dwi)
- B-values (bval)
- B-vectors (bvec)
- Reverse encoded diffusion weighted images (rev_dwi)
- B-values for the rev_dwi (rev_bval)
- B-vectors for the rev_dwi (rev_bvec)
- Reverse b0 image (rev_b0)

Metadata (within the meta):
- Subject ID (id)
- Session ID (ses)
- Run ID (run)
- DWI Total Readout Time (dwi_tr)
- DWI Phase Encoding Direction (dwi_phase)
- Reverse DWI Phase Encoding Direction (dwi_revphase)

Note: This subworkflow is meant to be an example of how to use the
IO_READBIDS module. It only supports a single BIDS folder as an input. It can be modified to fit the user’s needs.

Keywords : IO, BIDS, Files

Components : io/readbids


TypeDescriptionMandatoryPattern
bids_folderdirectoryPath to the BIDS directory. (You must supply only a single BIDS directory)

Structure : tuple path(bids_folder)
  • bids_folder [directory] BIDS directory path.
True
fs_folderdirectoryPath to the FreeSurfer directory.

Structure : tuple path(fs_folder)
  • fs_folder [directory] FreeSurfer directory path.
False
bidsignorefilePath to the .bidsignore file.

Structure : tuple path(bidsignore)
  • bidsignore [file] BIDS ignore file.
False

TypeDescriptionMandatoryPattern
ch_t1fileChannel containing all T1w files

Structure : tuple val(meta), path(t1)
  • meta [map] Metadata map.
  • t1 [file] T1-weighted image file.
True*.nii.gz
ch_wmparcfileChannel containing all FreeSurfer white matter parcellation files.

Structure : tuple val(meta), path(wmparc)
  • meta [map] Metadata map.
  • wmparc [file] FreeSurfer white matter parcellation file.
False*.mgz
ch_aparc_asegfileChannel containing all FreeSurfer grey matter parcellation files.

Structure : tuple val(meta), path(aparc_aseg)
  • meta [map] Metadata map.
  • aparc_aseg [file] FreeSurfer grey matter parcellation file.
False*.mgz
ch_dwi_bval_bvecfileChannel containing all diffusion weighted images, b-values and b-vectors.

Structure : tuple val(meta), path(dwi), path(bval), path(bvec)
  • meta [map] Metadata map.
  • dwi [file] DWI file.
  • bval [file] B-values file.
  • bvec [file] B-vectors file.
True*.\{nii.gz,bval,bvec\}
ch_rev_dwi_bval_bvecfileChannel containing all reverse encoded diffusion weighted images, b-values and b-vectors.

Structure : tuple val(meta), path(rev_dwi), path(rev_bval), path(rev_bvec)
  • meta [map] Metadata map.
  • rev_dwi [file] Reverse-encoded DWI file.
  • rev_bval [file] B-values file for reverse-encoded DWI.
  • rev_bvec [file] B-vectors file for reverse-encoded DWI.
False*.\{nii.gz,bval,bvec\}
ch_b0fileChannel containing all b0 images.

Structure : tuple val(meta), path(b0)
  • meta [map] Metadata map.
  • b0 [file] B0 image file.
False*.nii.gz
ch_rev_b0fileChannel containing all reverse b0 images.

Structure : tuple val(meta), path(rev_b0)
  • meta [map] Metadata map.
  • rev_b0 [file] Reverse b0 image file.
False*.nii.gz
versionsfileFile containing software versions

Structure : tuple path(versions)
  • versions [file] Versions YAML file.
Trueversions.yml


Last updated : 2026-03-17