calculating correlation btw WM and CSF ROIs

Hi all,

I want to calculate the correlation value for two sets of mean time-series from WM and CSF ROIs. I’ve used “3dmaskave” using the following command to extract mean time-series of both ROIs:

3dmaskave -q -mask CSF_mask.nii.gz RSfMRI_skullStrip.nii.gz > RSfMRI_skullStrip_meanTS_CSF.1D

and then used “1dCorrelate” using the following commadn to calclate the correlation value:

1dCorrelate -s RSfMRI_skullStrip_meanTS_CSF.1D RSfMRI_skullStrip_meanTS_WM.1D >> WM_CSF_meanTS_SpearmancorrVals.txt

What I want to do now, is to drop the first 10 volumes from each resting-state scan before calculating the correlation values. I was thinking of doing this in either steps (3dmaskave or 1dCorrelate) but don’t see to find a flag which drops selected volumes. Could anyone suggest a way to this?

Thanks a lot,
-Mojdeh

Hi again,

I think I figured it out, I used RSfMRI_skullStrip.nii.gz[9…299] as the input to 3dmaskave.

You have figured it out! Except for a couple of details:

(1) You want to start with 10 to skip the first 10 time points

(2) Since the output 1D files are columns (each row is one time point), you want to select a subset of rows, which would be done using the subscripts ‘{10…$}’ – here, $ means the last row and the curly braces {.} are used for row subset selection – the square brackets [.] are used for column subset selection. Since $ is a special character to the command line shell, you will need to put the subscript inside single quotes marks, as I have shown here.