Skip to content

Commit

Permalink
Merge pull request #11 from sct-pipeline/jv/improve_pervendor_figures
Browse files Browse the repository at this point in the history
jv/improve pervendor figures
  • Loading branch information
valosekj authored Apr 5, 2021
2 parents 0094d95 + 425e5e8 commit 6bd2b84
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 83 deletions.
51 changes: 35 additions & 16 deletions scripts/extract_normative_metrics.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,47 @@
#!/usr/bin/env python

# -------------------------------------------------------
# Extract qMRI metrics (FA, MD, AD, RD, MTR, MTsat) from
# individual ROIs/labels perlevel between C2 and C5
# ROIs/labels to process can be specified by input yml file
#
# Extracted metrics will be saved as *perlevel.csv files
# in results/perlevel directory
# Extract qMRI metrics (FA, MD, AD, RD, MTR, MTsat) for different ROIs/labels (SC, WM, GM, ...) along individual
# cervical levels (C2, C3, C4, C5)
#
# ROIs/labels to process can be specified by input yml file ('-yml-file' - option)
#
# Extracted metrics will be saved as *perlevel.csv files in "results/perlevel" directory
#
# USAGE:
# - parallel mode across multiple subjects (using SCT sct_run_batch function and extract_normative_metrics_wrapper.sh wrapper):
# sct_run_batch -jobs -1 -path-data ~/data-multi-subject/ -path-output ~/data-multi-subject_results -continue-on-error 1 -script scripts/extract_normative_metrics_wrapper.sh
# - same as above, but with yml file containing labels to process(passed by -script-args option):
# sct_run_batch -jobs -1 -path-data ~/data-multi-subject/ -path-output ~/data-multi-subject_results -continue-on-error 1 -script-args "-yml-file scripts/labels_to_process.yml" -script scripts/extract_normative_metrics_wrapper.sh
# - parallel mode across multiple subjects (using SCT sct_run_batch function and extract_normative_metrics_wrapper.sh
# wrapper):
# sct_run_batch
# -jobs -1
# -path-data ~/data-multi-subject/
# -path-output ~/data-multi-subject_results
# -continue-on-error 1
# -script scripts/extract_normative_metrics_wrapper.sh
#
# - same as above, but with yml file containing ROIs/labels to process(passed by '-script-args' option):
# sct_run_batch
# -jobs -1
# -path-data ~/data-multi-subject/
# -path-output ~/data-multi-subject_results
# -continue-on-error 1
# -script-args "-yml-file scripts/labels_to_process.yml"
# -script scripts/extract_normative_metrics_wrapper.sh
#
# (you can run the script only on some subjects, using -include flag, see sct_run_batch -h)
# (you can run the sct_run_batch script only on some subjects, using '-include flag', see sct_run_batch -h)
#
# - single subject mode with default labels/ROIs:
# extract_normative_metrics.py -path-data ~/data-multi-subject_results -sub sub-amu01
# - single subject mode with labels/ROIs defined by yml file:
# extract_normative_metrics.py -path-data ~/data-multi-subject_results -sub sub-amu01 -yml-file labels_to_process.yml
# - single subject mode (i.e., without parallelization using sct_run_batch) with default ROIs/labels:
# extract_normative_metrics.py
# -path-data ~/data-multi-subject_results
# -sub sub-amu01
#
# - single subject mode (i.e., without parallelization using sct_run_batch) with ROIs/labels defined by yml file:
# extract_normative_metrics.py
# -path-data ~/data-multi-subject_results
# -sub sub-amu01
# -yml-file labels_to_process.yml
#
# Authors: Jan Valosek, Julien Cohen-Adad
# -------------------------------------------------------
#

import os
import sys
Expand Down
Loading

0 comments on commit 6bd2b84

Please sign in to comment.