This shows you the differences between two versions of the page.
neuroimagen:fs_group_analysis [2020/06/11 13:27] osotolongo [GLM Analysis (mri_glmfit)] |
neuroimagen:fs_group_analysis [2020/08/04 10:58] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== FreeSurfer Group Analysis ====== | ||
- | |||
- | https:// | ||
- | |||
- | ===== FSDG ===== | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | |||
- | Primero hay que construir el archivo de diseño del experimento, | ||
- | |||
- | <code bash> | ||
- | [osotolongo@detritus fsdg]$ head codes.csv | ||
- | Subject, | ||
- | 0001,F001 | ||
- | 0002,F002 | ||
- | 0003,F003 | ||
- | 0004,F004 | ||
- | 0005,F005 | ||
- | 0006,F006 | ||
- | 0007,F007 | ||
- | 0008,F008 | ||
- | 0009,F009 | ||
- | [osotolongo@detritus fsdg]$ head demographics.csv | ||
- | PSubject, | ||
- | F001,71,8,0 | ||
- | F002, | ||
- | F003,70,8,0 | ||
- | F004, | ||
- | F005, | ||
- | F006, | ||
- | F007, | ||
- | F008, | ||
- | F009, | ||
- | [osotolongo@detritus fsdg]$ join -t"," | ||
- | [osotolongo@detritus fsdg]$ head body.csv | ||
- | Variables Age Education Gender | ||
- | Input facehbi_0001 Main 71 8 0 | ||
- | Input facehbi_0002 Main 70 12 1 | ||
- | Input facehbi_0003 Main 70 8 0 | ||
- | Input facehbi_0004 Main 76 16 0 | ||
- | Input facehbi_0005 Main 68 20 1 | ||
- | Input facehbi_0006 Main 64 14 0 | ||
- | Input facehbi_0007 Main 59 19 1 | ||
- | Input facehbi_0008 Main 55 16 0 | ||
- | Input facehbi_0009 Main 67 16 0 | ||
- | [osotolongo@detritus fsdg]$ cat headers.txt | ||
- | GroupDescriptorFile 1 | ||
- | Title FACEHBI_all | ||
- | Class Main | ||
- | [osotolongo@detritus fsdg]$ cat headers.txt body.csv > facehbi.fsdg | ||
- | [osotolongo@detritus fsdg]$ head facehbi.fsdg | ||
- | GroupDescriptorFile 1 | ||
- | Title FACEHBI_all | ||
- | Class Main | ||
- | Variables Age Education Gender | ||
- | Input facehbi_0001 Main 71 8 0 | ||
- | Input facehbi_0002 Main 70 12 1 | ||
- | Input facehbi_0003 Main 70 8 0 | ||
- | Input facehbi_0004 Main 76 16 0 | ||
- | Input facehbi_0005 Main 68 20 1 | ||
- | Input facehbi_0006 Main 64 14 0 | ||
- | |||
- | </ | ||
- | |||
- | ===== GLM Analysis (mri_glmfit) ===== | ||
- | Primero construimos los contrastes, diciendole a FS cual es la variable que nos interesa, en este caso la edad, | ||
- | |||
- | https:// | ||
- | |||
- | <code bash> | ||
- | [osotolongo@detritus fsdg]$ cat facehbi.mtx | ||
- | 0 1 0 0 | ||
- | </ | ||
- | Ahora vamos a correr el modelo con este contraste, | ||
- | <code bash> | ||
- | [osotolongo@detritus fsdg]$ mris_preproc --fsgd facehbi.fsdg --cache-in thickness.fwhm10.fsaverage --target fsaverage --hemi lh --out lh.facehbi.age.thickness.10.mgh | ||
- | [osotolongo@detritus fsdg]$ mri_glmfit --y lh.facehbi.age.thickness.10.mgh --fsgd facehbi.fsdg --C facehbi.mtx --surf fsaverage lh --cortex --glmdir lh.facehbi.age.glmdir | ||
- | </ | ||
- | |||
- | Para usar freeview me he tenido que ir a la [[neuroimagen: | ||
- | <code bash> | ||
- | [fsluser@FSLVm7_64 fsdg]$ freeview -f $SUBJECTS_DIR/ | ||
- | </ | ||
- | |||
- | {{ : | ||
- | |||
- | Cambiando el //overlay threshold// para que muestre toda la significancia, | ||
- | |||
- | {{ : | ||
- | |||
- | Ejemplo, fijando // | ||
- | |||
- | | {{ : | ||
- | |||
- | ===== Clusterwise Correction for Multiple Comparisons ===== | ||
- | |||
- | Ahora voy a buscar los clusters con una // | ||
- | <code bash> | ||
- | [osotolongo@detritus fsdg]$ mri_glmfit-sim --glmdir lh.facehbi.age.glmdir --cache 4 neg --cwp 0.05 --2spaces | ||
- | </ | ||
- | |||
- | A ver, | ||
- | <code bash> | ||
- | freeview -f $SUBJECTS_DIR/ | ||
- | </ | ||
- | |||
- | | {{ : | ||
- | |||
- | También hay un resumen de los clusters que se han encontrado a esta significancia, | ||
- | |||
- | <code bash> | ||
- | [osotolongo@detritus fsdg]$ cat lh.facehbi.age.glmdir/ | ||
- | # Cluster Growing Summary (mri_surfcluster) | ||
- | # $Id: mri_surfcluster.c, | ||
- | # $Id: mrisurf.c,v 1.781.2.6 2016/12/27 16:47:14 zkaufman Exp $ | ||
- | # CreationTime 2020/ | ||
- | # cmdline mri_surfcluster.bin --in lh.facehbi.age.glmdir/ | ||
- | # cwd / | ||
- | # sysname | ||
- | # hostname detritus.fundacioace.com | ||
- | # machine | ||
- | # FixVertexAreaFlag 1 | ||
- | # FixSurfClusterArea 1 | ||
- | # | ||
- | # Input lh.facehbi.age.glmdir/ | ||
- | # Frame Number | ||
- | # srcsubj fsaverage | ||
- | # hemi lh | ||
- | # surface white | ||
- | # group_avg_surface_area 82220 | ||
- | # group_avg_vtxarea_loaded 1 | ||
- | # annot aparc | ||
- | # SUBJECTS_DIR / | ||
- | # SearchSpace_mm2 75610.7 | ||
- | # SearchSpace_vtx 147840 | ||
- | # Bonferroni 2 | ||
- | # Minimum Threshold 4 | ||
- | # Maximum Threshold infinity | ||
- | # Threshold Sign neg | ||
- | # AdjustThreshWhenOneTail 1 | ||
- | # CW PValue Threshold: 0.05 | ||
- | # Area Threshold | ||
- | # CSD thresh | ||
- | # CSD nreps 10000 | ||
- | # CSD simtype | ||
- | # CSD contrast NA | ||
- | # CSD confint | ||
- | # Overall max 2.34317 at vertex 124430 | ||
- | # Overall min -11.9208 at vertex 75951 | ||
- | # NClusters | ||
- | # FixMNI = 0 | ||
- | # | ||
- | # ClusterNo | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | 10 | ||
- | 11 | ||
- | 12 | ||
- | 13 | ||
- | 14 | ||
- | 15 | ||
- | 16 | ||
- | 17 | ||
- | 18 | ||
- | 19 | ||
- | 20 | ||
- | 21 | ||
- | 22 | ||
- | 23 | ||
- | 24 | ||
- | 25 | ||
- | 26 | ||
- | 27 | ||
- | |||
- | </ | ||