Sign inSign up

diannepat/scif_fsl

By diannepat

•Updated over 4 years ago

This is a container using the SCIF file system to access several tools based on FSL 5.X

Image
0

10K+

diannepat/scif_fsl repository overview

This Docker container implements a set of SCIF recipes in a BIDS base FSL 5.X package⁠. You can read about SCIF here: Sochat, V. (2018). The Scientific Filesystem (SCIF). GigaScience, 7(5), 1–17 http://doi.org/10.1093/gigascience/giy023/4931737⁠

See the Dockerfile⁠.

⁠Example Docker Commands

  • Get the scif usage message:

docker run -ti --rm diannepat/scif_fsl

  • Learn about what apps are in the container:

docker run -ti --rm diannepat/scif_fsl apps

  • Get a bash shell in the container:

docker run -ti --rm diannepat/scif_fsl shell

  • Request help for a particular app (roixtractor):

docker run -ti --rm diannepat/scif_fsl app roixtractor

  • Inspect the scif recipe used in the container for a particular app:

docker run -ti --rm diannepat/scif_fsl dump roixtractor

Download sfw.sh⁠ and put it in your path to facilitate running some of these Docker SCIF commands.

⁠Apps

The following scif apps are defined in this container:

deface_fs is an app based on Freesurfer's mri_deface. It removes identifiable features from a T1w image. This uses Freesurfer's deface tool, and incorporates necessary helper files, so that all the user has to do is to select and specify a T1w image to process. FSL 5.x tools are used to orient the image etc. A mask is generated of the region that has been removed, so the user can inspect, and if necessary, modify the results. The following docker command that should work (assuming the T1w image exists):

docker run -it --rm -v ${PWD}:/scif/data/deface diannepat/scif_fsl run deface sub-0162_anat_T1w.nii.gz

roixtractor is an app for extracting mean and max values for each roi in an atlas. The results are useful for choropleth-type analyses and visualizations⁠. The git repository for roixtractor⁠ includes all the atlas ROIS.

HO-CB is the atlas chosen in this example. It is the Harvard-Oxford cortical and subcortical atlases combined with a cerebellar atlas. There are 2 atlas choices: HO-CB and HCP-MMP1. In general, the HO-CB atlas is preferred. The volumetric extraction performed by roixtractor is not appropriate for the HCP-MMP1 atlas, and so the results of extraction from the HCP-MMP1 atlas should be taken with a huge grain of salt.

Using Docker, here's a sample run:

docker run -it --rm -v ${PWD}:/scif/data/roixtractor diannepat/scif_fsl run roixtractor run-01_IC-06_Russian_Unlearnable.nii 1.3 HO-CB

Output: A CSV file containing Mean & max values for each region that meets the criterion: e.g., HO-CB_run-01_IC-06_Russian_Unlearnable_1.3.csv A NIfTI file, containing the mean value for each region that meets criterion: e.g., HO-CB_run-01_IC-06_Russian_Unlearnable_1.3.nii.gz

This assumes the container is called diannepat/scif_fsl and that you are in a directory with the sample file run-01*. Download run-01_IC-06_Russian_Unlearnable.nii⁠.

⁠Wrapper Script

You can make it easier to work with this scif container by downloading the sfw.sh⁠ bash script to some location in your path. sfw.sh wraps the scif docker commands:

sfw.sh

Displays general scif help and a list of the apps in the container

If you provide one argument, it can be shell, pyshell, version, e.g.,

sfw.sh version

If you provide two arguments, they should be an action followed by the name of an app, e.g.,

sfw.sh help roixtractor

If you provide xtract as your first argument, then you can run roixtractor by providing the stats_img, stats threshold and atlas. This will generate a CSV and NIfTI image containing the above threshold regions (i.e., where the mean is greater than or equal to the chosen threshold) from the chosen atlas. For each such above-threshold region, the CSV will contain the mean and the max values. The NIfTI image will contain the mean value in each region. e.g.,

sfw.sh xtract run-01_IC-06_Russian_Unlearnable.nii 1.3 HO-CB

If you provide deface as your first argument, then you can run Freesurfer defacing. by providing the T1w NIfTI image to be defaced e.g.,

sfw.sh deface anat_T1w

Tag summary

Content type

Image

Digest

Size

498.9 MB

Last updated

over 4 years ago

docker pull diannepat/scif_fsl