Deprecated scripts

cross_bold_pp

generic EPI (BOLD) pre-processing

Usage: cross_bold_pp_<version>.csh <params file> [instructions_file]

Examples:

cross_bold_pp_161012.csh VB16168.params
generic_cross_bold_pp_090115.csh VB16168.params

cross_bold_pp_130702.csh

Required parameters

Variable

Values

Description

patid

<str>

unique identifier for current subject/session

irun

<str array>

list of run folders

fstd

<int array>

list of scan numbers that map to run folders

mprs

<int array>

list of mprage scan numbers

target

<img>

atlas to be used for alignment

go

0,1

if calls should be executed (if 0, statements will only be printed, not executed)

nx

<int>

number of voxels on the x-axis

ny

<int>

number of voxels on the y-axis

skip

<int>

number of pre-steady state frames

TR_vol

<flt>

time per frame (s)

TR_slc

<flt>

time per slice (s) (set to 0 to have it computed)

epidir

0,1

direction of EPI slices (0 = inferior to superior, 1 = superior to inferior)

economy

<int>

level of removal for intermediate files created during execution (see table below)

epi2atl

0,1,2

if EPI to atlas transform is required (0 = no transform, 1 = transform to 333 space, 2 = skip to resampling step)

normode

0,1

if per-frame volume intensity should be modified

day1_patid

<str>

patient directory for first session (if patid is not patient’s first session)

day1_path

<str>

path to day1 atlas directory (required if day1_patid is set)

uwrp_cmnd

<str>

script to use for unwarping

rsam_cmnd

<str>

script to use for resampling

Economy value

Files to be removed

> 2

original bold run images

> 3

frame-aligned images (_faln)

> 4

cross-realigned avg images (_r3d_avg or xr3d_BC_avg if $BiasField) (only if $epi2atl == 0)

Field map correction variables (required)

Variable

Values

Description

Option 1 (Measured field map - gradient echo)

gre

<int array>

gradient echo measured field map scan numbers (magnitude image should be first, followed by phase image)

delta

<flt>

difference between field map echo times (ms)

TE_vol

<int>

echo time (ms)

Option 2 (basis_opt field map)

FMmean

<img>

mean field map image

FMBases

<img>

??

Optional parameters

Tip

Although tse and pdt2 are optional, you should specify one or the other if you have them in order to get a better registration to atlas.

Variable

Values

Default

Description

tse

<int array>

list of tse scan numbers

pdt2

<int array>

list of proton-density weighted scan numbers

scrdir

<str>

scratch directory to be

sorted

0,1

0

if dcm sort has already been run

MB

0,1

0

skip slice timing correction and debanding

sx

<int>

1

unpacked x-dimension squeeze factor (unpack_4dfp)

sy

<int>

1

unpacked y-dimension squeeze factor (unpack_4dfp)

E4dfp

0,1

0

if 4dfp files already exist (skips dcm_to_4dfp)

use_anat_ave

0,1

0

use _anat_ave epi image (default is _func_vols_ave)

min_frames

<int>

240

minimum number of remaining frames after scrubbing for participant to be included

interleave

-S

interleave

sequential slice acquisition (frame_align_4dfp)

MBfac

<int>

1

multiband factor

anat_aveb

<flt>

0

run_dvar_4dfp preblur in mm (for small voxels, set to 10mm)

anat_avet

<flt>

(compute)

run_dvar_4dfp criterion (set excessively high to skip DVARS censoring)

cross_day_nostretch

0,1

0

disable stretch for cross-day transform

Gad

0,1

0

if gadolinium contrast was used

Additional optional parameters

Warning

Only specify the following variables if the action is desired. They will happen if you specify them at all (even if you set them to 0).

Variable

Description

goto_UNWARP

immediately go to unwarp step

epi_zflip

flip z when unpacking (unpack_4dfp)

Siemens_interleave

enables Siemens interleave order (frame_align_4dfp)

nounpack

skips unpacking step

Processing steps

(Show/Hide Details)

  • Make atlas transformed EPI anat_ave and t2w in 111, 222, and 333 atlas space (t4img_4dfp)

  • Compute field mapping correction ($uwrp_cmnd)

  • Compute and apply unwarped epi to atlas transform (imgreg_4dfp, t4_mul, t4img_4dfp)

  • Resample unwarped images ($rsam_cmnd)

  • Make average atlas-aligned, unwarped image (actmapf_4dfp)

cross_bold_pp_121215.csh

Required parameters

Variable

Values

Description

patid

<str>

unique identifier for current subject/session

target

<img>

atlas to be used for alignment

irun

<str array>

list of run folders

fstd

<int array>

list of scan numbers that map to run folders

mprs

<int array>

list of mprage scan numbers

go

0,1

if calls should be executed (if 0, statements will only be printed, not executed)

nx

<int>

number of voxels on the x-axis

ny

<int>

number of voxels on the y-axis

skip

<int>

number of pre-steady state frames

TR_vol

<flt>

time per frame (s)

TR_slc

<flt>

time per slice (s) (set to 0 to have it computed)

epidir

0,1

direction of EPI slices (0 = inferior to superior, 1 = superior to inferior)

economy

<int>

level of removal for intermediate files created during execution (see table below)

epi2atl

0,1,2

if EPI to atlas transform is required (0 = no transform, 1 = transform to 333 space, 2 = skip to resampling step)

normode

0,1

if per-frame volume intensity should be modified

Economy value

Files to be removed

> 2

original bold images

> 3

frame-aligned images (_faln)

> 4

debanded images (_faln_dbnd) (only if $epi2atl == 0)

> 6

normalized images (_norm)

Optional parameters

Tip

Although tse and pdt2 are optional, you should specify one or the other if you have them in order to get a better registration to atlas.

Variable

Values

Default

Description

tse

<int array>

list of tse scan numbers

pdt2

<int array>

list of proton-density weighted scan numbers

t1w

<int array>

list of t1w scan numbers

scrdir

<str>

scratch directory to be

to_MNI152

0,1

0

transform to MNI152 atlas space

day1_patid

<str>

patient directory for first session (if patid is not patient’s first session)

day1_path

<str>

path to day1 atlas directory (required if day1_patid is set)

sorted

0,1

0

if dcm sort has already been run

Additional optional parameters

Warning

Only specify the following variables if the action is desired. They will happen if you specify them at all (even if you set them to 0).

Variable

Description

Siemens_interleave

enables Siemens interleave order (frame_align_4dfp)

Processing steps

  • Convert bold run dicoms to 4dfp format (dcm_to_4dfp)

  • Covert mosiac format to volume (unpack_4dfp)

  • Correct slice timing and odd/even slice intensities (frame_align_4dfp, deband_4dfp)

  • Motion correction via rigid body transform of each volume to reference frame (cross_realign3d_4dfp)

  • Compute and apply mode 1000 normalization (normalize_4dfp, scale_4dfp)

  • Extract/format movement data from on cross_realign3d_4dfp output (mat2dat)

  • Extract EPI first frame (anatomy) image (paste_4dfp)

  • Move anatomy image (anat_ave) to atlas directory

  • Compute cross-session BOLD atlas transform if $day1_patid specified for current patid (cross_day_imgreg_4dfp)

  • Convert MPRAGE dicoms to 4dfp format (dcm_to_4dfp)

  • Compute MPRAGE atlas transforms (avgmpr_4dfp)

  • Compute EPI atlas transform

(Show/Hide Details)

  • Make atlas transformed EPI anat_ave in 111, 222, and 333 (711-2B or MNI152 if $to_MNI152) atlas space (t4img_4dfp)

  • Make cross-realigned atlas-transformed resampled BOLD 4dfp stacks (t4_xr3d_4dfp)

generic_cross_bold_pp_090115

Required parameters

Variable

Values

Description

patid

<str>

unique identifier for current subject/session

irun

<str array>

list of run folders

fstd

<int array>

list of scan numbers that map to run folders

mprs

<int array>

list of mprage scan numbers

target

<img>

atlas to be used for alignment

go

0,1

if calls should be executed (if 0, statements will only be printed, not executed)

nx

<int>

number of voxels on the x-axis

ny

<int>

number of voxels on the y-axis

skip

<int>

number of pre-steady state frames

TR_vol

<flt>

time per frame (s)

TR_slc

<flt>

time per slice (s) (set to 0 to have it computed)

epidir

0,1

direction of EPI slices (0 = inferior to superior, 1 = superior to inferior)

economy

<int>

level of removal for intermediate files created during execution (see table below)

epi2atl

0,1,2

if EPI to atlas transform is required (0 = no transform, 1 = transform to 333 space, 2 = skip to resampling step)

normode

0,1

if per-frame volume intensity should be modified

Economy value

Files to be removed

> 2

original bold images

> 3

frame-aligned images (_faln)

> 4

debanded images (_faln_dbnd) (only if $epi2atl == 0)

> 6

normalized images (_norm)

Optional parameters

Tip

Although tse and pdt2 are optional, you should specify one or the other if you have them in order to get a better registration to atlas.

Variable

Values

Default

Description

tse

<int array>

list of tse scan numbers

pdt2

<int array>

list of proton-density weighted scan numbers

t1w

<int array>

list of t1w scan numbers

scrdir

<str>

scratch directory to be

sorted

0,1

0

if dcm sort has already been run

MB

0,1

0

skip slice timing correction and debanding

sx

<int>

1

unpacked x-dimension squeeze factor (unpack_4dfp)

sy

<int>

1

unpacked y-dimension squeeze factor (unpack_4dfp)

E4dfp

0,1

0

if 4dfp files already exist (skips dcm_to_4dfp)

interleave

-S

sequential slice acquisition (frame_align_4dfp)

MBfac

<int>

1

multiband factor

day1_patid

<str>

patient directory for first session (if patid is not patient’s first session)

day1_path

<str>

path to day1 atlas directory (required if day1_patid is set)

cross_day_nostretch

0,1

0

disable stretch for cross-day transform

Gad

0,1

0

if gadolinium contrast was used

Additional optional parameters

Warning

Only specify the following variables if the action is desired. They will happen if you specify them at all (even if you set them to 0).

Variable

Description

epi_zflip

flip z when unpacking (unpack_4dfp)

Siemens_interleave

enables Siemens interleave order (frame_align_4dfp)

nounpack

skips unpacking step

Processing steps

  • Convert bold run dicoms to 4dfp format (dcm_to_4dfp)

  • Covert mosiac format to volume – if not $nounpack (unpack_4dfp)

  • Correct slice timing and odd/even slice intensities – if not $MB (frame_align_4dfp, deband_4dfp)

  • Motion correction via rigid body transform of each volume to reference frame (cross_realign3d_4dfp)

  • Compute and apply mode 1000 normalization (normalize_4dfp, scale_4dfp)

  • Extract/format movement data from on cross_realign3d_4dfp output (mat2dat)

  • Extract EPI first frame (anatomy) image (paste_4dfp)

  • Move anatomy image (anat_ave) to atlas directory

  • Compute cross-session BOLD atlas transform if $day1_patid specified for current patid (cross_day_imgreg_4dfp)

  • Convert MPRAGE dicoms to 4dfp format (dcm_to_4dfp)

  • Compute MPRAGE atlas transforms (mpr2atl1_4dfp with first mpr if $Gad, otherwise avgmpr_4dfp)

  • Compute EPI to atlas transform

  • Compute EPI atlas transform

(Show/Hide Details)

  • Make atlas transformed EPI anat_ave in 111, 222, and 333 atlas space (t4img_4dfp)

  • Make cross-realigned atlas-transformed resampled BOLD 4dfp stacks (t4_xr3d_4dfp)

fcMRI_preproc

fcMRI preprocessing including nuisance variable regression.

Attention

fcMRI_preproc assumes successful completion of BOLD preprocessing (cross_bold_pp).

Usage: fcMRI_preproc_<version>.csh <params file> [instructions file]

Examples:

fcMRI_preproc_161012.csh VB16168.params
fcMRI_preproc_090115.csh VB16168.params

fcMRI_preproc_140413.csh

Required parameters

Variable

Values

Description

patid

<str>

unique identifier for current subject/session

srcdir

<str>

source directory path (contains run directories)

workdir

<str>

working directory path

TR_vol

<flt>

time per frame (s)

skip

<int>

number of pre-steady state frames

fcbolds

<array>

list of bold run folders

Optional parameters

Variable

Values

Default

Description

FCdir

<str>

FCmaps

output directory name

anat_aveb

<flt>

10

run_dvar_4dfp preblur in mm (for small voxels, set to 10mm)

anat_avet

<flt>

7

run_dvar_4dfp criterion

FWHM

<int>

6

full-width half maximum for spatial blur

MB

0,1

0

skip slice timing correction and debanding

conc

<str>

pre-existing conc file to use

task_regressor

<str>

optional externally supplied task regressor

noGSR

1

0

suppress global signal (WB) regression

Processing steps

  • Create conc file (conc_4dfp) and move it to FCdir

  • Compute defined mask and apply it (compute_defined_4dfp, maskimg_4dfp)

  • Compute frame censoring (DVARS) (run_dvar_4dfp)

  • Compute initial sd1 mean (var_4dfp, qnt_4dfp)

  • Make movement regressors for each bold run (mat2dat)

  • Make whole brain regressors including the 1st derivative (qnt_4dfp)

  • Make ventricle and bilateral white matter regressors and their derivatives (qnt_4dfp)

  • Paste nuisance regressors together (including task_regressor if supplied)

  • Remove nuisance regressors out of volumetric time series (glm_4dfp)

  • Temporal bandpass filter with bh = .1 and oh = 2 (bandpass_4dfp)

  • Spatial blur with f_half = 4.413/$FWHM (gauss_4dfp)

fcMRI_preproc_130715.csh

Params file variables

Variable

Values

Description

patid

<str>

unique identifier for current subject/session

srcdir

<str>

source directory path (contains run directories)

fcbolds

<array>

list of bold run folders

Instructions file variables

Variable

Values

Description

FCdir

<str>

output directory name

FSdir

<str>

freesurfer directory containing mri/aparc+aseg.mgz

MB

0,1

skip slice timing correction and debanding

conc

<str>

pre-existing conc file to use

task_regressor

<str>

optional externally supplied task regressor

noGSR

1

suppress global signal (WB) regression

anat_aveb

<flt>

run_dvar_4dfp preblur in mm (for small voxels, set to 10mm)

anat_avet

<flt>

run_dvar_4dfp criterion

CSF_lcube

<int>

cube dimension (in voxels) used by qntv_4dfp for CSF (recommended: 3)

CSF_sd1t

<flt>

threshold CSF sd1 image (recommended: 25)

CSF_svdt

<flt>

limit regressor covariance condition number to (1/{})^2 for CSF (recommended: .2)

WM_lcube

<int>

cube dimension (in voxels) used by qntv_4dfp for WM (recommended: 5)

WM_svdt

<flt>

limit regressor covariance condition number to (1/{})^2 for WM (recommended: .15)

fmtfile

<str>

format file

bpss_params

<array>

options for bandpass_4dfp (only -E,M,F specified by default; no default bands)

blur

<flt>

f_half for spatial blur

Processing steps

  • Generate FS masks (results in ../atlas) (Generate_FS_Masks_AZS.csh)

  • Create conc file (conc_4dfp) and move it to FCdir

  • Compute frame censoring (DVARS) (run_dvar_4dfp) and create avg censored image – only if no $fmtfile specified

  • Compute defined mask and apply it (compute_defined_4dfp, maskimg_4dfp)

  • Compute initial sd1 mean (var_4dfp, qnt_4dfp)

  • Make timeseries zero mean (var_4dfp)

  • Make movement regressors for each bold run (mat2dat)

  • Temporal bandpass filter using $bpss_params (bandpass_4dfp)

  • Make whole brain regressors including the 1st derivative (qnt_4dfp)

  • Make extra-axial CSF regressors (maskimg_4dfp)

  • Make venticle movement_regressors (qntv_4dfp)

  • Make white matter regressors (qntv_4dfp)

  • Paste nuisance regressors together (including task_regressor if supplied)

  • Pass final set of nuisance regressors (omitting WB and WB derivative) through covariance -D250

  • Remove nuisance regressors out of volumetric time series (glm_4dfp)

  • Spatial blur with f_half = $blur if specified (gauss_4dfp)

fcMRI_preproc_090115H.csh

Hallquist compliant version of fcMRI_preproc_090115.csh

Params file variables

Variable

Values

Description

patid

<str>

unique identifier for current subject/session

srcdir

<str>

source directory path (contains run directories)

workdir

<str>

working directory path

fcbolds

<array>

list of bold run folders

Instructions file variables

Variable

Values

Description

FCdir

<str>

output directory name

MB

0,1

skip slice timing correction and debanding

conc

<str>

pre-existing conc file to use

task_regressor

<str>

optional externally supplied task regressor

noGSR

1

suppress global signal (WB) regression

noWM

1

supress WM regression

movement_regressors

raw,bpss,none

??

Processing steps

  • Create conc file (conc_4dfp) and move it to FCdir

  • Compute defined mask and apply it (compute_defined_4dfp, maskimg_4dfp)

  • Compute initial sd1 mean (var_4dfp, qnt_4dfp)

  • Spatial blur with f_half = .735452 (gauss_4dfp)

  • Temporal bandpass filter with bh = .1 and oh = 2 (bandpass_4dfp)

  • Make movement regressors for each bold run (mat2dat) (if $movement_regressors is not “none”)

  • Make whole brain, ventricle, and bilateral white matter regressors (qnt_4dfp)

  • Paste nuisance regressors together (including task_regressor if supplied)

  • Pass final set of nuisance regressors (omitting WB and WB derivative) through covariance -D500

  • Remove nuisance regressors out of volumetric time series (glm_4dfp)

fcMRI_preproc_090115.csh

Params file variables

Variable

Values

Description

patid

<str>

unique identifier for current subject/session

srcdir

<str>

source directory path (contains run directories)

workdir

<str>

working directory path

fcbolds

<array>

list of bold run folders

Instructions file variables

Variable

Values

Description

FCdir

<str>

output directory name

MB

0,1

skip slice timing correction and debanding

conc

<str>

pre-existing conc file to use

task_regressor

<str>

optional externally supplied task regressor

noGSR

1

suppress global signal (WB) regression

Processing steps

  • Create conc file (conc_4dfp) and move it to FCdir

  • Compute defined mask and apply it (compute_defined_4dfp, maskimg_4dfp)

  • Compute initial sd1 mean (var_4dfp, qnt_4dfp)

  • Spatial blur with f_half = .735452 (gauss_4dfp)

  • Temporal bandpass filter with bh = .1 and oh = 2 (bandpass_4dfp)

  • Make movement regressors for each bold run (mat2dat)

  • Make whole brain, ventricle, and bilateral white matter regressors (qnt_4dfp)

  • Paste nuisance regressors together (including task_regressor if supplied)

  • Remove nuisance regressors out of volumetric time series (glm_4dfp)

seed_correl

compute multi-volume correlation maps

Attention

seed_correl assumes successful completion of BOLD preprocessing (cross_bold_pp) and fcMRI preprocessing (fcMRI_preproc).

Usage: seed_correl_<version>.csh <parameters file> [instructions] [options]

seed_correl_140413.csh

seed_correl_130715.csh

seed_correl_090115.csh