# THIS IS AN UNTESTED FIRST DRAFT IN PROGRESS!
#!/bin/csh -f
# This script is written for FreeSurfer 3.x. Much has changed with the release to 4.x, and some is not needed, e.g. paint-sess.
# It requires your subject to be painted on be called average_subject
cd #functional directory
set contrastlist = 'allvfix allvfix_de allvfix_se posvfix_dse negvfix_dse neutvfix_dse dvs posvneut_dse negvneut_dse posnegvneut_dse posvfix_de negvfix_de neutvfix_de posvneut_de negvneut_de posnegvneut_de posvfix_se negvfix_se neutvfix_se posvneut_se negvneut_se posnegvneut_se'
###################
#Group A eg males
set analysislist = 'All_FE All_FR All_WE All_WR'
#be sure this list matches your session file
set sessionlist1 = 'NC2_sess NC3_sess NC4_sess NC10_sess NC12_sess NC13_sess NC16_sess NC19_sess NC20_sess NC21_sess NC22_sess NC23_sess NC25_sess NC26_sess' #27 and 24
set group1 = 'MaleRan'
set sf1 'MaleSess'
foreach analysis ($analysislist)
foreach s ($sessionlist1)
selxavg-sess -analysis ${analysis} -d . -s ${s}
end
#set up constrasts according to paradigm files
mkcontrast-sess -analysis ${analysis} -contrast allvfix -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast allvfix_de -a 4 -a 5 -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast allvfix_se -a 1 -a 2 -a 3 -c 0
mkcontrast-sess -analysis ${analysis} -contrast posvfix_dse -a 3 -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast negvfix_dse -a 1 -a 4 -c 0
mkcontrast-sess -analysis ${analysis} -contrast neutvfix_dse -a 2 -a 5 -c 0
mkcontrast-sess -analysis ${analysis} -contrast dvs -a 4 -a 5 -a 6 -c 1 -c 2 -c 3
mkcontrast-sess -analysis ${analysis} -contrast posvneut_dse -a 3 -a 6 -c 2 -c 5
mkcontrast-sess -analysis ${analysis} -contrast negvneut_dse -a 4 -a 1 -c 2 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posnegvneut_dse -a 4 -a 6 -a 1 -a 3 -c 2 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posvfix_de -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast negvfix_de -a 4 -c 0
mkcontrast-sess -analysis ${analysis} -contrast neutvfix_de -a 5 -c 0
mkcontrast-sess -analysis ${analysis} -contrast posvneut_de -a 6 -c 5
mkcontrast-sess -analysis ${analysis} -contrast negvneut_de -a 4 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posnegvneut_de -a 4 -a 6 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posvfix_se -a 3 -c 0
mkcontrast-sess -analysis ${analysis} -contrast negvfix_se -a 1 -c 0
mkcontrast-sess -analysis ${analysis} -contrast neutvfix_se -a 2 -c 0
mkcontrast-sess -analysis ${analysis} -contrast posvneut_se -a 3 -c 2
mkcontrast-sess -analysis ${analysis} -contrast negvneut_se -a 1 -c 2
mkcontrast-sess -analysis ${analysis} -contrast posnegvneut_se -a 1 -a 3 -c 2
foreach hemi (lh rh)
foreach s ($sessionlist1)
func2sph-sess -analysis ${analysis} -hemi -${hemi} -projfrac 0.3 -d . -s ${s}
sphsmooth-sess -smoothsteps 10 -analysis ${analysis} -insphdir sph -outsphdir sphsm10 -hemi ${hemi} -d . -s ${s}
end
foreach contrast ($contrastlist)
isxavg-re-sess -analysis ${analysis} -group $group1 -space sph -hemi ${hemi} -contrast ${contrast} -nojackknife -d . -sf $sf1
paint-sess -analysis ${analysis} -contrast ${contrast} -map sig -d . -s $group1 -hemi $hemi -subject average_NC -space sph -isxavg random -spacedir sph
end
end
end
###################
#Group B eg females
#be sure this list matches your session file
set sessionlist2 = 'NC5_sess NC6_sess NC7_sess NC8_sess NC9_sess NC11_sess NC14_sess NC15_sess NC18_sess NC1_sess NC30_sess NC31_sess NC33_sess NC34_sess NC35_sess'
set group2 = 'FemaleRan'
set sf2 'FemaleSess'
foreach analysis ($analysislist)
foreach s ($sessionlist2)
selxavg-sess -analysis ${analysis} -d . -s ${s}
end
#set up constrasts according to paradigm files
mkcontrast-sess -analysis ${analysis} -contrast allvfix -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast allvfix_de -a 4 -a 5 -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast allvfix_se -a 1 -a 2 -a 3 -c 0
mkcontrast-sess -analysis ${analysis} -contrast posvfix_dse -a 3 -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast negvfix_dse -a 1 -a 4 -c 0
mkcontrast-sess -analysis ${analysis} -contrast neutvfix_dse -a 2 -a 5 -c 0
mkcontrast-sess -analysis ${analysis} -contrast dvs -a 4 -a 5 -a 6 -c 1 -c 2 -c 3
mkcontrast-sess -analysis ${analysis} -contrast posvneut_dse -a 3 -a 6 -c 2 -c 5
mkcontrast-sess -analysis ${analysis} -contrast negvneut_dse -a 4 -a 1 -c 2 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posnegvneut_dse -a 4 -a 6 -a 1 -a 3 -c 2 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posvfix_de -a 6 -c 0
mkcontrast-sess -analysis ${analysis} -contrast negvfix_de -a 4 -c 0
mkcontrast-sess -analysis ${analysis} -contrast neutvfix_de -a 5 -c 0
mkcontrast-sess -analysis ${analysis} -contrast posvneut_de -a 6 -c 5
mkcontrast-sess -analysis ${analysis} -contrast negvneut_de -a 4 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posnegvneut_de -a 4 -a 6 -c 5
mkcontrast-sess -analysis ${analysis} -contrast posvfix_se -a 3 -c 0
mkcontrast-sess -analysis ${analysis} -contrast negvfix_se -a 1 -c 0
mkcontrast-sess -analysis ${analysis} -contrast neutvfix_se -a 2 -c 0
mkcontrast-sess -analysis ${analysis} -contrast posvneut_se -a 3 -c 2
mkcontrast-sess -analysis ${analysis} -contrast negvneut_se -a 1 -c 2
mkcontrast-sess -analysis ${analysis} -contrast posnegvneut_se -a 1 -a 3 -c 2
foreach hemi (lh rh)
foreach s ($sessionlist2)
func2sph-sess -analysis ${analysis} -hemi -${hemi} -projfrac 0.3 -d . -s ${s}
sphsmooth-sess -smoothsteps 10 -analysis ${analysis} -insphdir sph -outsphdir sphsm10 -hemi ${hemi} -d . -s ${s}
end
foreach contrast ($contrastlist)
isxavg-re-sess -analysis ${analysis} -group $group2 -space sph -hemi ${hemi} -contrast ${contrast} -nojackknife -d . -sf $sf2
paint-sess -analysis ${analysis} -contrast ${contrast} -map sig -d . -s $group2 -hemi $hemi -subject average_subject -space sph -isxavg random -spacedir sph
end
end
end
###################
#Intergroup analysis
foreach analysis ($analysislist)
foreach hemi (lh rh)
foreach contrast ($contrastlist)
#group1 = red, group2 = blue
intergroupavg-sess -analysis ${analysis} -contrast ${contrast} -group1 $group2 -group2 $group1 -intergroup FemalevsMale -space sph -hemi ${hemi}
paint-sess -analysis ${analysis} -contrast ${contrast} -map sig -d . -s FemalevsMale -hemi ${hemi} -subject average_subject -space sph -isxavg random -spacedir sph
end
end
end
UserContributions/Scripts/kslays/intergroup%analysis (last edited 2008-04-29 11:45:05 by localhost)