Skip to content

How to use

Garikoitz Lerma-Usabiaga edited this page Apr 1, 2020 · 9 revisions

How to use RTP-pipeline

Input files

The input files need to be sorted in independent folders. We recommend that you create a basedir directory and store all subject information there. Inside basedir, create the input and output folders.

mkdir /Users/myusername/testFolder
export basedir=/Users/myusername/testFolder
cd $basedir
mkdir input
mkdir output

Inside the input folder, each file type will have an independent folder name. Below, the explanation of each file type. Important: the folder names need to be exactly the same as below.

If you are using Flywheel, there will be a GUI in the web browser and no need to create a folder structure.

anatomical

Create the folder (mkdir $basedir/input/anatomical) and paste the file inside.

t1w.nii.gz file coming from rtp-preproc output.

bval

Create the folder (mkdir $basedir/input/bval) and paste the file inside.

dwi.bval file coming from rtp-preproc output.

bvec

Create the folder (mkdir $basedir/input/bvec) and paste the file inside.

dwi.bvec file coming from rtp-preproc output.

dwi

Create the folder (mkdir $basedir/input/dwi) and paste the file inside.

dwi.nii.gz file coming from rtp-preproc output.

fs

Create the folder (mkdir $basedir/input/fs) and paste the file inside.

fs.zip file coming from freesurfer container output. See home page, it can be created/extended manually.

tractparams

Create the folder (mkdir $basedir/input/tractparams) and paste the file inside.

Create a comma separated values called tract_params.csv. Instructions in how to create/edit, here.

Config file

If you are using Flywheel, there is no config file, the values are introduced in the GUI. The description of the fields here will be based on the information field in the GUI, but there might be some more information here.

If you are using a container, you will need to provide a config.json file to the docker container. Create a file locally, for example: vim $basedir/yourLocalConfigFile.json or using your favorite text editor.

You can copy and paste this config file:


This is the detailed explanation of each variable:

How to run (only applies to containers)

Once you have the folder structure with all the correct files and you have created your config file, you can execute the Docker container with the following command:

docker run -ti --rm \
           -v $basedir/input:/flywheel/v0/input:ro  \
           -v $basedir/output:/flywheel/v0/output  \
           -v $basedir/yourLocalConfigFile.json:/flywheel/v0/config.json \
           garikoitz/rtp-pipeline:4.2.6

Output files (todo, it can change)

There will be a big .zip file with all the outputs, and a bunch of other files:

  • RTP_Output_afq_(datestam).zip: the whole output from the pipeline, zipped.
  • afq_(datestamp).mat: the classical afq Matlab struct.
  • .tck files: tracts to be visualized with mrTrix's mrView.
  • .obj files: the same tracts, but in obj format. Can be visualized in the browser (for example, directly in Flywheel's output folder) or in macos's explorer.
  • .mif file with the FoDs used in the whole brain tractogram tracking.
  • .nii.gz files (some selected ones):
    • bo
    • fa
    • brainMask
    • wmMask
    • tensors