Differences between revisions 32 and 33
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
[[BR]] <<BR>>
Line 7: Line 7:
The experiment consists of 3 active conditions (+baseline), referred to as V, T and P.[[BR]]
The task consists in solving visually presented problems in each of these conditions. Subjects respond using a button box.[[BR]]
The paradigm is presented in 6 consecutive runs, each lasting 300s. In each run, two of the three conditions are shown to minimize subject confusion, and increase statistical power [[BR]]
'''''**WHAT ARE THE EFFECTS ON POWER OF SHOWING ONLY A SUBSET OF THE CONDITIONS IN EACH RUN??'''''. [[BR]]
The runs consist of [[BR]]
Run 1: T-P [[BR]]
Run 2: T-V [[BR]]
Run 3: P-V [[BR]]
Run 4: T-P [[BR]]
Run 5: T-V [[BR]]
Run 6: P-V [[BR]]
The experiment consists of 3 active conditions (+baseline), referred to as V, T and P.<<BR>>
The task consists in solving visually presented problems in each of these conditions. Subjects respond using a button box.<<BR>>
The paradigm is presented in 6 consecutive runs, each lasting 300s. In each run, two of the three conditions are shown to minimize subject confusion, and increase statistical power <<BR>>
'''''**WHAT ARE THE EFFECTS ON POWER OF SHOWING ONLY A SUBSET OF THE CONDITIONS IN EACH RUN??'''''. <<BR>>
The runs consist of <<BR>>
Run 1: T-P <<BR>>
Run 2: T-V <<BR>>
Run 3: P-V <<BR>>
Run 4: T-P <<BR>>
Run 5: T-V <<BR>>
Run 6: P-V <<BR>>
Line 19: Line 19:
Within each run, the plates are presented using a pseudo-randomized (order the same for all subjects, but only known to the experimenter) event-related paradigm. Each plate presentation is considered an event, which can last between 1 and 10s, as the plate disappears when the subject responds or times out after 10 seconds (at which point the paradigm goes on by itself). In-between plates, a fixation cross is shown with a random ISI ranging from 1500 to 3500ms in 250ms steps. Every 6 plates, the fixation cross is held for a longer time, in order to match the total run duration across subjects. [[BR]]
'''''**IS THIS NECESSARY? WHY? IS THERE A BETTER WAY TO GO ABOUT IT THAN MY 'catchup times'?'''''. [[BR]]
Thus, the 7th plate appears at t=75s, the 13th at t=150s and the 19th at t=225s. The total run time of 5minutes is therefore the same as if all plates timed out (10x24 + 2.5x24 = 300). [[BR]]
The PAR files look like this: [[BR]]
Within each run, the plates are presented using a pseudo-randomized (order the same for all subjects, but only known to the experimenter) event-related paradigm. Each plate presentation is considered an event, which can last between 1 and 10s, as the plate disappears when the subject responds or times out after 10 seconds (at which point the paradigm goes on by itself). In-between plates, a fixation cross is shown with a random ISI ranging from 1500 to 3500ms in 250ms steps. Every 6 plates, the fixation cross is held for a longer time, in order to match the total run duration across subjects. <<BR>>
'''''**IS THIS NECESSARY? WHY? IS THERE A BETTER WAY TO GO ABOUT IT THAN MY 'catchup times'?'''''. <<BR>>
Thus, the 7th plate appears at t=75s, the 13th at t=150s and the 19th at t=225s. The total run time of 5minutes is therefore the same as if all plates timed out (10x24 + 2.5x24 = 300). <<BR>>
The PAR files look like this: <<BR>>
Line 36: Line 36:
nmrenv [[BR]]
setenv SUBJECTS_DIR /space/tango/5/users/cherif/reasoning [[BR]]
findsession <subjID> [[BR]]

unpacksdcmdir –src <> -targ <> -scanonly file [[BR]]
nmrenv <<BR>>
setenv SUBJECTS_DIR /space/tango/5/users/cherif/reasoning <<BR>>
findsession <subjID> <<BR>>

unpacksdcmdir –src <> -targ <> -scanonly file <<BR>>
Line 42: Line 42:
 (for all 6 runs) [[BR]]
unpacksdcmdir –src <> -targ <subjdir> -run <#> 3danat cor blah (for the structural) [[BR]]
 (for all 6 runs) <<BR>>
unpacksdcmdir –src <> -targ <subjdir> -run <#> 3danat cor blah (for the structural) <<BR>>
Line 46: Line 46:
nmrenv[[BR]]
setenv SUBJECTS_DIR /space/tango/3/users/recon_modygp/cherif [[BR]]
recon-all –subjid <subjid> –autorecon1 –autorecon2 [[BR]]
#perform manual edits [[BR]]
recon-all –subjid <subjid> -autorecon3 [[BR]]
nmrenv<<BR>>
setenv SUBJECTS_DIR /space/tango/3/users/recon_modygp/cherif <<BR>>
recon-all –subjid <subjid> –autorecon1 –autorecon2 <<BR>>
#perform manual edits <<BR>>
recon-all –subjid <subjid> -autorecon3 <<BR>>
Line 53: Line 53:
cd /space/tango/5/users/cherif/reasoning/ [[BR]]
ln –s /space/tango/3/users/recon_modygp/cherif/<subjID> <subjID> [[BR]]

cd fMRI_analysis/subjects/<subjID> [[BR]]
cat > fMRI_analysis/subjects/<subjID>/subjectname [[BR]]
<subjID> [[BR]]

<ctrl+d> [[BR]]

cp <subjid>_run<#>_par.txt bold/<correspondingrun#>/<subjid>_par.par [[BR]]
cp <subjid>_par.par reason_par.par [[BR]]
cd /space/tango/5/users/cherif/reasoning/ <<BR>>
ln –s /space/tango/3/users/recon_modygp/cherif/<subjID> <subjID> <<BR>>

cd fMRI_analysis/subjects/<subjID> <<BR>>
cat > fMRI_analysis/subjects/<subjID>/subjectname <<BR>>
<subjID> <<BR>>

<ctrl+d> <<BR>>

cp <subjid>_run<#>_par.txt bold/<correspondingrun#>/<subjid>_par.par <<BR>>
cp <subjid>_par.par reason_par.par <<BR>>
Line 65: Line 65:
cd ../ [[BR]]
preproc-sess –s <subjid> –smout <smfmc#> -fwhm <fwhm> [[BR]]
'''''**DO YOU STILL WANT TO APPLY SMOOTHING HERE IF YOU'RE GONNA SMOOTH ON THE SURFACE? SHOULD THERE BE A QUANTITATIVE LINK BETWEEN THE TWO FWHM?''''' [[BR]]
cd ../ <<BR>>
preproc-sess –s <subjid> –smout <smfmc#> -fwhm <fwhm> <<BR>>
'''''**DO YOU STILL WANT TO APPLY SMOOTHING HERE IF YOU'RE GONNA SMOOTH ON THE SURFACE? SHOULD THERE BE A QUANTITATIVE LINK BETWEEN THE TWO FWHM?''''' <<BR>>
Line 70: Line 70:
spmregister-sess –s <subjid> [[BR]]
tkregister-sess –s <subjid> [[BR]]
spmregister-sess –s <subjid> <<BR>>
tkregister-sess –s <subjid> <<BR>>
Line 74: Line 74:
mkanalysis-sess.new -analysis reasoning-analysis –TR 2 –paradigm reason_par.par -designtype event-related –funcstem fmcsm5 –nconditions 3 -gammafit 2.25 1.25 –inorm –mcextreg [[BR]]
'''''**WHAT ARE THE EFFECTS OF CHANGING TAUMAX, TIMEWINDOW, POLYFIT? RULES OF THUMB? HOW TO USE TER?''''' [[BR]]
'''''IF YOU USE FIR ANALYSIS INSTEAD OF GAMMAFIT, THEN NEED TO CHOOSE TIMEWINDOW AND PRESTIM PARAMETERS. RULE OF THUMB IS TIMEWINDOW=16S+LONGEST EVENT+PRESTIM, AND PRESTIM=2TRS''''' [[BR]]
mkanalysis-sess.new -analysis reasoning-analysis –TR 2 –paradigm reason_par.par -designtype event-related –funcstem fmcsm5 –nconditions 3 -gammafit 2.25 1.25 –inorm –mcextreg <<BR>>
'''''**WHAT ARE THE EFFECTS OF CHANGING TAUMAX, TIMEWINDOW, POLYFIT? RULES OF THUMB? HOW TO USE TER?''''' <<BR>>
'''''IF YOU USE FIR ANALYSIS INSTEAD OF GAMMAFIT, THEN NEED TO CHOOSE TIMEWINDOW AND PRESTIM PARAMETERS. RULE OF THUMB IS TIMEWINDOW=16S+LONGEST EVENT+PRESTIM, AND PRESTIM=2TRS''''' <<BR>>
Line 79: Line 79:
selxavg-sess –s <subjid> -analysis reasoning-analysis[[BR]] selxavg-sess –s <subjid> -analysis reasoning-analysis<<BR>>
Line 82: Line 82:
OMNIBUS: [[BR]]
mkcontrast-sess –analysis <analysis> -contrast omnibus –a 1 –a 2 –a 3 -c 0 -nosumconds [[BR]]

More interesting contrasts: [[BR]]
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-fix –a 1 -c 0 [[BR]]
mkcontrast-sess –analysis reasoning-analysis –contrast perc-v-fix –a 2 -c 0 [[BR]]
mkcontrast-sess –analysis reasoning-analysis –contrast verb-v-fix –a 3 -c 0 [[BR]]
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-verb –a 1 –c 3 [[BR]]
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-perc –a 1 –c 2 [[BR]]
mkcontrast-sess –analysis reasoning-analysis –contrast perc-v-verb –a 2 -c 3 [[BR]]
OMNIBUS: <<BR>>
mkcontrast-sess –analysis <analysis> -contrast omnibus –a 1 –a 2 –a 3 -c 0 -nosumconds <<BR>>

More interesting contrasts: <<BR>>
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-fix –a 1 -c 0 <<BR>>
mkcontrast-sess –analysis reasoning-analysis –contrast perc-v-fix –a 2 -c 0 <<BR>>
mkcontrast-sess –analysis reasoning-analysis –contrast verb-v-fix –a 3 -c 0 <<BR>>
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-verb –a 1 –c 3 <<BR>>
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-perc –a 1 –c 2 <<BR>>
mkcontrast-sess –analysis reasoning-analysis –contrast perc-v-verb –a 2 -c 3 <<BR>>
Line 94: Line 94:
stxgrinder-sess –analysis reasoning-analysis - s <subjid> –contrast <contrastname> [[BR]]
or [[BR]]

stxgrinder-sess –analysis reasoning-analysis –s <subjid> -all [[BR]]

 __Viewing results with sliceview__ [[BR]]
sliceview-sess –analysis <analysis> -slice <#> -contrast <contrastname> -map <mapname> -s <subjid> [[BR]]

 __Viewing results on anatomical__ [[BR]]
paint-sess –analysis <analysis> -s <subjid> –c <contrastname> -map <mapname> [[BR]]

surf-sess –s <subjid> –a <analysis> -c <contrastname> -map <mapname> [[BR]]

tkmedit-sess –analysis <analysis> -s <subjid> –contrast <contrastname> -map <mapname> [[BR]]
stxgrinder-sess –analysis reasoning-analysis - s <subjid> –contrast <contrastname> <<BR>>
or <<BR>>

stxgrinder-sess –analysis reasoning-analysis –s <subjid> -all <<BR>>

 __Viewing results with sliceview__ <<BR>>
sliceview-sess –analysis <analysis> -slice <#> -contrast <contrastname> -map <mapname> -s <subjid> <<BR>>

 __Viewing results on anatomical__ <<BR>>
paint-sess –analysis <analysis> -s <subjid> –c <contrastname> -map <mapname> <<BR>>

surf-sess –s <subjid> –a <analysis> -c <contrastname> -map <mapname> <<BR>>

tkmedit-sess –analysis <analysis> -s <subjid> –contrast <contrastname> -map <mapname> <<BR>>
Line 109: Line 109:
# The scripts used here are adapted from scripts written by Thomas Witzel. No support is provided for them, if you want to use them, you are on your own! [[BR]]

cp gf <subjid>/bold/reasoning-analysis/ [[BR]]
cp run-FSFAST.csh <subjid>/bold/reasoning-analysis/ [[BR]]
cp vol2surf_FSFAST <subjid>/bold/reasoning-analysis/ [[BR]]
cp snapshots* <subjid>/bold/reasoning-analysis/ [[BR]]

cd <subjid>/bold/reasoning-analysis [[BR]]

./vol2surf_FSFAST [[BR]]
 this script paints the activation on the inflated surface for all conditions [[BR]]
  # Contrast toni-v-fix [[BR]]
  mri_vol2surf --src toni-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-fix-lh.w --out_type paint [[BR]]
  mri_vol2surf --src toni-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-fix-rh.w --out_type paint [[BR]]
  # Contrast perc-v-fix [[BR]]
  mri_vol2surf --src perc-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./perc-v-fix-lh.w --out_type paint [[BR]]
  mri_vol2surf --src perc-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./perc-v-fix-rh.w --out_type paint [[BR]]
  # Contrast verb-v-fix [[BR]]
  mri_vol2surf --src verb-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./verb-v-fix-lh.w --out_type paint [[BR]]
  mri_vol2surf --src verb-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./verb-v-fix-rh.w --out_type paint [[BR]]
  # Contrast toni-v-perc [[BR]]
  mri_vol2surf --src toni-v-perc/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-perc-lh.w --out_type paint [[BR]]
  mri_vol2surf --src toni-v-perc/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-perc-rh.w --out_type paint [[BR]]
  # Contrast toni-v-verb [[BR]]
  mri_vol2surf --src toni-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-verb-lh.w --out_type paint [[BR]]
  mri_vol2surf --src toni-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-verb-rh.w --out_type paint [[BR]]
  # Contrast perc-v-verb [[BR]]
  mri_vol2surf --src perc-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./perc-v-verb-lh.w --out_type paint [[BR]]
  mri_vol2surf --src perc-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./perc-v-verb-rh.w --out_type paint [[BR]]

mkdir rgb (this is where run-FSFAST.csh will write its outputs) [[BR]]
EDIT run-FSFAST.csh: change the threshold, cluster size, and subject name [[BR]]
  This creates rgb files for all conditions, thresholded and clustered NOTE: do not let the screensaver come up!! [[BR]]
  # Set threshold values for contrast categories [[BR]]
  setenv fthresh 1.5 [[BR]]
  setenv fmid 2.5 [[BR]]
  setenv fslope 2.0 [[BR]]

  # List contrast names in quotes [[BR]]
  # Here subjectname is mody068 [[BR]]
  foreach name ("toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb") [[BR]]
    setenv statsname ${name}-rh.w [[BR]]
    mri_surfcluster --hemi rh --srcsubj mody068 --src ${name}-rh.w --minarea 30 --thmin 2.0** --o ./${name}-rh-th2.0-clust30.w [[BR]]
    setenv statsname ${name}-rh-th2.0-clust30.w [[BR]]
    tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -invphaseflag 1 -tcl snapshots-rh.tcl [[BR]]
    setenv statsname ${name}-lh.w [[BR]]
    mri_surfcluster --hemi lh --srcsubj mody068 --src ${name}-lh.w --minarea 30 --thmin 2.0 --o ./${name}-lh-th2.0-clust30.w [[BR]]
    setenv statsname ${name}-lh-th2.0-clust30.w [[BR]]
    tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -invphaseflag 1 -tcl snapshots-lh.tcl [[BR]]
  end [[BR]]


  #make copies of output files from mri_surfcluster with pos and neg extensions to use in snapshots [[BR]]
  rename clust30.w clust30-pos.w *clust30.w [[BR]]

  # Now to view positive stats only [[BR]]
  foreach name ( "toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb") [[BR]]
    setenv statsname ${name}-rh-th2.0-clust30-pos.w [[BR]]
    tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -tcl snapshots-rh.tcl [[BR]]
    setenv statsname ${name}-lh-th2.0-clust30-pos.w [[BR]]
    tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -tcl snapshots-lh.tcl [[BR]]
  end [[BR]]


  rename clust30-pos.w clust30-neg.w *clust30-pos.w [[BR]]
  foreach name ( "toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb")[[BR]]
    setenv statsname ${name}-rh-th2.0-clust30-neg.w [[BR]]
    tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -invphaseflag 1 -tcl snapshots-rh.tcl [[BR]]
    setenv statsname ${name}-lh-th2.0-clust30-neg.w [[BR]]
    tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -invphaseflag 1 -tcl snapshots-lh.tcl [[BR]]
  end [[BR]]
# The scripts used here are adapted from scripts written by Thomas Witzel. No support is provided for them, if you want to use them, you are on your own! <<BR>>

cp gf <subjid>/bold/reasoning-analysis/ <<BR>>
cp run-FSFAST.csh <subjid>/bold/reasoning-analysis/ <<BR>>
cp vol2surf_FSFAST <subjid>/bold/reasoning-analysis/ <<BR>>
cp snapshots* <subjid>/bold/reasoning-analysis/ <<BR>>

cd <subjid>/bold/reasoning-analysis <<BR>>

./vol2surf_FSFAST <<BR>>
 this script paints the activation on the inflated surface for all conditions <<BR>>
  # Contrast toni-v-fix <<BR>>
  mri_vol2surf --src toni-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-fix-lh.w --out_type paint <<BR>>
  mri_vol2surf --src toni-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-fix-rh.w --out_type paint <<BR>>
  # Contrast perc-v-fix <<BR>>
  mri_vol2surf --src perc-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./perc-v-fix-lh.w --out_type paint <<BR>>
  mri_vol2surf --src perc-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./perc-v-fix-rh.w --out_type paint <<BR>>
  # Contrast verb-v-fix <<BR>>
  mri_vol2surf --src verb-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./verb-v-fix-lh.w --out_type paint <<BR>>
  mri_vol2surf --src verb-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./verb-v-fix-rh.w --out_type paint <<BR>>
  # Contrast toni-v-perc <<BR>>
  mri_vol2surf --src toni-v-perc/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-perc-lh.w --out_type paint <<BR>>
  mri_vol2surf --src toni-v-perc/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-perc-rh.w --out_type paint <<BR>>
  # Contrast toni-v-verb <<BR>>
  mri_vol2surf --src toni-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-verb-lh.w --out_type paint <<BR>>
  mri_vol2surf --src toni-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-verb-rh.w --out_type paint <<BR>>
  # Contrast perc-v-verb <<BR>>
  mri_vol2surf --src perc-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./perc-v-verb-lh.w --out_type paint <<BR>>
  mri_vol2surf --src perc-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./perc-v-verb-rh.w --out_type paint <<BR>>

mkdir rgb (this is where run-FSFAST.csh will write its outputs) <<BR>>
EDIT run-FSFAST.csh: change the threshold, cluster size, and subject name <<BR>>
  This creates rgb files for all conditions, thresholded and clustered NOTE: do not let the screensaver come up!! <<BR>>
  # Set threshold values for contrast categories <<BR>>
  setenv fthresh 1.5 <<BR>>
  setenv fmid 2.5 <<BR>>
  setenv fslope 2.0 <<BR>>

  # List contrast names in quotes <<BR>>
  # Here subjectname is mody068 <<BR>>
  foreach name ("toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb") <<BR>>
    setenv statsname ${name}-rh.w <<BR>>
    mri_surfcluster --hemi rh --srcsubj mody068 --src ${name}-rh.w --minarea 30 --thmin 2.0** --o ./${name}-rh-th2.0-clust30.w <<BR>>
    setenv statsname ${name}-rh-th2.0-clust30.w <<BR>>
    tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -invphaseflag 1 -tcl snapshots-rh.tcl <<BR>>
    setenv statsname ${name}-lh.w <<BR>>
    mri_surfcluster --hemi lh --srcsubj mody068 --src ${name}-lh.w --minarea 30 --thmin 2.0 --o ./${name}-lh-th2.0-clust30.w <<BR>>
    setenv statsname ${name}-lh-th2.0-clust30.w <<BR>>
    tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -invphaseflag 1 -tcl snapshots-lh.tcl <<BR>>
  end <<BR>>


  #make copies of output files from mri_surfcluster with pos and neg extensions to use in snapshots <<BR>>
  rename clust30.w clust30-pos.w *clust30.w <<BR>>

  # Now to view positive stats only <<BR>>
  foreach name ( "toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb") <<BR>>
    setenv statsname ${name}-rh-th2.0-clust30-pos.w <<BR>>
    tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -tcl snapshots-rh.tcl <<BR>>
    setenv statsname ${name}-lh-th2.0-clust30-pos.w <<BR>>
    tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -tcl snapshots-lh.tcl <<BR>>
  end <<BR>>


  rename clust30-pos.w clust30-neg.w *clust30-pos.w <<BR>>
  foreach name ( "toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb")<<BR>>
    setenv statsname ${name}-rh-th2.0-clust30-neg.w <<BR>>
    tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -invphaseflag 1 -tcl snapshots-rh.tcl <<BR>>
    setenv statsname ${name}-lh-th2.0-clust30-neg.w <<BR>>
    tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -invphaseflag 1 -tcl snapshots-lh.tcl <<BR>>
  end <<BR>>
Line 180: Line 180:
 snapshots-lh shown below [[BR]]
  set val $env(statsname) [[BR]]
  sclv_read_binary_values 0 [[BR]]
  sclv_smooth 2 val [[BR]]
  set fthresh $env(fthresh) [[BR]]
  set fmid $env(fmid) [[BR]]
  set offset 0.4 [[BR]]
  set fslope $env(fslope) [[BR]]
  set curv lh.curv [[BR]]

  read_binary_curv [[BR]]
  set curvflag 1 [[BR]]
  open_window [[BR]]
  sclv_set_current_field 0 [[BR]]

  make_lateral_view [[BR]]
  redraw [[BR]]
  save_rgb [[BR]]

  file copy -force rgb/tksurfer.rgb rgb/$val-lat.rgb [[BR]]
  rotate_brain_y 90 [[BR]]
  redraw [[BR]]
  save_rgb [[BR]]

  file copy -force rgb/tksurfer.rgb rgb/$val-post.rgb [[BR]]
  rotate_brain_y 90 [[BR]]
  redraw [[BR]]
  save_rgb [[BR]]

  file copy -force rgb/tksurfer.rgb rgb/$val-med.rgb [[BR]]
  rotate_brain_y -90 [[BR]]
  rotate_brain_x 90 [[BR]]
  redraw [[BR]]
  save_rgb [[BR]]

  file copy -force rgb/tksurfer.rgb rgb/$val-inf.rgb [[BR]]
  exit [[BR]]

mv *-clust* rgb/ [[BR]]
mv rgb rgb_th<fthresh>_clust<minarea>_<subjid> [[BR]]
cd rgb_th<fthresh>_clust<minarea>_<subjid> [[BR]]
mkdir pos [[BR]]
mkdir neg #will contain images with –truncphaseflag for all subtractions [[BR]]
mv *<clust>-pos* pos/ [[BR]]
mv *<clust>-neg* neg/ [[BR]]
cp ../gf . [[BR]]
cp gf pos [[BR]]
cp gf neg [[BR]]


foreach image (*.rgb) [[BR]]
convert $image $image.png [[BR]]
end [[BR]]

rm tksurfer.rgb* [[BR]]
rename .rgb.png .png *.rgb.png [[BR]]
rename h-th<fthresh>-clust<minarea>.w h.w * h-th<fthresh>-clust<minarea>.w* [[BR]]
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>.html [[BR]]
#this creates a webpage showing maps for all conditions, using the .png images [[BR]]
#now for pos and neg maps: [[BR]]
cd pos [[BR]]

foreach image (*.rgb) [[BR]]
convert $image $image.png [[BR]]
end [[BR]]

rename .rgb.png .png *.rgb.png [[BR]]
rename h-th<fthresh>-clust<minarea>-pos.w h.w * h-th<fthresh>-clust<minarea>-pos.w* [[BR]]
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>-pos.html [[BR]]

cd ../neg [[BR]]
foreach image (*.rgb) [[BR]]
convert $image $image.png [[BR]]
end [[BR]]

rename .rgb.png .png *.rgb.png [[BR]]
rename h-th<fthresh>-clust<minarea>-neg.w h.w * h-th<fthresh>-clust<minarea>-neg.w* [[BR]]
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>-neg.html [[BR]]
 snapshots-lh shown below <<BR>>
  set val $env(statsname) <<BR>>
  sclv_read_binary_values 0 <<BR>>
  sclv_smooth 2 val <<BR>>
  set fthresh $env(fthresh) <<BR>>
  set fmid $env(fmid) <<BR>>
  set offset 0.4 <<BR>>
  set fslope $env(fslope) <<BR>>
  set curv lh.curv <<BR>>

  read_binary_curv <<BR>>
  set curvflag 1 <<BR>>
  open_window <<BR>>
  sclv_set_current_field 0 <<BR>>

  make_lateral_view <<BR>>
  redraw <<BR>>
  save_rgb <<BR>>

  file copy -force rgb/tksurfer.rgb rgb/$val-lat.rgb <<BR>>
  rotate_brain_y 90 <<BR>>
  redraw <<BR>>
  save_rgb <<BR>>

  file copy -force rgb/tksurfer.rgb rgb/$val-post.rgb <<BR>>
  rotate_brain_y 90 <<BR>>
  redraw <<BR>>
  save_rgb <<BR>>

  file copy -force rgb/tksurfer.rgb rgb/$val-med.rgb <<BR>>
  rotate_brain_y -90 <<BR>>
  rotate_brain_x 90 <<BR>>
  redraw <<BR>>
  save_rgb <<BR>>

  file copy -force rgb/tksurfer.rgb rgb/$val-inf.rgb <<BR>>
  exit <<BR>>

mv *-clust* rgb/ <<BR>>
mv rgb rgb_th<fthresh>_clust<minarea>_<subjid> <<BR>>
cd rgb_th<fthresh>_clust<minarea>_<subjid> <<BR>>
mkdir pos <<BR>>
mkdir neg #will contain images with –truncphaseflag for all subtractions <<BR>>
mv *<clust>-pos* pos/ <<BR>>
mv *<clust>-neg* neg/ <<BR>>
cp ../gf . <<BR>>
cp gf pos <<BR>>
cp gf neg <<BR>>


foreach image (*.rgb) <<BR>>
convert $image $image.png <<BR>>
end <<BR>>

rm tksurfer.rgb* <<BR>>
rename .rgb.png .png *.rgb.png <<BR>>
rename h-th<fthresh>-clust<minarea>.w h.w * h-th<fthresh>-clust<minarea>.w* <<BR>>
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>.html <<BR>>
#this creates a webpage showing maps for all conditions, using the .png images <<BR>>
#now for pos and neg maps: <<BR>>
cd pos <<BR>>

foreach image (*.rgb) <<BR>>
convert $image $image.png <<BR>>
end <<BR>>

rename .rgb.png .png *.rgb.png <<BR>>
rename h-th<fthresh>-clust<minarea>-pos.w h.w * h-th<fthresh>-clust<minarea>-pos.w* <<BR>>
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>-pos.html <<BR>>

cd ../neg <<BR>>
foreach image (*.rgb) <<BR>>
convert $image $image.png <<BR>>
end <<BR>>

rename .rgb.png .png *.rgb.png <<BR>>
rename h-th<fthresh>-clust<minarea>-neg.w h.w * h-th<fthresh>-clust<minarea>-neg.w* <<BR>>
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>-neg.html <<BR>>
Line 250: Line 250:
Func2sph-sess –analysis reasoning-analysis –projfrac .3 –s <subjid> [[BR]]
'''''**I UNDERSTAND A PROJECTION FRACTION OF 0.3 IS STANDARD, WOULD YOU EVER CHANGE IT?''''' [[BR]]

Func2tal-sess –res 4 –analysis reasoning-analysis –s <subjid> [[BR]]
'''''**AGAIN, 4 SEEMS TO BE DEFAULT FOR THE RESOLUTION, IS THIS WHAT YOU ALWAYS WANT TO USE?''''' [[BR]]

Sphsmooth-sess –analysis reasoning-analysis –smoothsteps 20 –outsphdir sphsm01 –s <subjid> [[BR]]
'''''**WHAT IS THE RULE OF THUMBS FOR –SMOOTHSTEPS? I SAW THE TIP ON THE WIKI THAT YOU WANT YOUR SMOOTHING TO BE THE SIZE OF YOUR ACTIVATION, BUT HOW IS THAT A PRACTICAL THING TO IMPLEMENT? [[BR]]
DO I STILL WANT TO SMOOTH IN PREPROC IF GONNA SMOOTH HERE? LINK BETWEEN THIS FWHM AND INDIVIDUAL ANALYSIS? [[BR]]'''''
Func2sph-sess –analysis reasoning-analysis –projfrac .3 –s <subjid> <<BR>>
'''''**I UNDERSTAND A PROJECTION FRACTION OF 0.3 IS STANDARD, WOULD YOU EVER CHANGE IT?''''' <<BR>>

Func2tal-sess –res 4 –analysis reasoning-analysis –s <subjid> <<BR>>
'''''**AGAIN, 4 SEEMS TO BE DEFAULT FOR THE RESOLUTION, IS THIS WHAT YOU ALWAYS WANT TO USE?''''' <<BR>>

Sphsmooth-sess –analysis reasoning-analysis –smoothsteps 20 –outsphdir sphsm01 –s <subjid> <<BR>>
'''''**WHAT IS THE RULE OF THUMBS FOR –SMOOTHSTEPS? I SAW THE TIP ON THE WIKI THAT YOU WANT YOUR SMOOTHING TO BE THE SIZE OF YOUR ACTIVATION, BUT HOW IS THAT A PRACTICAL THING TO IMPLEMENT? <<BR>>
DO I STILL WANT TO SMOOTH IN PREPROC IF GONNA SMOOTH HERE? LINK BETWEEN THIS FWHM AND INDIVIDUAL ANALYSIS? <<BR>>'''''
Line 261: Line 261:
 [[BR]]  <<BR>>
Line 264: Line 264:
 [[BR]]

Stxgrinder-sess –analysis reasoning-analysis –s m14-68-86 –space sph –spacedir sphsm01 –all [[BR]]

Stxgrinder-sess –analysis reasoning-analysis –s m14-68-86 –space tal –spacedir tal –all [[BR]]

Paint-sess –analysis reasoning-analysis –all –s m14-68-86 –subject mody014 –space sph –spacedir sphsm01 –isxavg fixed [[BR]]
'''''**IS –SUBJECT SPECIFYING WHICH ANATOMICAL TO RENDER THE GROUP AVERAGE ON? IF SO THEN AFTERWARDS WHEN YOU DISPLAY YOUR STATS ON A SURFACE, YOU WOULD HAVE TO ALWAYS USE THAT ONE, RIGHT? [[BR]]
IS FSAVERAGE WHAT YOU WOULD USE NOW INSTEAD?''''' [[BR]]

tksurfer <subject i used for paint-sess above, mody014> lh inflated -overlay <group>/bold/<analysis>/<spacedir>-ffx/<contrast>/sig-0-mody014-lh.w [[BR]]


 <<BR>>

Stxgrinder-sess –analysis reasoning-analysis –s m14-68-86 –space sph –spacedir sphsm01 –all <<BR>>

Stxgrinder-sess –analysis reasoning-analysis –s m14-68-86 –space tal –spacedir tal –all <<BR>>

Paint-sess –analysis reasoning-analysis –all –s m14-68-86 –subject mody014 –space sph –spacedir sphsm01 –isxavg fixed <<BR>>
'''''**IS –SUBJECT SPECIFYING WHICH ANATOMICAL TO RENDER THE GROUP AVERAGE ON? IF SO THEN AFTERWARDS WHEN YOU DISPLAY YOUR STATS ON A SURFACE, YOU WOULD HAVE TO ALWAYS USE THAT ONE, RIGHT? <<BR>>
IS FSAVERAGE WHAT YOU WOULD USE NOW INSTEAD?''''' <<BR>>

tksurfer <subject i used for paint-sess above, mody014> lh inflated -overlay <group>/bold/<analysis>/<spacedir>-ffx/<contrast>/sig-0-mody014-lh.w <<BR>>


'''THIS IS A WORK IN PROGRESS AND LIKELY CONTAINS MISTAKES. PLEASE IGNORE FOR NOW'''


FS-FAST USE CASE 1: fMRI Workflow for Reasoning Study

Experiment design

The experiment consists of 3 active conditions (+baseline), referred to as V, T and P.
The task consists in solving visually presented problems in each of these conditions. Subjects respond using a button box.
The paradigm is presented in 6 consecutive runs, each lasting 300s. In each run, two of the three conditions are shown to minimize subject confusion, and increase statistical power
**WHAT ARE THE EFFECTS ON POWER OF SHOWING ONLY A SUBSET OF THE CONDITIONS IN EACH RUN??.
The runs consist of
Run 1: T-P
Run 2: T-V
Run 3: P-V
Run 4: T-P
Run 5: T-V
Run 6: P-V
This alternation allows for similar scanner drift effects across the different pairings of the conditions (i.e. tentatively the same “amount” of drift occurs between runs 1 and 4 and 2 and 5, assuming drift is linear). Within each run, the plates are presented using a pseudo-randomized (order the same for all subjects, but only known to the experimenter) event-related paradigm. Each plate presentation is considered an event, which can last between 1 and 10s, as the plate disappears when the subject responds or times out after 10 seconds (at which point the paradigm goes on by itself). In-between plates, a fixation cross is shown with a random ISI ranging from 1500 to 3500ms in 250ms steps. Every 6 plates, the fixation cross is held for a longer time, in order to match the total run duration across subjects.
**IS THIS NECESSARY? WHY? IS THERE A BETTER WAY TO GO ABOUT IT THAN MY 'catchup times'?.
Thus, the 7th plate appears at t=75s, the 13th at t=150s and the 19th at t=225s. The total run time of 5minutes is therefore the same as if all plates timed out (10x24 + 2.5x24 = 300).
The PAR files look like this:

Init_time

condition_nb

duration

condition_name

0

0

2.5178

baseline

2.5178

2

2.3427

perceptual

4.8605

0

3.2763

baseline

8.1368

3

2.1638

verbal

10.3006

0

2.5216

baseline

12.8222

2

2.5746

perceptual

15.3968

0

2.0273

baseline

Individual Analysis

Unpacking

nmrenv
setenv SUBJECTS_DIR /space/tango/5/users/cherif/reasoning
findsession <subjID>

unpacksdcmdir –src <> -targ <> -scanonly file
unpacksdcmdir –src <> -targ <subjdir> -fsfast -run <#> bold bshort f -run … (for all 6 runs)
unpacksdcmdir –src <> -targ <subjdir> -run <#> 3danat cor blah (for the structural)

Structural Processing

nmrenv
setenv SUBJECTS_DIR /space/tango/3/users/recon_modygp/cherif
recon-all –subjid <subjid> –autorecon1 –autorecon2
#perform manual edits
recon-all –subjid <subjid> -autorecon3

Functional Analysis Stream

cd /space/tango/5/users/cherif/reasoning/
ln –s /space/tango/3/users/recon_modygp/cherif/<subjID> <subjID>

cd fMRI_analysis/subjects/<subjID>
cat > fMRI_analysis/subjects/<subjID>/subjectname
<subjID>
<ctrl+d>

cp <subjid>_run<#>_par.txt bold/<correspondingrun#>/<subjid>_par.par
cp <subjid>_par.par reason_par.par

  • Pre-processing

cd ../
preproc-sess –s <subjid> –smout <smfmc#> -fwhm <fwhm>
**DO YOU STILL WANT TO APPLY SMOOTHING HERE IF YOU'RE GONNA SMOOTH ON THE SURFACE? SHOULD THERE BE A QUANTITATIVE LINK BETWEEN THE TWO FWHM?

  • Registration to high res scan

spmregister-sess –s <subjid>
tkregister-sess –s <subjid>

  • Define the Analysis

mkanalysis-sess.new -analysis reasoning-analysis –TR 2 –paradigm reason_par.par -designtype event-related –funcstem fmcsm5 –nconditions 3 -gammafit 2.25 1.25 –inorm –mcextreg
**WHAT ARE THE EFFECTS OF CHANGING TAUMAX, TIMEWINDOW, POLYFIT? RULES OF THUMB? HOW TO USE TER?
IF YOU USE FIR ANALYSIS INSTEAD OF GAMMAFIT, THEN NEED TO CHOOSE TIMEWINDOW AND PRESTIM PARAMETERS. RULE OF THUMB IS TIMEWINDOW=16S+LONGEST EVENT+PRESTIM, AND PRESTIM=2TRS

  • Run the Analysis

selxavg-sess –s <subjid> -analysis reasoning-analysis

  • Define Contrasts

OMNIBUS:
mkcontrast-sess –analysis <analysis> -contrast omnibus –a 1 –a 2 –a 3 -c 0 -nosumconds

More interesting contrasts:
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-fix –a 1 -c 0
mkcontrast-sess –analysis reasoning-analysis –contrast perc-v-fix –a 2 -c 0
mkcontrast-sess –analysis reasoning-analysis –contrast verb-v-fix –a 3 -c 0
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-verb –a 1 –c 3
mkcontrast-sess –analysis reasoning-analysis –contrast toni-v-perc –a 1 –c 2
mkcontrast-sess –analysis reasoning-analysis –contrast perc-v-verb –a 2 -c 3

  • Compute stats (GLM)

stxgrinder-sess –analysis reasoning-analysis - s <subjid> –contrast <contrastname>
or
stxgrinder-sess –analysis reasoning-analysis –s <subjid> -all

  • Viewing results with sliceview

sliceview-sess –analysis <analysis> -slice <#> -contrast <contrastname> -map <mapname> -s <subjid>

  • Viewing results on anatomical

paint-sess –analysis <analysis> -s <subjid> –c <contrastname> -map <mapname>

surf-sess –s <subjid> –a <analysis> -c <contrastname> -map <mapname>

tkmedit-sess –analysis <analysis> -s <subjid> –contrast <contrastname> -map <mapname>

Making webpages of overlay contrasts for visualization

# The scripts used here are adapted from scripts written by Thomas Witzel. No support is provided for them, if you want to use them, you are on your own!

cp gf <subjid>/bold/reasoning-analysis/
cp run-FSFAST.csh <subjid>/bold/reasoning-analysis/
cp vol2surf_FSFAST <subjid>/bold/reasoning-analysis/
cp snapshots* <subjid>/bold/reasoning-analysis/

cd <subjid>/bold/reasoning-analysis

./vol2surf_FSFAST

  • this script paints the activation on the inflated surface for all conditions

  • # Contrast toni-v-fix
    mri_vol2surf --src toni-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-fix-lh.w --out_type paint
    mri_vol2surf --src toni-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-fix-rh.w --out_type paint
    # Contrast perc-v-fix
    mri_vol2surf --src perc-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./perc-v-fix-lh.w --out_type paint
    mri_vol2surf --src perc-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./perc-v-fix-rh.w --out_type paint
    # Contrast verb-v-fix
    mri_vol2surf --src verb-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./verb-v-fix-lh.w --out_type paint
    mri_vol2surf --src verb-v-fix/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./verb-v-fix-rh.w --out_type paint
    # Contrast toni-v-perc
    mri_vol2surf --src toni-v-perc/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-perc-lh.w --out_type paint
    mri_vol2surf --src toni-v-perc/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-perc-rh.w --out_type paint
    # Contrast toni-v-verb
    mri_vol2surf --src toni-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./toni-v-verb-lh.w --out_type paint
    mri_vol2surf --src toni-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./toni-v-verb-rh.w --out_type paint
    # Contrast perc-v-verb
    mri_vol2surf --src perc-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi lh --o ./perc-v-verb-lh.w --out_type paint
    mri_vol2surf --src perc-v-verb/sig --src_type bfloat --srcreg ../register.dat --hemi rh --o ./perc-v-verb-rh.w --out_type paint

mkdir rgb (this is where run-FSFAST.csh will write its outputs)
EDIT run-FSFAST.csh: change the threshold, cluster size, and subject name

  • This creates rgb files for all conditions, thresholded and clustered NOTE: do not let the screensaver come up!!
    # Set threshold values for contrast categories
    setenv fthresh 1.5
    setenv fmid 2.5
    setenv fslope 2.0

    # List contrast names in quotes
    # Here subjectname is mody068
    foreach name ("toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb")

    • setenv statsname ${name}-rh.w
      mri_surfcluster --hemi rh --srcsubj mody068 --src ${name}-rh.w --minarea 30 --thmin 2.0** --o ./${name}-rh-th2.0-clust30.w
      setenv statsname ${name}-rh-th2.0-clust30.w
      tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -invphaseflag 1 -tcl snapshots-rh.tcl
      setenv statsname ${name}-lh.w
      mri_surfcluster --hemi lh --srcsubj mody068 --src ${name}-lh.w --minarea 30 --thmin 2.0 --o ./${name}-lh-th2.0-clust30.w
      setenv statsname ${name}-lh-th2.0-clust30.w
      tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -invphaseflag 1 -tcl snapshots-lh.tcl

    end

    #make copies of output files from mri_surfcluster with pos and neg extensions to use in snapshots
    rename clust30.w clust30-pos.w *clust30.w

    # Now to view positive stats only
    foreach name ( "toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb")

    • setenv statsname ${name}-rh-th2.0-clust30-pos.w
      tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -tcl snapshots-rh.tcl
      setenv statsname ${name}-lh-th2.0-clust30-pos.w
      tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -tcl snapshots-lh.tcl

    end

    rename clust30-pos.w clust30-neg.w *clust30-pos.w
    foreach name ( "toni-v-fix" "perc-v-fix" "verb-v-fix" "toni-v-perc" "toni-v-verb" "perc-v-verb")

    • setenv statsname ${name}-rh-th2.0-clust30-neg.w
      tksurfer mody068 rh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -invphaseflag 1 -tcl snapshots-rh.tcl
      setenv statsname ${name}-lh-th2.0-clust30-neg.w
      tksurfer mody068 lh inflated -colscalebarflag 1 -scalebarflag 1 -truncphaseflag 1 -invphaseflag 1 -tcl snapshots-lh.tcl

    end

    run-FSFAST.csh calls snapshots-lh.tcl and snapshots-rh.tcl, which are equivalent… snapshots-lh shown below
    set val $env(statsname)
    sclv_read_binary_values 0
    sclv_smooth 2 val
    set fthresh $env(fthresh)
    set fmid $env(fmid)
    set offset 0.4
    set fslope $env(fslope)
    set curv lh.curv
    read_binary_curv
    set curvflag 1
    open_window
    sclv_set_current_field 0

    make_lateral_view
    redraw
    save_rgb
    file copy -force rgb/tksurfer.rgb rgb/$val-lat.rgb
    rotate_brain_y 90
    redraw
    save_rgb
    file copy -force rgb/tksurfer.rgb rgb/$val-post.rgb
    rotate_brain_y 90
    redraw
    save_rgb
    file copy -force rgb/tksurfer.rgb rgb/$val-med.rgb
    rotate_brain_y -90
    rotate_brain_x 90
    redraw
    save_rgb
    file copy -force rgb/tksurfer.rgb rgb/$val-inf.rgb
    exit

mv *-clust* rgb/
mv rgb rgb_th<fthresh>_clust<minarea>_<subjid>
cd rgb_th<fthresh>_clust<minarea>_<subjid>
mkdir pos
mkdir neg #will contain images with –truncphaseflag for all subtractions
mv *<clust>-pos* pos/
mv *<clust>-neg* neg/
cp ../gf .
cp gf pos
cp gf neg

foreach image (*.rgb)
convert $image $image.png
end
rm tksurfer.rgb*
rename .rgb.png .png *.rgb.png
rename h-th<fthresh>-clust<minarea>.w h.w * h-th<fthresh>-clust<minarea>.w*
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>.html
#this creates a webpage showing maps for all conditions, using the .png images
#now for pos and neg maps:
cd pos
foreach image (*.rgb)
convert $image $image.png
end
rename .rgb.png .png *.rgb.png
rename h-th<fthresh>-clust<minarea>-pos.w h.w * h-th<fthresh>-clust<minarea>-pos.w*
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>-pos.html

cd ../neg
foreach image (*.rgb)
convert $image $image.png
end
rename .rgb.png .png *.rgb.png
rename h-th<fthresh>-clust<minarea>-neg.w h.w * h-th<fthresh>-clust<minarea>-neg.w*
./gf toni-v-fix perc-v-fix verb-v-fix toni-v-perc toni-v-verb perc-v-verb <subjid>_th<fthresh>_clust<minarea>-neg.html

GROUP stats

Func2sph-sess –analysis reasoning-analysis –projfrac .3 –s <subjid>
**I UNDERSTAND A PROJECTION FRACTION OF 0.3 IS STANDARD, WOULD YOU EVER CHANGE IT?

Func2tal-sess –res 4 –analysis reasoning-analysis –s <subjid>
**AGAIN, 4 SEEMS TO BE DEFAULT FOR THE RESOLUTION, IS THIS WHAT YOU ALWAYS WANT TO USE?

Sphsmooth-sess –analysis reasoning-analysis –smoothsteps 20 –outsphdir sphsm01 –s <subjid>
**WHAT IS THE RULE OF THUMBS FOR –SMOOTHSTEPS? I SAW THE TIP ON THE WIKI THAT YOU WANT YOUR SMOOTHING TO BE THE SIZE OF YOUR ACTIVATION, BUT HOW IS THAT A PRACTICAL THING TO IMPLEMENT?
DO I STILL WANT TO SMOOTH IN PREPROC IF GONNA SMOOTH HERE? LINK BETWEEN THIS FWHM AND INDIVIDUAL ANALYSIS?

Isxavg-fe-sess –analysis reasoning-analysis –group m14-68-86 –space sph –spacedir sphsm01 –s <subjid1> -s <subjid2> …

Isxavg-fe-sess –analysis reasoning-analysis –group m14-68-86 –space tal –spacedir tal –s <subjid1> -s <subjid2> …

Stxgrinder-sess –analysis reasoning-analysis –s m14-68-86 –space sph –spacedir sphsm01 –all

Stxgrinder-sess –analysis reasoning-analysis –s m14-68-86 –space tal –spacedir tal –all

Paint-sess –analysis reasoning-analysis –all –s m14-68-86 –subject mody014 –space sph –spacedir sphsm01 –isxavg fixed
**IS –SUBJECT SPECIFYING WHICH ANATOMICAL TO RENDER THE GROUP AVERAGE ON? IF SO THEN AFTERWARDS WHEN YOU DISPLAY YOUR STATS ON A SURFACE, YOU WOULD HAVE TO ALWAYS USE THAT ONE, RIGHT?
IS FSAVERAGE WHAT YOU WOULD USE NOW INSTEAD?

tksurfer <subject i used for paint-sess above, mody014> lh inflated -overlay <group>/bold/<analysis>/<spacedir>-ffx/<contrast>/sig-0-mody014-lh.w

UseCase1 (last edited 2008-04-29 11:46:12 by localhost)