User Tools

Site Tools


neuroimagen:fs_group_analysis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
neuroimagen:fs_group_analysis [2020/07/16 09:39] – [Full data] osotolongoneuroimagen:fs_group_analysis [2020/07/17 08:40] – [Surface Area] osotolongo
Line 273: Line 273:
  
  
-Aqui no hay nada asi que podemos seguir hacia la siguiente variable, ;-)+Y esto lo hacemos para el otro hemisferio igualmente. Aqui no hay nada asi que podemos seguir hacia la siguiente variable, ;-) 
 + 
 +**ejemplo de resultados** 
 + 
 +<code bash> 
 +osotolongo@detritus:facehbi$ grep -v "#" lh.executive_processing.glmdir/comps/cache.th40.neg.sig.cluster.summary 
 +         -6.662  147537    122.63    -24.1  -78.1   17.4  0.00739  0.00579  0.00898    237    -1176.13  superiorparietal 
 +</code> 
 + 
 +{{ :neuroimagen:sig.png|}} 
 + 
 +{{ :neuroimagen:clusters.png|}} 
 + 
 +===== bulk processing ===== 
 + 
 +Esto es muy aburrido, asi que vamos a hacerlo todo junto, 
 + 
 +<code bash fsgd.sh> 
 +avar=$1 
 +shift 
 +mris_preproc --fsgd ${avar}.fsgd --cache-in thickness.fwhm10.fsaverage --target fsaverage --hemi lh --out lh.${avar}.thickness.10.mgh 
 +mris_preproc --fsgd ${avar}.fsgd --cache-in thickness.fwhm10.fsaverage --target fsaverage --hemi rh --out rh.${avar}.thickness.10.mgh 
 +mri_glmfit --y lh.${avar}.thickness.10.mgh --fsgd ${avar}.fsgd --C comps.mtx --surf fsaverage lh --cortex --glmdir lh.${avar}.glmdir 
 +mri_glmfit --y rh.${avar}.thickness.10.mgh --fsgd ${avar}.fsgd --C comps.mtx --surf fsaverage rh --cortex --glmdir rh.${avar}.glmdir 
 +mri_glmfit-sim --glmdir lh.${avar}.glmdir --cache 4 neg --cwp 0.05 --2spaces 
 +mri_glmfit-sim --glmdir rh.${avar}.glmdir --cache 4 neg --cwp 0.05 --2spaces 
 +mri_glmfit-sim --glmdir lh.${avar}.glmdir --cache 4 pos --cwp 0.05 --2spaces 
 +mri_glmfit-sim --glmdir rh.${avar}.glmdir --cache 4 pos --cwp 0.05 --2spaces 
 +echo "lh, neg" 
 +grep -v "#" lh.${avar}.glmdir/comps/cache.th40.neg.sig.cluster.summary 
 +echo "rh, neg" 
 +grep -v "#" rh.${avar}.glmdir/comps/cache.th40.neg.sig.cluster.summary 
 +echo "lh, pos" 
 +grep -v "#" lh.${avar}.glmdir/comps/cache.th40.pos.sig.cluster.summary 
 +echo "rh, pos" 
 +grep -v "#" rh.${avar}.glmdir/comps/cache.th40.pos.sig.cluster.summary 
 +</code> 
 + 
 + 
 +todavia hay que hacer el archivo fsgd a mano pero despues de eso, 
 + 
 +<code bash> 
 +osotolongo@detritus:facehbi$ head wms.fsgd 
 +GroupDescriptorFile 1 
 +Title FACEHBI_memory_wms 
 +Class Main 
 +Variables age education gender memory_WMS  
 +Input facehbi_0001 Main 71 8 0 -0.453361 
 +Input facehbi_0002 Main 70 12 1 0.259093 
 +Input facehbi_0003 Main 70 8 0 -0.809587 
 +Input facehbi_0004 Main 76 16 0 -0.152722 
 +Input facehbi_0005 Main 68 20 1 0.630976 
 +Input facehbi_0006 Main 64 14 0 0.116602 
 +osotolongo@detritus:facehbi$ ./fsgd.sh wms 
 +</code> 
 + 
 +===== Surface Area ===== 
 + 
 +Tengo que añadir el ICV a los datos, (un poco de awk, sed, join, etc) y deberia quedar, 
 + 
 +<code bash> 
 +osotolongo@detritus:facehbi$ head -n 1 datacomb_freesurfer_neuro_v0_scdSUMCC_icv.csv | sed 's/,/\n/g' | cat -n 
 +      code_facehbi 
 +      Subject 
 +      SubjID 
 +      N_Interno 
 +      Date 
 +      edat 
 +      Anyos_Escolaridad_FAC 
 +      Sex_1H_0M 
 +      SCDplus_Memorycomplaint 
 +    10  SCDplus_APOE4 
 +    11  SCDplus_concernsaboutcognition 
 +    12  SCDplus_feelingworsethancontemporarypeers 
 +    13  SCDplus_informantcorroboratessymptoms 
 +    14  SCDplus_onset60Y 
 +    15  SCDplus_onsetwithinlast5Y 
 +    16  SCDplus_SUVRgt1.35 
 +    17  SCDplus_SUVRgt1.45 
 +    18  SCDplus_Total7 
 +    19  Q_QSM_JPO 
 +    20  SUVR 
 +    21  Centilod 
 +    22  APOE 
 +    23  COMPOSITE_executive_fluency  
 +    24  COMPOSITE_executive_processing speed  
 +    25  COMPOSITE_executive_attention  
 +    26  COMPOSITE_memory_FNAME professions 
 +    27  COMPOSITE_memory_FNAME names  
 +    28  COMPOSITES_memory_WMS  
 +    29  COMPOSITE_memory_RBANS  
 +    30  COMPOSITE_gnosis 
 +    31  COMPOSITE_praxis 
 +    32  COMPOSITE_languge_naming  
 +    33  EstimatedTotalIntraCranialVol 
 +</code> 
 + 
 +Ahora ir escogiendo y pegando, 
 + 
 +<code bash> 
 +osotolongo@detritus:facehbi$ awk -F"," {'print $3","$6","$7","$8","$9","$33'} datacomb_freesurfer_neuro_v0_scdSUMCC_icv.csv | sed 's/.*\/facehbi_/facehbi_/;s/SubjID/Variables/;s/edat/age/;s/Anyos_Escolaridad_FAC/education/;s/Sex_1H_0M/gender/;s/facehbi_\([^,]*\),/Input facehbi_\1 Main /; s/,/ /g' > scd9a.tsv 
 +osotolongo@detritus:facehbi$ head scd9a.tsv 
 +Variables age education gender SCDplus_Memorycomplaint EstimatedTotalIntraCranialVol 
 +Input facehbi_0001 Main 71 8 0 0 1756453.4998 
 +Input facehbi_0002 Main 70 12 1 0 1529412.17649 
 +Input facehbi_0003 Main 70 8 0 0 1326413.64353 
 +Input facehbi_0004 Main 76 16 0 0 1368330.41095 
 +Input facehbi_0005 Main 68 20 1 0 1467058.62476 
 +Input facehbi_0006 Main 64 14 0 0 1300087.33412 
 +Input facehbi_0007 Main 59 19 1 1 1672996.58646 
 +Input facehbi_0008 Main 55 16 0 0 1230515.65242 
 +Input facehbi_0009 Main 67 16 0 0 1526642.95225 
 +osotolongo@detritus:facehbi$ cat scd9a.header  
 +GroupDescriptorFile 1 
 +Title FACEHBI_SCDplus_Memorycomplaint 
 +Class Main 
 +osotolongo@detritus:facehbi$ cat scd9a.header scd9a.tsv > scd9a.fsgd 
 +osotolongo@detritus:facehbi$ head scd9a.fsgd 
 +GroupDescriptorFile 1 
 +Title FACEHBI_SCDplus_Memorycomplaint 
 +Class Main 
 +Variables age education gender SCDplus_Memorycomplaint EstimatedTotalIntraCranialVol 
 +Input facehbi_0001 Main 71 8 0 0 1756453.4998 
 +Input facehbi_0002 Main 70 12 1 0 1529412.17649 
 +Input facehbi_0003 Main 70 8 0 0 1326413.64353 
 +Input facehbi_0004 Main 76 16 0 0 1368330.41095 
 +Input facehbi_0005 Main 68 20 1 0 1467058.62476 
 +Input facehbi_0006 Main 64 14 0 0 1300087.33412 
 + 
 +osotolongo@detritus:facehbi$ cat compsa.mtx  
 +0 0 0 0 1 0 
 + 
 +</code> 
 + 
 +El codigo debe cambiar algo,  
 + 
 +<code bash fsgda.sh> 
 +avar=$1 
 +shift 
 +mris_preproc --fsgd ${avar}.fsgd --cache-in area.fwhm10.fsaverage --target fsaverage --hemi lh --out lh.${avar}.area.10.mgh 
 +mris_preproc --fsgd ${avar}.fsgd --cache-in area.fwhm10.fsaverage --target fsaverage --hemi rh --out rh.${avar}.area.10.mgh 
 +mri_glmfit --y lh.${avar}.area.10.mgh --fsgd ${avar}.fsgd --C compsa.mtx --surf fsaverage lh --cortex --glmdir lh.${avar}.sa.glmdir 
 +mri_glmfit --y rh.${avar}.area.10.mgh --fsgd ${avar}.fsgd --C compsa.mtx --surf fsaverage rh --cortex --glmdir rh.${avar}.sa.glmdir 
 +mri_glmfit-sim --glmdir lh.${avar}.sa.glmdir --cache 4 neg --cwp 0.05 --2spaces 
 +mri_glmfit-sim --glmdir rh.${avar}.sa.glmdir --cache 4 neg --cwp 0.05 --2spaces 
 +mri_glmfit-sim --glmdir lh.${avar}.sa.glmdir --cache 4 pos --cwp 0.05 --2spaces 
 +mri_glmfit-sim --glmdir rh.${avar}.sa.glmdir --cache 4 pos --cwp 0.05 --2spaces 
 +echo "lh, neg" 
 +grep -v "#" lh.${avar}.sa.glmdir/compsa/cache.th40.neg.sig.cluster.summary 
 +echo "rh, neg" 
 +grep -v "#" rh.${avar}.sa.glmdir/compsa/cache.th40.neg.sig.cluster.summary 
 +echo "lh, pos" 
 +grep -v "#" lh.${avar}.sa.glmdir/compsa/cache.th40.pos.sig.cluster.summary 
 +echo "rh, pos" 
 +grep -v "#" rh.${avar}.sa.glmdir/compsa/cache.th40.pos.sig.cluster.summary 
 +</code> 
 + 
 + 
neuroimagen/fs_group_analysis.txt · Last modified: 2020/08/04 10:58 by 127.0.0.1