-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from gagnonanthony/dev
Working and tested end-to-end version for infant and paediatric data (raw dwi/anat --> connectomics)
- Loading branch information
Showing
41 changed files
with
4,758 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
pipeline-compilation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: nf-core/setup-nextflow@v1 | ||
- name: Run pipeline | ||
run: | | ||
nextflow run ${GITHUB_WORKSPACE} --help | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile tracking | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile tracking,infant | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile connectomics | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile connectomics,infant | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile tracking,connectomics | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile tracking,connectomics,infant | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile freesurfer | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile freesurfer,connectomics | ||
nextflow run ${GITHUB_WORKSPACE} --help -profile freesurfer,connectomics,tracking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.devcontainer | ||
.vscode | ||
.nextflow* | ||
.DS_Store | ||
*.code-workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,83 @@ | ||
Infant-DWI | ||
=============== | ||
Complete pipeline to perform tractography from infant diffusion MRI data. Adapted from the SCIL TractoFlow Pipeline (https://github.com/scilus/tractoflow.git) and Connectoflow Pipeline (https://github.com/scilus/connectoflow.git). | ||
ChildBrainFlow Pipeline | ||
======================= | ||
|
||
SINGULARITY | ||
----------- | ||
If you are running this pipeline on Linux, it is recommended you use the SCIL singularity container that contains all the relevant dependencies. | ||
You can get the image by running this command: | ||
ChildBrainFlow is an end-to-end pipeline that performs tractography, t1 reconstruction and connectomics. | ||
It is essentially a merged version of multiple individual pipelines to avoid the handling of inputs/outputs | ||
between flows with some parameters tuned for pediatric brain scans. Here is a list of flows from which | ||
processes have been taken: | ||
|
||
`` sudo singularity pull scilus.sif docker://scilus/scilus:latest`` | ||
1. TractoFlow (https://github.com/scilus/tractoflow.git) [1] | ||
2. FreeSurfer-Flow (https://github.com/scilus/freesurfer_flow) | ||
3. Connectoflow (https://github.com/scilus/connectoflow) | ||
|
||
DOCKER | ||
------ | ||
If you are on MacOS or Windows, you can use Docker to run Infant-DWI. | ||
Prebuilt image are available here: | ||
> [!NOTE] | ||
> Please note that some steps have been removed from the original pipelines if they were not relevant for pediatric data. If you need some of these steps, please use the original pipelines. | ||
Nextflow | ||
-------- | ||
To install nextflow, please see : https://www.nextflow.io/docs/latest/getstarted.html#requirements | ||
|
||
The pipeline export by default a `` parameters.json `` within the output directory to provide a documentation of the parameters used during the execution. For a more detailed report (excluding execution's parameters), the default feature of nextflow `` -with-report <report_name.html> `` can be used to export a html report. Simply add this your command line when launching the pipeline: | ||
|
||
https://hub.docker.com/r/scilus/scilus | ||
``` | ||
nextflow run main.nf --input <input> <other_arguments> -with-report <report_name.html> | ||
``` | ||
|
||
DEPENDENCIES | ||
------------ | ||
You can also run Infant-DWI without any container, but you need these dependencies installed on your machine to make it work: | ||
Apptainer | ||
--------- | ||
If you are running this pipeline on Linux, it is recommended to run the pipeline using an apptainer image. | ||
The pipeline comes with a recipe file (`` /containers/apptainer_recipe.def ``) containing all the required | ||
dependencies to successfully run every profiles. To build the apptainer image, run this command: | ||
|
||
* Scilpy (https://github.com/scilus/scilpy.git) | ||
* Mrtrix3 (https://www.mrtrix.org/) | ||
* FSL (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki) | ||
* ANTs (http://stnava.github.io/ANTs/) | ||
``` | ||
sudo apptainer build <image_name> </path/to/apptainer_recipe.def> | ||
``` | ||
|
||
All these dependencies must be in your PATH environment variable in order to launch Infant-Tracking. | ||
Docker | ||
------ | ||
If you are on MacOS or Windows, you can use Docker to run ChildBrainFlow. The pipeline comes with | ||
a Dockerfile containing all the dependencies required to successfully run every profiles of the pipeline. | ||
Simply run this command from inside the `` /containers/ `` folder: | ||
|
||
``` | ||
docker build -t <container_name> . | ||
``` | ||
> [!WARNING] | ||
> Due to the high number of dependencies (ANTs, FSL, MRtrix3, Scilpy, Freesurfer, FastSurfer, etc.), the resulting docker image can be pretty large (~ 40Gb). | ||
USAGE | ||
Usage | ||
----- | ||
See _USAGE_ or run `` nextflow run main.nf --help `` for more details. | ||
|
||
REFERENCES | ||
References | ||
---------- | ||
This pipeline is adapted from the SCIL TractoFlow pipeline, see: | ||
If you used this pipeline, please cite : | ||
|
||
[1] 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. | ||
|
||
[2] Kurtzer GM, Sochat V, Bauer MW Singularity: Scientific containers for mobility of compute. PLoS ONE 12(5) | ||
(2017): e0177459. https://doi.org/10.1371/journal.pone.0177459 | ||
|
||
[3] P. Di Tommaso, et al. Nextflow enables reproducible computational workflows. Nature Biotechnology 35, | ||
316–319 (2017) https://doi.org/10.1038/nbt.3820 | ||
|
||
[4] Garyfallidis, E., Brett, M., Amirbekian, B., Rokem, A., Van Der Walt, S., Descoteaux, M., Nimmo-Smith, I., | ||
2014. Dipy, a library for the analysis of diffusion mri data. Frontiers in neuroinformatics 8, 8. | ||
https://doi.org/10.3389/fninf.2014.00008 | ||
|
||
[5] Tournier, J. D., Smith, R. E., Raffelt, D. A., Tabbara, R., Dhollander, T., Pietsch, M., … & Connelly, A. | ||
(2019). MRtrix3: A fast, flexible and open software framework for medical image processing and visualisation. | ||
NeuroImage 202, https://doi.org/10.1016/j.neuroimage.2019.116137 | ||
|
||
[6] Avants, B. B., Tustison, N., & Song, G. (2009). Advanced normalization tools (ANTS). Insight j, 2(365), 1-35. | ||
|
||
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. | ||
[7] Jenkinson, M., Beckmann, C.F., Behrens, T.E., Woolrich, M.W., Smith, S.M., 2012. Fsl. Neuroimage 62, | ||
782–790. https://doi.org/10.1016/j.neuroimage.2011.09.015 | ||
|
||
[8] Fischl, B., Salat, D.H., Busa, E., Albert, M., Dieterich, M., Haselgrove, C., van der Kouwe, A., Killiany, | ||
R., Kennedy, D., Klaveness, S., Montillo, A., Makris, N., Rosen, B., Dale, A.M., 2002. Whole brain | ||
segmentation: automated labeling of neuroanatomical structures in the human brain. Neuron 33, 341-355. | ||
https://doi.org/10.1016/s0896-6273(02)00569-x |
Oops, something went wrong.