Pre/Post-processing pipeline for tractography wrapped around nipype and mrtrix3
Project description
Pipetography
Nipype and mrtrix3 based pre-/post- processing pipeline for brain diffusion-MRI and generation of structural connectomes of the brain.
This repo currently only has pre-processing capabilities! More will be added in the near future.
The pre-processing workflow has been updated to reflect what's seen in the optimal DESIGNER pipeline and on mrtrix3 cloud apps on brainlife.io.
Install
Since most usages will be on HPC resources, I highly recommend that you use the Singularity
or Docker
recipe in the repository instead of installing the Python module.
Singularity (recommended):
-
To build sandbox singularity image:
singularity build -s pipetography.simg singularity.def
-
Run singularity image with:
singularity run -B <BIDS_DIR>:<Singularity_BIDS_DIR> pipetography.simg
(You will have to bind your data directories in addition to justsingularity run
)
Docker:
-
Pull the docker image:
docker pull axiezai/pipetography
-
Run with BIDS directory and interactive bash terminal:
docker run -v <BIDS_DIR>:<Docker_BIDS_DIR> -it axiezai/pipetography bash
Known container issues:
-
The freesurfer
license.txt
file, although copied into the containers and the environment variableFS_LICENSE
is set, must be moved into the freesurfer home folder before running the pipeline. So once your image is built, run it interactively and manually move the license file withmv /license.txt /opt/freesurfer-6.0.0-min/
-
If
singularity build
fails withapt-get install
error complaining about unauthenticated packages, add--allow-unauthenticated
to everyapt-get
line in thesinngularity.def
file. -
Containers missing standard libraries like
libopenblas
orlibfortran
, this is because$LS_LIBRARY_PATH
is missing conda environment's lib path. We need to append the environment's lib path withexport LB_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/miniconda-latest/envs/tracts/lib/
-
Freesurfer6.0.0-min
recon-all
is missing commands if-parallel
or-openmp
are set toTrue
.
Creating your own environment and install pipetography
as a Python module:
pip install pipetography
Since pipetography
is a Nipype
wrapper around mrtrix3
, ANTs
, and FSL
, you have to follow their installation instructions and set them up appropriately on your machine as well:
The pipeline:
The following pipeline is produced by running the default set up in pipeline. And each individual node in the workflow is shown in core.
#example
from IPython.display import Image
Image('docs/images/output_5_0.png')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pipetography-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f1f723e7446986b570ee4a4e46f65c55b71b7dff1a560323b6c1d9aaf6b523 |
|
MD5 | 9039bd2ae9a6da1b5ef80c0b437b6983 |
|
BLAKE2b-256 | 578cd8e2ca05d0aeaf54b45a837b314a012813fca6f1564695cc6d00bae22bcb |