Skip to main content

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.

CI docker

The pre-processing pipeline has been updated to reflect what's seen in the optimal DESIGNER pipeline and on mrtrix3 cloud apps on brainlife.io.

The post-processing pipeline, including co-registration of atlases and connectome generation is now included in the connectomes module

Install

Since most usages will be on HPC resources, I highly recommend that you use the Singularity definition file in the repository instead of installing the Python module.

Singularity:

  • This is a large image, you will need to set the following environment variables to somewhere other than /tmp if you want to avoid memory errors:

    • export SINGULARITY_TMPDIR={YOUR DESTINATION DIR}
    • export SINGULARITY_LOCALCACHEDIR={YOUR DESTINATION DIR}
    • export SINGULARITY_CACHEDIR={YOUR DESTINATION DIR}
    • export SINGULARITY_PULLFOLDER={YOUR DESTINATION DIR}
  • Build the singularity image with the singularity.def file provided in Github, you will need to have sudo permissions to perform singularity build. If you run into memory problems, consider building as a sandbox at first with the -s flag.

    • sudo singularity build {image_file_name}.sif singularity.def
  • OR pull the built singularity image from cloud library:

    • singularity pull --arch amd64 library://axiezai/pipetography/pipetography:latest

Docker:

  • Docker often encounters permission problems on HPC resources, using the docker container is only recommended if you have sudo permissions to the machine.
  • Use the Dockerfile in this repo to build your own Docker container.

Usage:

  • To run the singularity container interactively, you will need a few flags:
    • -e flag for a clean environnment upon container start
    • -B flag to bind your BIDS directory into the container.
  • Example:
    • singularity shell -e -B <BIDS_DIR>:<SINGULARITY_BIDS_DIR> {Path to singularity .sif} will start an interactive shell.
    • singualrity exec -e -B <BIDS_DIR>:<SINGULARITY_BIDS_DIR> {Path to singularity .sif} python dwi_pipeline.py will execute the input python code. See pipeline for an example python script that preprocesses BIDS DWI data.

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:

Everything listed in this section is included in the Singularity and Docker containers.

The pipeline:

Currently supports acquisitions with no reverse phase encoding (-rpe_none) and reverse phase encoding in all DWI directions (-rpe_all) options. See pipeline for preprocessing details, and connectomes for postprocessing details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipetography-0.3.12.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipetography-0.3.12-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file pipetography-0.3.12.tar.gz.

File metadata

  • Download URL: pipetography-0.3.12.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0.post20200704 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for pipetography-0.3.12.tar.gz
Algorithm Hash digest
SHA256 bb9f247fc6a60d8b55d4843e71df15e49f30c1721ab6b0446b403c739f953546
MD5 570a1c61d38c714d428b99c7a5aaebea
BLAKE2b-256 06527715ae1285a304c49b20942266a914c3893b9e882b4315592928652f52ac

See more details on using hashes here.

File details

Details for the file pipetography-0.3.12-py3-none-any.whl.

File metadata

  • Download URL: pipetography-0.3.12-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0.post20200704 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for pipetography-0.3.12-py3-none-any.whl
Algorithm Hash digest
SHA256 dab53a3db0b979e83f055b1346ab8cea2438614259ef0c4aaca513e56a567ec2
MD5 1c710ffecd3f4bb7546a0e740a033793
BLAKE2b-256 13e755c28983bd8fa546bb0b5dfb49357745cb9a1606bb0ce1d5fe7945b3adb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page