Skip to main content
https://badge.fury.io/py/freesurfer_pp_moc.svg https://travis-ci.org/FNNDSC/freesurfer_pp_moc.svg?branch=master https://img.shields.io/badge/python-3.5%2B-blue.svg

Abstract

freesurfer_pp_moc.py is a dummy FreeSurfer plugin / container that is prepopulated with the results of several a priori FreeSurfer runs. For a given run, this script will simply copy elements of one of these prior runs to the output directory.

Synopsis

python freesurfer_pp_moc.py                                         \
    [-v <level>] [--verbosity <level>]                          \
    [--version]                                                 \
    [--man]                                                     \
    [--meta]                                                    \
    [--copySpec <copySpec>]                                     \
    [--ageSpec <ageSpec>]                                       \
    <inputDir>                                                  \
    <outputDir>

Run

This plugin can be run in two modes: natively as a python package or as a containerized docker image. The PyPI mode is largely included for completeness sake and only useful if run against some pre-processed tree that exists in the filesystem.

Using PyPI

You probably do not want to run the PyPI version unless you are a developer! Mostly likely you want the docker containerized run – see the next section.

To run from PyPI, simply do a

pip install freesurfer_pp_moc

and run with

freesurfer.py --man /tmp /tmp

Using docker run

The real utility of this package is to run it containerized against bundled data that is packed into the container.

Assign an “input” directory to /incoming and an “output” directory to /outgoing. Note that the “input” directory is effectively ignored by this plugin, but is required. Make sure that the host $(pwd)/out directory is world writable!

In the simplest sense, the plugin can be run with

mkdir in out && chmod 777 out
docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-freesurfer_pp_moc freesurfer_pp_moc.py                    \
        /incoming /outgoing

which will copy only the internal stats directory from a 10-yr/06-mo/01-da subject to the output. By specifying a --copySpec stats,3D,sag,cor,tra several additional directories containing png image frames through parcellated sagittal, coronal, and transverse (axial) planes as well as multiple 3D images are also copied.

Examples

Check available pre-processed runs

To get a listing of the internal tree of already processed and available FreeSurfer choices:

docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-freesurfer_pp_moc freesurfer_pp_moc.py            \
        -T ../preprocessed                                          \
        /incoming /outgoing

This will print a tree of the available choices of preprocessed data in a directory tree.

Copy the default for a selected pre-processed run

Select one run, say the 08-yr/07-mo/16-da and specify that to copy:

docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-freesurfer_pp_moc freesurfer_pp_moc.py            \
        -a 08-07-16 \
        /incoming /outgoing

Simulate a processing delay

To simulate a processing delay, specify some time in seconds:

docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-freesurfer_pp_moc freesurfer_pp_moc.py            \
        -a 08-07-16                                                 \
        -P 20                                                       \
        /incoming /outgoing

Explicitly copy all the data including images from a pre-processed run

To copy all the image directories from the 10-yr/06-mo/01-da subject,

docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-freesurfer_pp_moc freesurfer_pp_moc.py            \
        -a 10-06-01                                                 \
        -c stats,sag,cor,tra,3D                                     \
        /incoming /outgoing

Metadata

Release files for freesurfer-pp-moc 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for freesurfer-pp-moc 2.2.2
File Size Uploaded
freesurfer_pp_moc-2.2.2.tar.gz 6.0 kB Details

Release files / freesurfer_pp_moc-2.2.2.tar.gz

Download URL freesurfer_pp_moc-2.2.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c268f90f746abe077b8651f4608578c1a0269745e61379e07cc21f3b1b894672
BLAKE2b-256 checksum
How to use checksums
4f273b518abb5dcbd586655bfc403d637491e11942cde6587719bce1dd71480a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

2.2.2 This release

1 release file

2.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page