3dNetCorr

Hi All

Just a quick question : I’m performing resting state analysis in a set of ROI using 3dNetCorr. I have two subjects rest fMRI pre and post surgery and I am trying to verify changes in connectivity inside a specific network of ROIs .I use the options -fish_z and ts_wb_Z but I am not able to figure out how to visualize the individual outputs in the …INDIV/ directory in the AFNI gui.

Can also someone explain to me how 3dNetCorr is different from @ROI_Corr_Mat and how is it performing the correlation? Do you think will be correct methodologically to run 3dttest++ on the …INDIV directory HEAD/BRIK contents?

Thank you for any suggestion and sorry if perhaps this has already been asked .

Hi-

Can also someone explain to me how 3dNetCorr is different from @ROI_Corr_Mat and how is it performing the correlation? Do you think will be correct methodologically to run 3dttest++ on the …INDIV directory HEAD/BRIK contents?

The Pearson ‘r’ matrices returned by @ROI_Corr_Mat and 3dNetCorr appear to be the same (to 4 decimal places); the Fisher Z transform in 3dNetCorr is Z = arctanh(r), and for some reason the Z value returned by @ROI_Corr_Mat is essentially the same (calculated with the log-version of the transform), multiplied by sqrt(N-3)… I guess 1/sqrt(N-3) is the standard error of the transformed Z; to be honest, I’m not sure why it is returned this way, and would have to check with the authors of the @ROI* script.

One other difference is that 3dNetCorr should stick any labels attached to regions in the output file. There are also a function for visualizing the output of 3dNetCorr as correlation matrices images, namely fat_mat_sel.py.

Just a quick question : I’m performing resting state analysis in a set of ROI using 3dNetCorr. I have two subjects rest fMRI pre and post surgery and I am trying to verify changes in connectivity inside a specific network of ROIs .I use the options -fish_z and ts_wb_Z but I am not able to figure out how to visualize the individual outputs in the …INDIV/ directory in the AFNI gui.

The outputs in the PREFIX_*_INDIV/ directory are the whole brain correlation maps (r transformed to Z, with that particular switch) of each ROI’s average time series with every voxel in the brain; you could overlay that data set on some anatomical underlay to see what voxels correlate highly with a given region, for example.

The ‘-fish_Z’ option means that the output *.netcc file contains the Fisher Z-transformed correlation matrix of the average time series of the ROIs (in addition to the Pearson values). The Pearson values are in the ‘CC’ (=correlation coefficient) matrix, and the Z-values are in the “FZ” (=Fisher Z) matrix. Each of these matrices could be viewed as jpgs as, for example:


# Pearson
$ fat_mat_sel.py -m "PREFIX_*netcc" -P 'CC' -A 1 -B 1 -T -o
# Fisher
$ fat_mat_sel.py -m "PREFIX_*netcc" -P 'FZ' -A 1 -B 1 -T -o

Does that help?

–pt

Thank you a lot for your answer this does really help! I discovered fat_mat_sel.py!

Last question (sorry) : is there a way that you may recall to have also the confidence interval in the output of 3dNetCorr or fat_mal_sel ? Like when using 1dCorrelate with each couple of ROIs it outputs the confidence interval.

I am using the new multimodal parcellation by Glasser et al. (Nature 2016) that includes 180 areas…

Thank you a lot again

Sooo, in looking at the guts of 1dCorrelate, there are two ways that confidence intervals are calculated:

  1. bootstrap simulations, and
  2. normal theory confidence intervals (based on the number of time points and correlation value).

I think it would be straightforward to steal these functions for 3dNetCorr. The question is-- what format to make the output? Right now, each there are 6 numerical columns output for 1dCorrelate, e.g.:


# Pearson correlation [n=195 #col=8]
# Name                         Name                          Value   BiasCorr   2.50%   97.50%  N: 2.50% N:97.50%
# ---------------------------  ---------------------------  -------- -------- -------- -------- -------- --------
  REST_corr_rz_000.nettsTR[0]  REST_corr_rz_000.nettsTR[1]  +0.69332 +0.69483 +0.62293 +0.76447 +0.61248 +0.75981
  REST_corr_rz_000.nettsTR[0]  REST_corr_rz_000.nettsTR[2]  +0.84149 +0.84071 +0.78730 +0.88519 +0.79497 +0.87817
  REST_corr_rz_000.nettsTR[0]  REST_corr_rz_000.nettsTR[3]  +0.73856 +0.73644 +0.66915 +0.78605 +0.66730 +0.79642
  REST_corr_rz_000.nettsTR[0]  REST_corr_rz_000.nettsTR[4]  +0.59145 +0.58879 +0.49465 +0.67321 +0.49182 +0.67580
  REST_corr_rz_000.nettsTR[0]  REST_corr_rz_000.nettsTR[5]  +0.68739 +0.68851 +0.59616 +0.76496 +0.60535 +0.75498
  REST_corr_rz_000.nettsTR[0]  REST_corr_rz_000.nettsTR[6]  +0.75181 +0.74840 +0.68784 +0.79939 +0.68350 +0.80707
  REST_corr_rz_000.nettsTR[0]  REST_corr_rz_000.nettsTR[7]  +0.65485 +0.65146 +0.56743 +0.71945 +0.56646 +0.72835

Right now, in terms of Pearson r values between average ROI time series, the 3dNetCorr just returns the equivalent of ‘Value’ (-> called ‘CC’ in NetCorr-ese). Would you just want 5 other matrices made/exported, containing the values of “BiasCorr”, “2.50%”, “97.50%”, “N: 2.50%”, and “N:97.50%” at each element? Also, in terms of the Fisher Z, then there would be another 5 values, basically Z-transform of each of the r values. So, is that useful for your processing goals?

Note: all of the above confidence intervals would only be calculated for the average ROI time series; I don’t think it’s feasible to do such for the WB correlation maps.

–pt

Hi Paul,

From vague recollections…

I think the sqrt(N-3) scalar is an adjustment for varying
degrees of freedom. It was probably included to correct
for the fact that different subjects have different amounts
of censoring, and might be based on this wikipedia entry.

  • rick

Intriguing… OK, thanks for pointing out.

–pt

Dear Paul

thank you again for your answer. I understand now. Regarding my analysis I am seeking changes inside a specific number of cortical masks (they are part of a known network), so I was more interested to roi-roi correlation. I suppose for my purpose I would use some loop within 1dCorrelate then.

Thank you again

OK… Just to be clear, the “correlation for the average ROI time series” with 3dNetCorr is the roi-to-roi correlation for which I was suggesting to output some of the above quantities. If I understand properly, that is what you were asking about?

The part that I don’t think it would be useful/feasible to calculate would be for average ROI time series to each voxel in the brain (-> “WB correlation maps”).

-pt