Sharing script snippets

Submitted by YAN Chao-Gan on

Dear all,

I would like to share script snippets here. Compared with the shared programs at http://rfmri.org/Programs_YAN, these snippets are less documented and may have no support. In addition, these snippets require the readers have a relative good programming background. In a long run, I will improve some of them into better documented programs, or even include them into well-organized toolboxes, such as DPARSF and DPABI. Please install DPABI first to use the following scripts.

1. Apply realign parameters (rp*.txt generated by SPM) to grey matter, white matter and CSF images. Buy doing so, one could evaluate the partial voluming effects on BOLD signal. These script is written for a porject of Yan, C.G., Cheung, B., Kelly, C., Colcombe, S., Craddock, R.C., Di Martino, A., Li, Q., Zuo, X.N., Castellanos, F.X., Milham, M.P., 2013. A comprehensive assessment of regional variation in the impact of head micromovements on functional connectomics. Neuroimage 76, 183-201. However, we didn't include this part into the final paper. y_ApplyHeadMotionToGMWMCSFImages.m

2. Calculate the voxel-to-voxel mean iFC (or called Global Correlation, GCOR, in Saad et al., 2013). We calculated the all voxel-to-voxel mean iFC as follows: 1) normalize the time courses of all the voxels to zero mean and unit variance; 2) calculate the mean signal across the brain (“global signal”); 3) calculate correlation between this “global signal” and all the other voxels (a simple dot product and then divided by n -1); 4) calculate the mean value of the correlation coefficients across brain. This mean correlation coefficient is equivalent to the all voxel-to-voxel mean correlation. This calculation is similar to the L2 norm way recently proposed by Saad et al. (2013), but in a more intuitive form. Please see group-level correction in Yan, C.G., Craddock, R.C., He, Y., Milham, M.P., 2013. Addressing head motion dependencies for small-world topologies in functional connectomics. Front Hum Neurosci 7, 910. y_GlobalCorrelation.m

3. Use graphical lasso to create the correlation matrix (kind of partial correlation, in the case that number of regions >> number of time points, the covariance is not invertible). Please see more information in Yan, C.G., Craddock, R.C., He, Y., Milham, M.P., 2013. Addressing head motion dependencies for small-world topologies in functional connectomics. Front Hum Neurosci 7, 910y_GLassoMatrix.m

4. Perform Graphical Analysis with wanted sparsity (based on Brain Connectivity Toolbox). Please see more information in Yan, C.G., Craddock, R.C., He, Y., Milham, M.P., 2013. Addressing head motion dependencies for small-world topologies in functional connectomics. Front Hum Neurosci 7, 910. y_GraphTheoreticalAnalysis_bu.m and y_GraphTheoreticalAnalysis_wu.m

Hope the scripts will be helpful for your research.

Best,

Chao-Gan YAN