AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
April 27, 2017 10:58AM
Hi, Sondos-

My question has to do with 3dRSFC.
I have resting date fmri data from a single subject.
I then used the following command:
3dRSFC -prefix PREFIX 0.01 0.1 INPUT_NAME
What this does is that it acts as a bandpass filter in order to filter out too high or low signal intensities. It then outputs the alff, falff malff, rsFA. and some other parameters.

Agreed. For each time series, a frequency-based parameter is calculated. Note that at present, this will assume that the time series have not been censored, as the Fourier-based bandpassing assumes equal durations between time points (i.e., in FMRI, a single TR between points, whereas censoring would effectively put multiple TRs between non-censored points). On a technical note, 3dRSFC is basically a wrapper around 3dBandpass functionality.

The output of this however were values that were assigned to each voxel. I was expecting to get a single value (average for all the voxels), but instead the program assigns a single value to each voxel.
It is a voxelwise calculation-- each time series is Fourier transformed into the frequency domain, and then various things calculated.

My question now is, how would I get statistics in order to make a comparison between different outputs?
In a group setting, one can do voxelwise approaches like ttests, for example. You said you have just a single subject? What is the aim of the study/analysis?

A paper I read said the following which still has me confused: "In our previous work, the ALFF of each voxel was divided by the individual global mean of ALFF within a brain-mask, which was obtained by removing the tissues outside the brain using software MRIcro "
-> that would be the mALFF quantity, which is already automatically calculated within the masked region in the data set.

where does one get a global mean? Is that just a brain with the skull extracted?
Yep, is your data brain-extracted already? You could input a "-mask ...", which would probably be preferable to using "-automask" on resting state data (as the values are often around zero, anyways, so the automasking might be pretty rough).

which can be obtained by BET from FSL?
Well, that wouldn't be my first choice function... but the main thing would be to make a brain mask, yes; if you're using afni_proc.py to process your FMRI data (highly recommended!), then there would likely be a brain mask created during the processing.

Even then... how do I do this? given I have a bunch of output files that are images of the brain and not a single value.
You still get voxelwise values; but again, mALFF is automatically calculated already.

Lastly, the next step in this paper was:
"The individual data was transformed to Z score (i.e., minus the global mean value and then divided by the standard deviation) other than simply being divided by the global mean."
Again, how would I do this? It sounds really straight-forward, but it's so confusing to me.

So, I looked up the paper from the quotes, and so I believe it is Zou et al. (2008, J Neurosci Meth). Initially, I though the Z-transform meant was the Fisher Z transform for variables, but that isn't the case (which is good, because the Fisher Z would have problems for all the quantities described here). In the Zou et al. paper, they refer to the fact that they transformed each quantity x_i to it's normalized Z_i value as:
Z_i = (x_i - {mean of all xs}) / {stdev of all xs}.

This would be a tcsh executable code to do that, for example with a data set of resting state ALFF values and a whole brain mask:
#!/bin/tcsh

# user input sets
set my_dset = "REST_filt_ALFF+orig"
set my_mask = "mask+orig"

# calculate summary stats within brain mask
set dset_mean  = `3dBrickStat        \
                    -mean            \
                    -mask $my_mask   \
                    $my_dset`

set dset_stdev = `3dBrickStat        \
                    -stdev           \
                    -mask $my_mask   \
                    $my_dset`

echo "\n\n"
echo "The mean of values within the mask is:   $dset_mean"
echo "The stdev of values within the mask is:  $dset_stdev"
echo "\n"

# get new dset of values
3dcalc \
    -echo_edu \
    -a $my_dset \
    -b $my_mask \
    -expr "step(b)*(a - $dset_mean) / ($dset_stdev)" \
    -prefix NEW_DSET_Z
You could copy this text into a file called, say, "do_zcalc.tcsh", and then set whatever file names are appropriate for your data sets, and then execute it as `tcsh do_zcalc.tcsh`.

ps. I'm trying to follow the flowchart presented by FATCAT here: [afni.nimh.nih.gov].
... a dangerous pastime.

But I'm still confused as to how they obtained the statistics? how would I obtain values which I can compare in a paper? And would I have to perform a t-test on it?
To be honest, this part would confuse me as well if there is only one subject involved in the study. More info would be required. But this is separate from the technical points of calculating quantities-- it's much easier for me to offer advice on the calculating, rather than on the interpreting!

Any assistance would be greatly appreciated! I've been struggling with this for quite some time.
Just remember- you're never alone with the AFNI Message Board.

--pt



Edited 1 time(s). Last edit at 04/27/2017 10:59AM by ptaylor.
Subject Author Posted

3dRSFC

sondosayyash April 27, 2017 09:54AM

Re: 3dRSFC

ptaylor April 27, 2017 10:58AM

Re: 3dRSFC

sondosayyash May 04, 2017 11:36AM

Re: 3dRSFC

ptaylor May 04, 2017 11:40AM

Re: 3dRSFC

sondosayyash May 07, 2017 01:50AM

Re: 3dRSFC

ptaylor May 08, 2017 11:56AM

Re: 3dRSFC

melissaneuro September 12, 2022 06:39AM

Re: 3dRSFC

ptaylor September 12, 2022 08:01PM