Here are useful scripts for several needs.
This is a function I created for R statistics. This function uses the GLM information from the vertexLm and vertexFDR from RMINC, to create Tables ready for publication. The tables have the following columns: 1) Labels, 2) MNI coordinates, 3) vertex, 4) T-value.
At the moment it uses the AAL atlas, but it can be modified to use with any atlas.
The function uses the AAL labels as factors to cluster the MNI coordinates and t-values, from which then it chooses the MAX t-value and prints the related row with all the information.
The function needs the following information:
- vertexLm object, from the GLM analysis for each hemisphere.
- The column of interest in the GLM analysis. It can be a number or the string (i.e. "tvalue-age").
- The t-value threshold for each hemisphere.
- The AAL atlas for each hemisphere.
- The AAL labels file.
- The MNI coordinates for each vertex file.
The Atlases, labels and MNI coordinates I used are included in the folder. You will have to load them into R first.
The function only creates the table, you will need to explicitly create the table (i.e. table <- function(mystuff)
).
Then to export it:
write.csv(mytable, file = "mytable.csv")
Scripts and code helpful for BIDS framework.
Script to create cones based on Michael Fox's connectivity analysis.