FS Course Laptop Commands
List of commands to try on course laptops to verify tutorial commands will work.
Contents
-
FS Course Laptop Commands
- CHECK BEFORE RUNNING COMMANDS
- Interaction with Individual Subject Data
- Troubleshooting
- ROI Analysis
- Longitudinal Tutorial
- Multi-Modal Registration
- Multi-Modal fMRI Individual
- Multi-Modal fMRI Group
- Multi-Modal DTI Group
- Group Analysis
- Group Analysis (QDEC)
- FS FAST
- Diffusion Tutorial
- TRACULA Tutorial
CHECK BEFORE RUNNING COMMANDS
- Set FREESURFER_HOME before executing this script
- Also make sure $FREESURFER_HOME/subjects/buckner_data exists or is symlinked to the buckner data directory.
Interaction with Individual Subject Data
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs cd $SUBJECTS_DIR freeview -v good_output/mri/T1.mgz good_output/mri/wm.mgz:colormap=heat:opacity=0.4 \ good_output/mri/brainmask.mgz good_output/mri/aseg.mgz:colormap=lut:opacity=0.2 \ -f good_output/surf/lh.white:edgecolor=blue good_output/surf/lh.pial:edgecolor=red \ good_output/surf/rh.white:edgecolor=blue good_output/surf/rh.pial:edgecolor=red \ tksurfer good_output lh inflated freeview good_output/mri/brainmask.mgz \ good_output/mri/aseg.mgz:colormap=lut:opacity=0.2 \ -f good_output/surf/lh.white:edgecolor=blue good_output/surf/lh.pial:edgecolor=red \ good_output/surf/rh.white:edgecolor=blue good_output/surf/rh.pial:edgecolor=red \
Troubleshooting
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs cd $SUBJECTS_DIR freeview -v pial_edits_before/mri/T1.mgz \ pial_edits_before/mri/brainmask.mgz \ -f pial_edits_before/surf/lh.white:edgecolor=yellow \ pial_edits_before/surf/lh.pial:edgecolor=red \ pial_edits_before/surf/rh.white:edgecolor=yellow \ pial_edits_before/surf/rh.pial:edgecolor=red \ tksurfer pial_edits_before lh inflated tksurfer pial_edits_before rh inflated freeview -v wm1_edits_before/mri/T1.mgz \ wm1_edits_before/mri/brainmask.mgz \ -f wm1_edits_before/surf/lh.white:edgecolor=yellow \ wm1_edits_before/surf/lh.pial:edgecolor=red \ wm1_edits_before/surf/rh.white:edgecolor=yellow \ wm1_edits_before/surf/rh.pial:edgecolor=red \ tksurfer wm1_edits_before lh inflated tksurfer wm1_edits_before rh inflated freeview -v wm1_edits_after/mri/T1.mgz \ wm1_edits_after/mri/brainmask.mgz \ -f wm1_edits_after/surf/lh.white:edgecolor=yellow \ wm1_edits_after/surf/lh.pial:edgecolor=red \ wm1_edits_after/surf/rh.white:edgecolor=yellow \ wm1_edits_after/surf/rh.pial:edgecolor=red \ freeview -v topo_defect_before/mri/brainmask.mgz \ topo_defect_before/mri/wm.mgz:colormap=heat:opacity=0.4 \ -f topo_defect_before/surf/lh.white:edgecolor=yellow \ topo_defect_before/surf/lh.pial:edgecolor=red \ topo_defect_before/surf/rh.white:edgecolor=yellow \ topo_defect_before/surf/rh.pial:edgecolor=red \ freeview -v topo_defect_after/mri/brainmask.mgz \ topo_defect_after/mri/wm.mgz:colormap=heat:opacity=0.4 \ -f topo_defect_after/surf/lh.white:edgecolor=yellow \ topo_defect_after/surf/lh.pial:edgecolor=red \ topo_defect_after/surf/rh.white:edgecolor=yellow \ topo_defect_after/surf/rh.pial:edgecolor=red \ freeview -v skullstrip1_before/mri/T1.mgz \ skullstrip1_before/mri/brainmask.mgz \ -f skullstrip1_before/surf/lh.white:edgecolor=yellow \ skullstrip1_before/surf/lh.pial:edgecolor=red \ skullstrip1_before/surf/rh.white:edgecolor=yellow \ skullstrip1_before/surf/rh.pial:edgecolor=red \ freeview -v cp_before/mri/brainmask.mgz -f pial_edits_before/surf/lh.white:edgecolor=blue pial_edits_before/surf/lh.pial:edgecolor=red pial_edits_before/surf/rh.white:edgecolor=blue pial_edits_before/surf/rh.pial:edgecolor=red tksurfer cp_before lh inflated tksurfer cp_before rh inflated freeview -v tal_before/mri/T1.mgz tal_before/mri/brainmask.mgz:reg=transforms/talairach.xfm tksurfer tal_before lh inflated tksurfer tal_before rh inflated
ROI Analysis
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs/group_analysis_tutorial cd $SUBJECTS_DIR freeview -v 004/mri/orig.mgz 004/mri/aparc+aseg.mgz:colormap=lut:opacity=0.4 tksurfer 004 lh inflated -annot aparc.annot less $FREESURFER_HOME/FreeSurferColorLUT.txt mri_label2label \ --srcsubject fsaverage \ --srclabel fsaverage/label/lh.BA45.label \ --trgsubject 004 \ --trglabel 004/label/lh.BA45.label \ --hemi lh \ --regmethod surface less 004/label/lh.BA45.label freeview -v 004/mri/orig.mgz tksurfer 004 lh inflated cd $SUBJECTS_DIR/004/stats less aseg.stats less lh.aparc.stats setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs/group_analysis_tutorial cd $SUBJECTS_DIR asegstats2table --subjects 004 021 040 067 080 092 \ --segno 11 17 18 \ --tablefile aseg.vol.table less $FREESURFER_HOME/FreeSurferColorLUT.txt less aseg.vol.table #oocalc aseg.vol.table #/Applications/OpenOffice.org.app/Contents/MacOS/scalc aseg.vol.table asegstats2table \ --subjects 004 021 040 067 080 092 \ --segno 11 17 18 \ --meas mean \ --tablefile aseg.mean-intensity.table asegstats2table \ --subjects 004 021 040 067 080 092 \ --segno 3007 3021 3022 4022 \ --stats wmparc.stats \ --tablefile wmparc.vol.table aparcstats2table --hemi lh \ --subjects 004 021 040 067 080 092 \ --tablefile lh.aparc.area.table aparcstats2table --hemi lh \ --subjects 004 021 040 067 080 092 \ --meas thickness \ --parc aparc.a2009s \ --tablefile lh.aparc.a2009.thickness.table
Longitudinal Tutorial
setenv SUBJECTS_DIR $TUTORIAL_DATA/long-tutorial cd $SUBJECTS_DIR freeview -v OAS2_0001/mri/norm.mgz \ -f OAS2_0001/surf/lh.pial:edgecolor=red \ OAS2_0001/surf/rh.pial:edgecolor=red \ OAS2_0001/surf/lh.white:edgecolor=blue \ OAS2_0001/surf/rh.white:edgecolor=blue freeview -v OAS2_0001_MR1.long.OAS2_0001/mri/norm.mgz \ OAS2_0001_MR2.long.OAS2_0001/mri/norm.mgz \ -f OAS2_0001_MR1.long.OAS2_0001/surf/lh.pial:edgecolor=red \ OAS2_0001_MR1.long.OAS2_0001/surf/lh.white:edgecolor=blue \ OAS2_0001_MR2.long.OAS2_0001/surf/lh.pial:edgecolor=255,128,128 \ OAS2_0001_MR2.long.OAS2_0001/surf/lh.white:edgecolor=lightblue gedit qdec/long.qdec.table.dat ooffice -calc qdec/long.qdec.table.dat tksurfer OAS2_0001 lh pial -overlay $SUBJECTS_DIR/OAS2_0001/surf/lh.long.thickness-avg.fwhm15.mgh -timecourse $SUBJECTS_DIR/OAS2_0001/surf/lh.long.thickness-stack.mgh -aparc tksurfer fsaverage lh pial -overlay $SUBJECTS_DIR/OAS2_0001/surf/lh.long.thickness-spc.fwhm15.fsaverage.mgh -aparc freeview -f fsaverage/surf/lh.pial:overlay=$SUBJECTS_DIR/OAS2_0001/surf/lh.long.thickness-spc.fwhm15.fsaverage.mgh:overlay_threshold=2,5 long_qdec_table --qdec ./qdec/long.qdec.table.dat --cross --out ./qdec/cross.qdec.table.dat qdec --table ./qdec/cross.qdec.table.dat setenv SUBJECTS_DIR $TUTORIAL_DATA/long-tutorial cd $SUBJECTS_DIR freeview -v OAS2_0088/mri/T1.mgz \ OAS2_0088/mri/brainmask.mgz \ -f OAS2_0088/surf/lh.pial:edgecolor=red \ OAS2_0088/surf/rh.pial:edgecolor=red \ OAS2_0088/surf/lh.white:edgecolor=blue \ OAS2_0088/surf/rh.white:edgecolor=blue freeview -v OAS2_0088_MR1/mri/T1.mgz \ OAS2_0088_MR1/mri/brainmask.mgz \ -f OAS2_0088_MR1/surf/lh.pial:edgecolor=red \ OAS2_0088_MR1/surf/rh.pial:edgecolor=red \ OAS2_0088_MR1/surf/lh.white:edgecolor=blue \ OAS2_0088_MR1/surf/rh.white:edgecolor=blue freeview -v OAS2_0088_MR2/mri/T1.mgz \ OAS2_0088_MR2/mri/brainmask.mgz \ -f OAS2_0088_MR2/surf/lh.pial:edgecolor=red \ OAS2_0088_MR2/surf/rh.pial:edgecolor=red \ OAS2_0088_MR2/surf/lh.white:edgecolor=blue \ OAS2_0088_MR2/surf/rh.white:edgecolor=blue freeview -v OAS2_0088_MR1.long.OAS2_0004/mri/T1.mgz \ OAS2_0088_MR1.long.OAS2_0004/mri/brainmask.mgz \ -f OAS2_0088_MR1.long.OAS2_0004/surf/lh.pial:edgecolor=red \ OAS2_0088_MR1.long.OAS2_0004/surf/rh.pial:edgecolor=red \ OAS2_0088_MR1.long.OAS2_0004/surf/lh.white:edgecolor=blue \ OAS2_0088_MR1.long.OAS2_0004/surf/rh.white:edgecolor=blue freeview -v OAS2_0088_MR2.long.OAS2_0004/mri/T1.mgz \ OAS2_0088_MR2.long.OAS2_0004/mri/brainmask.mgz \ -f OAS2_0088_MR2.long.OAS2_0004/surf/lh.pial:edgecolor=red \ OAS2_0088_MR2.long.OAS2_0004/surf/rh.pial:edgecolor=red \ OAS2_0088_MR2.long.OAS2_0004/surf/lh.white:edgecolor=blue \ OAS2_0088_MR2.long.OAS2_0004/surf/rh.white:edgecolor=blue freeview -v OAS2_0057/mri/T1.mgz \ OAS2_0057/mri/brainmask.mgz \ -f OAS2_0057/surf/lh.pial:edgecolor=red \ OAS2_0057/surf/rh.pial:edgecolor=red \ OAS2_0057/surf/lh.white:edgecolor=blue \ OAS2_0057/surf/rh.white:edgecolor=blue freeview -v OAS2_0057_MR1/mri/T1.mgz \ OAS2_0057_MR1/mri/brainmask.mgz \ -f OAS2_0057_MR1/surf/lh.pial:edgecolor=red \ OAS2_0057_MR1/surf/rh.pial:edgecolor=red \ OAS2_0057_MR1/surf/lh.white:edgecolor=blue \ OAS2_0057_MR1/surf/rh.white:edgecolor=blue freeview -v OAS2_0057_MR2/mri/T1.mgz \ OAS2_0057_MR2/mri/brainmask.mgz \ -f OAS2_0057_MR2/surf/lh.pial:edgecolor=red \ OAS2_0057_MR2/surf/rh.pial:edgecolor=red \ OAS2_0057_MR2/surf/lh.white:edgecolor=blue \ OAS2_0057_MR2/surf/rh.white:edgecolor=blue freeview -v OAS2_0121_MR1/mri/T1.mgz \ OAS2_0121_MR1/mri/brainmask.mgz \ -f OAS2_0121_MR1/surf/lh.pial:edgecolor=red \ OAS2_0121_MR1/surf/rh.pial:edgecolor=red \ OAS2_0121_MR1/surf/lh.white:edgecolor=blue \ OAS2_0121_MR1/surf/rh.white:edgecolor=blue freeview -v OAS2_0121_MR2/mri/T1.mgz \ OAS2_0121_MR2/mri/brainmask.mgz \ -f OAS2_0121_MR2/surf/lh.pial:edgecolor=red \ OAS2_0121_MR2/surf/rh.pial:edgecolor=red \ OAS2_0121_MR2/surf/lh.white:edgecolor=blue \ OAS2_0121_MR2/surf/rh.white:edgecolor=blue freeview -v OAS2_0121/mri/T1.mgz \ OAS2_0121/mri/brainmask.mgz \ -f OAS2_0121/surf/lh.pial:edgecolor=red \ OAS2_0121/surf/rh.pial:edgecolor=red \ OAS2_0121/surf/lh.white:edgecolor=blue \ OAS2_0121/surf/rh.white:edgecolor=blue freeview -v OAS2_0121_MR1.long.OAS2_0121/mri/T1.mgz \ OAS2_0121_MR1.long.OAS2_0121/mri/brainmask.mgz \ -f OAS2_0121_MR1.long.OAS2_0121/surf/lh.pial:edgecolor=red \ OAS2_0121_MR1.long.OAS2_0121/surf/rh.pial:edgecolor=red \ OAS2_0121_MR1.long.OAS2_0121/surf/lh.white:edgecolor=blue \ OAS2_0121_MR1.long.OAS2_0121/surf/rh.white:edgecolor=blue freeview -v OAS2_0121_MR2.long.OAS2_0121/mri/T1.mgz \ OAS2_0121_MR2.long.OAS2_0121/mri/brainmask.mgz \ -f OAS2_0121_MR2.long.OAS2_0121/surf/lh.pial:edgecolor=red \ OAS2_0121_MR2.long.OAS2_0121/surf/rh.pial:edgecolor=red \ OAS2_0121_MR2.long.OAS2_0121/surf/lh.white:edgecolor=blue \ OAS2_0121_MR2.long.OAS2_0121/surf/rh.white:edgecolor=blue freeview -v OAS2_0185/mri/wm.mgz \ OAS2_0185/mri/brainmask.mgz \ -f OAS2_0185/surf/lh.pial:edgecolor=red \ OAS2_0185/surf/rh.pial:edgecolor=red \ OAS2_0185/surf/lh.white:edgecolor=blue \ OAS2_0185/surf/rh.white:edgecolor=blue freeview -v OAS2_0185_MR1/mri/wm.mgz \ OAS2_0185_MR1/mri/brainmask.mgz \ -f OAS2_0185_MR1/surf/lh.pial:edgecolor=red \ OAS2_0185_MR1/surf/rh.pial:edgecolor=red \ OAS2_0185_MR1/surf/lh.white:edgecolor=blue \ OAS2_0185_MR1/surf/rh.white:edgecolor=blue freeview -v OAS2_0185_MR2/mri/wm.mgz \ OAS2_0185_MR2/mri/brainmask.mgz \ -f OAS2_0185_MR2/surf/lh.pial:edgecolor=red \ OAS2_0185_MR2/surf/rh.pial:edgecolor=red \ OAS2_0185_MR2/surf/lh.white:edgecolor=blue \ OAS2_0185_MR2/surf/rh.white:edgecolor=blue freeview -v OAS2_0185_MR1.long.OAS2_0185/mri/wm.mgz \ OAS2_0185_MR1.long.OAS2_0185/mri/brainmask.mgz \ -f OAS2_0185_MR1.long.OAS2_0185/surf/lh.pial:edgecolor=red \ OAS2_0185_MR1.long.OAS2_0185/surf/rh.pial:edgecolor=red \ OAS2_0185_MR1.long.OAS2_0185/surf/lh.white:edgecolor=blue \ OAS2_0185_MR1.long.OAS2_0185/surf/rh.white:edgecolor=blue freeview -v OAS2_0185_MR2.long.OAS2_0185/mri/wm.mgz \ OAS2_0185_MR2.long.OAS2_0185/mri/brainmask.mgz \ -f OAS2_0185_MR2.long.OAS2_0185/surf/lh.pial:edgecolor=red \ OAS2_0185_MR2.long.OAS2_0185/surf/rh.pial:edgecolor=red \ OAS2_0185_MR2.long.OAS2_0185/surf/lh.white:edgecolor=blue \ OAS2_0185_MR2.long.OAS2_0185/surf/rh.white:edgecolor=blue freeview -v OAS2_0002_MR2/mri/brain.finalsurfs.mgz \ OAS2_0002_MR2/mri/brainmask.mgz \ OAS2_0002_MR2/mri/aseg.mgz:colormap=lut:opacity=0.25 \ -f OAS2_0002_MR2/surf/lh.pial:edgecolor=red \ OAS2_0002_MR2/surf/rh.pial:edgecolor=red \ OAS2_0002_MR2/surf/lh.white:edgecolor=blue \ OAS2_0002_MR2/surf/rh.white:edgecolor=blue
Multi-Modal Registration
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs cd $SUBJECTS_DIR/multimodal/fmri/fbirn-101 tkregister2 --mov template.nii --s fbirn-anat-101.v4 \ --regheader --reg myregister.dat --surf bbregister --mov template.nii --bold \ --s fbirn-anat-101.v4 \ --init-fsl --reg register.dat cat register.dat tkregister2 --mov template.nii --reg register.dat --surf
Multi-Modal fMRI Individual
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs cd $SUBJECTS_DIR/multimodal/fmri/fbirn-101 tkregister2 --mov template.nii --reg bb.register.dat --surf freeview -v $SUBJECTS_DIR/fbirn-anat-101.v4/mri/orig.mgz \ $SUBJECTS_DIR/fbirn-anat-101.v4/mri/aparc+aseg.mgz:colormap=lut:opacity=0.2 \ sig.nii:reg=bb.register.dat:colormap=heat:heatscale=2,2,4 -colorscale \ mri_vol2surf --mov sig.nii \ --reg bb.register.dat \ --projfrac 0.5 --interp nearest \ --hemi lh --o lh.sig.mgh mri_info lh.sig.mgh tksurfer fbirn-anat-101.v4 lh inflated -annot aparc \ -overlay lh.sig.mgh mri_vol2vol --mov ces.nii \ --reg bb.register.dat \ --fstarg --interp nearest \ --o ces.anat.bb.mgh mri_info ces.anat.bb.mgh mri_segstats \ --seg $SUBJECTS_DIR/fbirn-anat-101.v4/mri/aparc+aseg.mgz \ --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt \ --id 1021 --id 1022 --id 1030 --id 17 \ --i ces.anat.bb.mgh --sum ces.bb.stats mri_vol2vol --mov sig.nii \ --reg bb.register.dat \ --fstarg --interp nearest \ --o sig.anat.bb.mgh mri_segstats \ --seg $SUBJECTS_DIR/fbirn-anat-101.v4/mri/aparc+aseg.mgz \ --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt \ --id 1021 --id 1022 --id 1030 --id 17 \ --i ces.anat.bb.mgh --sum ces.abs-masked.bb.stats \ --mask sig.anat.bb.mgh --maskthresh 2 --masksign abs mri_segstats \ --seg $SUBJECTS_DIR/fbirn-anat-101.v4/mri/aparc+aseg.mgz \ --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt \ --id 1021 --id 1022 --id 1030 --id 17 \ --i ces.anat.bb.mgh --sum ces.pos-masked.bb.stats \ --mask sig.anat.bb.mgh --maskthresh 2 --masksign pos
Multi-Modal fMRI Group
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs cd $SUBJECTS_DIR/multimodal/fmri tkregister2 --mov fbirn-101/template.nii --reg fbirn-101/bb.register.dat --surf mris_preproc --target fsaverage --hemi lh \ --iv fbirn-101/ces.nii fbirn-101/bb.register.dat \ --iv fbirn-103/ces.nii fbirn-103/bb.register.dat \ --iv fbirn-104/ces.nii fbirn-104/bb.register.dat \ --iv fbirn-105/ces.nii fbirn-105/bb.register.dat \ --iv fbirn-106/ces.nii fbirn-106/bb.register.dat \ --projfrac 0.5 \ --out lh.ces.mgh mri_info lh.ces.mgh mri_surf2surf --hemi lh --s fsaverage --fwhm 5 --cortex\ --sval lh.ces.mgh --tval lh.ces.sm05.mgh mri_glmfit --y lh.ces.sm05.mgh --surf fsaverage lh \ --osgm --glmdir lh.ces.sm05.osgm --cortex tksurfer fsaverage lh inflated -annot aparc -ov lh.ces.sm05.osgm/osgm/sig.mgh asegstats2table \ --meas volume \ --tablefile ces.pos-masked.vol.stats \ --i fbirn-101/ces.pos-masked.bb.stats \ fbirn-103/ces.pos-masked.bb.stats \ fbirn-104/ces.pos-masked.bb.stats \ fbirn-105/ces.pos-masked.bb.stats \ fbirn-106/ces.pos-masked.bb.stats asegstats2table \ --meas mean \ --tablefile ces.abs-masked.mean.stats \ --i fbirn-101/ces.abs-masked.bb.stats \ fbirn-103/ces.abs-masked.bb.stats \ fbirn-104/ces.abs-masked.bb.stats \ fbirn-105/ces.abs-masked.bb.stats \ fbirn-106/ces.abs-masked.bb.stats asegstats2table \ --meas mean \ --tablefile ces.pos-masked.mean.stats \ --i fbirn-101/ces.pos-masked.bb.stats \ fbirn-103/ces.pos-masked.bb.stats \ fbirn-104/ces.pos-masked.bb.stats \ fbirn-105/ces.pos-masked.bb.stats \ fbirn-106/ces.pos-masked.bb.stats
Multi-Modal DTI Group
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs cd $SUBJECTS_DIR/multimodal/dti tkregister2 --mov lowb.nii --reg register.dat --surf freeview -v $SUBJECTS_DIR/M87102113.v4/mri/brain.mgz $SUBJECTS_DIR/M87102113.v4/mri/orig.mgz $SUBJECTS_DIR/M87102113.v4/mri/wmparc.mgz:colormap=lut:opacity=0.2 fa.nii:reg=register.dat:colormap=heat:heatscale=.2,.2,1 -colorscale mri_vol2vol --mov fa.nii \ --reg register.dat \ --fstarg --interp nearest \ --o fa.anat.mgh mri_segstats \ --seg $SUBJECTS_DIR/M87102113.v4/mri/wmparc.mgz \ --ctab $FREESURFER_HOME/FreeSurferColorLUT.txt \ --id 251 --id 3021 --id 3024 --id 3030 --id 12 --id 4 \ --i fa.anat.mgh --sum fa.stats
Group Analysis
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs/group_analysis_tutorial cd $SUBJECTS_DIR/glm mris_preproc --fsgd gender_age.fsgd \ --cache-in thickness.fwhm10.fsaverage \ --target fsaverage --hemi lh \ --out lh.gender_age.thickness.10.mgh mri_info lh.gender_age.thickness.10.mgh mris_preproc --fsgd gender_age.fsgd \ --target fsaverage --hemi lh \ --meas thickness \ --out lh.gender_age.thickness.00.mgh mri_surf2surf --hemi lh \ --s fsaverage \ --sval lh.gender_age.thickness.00.mgh \ --fwhm 10 \ --cortex \ --tval lh.gender_age.thickness.10B.mgh mri_glmfit \ --y lh.gender_age.thickness.10.mgh \ --fsgd gender_age.fsgd dods\ --C lh-Avg-thickness-age-Cor.mtx \ --surf fsaverage lh \ --cortex \ --glmdir lh.gender_age.glmdir tksurfer fsaverage lh inflated \ -annot aparc.annot -fthresh 2 \ -overlay lh.gender_age.glmdir/lh-Avg-thickness-age-Cor/sig.mgh mri_glmfit-sim \ --glmdir lh.gender_age.glmdir \ --sim mc-z 5 4 mc-z.negative \ --sim-sign neg --cwpvalthresh 0.4\ --overwrite less lh.gender_age.glmdir/csd/mc-z.neg4.j001-lh-Avg-thickness-age-Cor.csd less lh.gender_age.glmdir/lh-Avg-thickness-age-Cor/mc-z.neg4.sig.cluster.summary tksurfer fsaverage lh inflated \ -annot lh.gender_age.glmdir/lh-Avg-thickness-age-Cor/mc-z.neg4.sig.ocn.annot \ -fthresh 2 -curv -gray
Group Analysis (QDEC)
setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs/group_analysis_tutorial cd $SUBJECTS_DIR qdec & mri_label2label --srclabel lh.supramarg --srcsubject fsaverage --trgsubject 004 --trglabel lh.supramarg --regmethod surface --hemi lh mris_anatomical_stats -l lh.supramarg.label \ -t lh.thickness -b -f 004/stats/lh.supramarg.stats 004 lh freeview -v 004/mri/brainmask.mgz -l 004/label/lh.supramarg.label
FS FAST
cd $TUTORIAL_DATA/fsfast-functional ls cd $TUTORIAL_DATA/fsfast-functional/sess01.noproc ls setenv SUBJECTS_DIR $TUTORIAL_DATA/fsfast-tutorial.subjects cat subjectname ls $SUBJECTS_DIR ls rest ls bold cd bold/001 ls mri_info --dim f.nii.gz mri_info --res f.nii.gz freeview -v f.nii.gz cat workmem.par cd $TUTORIAL_DATA/fsfast-functional cat sessidlist setenv SUBJECTS_DIR $TUTORIAL_DATA/fsfast-tutorial.subjects cd $TUTORIAL_DATA/fsfast-functional preproc-sess -s sess01 -fsd bold -stc up -surface fsaverage lhrh -mni305 -fwhm 5 -per-run plot-twf-sess -s sess01 -fsd bold -mc tkregister-sess -s sess01 -s sess02 -s sess03 -fsd bold -per-run -bbr-sum tkregister-sess -s sess02 -fsd bold -per-run cd $TUTORIAL_DATA/fsfast-functional/sess01/bold/001 freeview -v template.nii.gz masks/brain.nii.gz:colormap=heat freeview -v template.nii.gz masks/brain.e3.nii.gz:colormap=heat mri_info --dim fmcpr.up.sm5.mni305.2mm.nii.gz mri_info --res fmcpr.up.sm5.mni305.2mm.nii.gz mri_info --dim fmcpr.up.sm5.fsaverage.lh.nii.gz mri_info --res fmcpr.up.sm5.fsaverage.lh.nii.gz setenv SUBJECTS_DIR $TUTORIAL_DATA/fsfast-tutorial.subjects cd $TUTORIAL_DATA/fsfast-functional mkanalysis-sess \ -fsd bold -stc up -surface fsaverage lh -fwhm 5 \ -event-related -paradigm workmem.par -nconditions 5 \ -spmhrf 0 -TR 2 -refeventdur 16 -nskip 4 -polyfit 2 \ -analysis my-workmem.sm05.lh -force ls my-workmem.sm05.lh mkcontrast-sess -analysis my-workmem.sm05.lh -contrast encode-v-base -a 1 ls my-workmem.sm05.lh mkcontrast-sess -analysis my-workmem.sm05.lh -contrast emot.dist-v-neut.dist -a 2 -c 3 mkcontrast-sess -analysis my-workmem.sm05.lh -contrast distractor.avg-v-base -a 2 -a 3 mkcontrast-sess -analysis my-workmem.sm05.lh -contrast emot.dist-v-base -a 2 mkcontrast-sess -analysis my-workmem.sm05.lh -contrast probe.avg-v-base -a 4 -a 5 mkanalysis-sess \ -fsd bold -stc up -surface fsaverage rh -fwhm 5 \ -event-related -paradigm workmem.par -nconditions 5 \ -spmhrf 0 -TR 2 -refeventdur 16 -nskip 4 -polyfit 2 \ -analysis my-workmem.sm05.rh -force mkanalysis-sess \ -fsd bold -stc up -mni305 2 -fwhm 5 \ -event-related -paradigm workmem.par -nconditions 5 \ -spmhrf 0 -TR 2 -refeventdur 16 -nskip 4 -polyfit 2 \ -analysis my-workmem.sm05.mni305 -force -per-run selxavg3-sess -s sess01 -analysis workmem.sm05.lh ls $TUTORIAL_DATA/fsfast-functional/sess01/bold tksurfer-sess -s sess01 \ -analysis workmem.sm05.lh \ -c encode-v-base \ -c emot.dist-v-base \ -c probe.avg-v-base \ -c emot.dist-v-neut.dist tksurfer-sess -s sess01 -analysis workmem.sm05.rh \ -c encode-v-base \ -c emot.dist-v-base \ -c emot.dist-v-neut.dist \ -c probe.avg-v-base tkmedit-sess -s sess01 -analysis workmem.sm05.mni305 \ -c encode-v-base \ -c emot.dist-v-base \ -c emot.dist-v-neut.dist \ -c probe.avg-v-base setenv SUBJECTS_DIR $TUTORIAL_DATA/fsfast-tutorial.subjects cd $TUTORIAL_DATA/fsfast-functional isxconcat-sess -sf sessidlist -analysis workmem.sm05.lh -contrast encode-v-base -o my-group cd $TUTORIAL_DATA/fsfast-functional/my-group ls cd $TUTORIAL_DATA/fsfast-functional/my-group/workmem.sm05.lh ls mri_glmfit --y ces.nii.gz \ --wls cesvar.nii.gz \ --osgm \ --surface fsaverage lh \ --glmdir my-glm.wls \ --nii.gz tksurfer fsaverage lh inflated -aparc -overlay my-glm.wls/osgm/sig.nii.gz -fminmax 2 3 mri_glmfit-sim --glmdir my-glm.wls --cache 3 pos --cwpvalthresh .0166 cat my-glm.wls/osgm/cache.th30.pos.sig.cluster.summary tksurfer fsaverage lh inflated \ -overlay my-glm.wls/osgm/cache.th30.pos.sig.cluster.nii.gz \ -annot ./my-glm.wls/osgm/cache.th30.pos.sig.ocn.annot -fminmax 1.3 3 cd $TUTORIAL_DATA/fsfast-functional/group/workmem.sm05.rh/encode-v-base mri_glmfit --y ces.nii.gz --wls cesvar.nii.gz --osgm \ --surface fsaverage rh --glmdir my-glm.wls --nii.gz mri_glmfit-sim --glmdir my-glm.wls --cache 3 pos --cwpvalthresh .0166 cat my-glm.wls/osgm/cache.th30.pos.sig.cluster.summary cd $TUTORIAL_DATA/fsfast-functional/group/workmem.sm05.mni305/encode-v-base ls cd $TUTORIAL_DATA/fsfast-functional/group/workmem.sm05.mni305/encode-v-base mri_glmfit --y ces.nii.gz --wls cesvar.nii.gz --osgm \ --glmdir my-glm.wls --nii.gz freeview -v $SUBJECTS_DIR/fsaverage/mri/orig.mgz $SUBJECTS_DIR/fsaverage/mri/aparc+aseg.mgz:colormap=lut:opacity=0.2 my-glm.wls/osgm/sig.nii.gz:colormap=heat:heatscale=2,2,3 mri_glmfit-sim --glmdir my-glm.wls --grf 3 pos --cwpvalthresh .0166 cat my-glm.wls/osgm/grf.th3.pos.sig.cluster.summary freeview $SUBJECTS_DIR/fsaverage/mri/orig.mgz my-glm.wls/osgm/grf.th3.pos.sig.ocn.anat.nii.gz:colormap=lut:lut=./my-glm.wls/osgm/grf.th3.pos.sig.ocn.lut:opacity=0 my-glm.wls/osgm/grf.th3.pos.sig.cluster.nii.gz:colormap=heat:heatscale=1.3,1.3,5 cd $TUTORIAL_DATA/fsfast-functional/group cat workmem.sm05.lh/encode-v-base/my-glm.wls/osgm/cache.th30.pos.sig.cluster.summary cat workmem.sm05.rh/encode-v-base/my-glm.wls/osgm/cache.th30.pos.sig.cluster.summary cat workmem.sm05.mni305/encode-v-base/my-glm.wls/osgm/grf.th3.pos.sig.cluster.summary vlrmerge --o encode.merged.nii.gz \ --lh workmem.sm05.lh/encode-v-base/my-glm.wls/osgm/cache.th30.pos.sig.cluster.nii.gz \ --rh workmem.sm05.rh/encode-v-base/my-glm.wls/osgm/cache.th30.pos.sig.cluster.nii.gz \ --vol workmem.sm05.mni305/encode-v-base/my-glm.wls/osgm/grf.th3.pos.sig.cluster.nii.gz \ --scm workmem.sm05.mni305/subcort.mask.nii.gz freeview -v $SUBJECTS_DIR/fsaverage/mri/orig.mgz \ $SUBJECTS_DIR/fsaverage/mri/aparc+aseg.mgz:colormap=lut:opacity=0.2 \ encode.merged.nii.gz:colormap=heat:heatscale=1.3,1.3,5 \ -f $SUBJECTS_DIR/fsaverage/surf/lh.pial:edgecolor=red \ $SUBJECTS_DIR/fsaverage/surf/rh.pial:edgecolor=red \ $SUBJECTS_DIR/fsaverage/surf/lh.white:edgecolor=yellow \ $SUBJECTS_DIR/fsaverage/surf/rh.white:edgecolor=yellow
Diffusion Tutorial
setenv SUBJECTS_DIR $TUTORIAL_DATA/diffusion_recons setenv TUTORIAL_DIR $TUTORIAL_DATA/diffusion_tutorial set subj = Diff001 freeview -v $TUTORIAL_DIR/$subj/dtrecon/fa.nii $TUTORIAL_DIR/$subj/dtrecon/adc.nii mri_vol2vol --mov $TUTORIAL_DIR/$subj/dtrecon/lowb.nii \ --targ $SUBJECTS_DIR/$subj/mri/wmparc.mgz \ --inv --interp nearest --o $SUBJECTS_DIR/$subj/mri/wmparc2diff.mgz \ --reg $TUTORIAL_DIR/$subj/dtrecon/register.dat --no-save-reg freeview -v $TUTORIAL_DIR/$subj/dtrecon/fa.nii \ $SUBJECTS_DIR/$subj/mri/aparc+aseg2diff.mgz:colormap=lut mri_mask $TUTORIAL_DIR/$subj/dtrecon/fa.nii \ $SUBJECTS_DIR/$subj/mri/wmparc2diff.mgz \ $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz freeview -v $TUTORIAL_DIR/$subj/dtrecon/fa.nii \ $TUTORIAL_DIR/$subj/dtrecon/fa-masked.mgz freeview -v $FREESURFER_HOME/subjects/cvs_avg35/mri/norm.mgz \ $TUTORIAL_DIR/$subj/dtrecon/fa-masked.ANAT+CVS-to-avg35.mgz
TRACULA Tutorial
setenv SUBJECTS_DIR $TUTORIAL_DATA/diffusion_recons cd $TUTORIAL_DATA/diffusion_tutorial gedit $TUTORIAL_DATA/diffusion_tutorial/scripts/dmrirc_single_subject set dtroot = $TUTORIAL_DATA/diffusion_tutorial set subjlist = (Diff001 Diff002 Diff003) set runlist = (1) set dcmroot = $TUTORIAL_DATA/diffusion_tutorial/ set dcmlist = (Diff001/orig/6-1.dcm \ Diff002/orig/312000-6-1.dcm \ Diff003/orig/781000-6-1.dcm) trac-all -prep -c $TUTORIAL_DATA/diffusion_tutorial/scripts/dmrirc_single_subject trac-all -bedp -c $TUTORIAL_DATA/diffusion_tutorial/scripts/dmrirc_single_subject trac-all -path -c $TUTORIAL_DATA/diffusion_tutorial/scripts/dmrirc_single_subject cd $TUTORIAL_DATA/diffusion_tutorial/Diff001/dmri freeview $TUTORIAL_DATA/diffusion_tutorial/Diff001/dmri/dtifit_FA.nii.gz & cd $TUTORIAL_DATA/diffusion_tutorial/Diff001/dmri/mni/ freeview -v $FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz \ $TUTORIAL_DATA/diffusion_tutorial/Diff001/dmri/mni/dtifit_FA.bbr.nii.gz & freeview -v $FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz \ $TUTORIAL_DATA/diffusion_tutorial/Diff001/dmri/mni/dtifit_FA.flt.nii.gz & freeview -v $TUTORIAL_DATA/diffusion_tutorial/Diff001/dmri/dtifit_FA.nii.gz \ $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.ilf_AS_avg32_mni_flt/path.pd.nii.gz:colormap=jet:isosurface=0,0:color='Red' \ $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/rh.ilf_AS_avg32_mni_flt/path.pd.nii.gz:colormap=jet:isosurface=0,0:color='Red' & freeview -tv $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/merged_avg32_mni_flt.mgz \ -v $TUTORIAL_DATA/diffusion_tutorial/Diff001/dmri/dtifit_FA.nii.gz & cd $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt gedit $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/pathstats.overall.txt & gedit $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/pathstats.byvoxel.txt & tractstats2table --inputs $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/pathstats.overall.txt --overall --tablefile $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/lh.cst_AS.All.table gedit $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/lh.cst_AS.All.table & tractstats2table --inputs $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/pathstats.overall.txt --overall --only-measures FA_Avg --tablefile $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/lh.cst_AS.FA_Avg.table gedit $TUTORIAL_DATA/diffusion_tutorial/Diff001/dpath/lh.cst_AS_avg32_mni_flt/lh.cst_AS.FA_Avg.table & gedit $TUTORIAL_DATA/diffusion_tutorial/TraculaStatFiles/lh.cst_AS.overall.pathstats.list & tractstats2table --load-pathstats-from-file $TUTORIAL_DATA/diffusion_tutorial/TraculaStatFiles/lh.cst_AS.overall.pathstats.list --overall --tablefile $TUTORIAL_DATA/diffusion_tutorial/TraculaStatFiles/lh.cst_AS.All.table ls $TUTORIAL_DATA/diffusion_tutorial/TraculaStatFiles/*.All.table tractstats2table --load-pathstats-from-file $TUTORIAL_DATA/diffusion_tutorial/TraculaStatFiles/lh.cst_AS.overall.pathstats.list --overall --only-measures FA_Avg --tablefile $TUTORIAL_DATA/diffusion_tutorial/TraculaStatFiles/lh.cst_AS.FA_Avg.table oocalc $TUTORIAL_DATA/diffusion_tutorial/TraculaStatFiles/lh.cst_AS.All.table