Skip to content

BioMeDS/DTI_Processing_Snakemake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Automated FSL-based processing pipeline for DTI (Diffusion Tensor Imaging) data. Specifically for non-brain images (e.g. images of DRG (Dorsal Root Ganglia))

What does this pipeline do?

  • optionally ROIs are extracted from the images, using fslroi
  • all images with b-value 0 are extracted (in both AP and PA direction) and recombined for topup
  • the AP and PA file (nifti, bvec, and bval) are concatenated for eddy
  • config files for topup and eddy are created
  • then topup and eddy are applied
  • dtifit is applied to the eddy corrected data
  • bedpostX is applied to the eddy corrected data

The workflow can be run with slurm (--executor slurm). Start it in the root of a BIDS dataset and all subjects and sessions with dwi images in dir-AP and dir-PA are processed. Outputs are stored under derivatives/dti_smk.

Requirements

The listed versions are the ones this pipeline was developed with. It might work with other (particularly newer) versions.

How to run it?

Navigate into the root of your BIDS dataset and run (adjusting the path to the Snakefile and number of cpus):

snakemake --snakefile /path/to/workflow/Snakefile --cores 6

If you are on a SLURM cluster (and you have snakemake-executor-plugin-slurm installed), you can run (again adjusting parameters as appropriate):

snakemake --snakefile /path/to/workflow/Snakefile --executor slurm --default-resources mem_mb=1000 cpus_per_task=2 runtime=60 --jobs 10 --latency-wait 60 

Additional naming requirements

the full BIDS specification is not supported, yet.

There are currently still some limitations:

  • the session level is not optional (_ses-<label>)
  • the PhaseEncodingDirection has to be in _dir-<label> and only "AP" and "PA" are supported (in uppercase letters)
  • no additional file name components are currently accepted (acq, rec, run, part, chunk)

For developers

Install dependencies with:

uv sync

Run tests with:

uv run pytest test

Contributing

Contributions are welcome, including but not limited to bug fixes, new features, documentation, and tests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages