README.md 2.7 KB
Newer Older
Chris Hines's avatar
Chris Hines committed
1
2
3
4
5
6
ENIGMA Ataxia project-pipeline
==============================

This is a neuroimaging project studing ataxia

You should find a .def file and build_container.sh to create a singularity container
Chris Hines's avatar
Chris Hines committed
7
8
9

    1. Start a linux computer/VM
    2. Ensure singularity (http://singularity.lbl.gov/) is installed
Chris Hines's avatar
Chris Hines committed
10
    3. Install git (`apt-get install git`, or `yum install git` depending on your linux flavour)
Chris Hines's avatar
Chris Hines committed
11
12

Use
Chris Hines's avatar
Chris Hines committed
13
```
Chris Hines's avatar
Chris Hines committed
14
15
git clone <this repo> ; cd <repo>
sudo build_container.sh
Chris Hines's avatar
Chris Hines committed
16
```
Chris Hines's avatar
Chris Hines committed
17
18
19
20
21

This should generate a enigma-neuro.img file. You can copy this file to any computer with singularity installed (e.g. HPC systems)

You can execute the container with a command line like:

Chris Hines's avatar
Chris Hines committed
22
```
Chris Hines's avatar
Chris Hines committed
23
singularity exec -B <datapath>:/mnt -B <licensepath>:/licese <path-to-img>/enigma-neuro.img run_pipeline ...
Chris Hines's avatar
Chris Hines committed
24
```
Chris Hines's avatar
Chris Hines committed
25
26

You might like to alias this
Chris Hines's avatar
Chris Hines committed
27
```
Chris Hines's avatar
Chris Hines committed
28
alias ataxia='singularity exec -B /mnt/enigma:/mnt /mnt/ubuntu/ENIGMA-subcortical-volumes-ataxia/build/enigma-neuro.img run_pipeline'
Chris Hines's avatar
Chris Hines committed
29
```
Chris Hines's avatar
Chris Hines committed
30
31

to save on typing, then you can just do
Chris Hines's avatar
Chris Hines committed
32
```
Chris Hines's avatar
Chris Hines committed
33
ataxia recon
Chris Hines's avatar
Chris Hines committed
34
```
Chris Hines's avatar
Chris Hines committed
35
36
etc.

Chris Hines's avatar
Chris Hines committed
37
Options to `run_pipeline` are explained bellow
Chris Hines's avatar
Chris Hines committed
38
39
40
41


The 'datapath' should contain 'input' and 'output' directorys. a 'figures' directory will also be created

Chris Hines's avatar
Chris Hines committed
42
43
The `licensepath` should contain a license.txt file with a Freesurfer license (we are investigating including a license with the container)
On M3 you could use the licensepath `/usr/local/freesurfer/20160922/`
Chris Hines's avatar
Chris Hines committed
44
45
46
47

Using run_pipeline
------------------

Chris Hines's avatar
Chris Hines committed
48
49
`run_pipeline` is a simple python script to handle the various steps of the pipeline. 
You can use `run_pipeline --help` or `run_pipeline recon --help` for more detail
Chris Hines's avatar
Chris Hines committed
50
51
52

There are three steps to the pipeline currently executed individually

Chris Hines's avatar
Chris Hines committed
53
run_pipeline recon will Look for `\*.nii.gz` files in your input directory and process them with recon-all. Its smart enought that you can rerun it multiple times on different computers without overwriting things (suitable for processing on an HPC cluster). You can also modify if with --oneonly if you want it to process only one subject and exit (suitable for HPC systems where you need to provide an accurate esimate of walltime). The other option of note is --retry if recon fails for some reason (note you should remove any output generated by recon-all from your directory first or recon-all will fail again)
Chris Hines's avatar
Chris Hines committed
54
55
56
57

run_pipeline stats will generate histograms and look for outliers based on standard deviation. Of course this will fail if you only have one subject (you can define the stddev for one data point!). The initial pipeline called for you to run fslview at this point. If you want to do so you will need to do so manually.

run_pipeline qc will generate html files for you to view. These will be placed in your output directory. Its up to each individual to figure out the best way to view these