User Tools

Site Tools


public:standard_prep-script_and_its_components

Standard Prep-Script and Its Components

After you have followed the directions for downloading and renaming the raw data from the CD(s) as found on the downloading data page the following steps will help you to pre-process the data so that that data will be able to be viewed, verified for validity, and processed with a General Linear Model (GLM).

A sample/general script can be found at /jet/aguirre/Scripts/prep_Human_Raw.vbp

You may also view the sample script by clicking FIXME here.

Below, we will demonstrate how to modify this script for use with your raw data and cover them line-by-line.

Beginning

Most modifications will be done here

All occurances of “MyStudyName” should be replaced with the subject's study code, (subject's first initial + month + day + year + subject's last initial), e.g. X000000X

If the scan names following “FirstLoc=”, “MPRAGE1=”, “RawEPI”, and “raw=” are not exact the script will result in MANY errors. Double check these modifications before submitting the script for processing

LN1 SEQUENCENAME RawPrep_[Subject study code, e.g. X000000X]

LN2 DIR [full path to the directory containing your raw data beginning with /jet/aguirre/'study code'/]

LN4 PRIORITY [a number 1 - 4 determining the priority of processing of the script, generally 2, 1 if able to wait and be processed overnight]

LN6 globals FirstLoc=[number preceding “_localizer”]_localizer

LN7 globals MPRAGE=[number preceding “_t1”]_t1_mpr_AX_MPRAGE

  • If you have more than 1 MPRage
    1. duplicate this line for each additional scan
    2. make the names MPRage1, MPRage2,…

LN8 globals RawEPI=[full title of the single EPI scan, normally includes number + “_ep2d_pace”]

LN10 FILE scan=[subject code + “_” + scan number, e.g. “X000000X_01”] raw=[full title of the scan that includes “ep2d” and the number of TRs, e.g. “0100_ep2d_max_pace_160acq” shown after typing “ls” following the Renaming step of downloading data]

LNS11-15 same as LN10 except this is modified for scans #2-6

  • Duplicate the above lines if there are more than 6 BOLD scans and be sure to adjust the scan number (studyname_#)
  • If fewer than 6 BOLD scans were acquired, use the “#” symbol at the beginning of the line to “comment out” any lines that are extraneous and they will not be used during the processing of the script.

Settings

LN22 - no modification necessary

LN23 globals thresh= [value to threshold fMRI data, generally 200]

LN24 globals xa= [x value for the anatomical scan, generally 1]

LN25 globals ya= [y value for the anatomical scan, generally 1]

LN26 globals za= [z value for the anatomical scan, generally 1]

  • LNS 24-26 indicate that the anatomical scan is made up of 1mm3 voxels

LN27 globals xf= [x value for the functional scans, generally 3]

LN28 globals yf= [y value for the functional scans, generally 3]

LN29 globals zf= [z value for the functional scans, generally 3]

  • LNS 27-29 indicate that the functional scans are made up of 3mm3 voxels

LNS31-34 - Do NOT modify, these are globals specified for use throughout the rest of the script

LN36 “bb_anat= :!:

LN37 “bb_func= :!:

LN38 “bb_disp= :!:

Reset any previous analysis

This section converts the entire subject folder back to it's state prior to any script processing (a.k.a. the state directly after completing the downloading_data_from_cd_to_cfn_cluster_and_renaming.

Place the ”#” sign before lines that are irrelevant to the data. For example, LNs 50 & 51 should appear as:

 #runonce shellcommand "mv DTI/00* ./"
 #runonce shellcommand "rm -rf DTI"

if no DTI scans were completed as part of the scan protocol.

Prep anatomy

There should NOT be ANY modifications to this section

LNs 62 &63 are commented out since there are not currently any motion correction images being collected. However, they have been collected in the past. Therefore, these shellcommands remain in the scripts, but are currently 'commented out', in case they are needed in the future.

This section:

  1. Makes the Anatomy directory
  2. Makes the Models directory
  3. Converts the single EPI scan to a Functional.cub image by way of a functional.tes image, then removes the functional.tes
  4. Converts the MPRage to an Anatomical.cub image
  5. Moves the raw MPRage, localizer, and single EPI to the Anatomy/raw directory

Align origins of functional and anatomical data

LN79 Aligns the origin of the anatomical.cub with the functional.cub

LN80 Aligns the origin of the functional.cub with the anatomical.cub

  • The combination of these two commands guarantee that the two scans are exactly aligned

LN81 :!:

Perform normalization of anatomicals

Perform noise reduction, skull-stripping and inhomogeneity correction with FSL tools

Make the data directory, raw subdirectory, tes file from the raw, move the raw Siemens data to the raw subdirectory

There should NOT be ANY modifications to this section

These commands are run for each scan defined as a “FILE scan” in the beginning section.

LN125 Makes the scan directory

LN126 Makes the scan/raw directory

LN127 Converts the raw scan images to a .tes file

LN128 Moves the raw data to the scan/raw directory

Process the tes file

Create the average power spectrum and one-over-f file

Other useful scripts

A general script used for averaging several MPRages

  • /jet/aguirre/Scripts/prep_Human_MPRAGEs.vbp

A general script used to prep canine raw fMRI data

  • /jet/aguirre/Scripts/prep_Dog_RawData.vbp

Scripts used to prep fMRI, DTI, and Perfusion data

:!: Make general scripts soon to be added to /jet/aguirre/Scripts

  • Stock_CMP_Prep_new.vbp
  • V061908W.vbp

Questions/Concerns

If you have questions or concerns about the information found here or difficulty trouble-shooting a prep-script, please contact the author of this page, Amy Thomas, or another member of the Aguirre Lab.

public/standard_prep-script_and_its_components.txt · Last modified: 2010/07/03 18:09 by aguirreg