Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document running instructions for WMA #68

Closed
wants to merge 9 commits into from
62 changes: 62 additions & 0 deletions docs/TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,29 @@ for performing whole-brain tractography parcellation. The outputs of that script
* a parcellation of the entire white matter into 800 fiber clusters
* a parcellation of anatomical fiber tracts organized according to the brain lobes they connect

Here is an abridged snapshot of the output directory (you should examine the `*csv` files):

```python
wma800/
└── sub-1122_ses-1_dir-416
├── AnatomicalTracts
│   └── diffusion_measurements_anatomical_tracts.csv
├── FiberClustering
│   ├── InitialClusters
│   ├── OutlierRemovedClusters
│   ├── SeparatedClusters
│   │   ├── diffusion_measurements_commissural.csv
│   │   ├── diffusion_measurements_left_hemisphere.csv
│   │   ├── diffusion_measurements_right_hemisphere.csv
│   │   ├── tracts_commissural
│   │   ├── tracts_left_hemisphere
│   │   └── tracts_right_hemisphere
│   └── TransformedClusters
└── TractRegistration
└── sub-1122_ses-1_dir-416
└── output_tractography
```


Configuration:

Expand All @@ -560,13 +583,52 @@ Consult `wm_apply_ORG_atlas_to_subject.sh --help` to know the details of these p

Run it:

##### Through Luigi pipeline

```bash
export LUIGI_CONFIG_PATH=/path/to/dwi_pipe_params.cfg

exec/ExecuteTask --task Wma800 \
--bids-data-dir /data/pnl/DIAGNOSE_CTE_U01/rawdata -c 1001 --dwi-template sub-*/ses-01/dwi/*_dwi.nii.gz
```

##### On a PNL workstation physically or through NoMachine

```
NEW_SOFT_DIR=/rfanfs/pnl-zorro/software/pnlpipe3/
source ${NEW_SOFT_DIR}/bashrc3

wm_apply_ORG_atlas_to_subject.sh \
-i /path/to/your.vtk \
-o /path/to/output/dir/ \
-a ${NEW_SOFT_DIR}/ORG-Atlases-1.2 \
-s ${NEW_SOFT_DIR}/Slicer-4.10.2-linux-amd64/SlicerWithExtensions.sh \
-m "${NEW_SOFT_DIR}/Slicer-4.10.2-linux-amd64/SlicerWithExtensions.sh --launch FiberTractMeasurements" \
-n 8 -c 2 -d 1
```

The same command applies for running it on PNL's GRX node: `dna007.partners.org` except a change in the software directory:

> NEW_SOFT_DIR=/data/pnl/soft/pnlpipe3/

You should consult [SlicerDMRI/whitematteranalysis](https://github.com/SlicerDMRI/whitematteranalysis) repository
for meaning of the above arguments.

##### Through SSH

Just append the `-x 1` flag to the above command to enable virtual X server:

```
wm_apply_ORG_atlas_to_subject.sh \
...
-n 8 -c 2 -d 1 -x 1
```

However, running it through SSH requires availability of `xvfb-run` on that server--may it be a PNL workstation or a GRX node.
The good news is that we have already installed `xorg-x11-server-Xvfb` in most servers. So you should be all set.
But if you find `xvfb-run`'s absence, reach out to PNL engineers for help.
Lastly, you can use the same `-x 1` flag to run it through `bsub` on `pri_pnl` queue in ERIS cluster.



# Fs2Dwi pipeline
Expand Down