CMRIF_preprocess.py - Aaronearlerichardson/CMRIF_preprocess GitHub Wiki

CMRIF_preprocess is a preprocessing script that allows for the user to substitute in any software packages they want for any process. It takes full advantage of BIDS formatting for intuitive dataset querying via the pybids module. The user may also use afni's sub-brick selection syntax while using fsl or freesurfer's preprocessing packages. It is recommended that users take a quick look at their tutorial. One can also use their documentation for reference.

WARNING: Because this repository continually updates, any edits made to this or any other script will be overwritten every time the instance is booted. If you want the changes to become permanent you must commit and then push your changes to this github page. If you are fixing bugs or issues feel free to push to the master branch. If you are making changes to this script because you want to personalize it for your lab, you have two options. The simple option is to just make a copy of the script and store it outside of the CMRIF_preprocess directory. The other option is to create your own github branch and push your changes there. Instructions on how to do this can be found here.

usage:

 CMRIF_preprocess.py [-h] [-i INPUT_DIR] [-verb] [-o OUTPUT_DIR]
                           [-ex [EXCLUDE [EXCLUDE ...]] | -in
                           [INCLUDE [INCLUDE ...]]]

arguments:

arguments:
  -h, --help            show this help message and exit
  -i INPUT_DIR, --input_dir INPUT_DIR
                        Input data directory(ies), Default: current directory
  -verb, --verbose      Verbosity
  -o OUTPUT_DIR, --output_dir OUTPUT_DIR
                        Output BIDS directory, Default: Inside current
                        directory
  -ex [EXCLUDE [EXCLUDE ...]], --exclude [EXCLUDE [EXCLUDE ...]]
                        Option to exclude scans based on either subject
                        number, scan run number, or echo number. This option
                        will import all files in the BIDS folder into the
                        BIDSLayout object except those listed here. For
                        example, if I wanted to import all files except
                        subject 12, run 3, echo 2, I would add to the command
                        "-ex s12r3e2". If subject 12 has only 3 runs, writing
                        "-ex s12r1 s12r2 s12r3" is the same as writing "-ex
                        s12". Mutually exclusive with the -in option.
  -in [INCLUDE [INCLUDE ...]], --include [INCLUDE [INCLUDE ...]]
                        Option to include scans based on either subject
                        number, scan run number, or echo number. This option
                        will only import files from the BIDS folder to the
                        BIDSLayout object if they are listed here. For
                        example, if I wanted to import only subject 12, run 3,
                        echo 2, I would add to the command "-in s12r3e2". If
                        subject 12 has only 3 runs, writing "-in s12r1 s12r2
                        s12r3" is the same as writing "-in s12". Mutually
                        eclusive with the -ex option.