nf-surgeryflow

End-to-end surgical tractography pipeline

https://github.com/anroy1/nf-surgeryflow

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

End-to-end surgical tractography pipeline

Basic Info
  • Host: GitHub
  • Owner: anroy1
  • Language: Nextflow
  • Default Branch: main
  • Size: 478 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Created over 1 year ago · Last pushed 11 months ago
Metadata Files
Readme Citation

README.md

nf-SurgeryFlow

nf-SurgeryFlow is a Nextflow pipeline for processing neuroimaging data. This pipeline includes various preprocessing, reconstruction, tracking, and segmentation steps.

Table of Contents

Introduction

nf-SurgeryFlow is an end-to-end tractography pipeline dedicated to clinicians in a pre-surgical setting. It performs preprocessing, T1 segmentation, DTI and fODF metrics computations, tractography, virtual dissection and an optional Nifti to DICOM conversion.

![nf-surgeryflow-schema(/nf-surgeryflow-schema.png)]

Installation

To install nf-SurgeryFlow, you need to have Nextflow and Docker installed. Follow these steps:

  1. Install Nextflow: sh curl -s https://get.nextflow.io | bash

  2. Install Docker: Follow the instructions on the Docker website.

  3. Clone the repository: sh git clone https://github.com/yourusername/nf-surgeryflow.git cd nf-surgeryflow

Usage

This pipeline is still under developpement, therefore has not been tested under all circomstances. Here are the main elements to know to be able to run it: - Some modules use Freesurfer tools, which require pointing to a valid Freesurfer license. This license should be provided by the user and passed through when calling nf-surgeryflow. Refer to this page. - BundleSeg uses an atlas-based virtual dissection method, therefore needs a white matter bundles atlas. You can use yours or use this one - We highly recommend using <-profile docker> or <-profile apptainer>, , as it controls the version of the software used and avoids the installation of all the required softwares.

[!NOTE] If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow.

Input specification

nf-surgeryflow takes the following inputs, passing the /path/to/root at the --input flag:

bash " --input=/path/to/[root] Input directory containing your subjects" "" " [root]" " ├-- S1" " | ├-- *dwi.nii.gz" " | ├-- *dwi.bval" " | ├-- *dwi.bvec" " | ├-- *t1.nii.gz" " | ├-- *b0.nii.gz (optional)" " | ├-- *rev_dwi.nii.gz (optional)" " | ├-- *rev_dwi.bval (optional)" " | ├-- *rev_dwi.bvec (optional)" " | ├-- *rev_b0.nii.gz (optional)" " | └-- *lesion.nii.gz (optional)" [WIP] " └-- S2" " ├-- *dwi.nii.gz" " ├-- *dwi.bval" " ├-- *dwi.bvec" " ├-- *t1.nii.gz" " ├-- *b0.nii.gz (optional)" " ├-- *rev_dwi.nii.gz (optional)" " ├-- *rev_dwi.bval (optional)" " ├-- *rev_dwi.bvec (optional)" " ├-- *rev_b0.nii.gz (optional)" " └-- *lesion.nii.gz (optional)" [WIP]

Configurations profiles

  1. -profile docker: Each process will be run using docker containers (Recommended).
  2. -profile apptainer or -profile singularity: Each process will be run using apptainer/singularity images.
  3. -profile use-gpu: Some processes use GPU acceleration [WIP]
  4. -profile dicom: Convert output back to DICOM [WIP]

Processing profiles

  1. -profile standard: Base tracking configuration for pre-surgical evaluation
  2. -profile tumour: Base tracking configuration for tumour evaluation
  3. -profile tractoflow: Revert processing to standard tractoflow pipeline [WIP]

Using either -profile docker or -profile apptainer is highly recommended, as it controls the version of the software used and avoids the installation of all the required softwares.

To run the pipeline, use the following command:

sh nextflow run main.nf --input /path/to/input --atlas /path/to/atlas --fs_license /path/to/license.txt -profile standard,[<docker|apptainer>] Processing steps Diffusion processes - Preliminary DWI brain extraction (FSL) - Denoise DWI (Mrtrix3) - Gibbs correction (Mrtrix3) - Topup (FSL) - Eddy (FSL) - Extract B0 (Scilpy) - DWI brain extraction (FSL) - N4 DWI (ANTs) - Crop DWI (Scilpy) - Resample DWI (Scilpy) - Resample B0 (Scilpy) - extract SH fitted to DWI (Scilpy)

T1 processes - Denoise T1 (Scilpy) - N4 T1 (ANTs) - Resample T1 (Scilpy) - T1 brain extraction (Freesurfer) - Crop T1 (Scilpy) - Registration on diffusion (Freesurfer) - Tissue segmentation (Freesurfer)

Metrics processes - Extract DTI shells (Scilpy) - DTI metrics (Scilpy) - Extract fODF shells (Scilpy) - Compute fiber response function (Scilpy) - Mean fiber response function (Scilpy) - fODF metrics (scilpy) - PFT maps (Scilpy) - Seeding and tracking masks (Scilpy) - Tracking (local or PFT) (Scilpy)

Bundle segmentation - Register atlas in diffusion space (ANTs) - Bundle segmentation and clean (Scilpy) - FilterBundles (Scilpy) - BundlesOn_Anat (Scilpy)

Nifti to DICOM [WIP] - Affine matrix conversion (Freesurfer) - NIFTI to DICOM conversion (nii2dcm)

Owner

  • Login: anroy1
  • Kind: user

Citation (CITATIONS.md)

# nf-surgeryflow: Citations

## [nf-core](https://pubmed.ncbi.nlm.nih.gov/32055031/)

> Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, Garcia MU, Di Tommaso P, Nahnsen S. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276-278. doi: 10.1038/s41587-020-0439-x. PubMed PMID: 32055031.

## [Nextflow](https://pubmed.ncbi.nlm.nih.gov/28398311/)

> Di Tommaso P, Chatzou M, Floden EW, Barja PP, Palumbo E, Notredame C. Nextflow enables reproducible computational workflows. Nat Biotechnol. 2017 Apr 11;35(4):316-319. doi: 10.1038/nbt.3820. PubMed PMID: 28398311.

## Pipeline tools

- [Tractoflow] (https://github.com/scilus/tractoflow)
  
> Theaud, G., Houde, J.-C., Boré, A., Rheault, F., Morency, F., Descoteaux, M.,TractoFlow: A robust, efficient and reproducible diffusion MRI pipeline leveraging Nextflow & Singularity, NeuroImage, https://doi.org/10.1016/j.neuroimage.2020.116889

- [BundleSeg] (https://github.com/scilus/rbx_flow)
 
> St-Onge, Etienne, Kurt G. Schilling, and Francois Rheault. "BundleSeg: A versatile, reliable and reproducible approach to white matter bundle segmentation." International Workshop on Computational Diffusion MRI. Cham: Springer Nature Switzerland, (2023)

> Rheault, Francois. Analyse et reconstruction de faisceaux de la matière blanche.
page 137-170, (2020), https://savoirs.usherbrooke.ca/handle/11143/17255

- [scilpy](https://github.com/scilus/scilpy)

- [Mrtrix](https://www.mrtrix.org/)

> Tournier, J.-D., Smith, R., Raffelt, D., Tabbara, R., Dhollander, T., Pietsch, M., Christiaens, D., Jeurissen, B., Yeh, C.-H., & Connelly, A. (2019). MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. NeuroImage, 202, 116137. https://doi.org/10.1016/j.neuroimage.2019.116137

- [FSL](https://fsl.fmrib.ox.ac.uk/fsl/docs/#/)

> Jenkinson, M., Beckmann, C. F., Behrens, T. E. J., Woolrich, M. W., & Smith, S. M. (2012). FSL. NeuroImage, 62(2), 782–790. https://doi.org/10.1016/j.neuroimage.2011.09.015

- [ANTs](https://antsx.github.io/ANTs/)

> Tustison, N. J., Cook, P. A., Holbrook, A. J., Johnson, H. J., Muschelli, J., Devenyi, G. A., Duda, J. T., Das, S. R., Cullen, N. C., Gillen, D. L., Yassa, M. A., Stone, J. R., Gee, J. C., & Avants, B. B. (2021). The ANTsX ecosystem for quantitative biological and medical imaging. Scientific Reports, 11(1), 9068. https://doi.org/10.1038/s41598-021-87564-6

- [FastSurfer](https://deep-mi.org/research/fastsurfer/)

> Henschel, L., Conjeti, S., Estrada, S., Diers, K., Fischl, B., & Reuter, M. (2020). FastSurfer—A fast and accurate deep learning based neuroimaging pipeline. NeuroImage, 219, 117012. https://doi.org/10.1016/j.neuroimage.2020.117012

- [FreeSurfer](https://surfer.nmr.mgh.harvard.edu/)

> Fischl, B. (2012). FreeSurfer. NeuroImage, 62(2), 774–781. https://doi.org/10.1016/j.neuroimage.2012.01.021

- [Synthmorph](https://martinos.org/malte/synthmorph/)

> Anatomy-specific acquisition-agnostic affine registration learned from fictitious images. Hoffmann M, Hoopes A, Fischl B*, Dalca AV*. SPIE Medical Imaging: Image Processing, 12464, p 1246402, 2023 
> SynthMorph: learning contrast-invariant registration without acquired images. Hoffmann M, Billot B, Greve DN, Iglesias JE, Fischl B, Dalca AV. IEEE Transactions on Medical Imaging (TMI), 41 (3), pp 543-558, 2022 

- [Synthstrip] (https://surfer.nmr.mgh.harvard.edu/docs/synthstrip/)

> SynthStrip: Skull-Stripping for Any Brain Image. Andrew Hoopes, Jocelyn S. Mora, Adrian V. Dalca, Bruce Fischl*, Malte Hoffmann* (*equal contribution). NeuroImage 260, 2022, 119474

- [Synthseg] (https://github.com/BBillot/SynthSeg)

> SynthSeg: Segmentation of brain MRI scans of any contrast and resolution without retraining. B. Billot, D.N. Greve, O. Puonti, A. Thielscher, K. Van Leemput, B. Fischl, A.V. Dalca, J.E. Iglesias. Medical Image Analysis (2023) 

- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/)

> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.

## Software packaging/containerisation tools

- [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241)

  > Merkel, D. (2014). Docker: lightweight linux containers for consistent development and deployment. Linux Journal, 2014(239), 2. doi: 10.5555/2600239.2600241.

- [Singularity](https://pubmed.ncbi.nlm.nih.gov/28494014/)

  > Kurtzer GM, Sochat V, Bauer MW. Singularity: Scientific containers for mobility of compute. PLoS One. 2017 May 11;12(5):e0177459. doi: 10.1371/journal.pone.0177459. eCollection 2017. PubMed PMID: 28494014; PubMed Central PMCID: PMC5426675.

GitHub Events

Total
  • Issues event: 3
  • Push event: 50
  • Pull request event: 8
  • Create event: 4
Last Year
  • Issues event: 3
  • Push event: 50
  • Pull request event: 8
  • Create event: 4