set echo = 1 ; breaksw breaksw end end while ( $#argv != 0 ) while ( 3 != 0 ) set flag = $argv[1] ; shift ; set flag = -all shift switch ( $flag ) switch ( -all ) case "-autorecon-all": case -autorecon-all: set DoCreateBaseInput = 1 ; set DoCreateBaseInput = 1 set DoMotionCor = 1 ; set DoMotionCor = 1 set DoTalairach = 1 ; set DoTalairach = 1 set DoTalCheck = 1 ; set DoTalCheck = 1 set DoNuIntensityCor = 1 ; set DoNuIntensityCor = 1 set DoNormalization = 1 ; set DoNormalization = 1 set DoSkullStrip = 1 ; set DoSkullStrip = 1 set DoGCAReg = 1 ; set DoGCAReg = 1 set DoCARegInv = 1 ; set DoCARegInv = 1 set DoRemoveNeck = 1 ; set DoRemoveNeck = 1 set DoSkullLTA = 1 ; set DoSkullLTA = 1 set DoCANormalize = 1 ; set DoCANormalize = 1 set DoCAReg = 1 ; set DoCAReg = 1 set DoCALabel = 1 ; set DoCALabel = 1 set DoNormalization2 = 1 ; set DoNormalization2 = 1 set DoMaskBFS = 1 ; set DoMaskBFS = 1 set DoSegmentation = 1 ; set DoSegmentation = 1 set DoFill = 1 ; set DoFill = 1 set DoTessellate = 1 ; set DoTessellate = 1 set DoSmooth1 = 1 ; set DoSmooth1 = 1 set DoInflate1 = 1 ; set DoInflate1 = 1 set DoQSphere = 1 ; set DoQSphere = 1 set DoFix = 1 ; set DoFix = 1 set DoSmooth2 = 1 ; set DoSmooth2 = 1 set DoInflate2 = 1 ; set DoInflate2 = 1 set DoWhiteSurfs = 1 ; set DoWhiteSurfs = 1 set DoSphere = 1 ; set DoSphere = 1 set DoSurfReg = 1 ; set DoSurfReg = 1 set DoContraSurfReg = 0 ; set DoContraSurfReg = 0 set DoAvgCurv = 1 ; set DoAvgCurv = 1 set DoJacobianWhite = 1 ; set DoJacobianWhite = 1 set DoCortParc = 1 ; set DoCortParc = 1 set DoPialSurfs = 1 ; set DoPialSurfs = 1 set DoPctSurfCon = 1 ; set DoPctSurfCon = 1 set DoParcStats = 1 ; set DoParcStats = 1 set DoCortParc2 = 1 ; set DoCortParc2 = 1 set DoParcStats2 = 1 ; set DoParcStats2 = 1 set DoCortParc3 = 1 ; set DoCortParc3 = 1 set DoParcStats3 = 1 ; set DoParcStats3 = 1 set DoCortRibbonVolMask = 1 ; set DoCortRibbonVolMask = 1 set DoSegStats = 1 ; set DoSegStats = 1 set DoAParc2ASeg = 1 ; set DoAParc2ASeg = 1 set DoWMParc = 1 ; set DoWMParc = 1 set DoCurvStats = 1 ; set DoCurvStats = 1 set DoBaLabels = 1 ; set DoBaLabels = 1 set DoLabelExvivoEC = 1 ; set DoLabelExvivoEC = 1 breaksw breaksw end end while ( $#argv != 0 ) while ( 2 != 0 ) set flag = $argv[1] ; shift ; set flag = -subjid shift switch ( $flag ) switch ( -subjid ) case "-sid": case -sid: case "-s": case -s: if ( $#argv < 1 ) goto arg1err ; if ( 1 < 1 ) goto arg1err set subjid = $argv[1] ; shift ; set subjid = CAA_022_struc shift set subjid = `basename $subjid` ; set subjid = `basename $subjid` basename CAA_022_struc breaksw breaksw end end while ( $#argv != 0 ) while ( 0 != 0 ) goto parse_args_return ; goto parse_args_return goto check_params ; goto check_params if ( $DoT2pial && $DoFLAIRpial ) then if ( 0 && 0 ) then if ( $UseCuda || $GetCuda ) then if ( 0 || 0 ) then if ( ! $DoVersionsOnly ) then if ( ! 0 ) then if ( $#subjid != 1 ) then if ( 1 != 1 ) then if ( ! $?SUBJECTS_DIR ) then if ( ! 1 ) then if ( ! -e $SUBJECTS_DIR ) then if ( ! -e /cluster/ichresearch/Petechial/MEG ) then pushd $SUBJECTS_DIR > /dev/null pushd /cluster/ichresearch/Petechial/MEG setenv SUBJECTS_DIR `$PWD` ; setenv SUBJECTS_DIR `$PWD` /bin/pwd popd > /dev/null popd set subjdir = $SUBJECTS_DIR/$subjid set subjdir = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc if ( $longitudinal ) then if ( 0 ) then set haslong = `echo $subjid | grep "\.long\."` set haslong = `echo $subjid | grep "\.long\."` grep \.long\. echo CAA_022_struc if ( "$haslong" != "" ) then if ( != ) then endif endif if ( ! $DoCreateBaseSubj ) then if ( ! 0 ) then if ( -e $subjdir/$BaseSubjsListFname ) then if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/base-tps ) then endif endif if ( $#InputList == 0 ) then if ( 0 == 0 ) then if ( ! $DoCreateBaseSubj ) then if ( ! 0 ) then if ( $longitudinal ) mkdir -p ${subjdir} if ( 0 ) mkdir -p /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc if ( ! -e $subjdir ) then if ( ! -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc ) then if ( ! -w $subjdir ) then if ( ! -w /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc ) then endif endif else else else else if ( ! $?FREESURFER_HOME ) then if ( ! 1 ) then if ( ! -e $FREESURFER_HOME ) then if ( ! -e /usr/local/freesurfer/stable5_3_0 ) then if ( ! -e ${GCADIR}/$GCA ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/RB_all_2008-03-26.gca ) then if ( ! -e ${GCADIR}/$GCASkull ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/RB_all_withskull_2008-03-26.gca ) then foreach hemi ( $hemilist ) foreach hemi ( lh rh ) set avgtif = ${AvgCurvTifPath}/$hemi.${AvgCurvTif} ; set avgtif = /usr/local/freesurfer/stable5_3_0/average/lh.average.curvature.filled.buckner40.tif if ( ! -e $avgtif ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/lh.average.curvature.filled.buckner40.tif ) then set GCSHemi = ${GCSDIR}/$hemi.$GCS set GCSHemi = /usr/local/freesurfer/stable5_3_0/average/lh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs if ( ! -e $GCSHemi ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/lh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs ) then set CPAtlas = ${GCSDIR}/$hemi.$GCS set CPAtlas = /usr/local/freesurfer/stable5_3_0/average/lh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs if ( ! -e $CPAtlas ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/lh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs ) then end end set avgtif = ${AvgCurvTifPath}/$hemi.${AvgCurvTif} ; set avgtif = /usr/local/freesurfer/stable5_3_0/average/rh.average.curvature.filled.buckner40.tif if ( ! -e $avgtif ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/rh.average.curvature.filled.buckner40.tif ) then set GCSHemi = ${GCSDIR}/$hemi.$GCS set GCSHemi = /usr/local/freesurfer/stable5_3_0/average/rh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs if ( ! -e $GCSHemi ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/rh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs ) then set CPAtlas = ${GCSDIR}/$hemi.$GCS set CPAtlas = /usr/local/freesurfer/stable5_3_0/average/rh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs if ( ! -e $CPAtlas ) then if ( ! -e /usr/local/freesurfer/stable5_3_0/average/rh.curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs ) then end end if ( $XOptsUse == 1 && $XOptsClean == 1 ) then if ( 1 == 1 && 0 == 1 ) then if ( $IsMPRAGE == 1 && $IsWashuMPRAGE == 1 ) then if ( 0 == 1 && 0 == 1 ) then mkdir -p $subjdir/scripts mkdir -p /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts set XOptsPreExist = $subjdir/scripts/expert-options set XOptsPreExist = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/expert-options if ( -e $XOptsPreExist ) then if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/expert-options ) then if ( $#XOptsFile != 0 ) then if ( 0 != 0 ) then endif endif if ( $#NotifyFile != 0 ) then if ( 0 != 0 ) then if ( $#WaitForFile != 0 ) then if ( 0 != 0 ) then if ( ! $DoCleanTal && ! $DoCleanCP && ! $DoCleanBM && ! $DoConvertInput && ! $DoCleanASeg && ! $DoCleanWM && ! $DoCleanSeed && ! $DoCleanCW256 && ! $DoCortParc && ! $DoCortParc2 && ! $DoGCAReg && ! $DoCARegInv && ! $DoMotionCor && ! $DoTalairach && ! $DoTalCheck && ! $DoCleanXopts && ! $DoNormalization && ! $#SurfRegToSubj && ! $DoNormalization2 && ! $DoParcStats && ! $DoParcStats2 && ! $DoVersionsOnly && ! $DoDeface && ! $DoCleanPFH && ! $DoSkullStrip && ! $DoSegmentation && ! $DoNuIntensityCor && ! $DoFill && ! $DoTessellate && ! $DoAParc2ASeg && ! $DoWMParc && ! $DoSmooth1 && ! $DoInflate1 && ! $DoQSphere && ! $DoRemoveNeck && ! $DoFix && ! $DoSmooth2 && ! $DoInflate2 && ! $DoSphere && ! $DoSkullLTA && ! $DoQdecCache && ! $DoVnoMatchCheck && ! $DoSurfReg && ! $DoContraSurfReg && ! $DoAvgCurv && ! $DoSegStats && ! $DoMorphRGB && ! $DoWhiteSurfs && ! $DoContraSurfRegWithinSubject && ! $DoCortRibbonVolMask && ! $DoJacobianWhite && ! $DoJacobianDist0 && ! $DoCANormalize && ! $DoCAReg && ! $DoCALabel && ! $DoMaskBFS && ! $DoAParcASegStats && ! $DoLocalGyriIndex && ! $DoMakefile && ! $DoAsegStatsDiff && ! $DoAparcStatsDiff && ! $DoSurfVolume && ! $DoASegMerge && ! $DoCurvStats && ! $DoLabelV1 && ! $DoCreateBaseSubj && ! $DoBaLabels && ! $DoShowEdits && ! $DoLabelExvivoEC && ! $DoSurfSegEdit && ! $DoPialSurfs && ! $DoGEMS && ! $DoPctSurfCon && ! $DoT2pial && ! $DoFLAIRpial && ! $DoConvertT2Input && ! $DoConvertFlairInput && ! $DoCortParc3 && ! $DoParcStats3 ) then if ( ! 0 && ! 0 && ! 0 && ! 0 && ! 0 && ! 0 && ! 0 && ! 0 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 0 && ! 1 && ! 0 && ! 1 && ! 1 && ! 1 && ! 0 && ! 0 && ! 0 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 1 && ! 0 && ! 0 && ! 1 && ! 0 && ! 1 && ! 1 && ! 0 && ! 1 && ! 0 && ! 1 && ! 1 && ! 0 && ! 1 && ! 1 && ! 1 && ! 1 && ! 0 && ! 0 && ! 0 && ! 0 && ! 0 && ! 0 && ! 0 && ! 1 && ! 0 && ! 0 && ! 1 && ! 0 && ! 1 && ! 0 && ! 1 && ! 0 && ! 1 && ! 0 && ! 0 && ! 0 && ! 0 && ! 1 && ! 1 ) then if ( $WSMore && $WSLess ) then if ( 0 && 0 ) then if ( ( $WSMore || $WSLess ) && $WSPctPreFlood ) then if ( ( 0 || 0 ) && ) then if ( $DoAsegStatsDiff ) then if ( 0 ) then if ( $DoAparcStatsDiff ) then if ( 0 ) then if ( $#SurfRegToSubj ) then if ( 0 ) then goto check_params_return ; goto check_params_return set StartTime = `date` ; set StartTime = `date` date set tSecStart = `date '+%s'` ; set tSecStart = `date '+%s'` date +%s if ( $?REQUIRE_FS_MATCH == 0 ) setenv REQUIRE_FS_MATCH 0 if ( 0 == 0 ) setenv REQUIRE_FS_MATCH 0 setenv REQUIRE_FS_MATCH 0 set bstampfile0 = $FREESURFER_HOME/build-stamp.txt set bstampfile0 = /usr/local/freesurfer/stable5_3_0/build-stamp.txt mkdir -p $SUBJECTS_DIR/$subjid/scripts mkdir -p /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts set bstampfile = $SUBJECTS_DIR/$subjid/scripts/build-stamp.txt set bstampfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/build-stamp.txt if ( -e $bstampfile0 ) then if ( -e /usr/local/freesurfer/stable5_3_0/build-stamp.txt ) then if ( ! -e $bstampfile ) cp $bstampfile0 $bstampfile if ( ! -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/build-stamp.txt ) cp /usr/local/freesurfer/stable5_3_0/build-stamp.txt /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/build-stamp.txt cp /usr/local/freesurfer/stable5_3_0/build-stamp.txt /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/build-stamp.txt set bstamp0 = `cat $bstampfile0` set bstamp0 = `cat $bstampfile0` cat /usr/local/freesurfer/stable5_3_0/build-stamp.txt set bstamp = `cat $bstampfile` set bstamp = `cat $bstampfile` cat /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/build-stamp.txt if ( "$bstamp0" != "$bstamp" ) then if ( freesurfer-Linux-centos6_x86_64-stable-v5.3.0-20130514 != freesurfer-Linux-centos6_x86_64-stable-v5.3.0-20130514 ) then echo "Subject Stamp: $bstamp" echo Subject Stamp: freesurfer-Linux-centos6_x86_64-stable-v5.3.0-20130514 Subject Stamp: freesurfer-Linux-centos6_x86_64-stable-v5.3.0-20130514 echo "Current Stamp: $bstamp0" echo Current Stamp: freesurfer-Linux-centos6_x86_64-stable-v5.3.0-20130514 Current Stamp: freesurfer-Linux-centos6_x86_64-stable-v5.3.0-20130514 endif endif if ( $DoMakefile ) then if ( 0 ) then if ( $DoTime ) then if ( 0 ) then echo "INFO: SUBJECTS_DIR is $SUBJECTS_DIR" echo INFO: SUBJECTS_DIR is /autofs/cluster/ichresearch/Petechial/MEG INFO: SUBJECTS_DIR is /autofs/cluster/ichresearch/Petechial/MEG pushd $FREESURFER_HOME > /dev/null pushd /usr/local/freesurfer/stable5_3_0 set freesurfer_home_true = `pwd` ; set freesurfer_home_true = `pwd` pwd popd > /dev/null popd echo "Actual FREESURFER_HOME $freesurfer_home_true" echo Actual FREESURFER_HOME /autofs/cluster/freesurfer/centos6_x86_64/stable5_3_0 Actual FREESURFER_HOME /autofs/cluster/freesurfer/centos6_x86_64/stable5_3_0 set DateString = "`date '+%y%m%d%H%M'`" set DateString = `date '+%y%m%d%H%M'` date +%y%m%d%H%M cd $subjdir cd /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc mkdir -p mri scripts surf tmp label touch stats touch src trash bem mkdir -p mri scripts surf tmp label touch stats touch src trash bem mkdir -p mri/transforms mri/transforms/bak mri/orig mkdir -p mri/transforms mri/transforms/bak mri/orig set touchdir = $subjdir/touch set touchdir = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/touch if ( ! $DoVersionsOnly ) then if ( ! 0 ) then set CF = ( $subjdir/scripts/$CF_DEFAULT_NAME ) set CF = ( /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.cmd ) rm -f $CF rm -f /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.cmd set ENVF = $subjdir/scripts/recon-all.env set ENVF = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.env if ( -e $ENVF ) mv $ENVF $ENVF.bak if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.env ) mv /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.env /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.env.bak date >> $ENVF date echo "FREESURFER_HOME $FREESURFER_HOME" >> $ENVF echo FREESURFER_HOME /usr/local/freesurfer/stable5_3_0 echo "Actual FREESURFER_HOME $freesurfer_home_true" >> $ENVF echo Actual FREESURFER_HOME /autofs/cluster/freesurfer/centos6_x86_64/stable5_3_0 pwd >> $ENVF pwd echo "setenv SUBJECTS_DIR $SUBJECTS_DIR" >> $ENVF echo setenv SUBJECTS_DIR /autofs/cluster/ichresearch/Petechial/MEG echo $inputargs >> $ENVF echo -debug -all -subjid CAA_022_struc uname -a >> $ENVF uname -a echo "" >> $ENVF echo limit >> $ENVF limit echo "" >> $ENVF echo printenv >> $ENVF printenv endif endif if ( $DoVersionsOnly ) then if ( 0 ) then if ( $#LF == 0 ) then if ( 0 == 0 ) then set LF = ( $subjdir/scripts/$LF_DEFAULT_NAME ) set LF = ( /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log ) if ( -e $LF ) then if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log ) then else else skip_new_invo: skip_new_invo: date >> $LF date $PWD >> $LF /bin/pwd echo $0 >> $LF echo /usr/local/freesurfer/stable5_3_0/bin/recon-all echo $inputargs >> $LF echo -debug -all -subjid CAA_022_struc if ( $?RECONALL_MAKE_SUBJECT ) goto skip_all_info if ( 0 ) goto skip_all_info echo "subjid $subjid" >> $LF echo subjid CAA_022_struc echo "setenv SUBJECTS_DIR $SUBJECTS_DIR" >> $LF echo setenv SUBJECTS_DIR /autofs/cluster/ichresearch/Petechial/MEG echo "FREESURFER_HOME $FREESURFER_HOME" >> $LF echo FREESURFER_HOME /usr/local/freesurfer/stable5_3_0 echo "Actual FREESURFER_HOME $freesurfer_home_true" >> $LF echo Actual FREESURFER_HOME /autofs/cluster/freesurfer/centos6_x86_64/stable5_3_0 if ( -e $FREESURFER_HOME/build-stamp.txt ) then if ( -e /usr/local/freesurfer/stable5_3_0/build-stamp.txt ) then echo "build-stamp.txt: `cat $FREESURFER_HOME/build-stamp.txt`" >> $LF echo build-stamp.txt: `cat /usr/local/freesurfer/stable5_3_0/build-stamp.txt` cat /usr/local/freesurfer/stable5_3_0/build-stamp.txt endif endif uname -a | tee -a $LF uname -a tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log Linux eesmith 2.6.32-279.22.1.el6.x86_64 #1 SMP Wed Feb 6 03:10:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux limit >> $LF limit if ( -e /usr/bin/free ) then if ( -e /usr/bin/free ) then echo "" >> $LF echo /usr/bin/free >> $LF /usr/bin/free echo "" >> $LF echo endif endif if ( "`uname -s`" == "Darwin" ) then if ( `uname -s` == Darwin ) then uname -s echo "########################################" >> $LF echo ######################################## echo "program versions used" >> $LF echo program versions used echo $VERSION >> $LF echo $Id: recon-all,v 1.379.2.73 2013/05/12 23:15:37 nicks Exp $ mri_motion_correct.fsl -version >> $LF mri_motion_correct.fsl -version if ( -e $FREESURFER_HOME/bin/flirt.fsl ) flirt.fsl -version >> $LF if ( -e /usr/local/freesurfer/stable5_3_0/bin/flirt.fsl ) flirt.fsl -version flirt.fsl -version talairach_avi --version >> $LF talairach_avi --version tkregister2_cmdl --all-info >> $LF tkregister2_cmdl --all-info nu_correct -version >> $LF nu_correct -version mri_make_uchar -all-info >> $LF mri_make_uchar -all-info mri_normalize -all-info >> $LF mri_normalize -all-info mri_watershed -all-info >> $LF mri_watershed -all-info mri_gcut -all-info >> $LF mri_gcut -all-info mri_segment -all-info >> $LF mri_segment -all-info mri_label2label -all-info >> $LF mri_label2label -all-info mri_em_register -all-info >> $LF mri_em_register -all-info mri_ca_normalize -all-info >> $LF mri_ca_normalize -all-info mri_ca_register -all-info >> $LF mri_ca_register -all-info mri_ca_label -all-info >> $LF mri_ca_label -all-info mri_pretess -all-info >> $LF mri_pretess -all-info mri_fill -all-info >> $LF mri_fill -all-info mri_tessellate -all-info >> $LF mri_tessellate -all-info mri_concatenate_lta -all-info >> $LF mri_concatenate_lta -all-info mri_normalize_tp2 -all-info >> $LF mri_normalize_tp2 -all-info mris_smooth -all-info >> $LF mris_smooth -all-info mris_inflate -all-info >> $LF mris_inflate -all-info mris_curvature -all-info >> $LF mris_curvature -all-info mris_sphere -all-info >> $LF mris_sphere -all-info mris_fix_topology -all-info >> $LF mris_fix_topology -all-info mris_topo_fixer -all-info >> $LF mris_topo_fixer -all-info mris_ca_label -all-info >> $LF mris_ca_label -all-info mris_euler_number -all-info >> $LF mris_euler_number -all-info mris_make_surfaces -all-info >> $LF mris_make_surfaces -all-info mris_register -all-info >> $LF mris_register -all-info mris_volmask --all-info >> $LF mris_volmask --all-info mris_anatomical_stats -all-info >> $LF mris_anatomical_stats -all-info mrisp_paint -all-info >> $LF mrisp_paint -all-info mris_curvature_stats -all-info >> $LF mris_curvature_stats -all-info if ( -e .xdebug_mris_curvature_stats ) rm -f .xdebug_mris_curvature_stats if ( -e .xdebug_mris_curvature_stats ) rm -f .xdebug_mris_curvature_stats rm -f .xdebug_mris_curvature_stats mris_calc -all-info >> $LF mris_calc -all-info if ( -e .xdebug_mris_calc ) rm -f .xdebug_mris_calc if ( -e .xdebug_mris_calc ) rm -f .xdebug_mris_calc rm -f .xdebug_mris_calc mri_robust_register -all-info >> $LF mri_robust_register -all-info mri_robust_template -all-info >> $LF mri_robust_template -all-info mri_and -all-info >> $LF mri_and -all-info mri_or -all-info >> $LF mri_or -all-info mri_fuse_segmentations -all-info >> $LF mri_fuse_segmentations -all-info mri_segstats -all-info >> $LF mri_segstats -all-info echo "#######################################" >> $LF echo ####################################### echo "GCADIR $GCADIR" >> $LF echo GCADIR /usr/local/freesurfer/stable5_3_0/average echo "GCA $GCA" >> $LF echo GCA RB_all_2008-03-26.gca echo "GCASkull $GCASkull" >> $LF echo GCASkull RB_all_withskull_2008-03-26.gca echo "AvgCurvTif $AvgCurvTif" >> $LF echo AvgCurvTif average.curvature.filled.buckner40.tif echo "GCSDIR $GCSDIR" >> $LF echo GCSDIR /usr/local/freesurfer/stable5_3_0/average echo "GCS $GCS" >> $LF echo GCS curvature.buckner40.filled.desikan_killiany.2010-03-25.gcs echo "#######################################" >> $LF echo ####################################### skip_all_info: skip_all_info: if ( $DoVersionsOnly ) exit 0 ; if ( 0 ) exit 0 set ErrorFile = $subjdir/scripts/recon-all.error set ErrorFile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.error rm -f $ErrorFile rm -f /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.error set DoneFile = $subjdir/scripts/recon-all.done set DoneFile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.done rm -f $DoneFile rm -f /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.done if ( $DoIsRunning ) then if ( 1 ) then set IsRunningLH = $subjdir/scripts/IsRunning.lh set IsRunningLH = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.lh set IsRunningRH = $subjdir/scripts/IsRunning.rh set IsRunningRH = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.rh set IsRunningLHRH = $subjdir/scripts/IsRunning.lh+rh set IsRunningLHRH = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.lh+rh set bailfile = ( ) ; set bailfile = ( ) if ( $#hemilist == 1 ) then if ( 2 == 1 ) then set IsRunningFile = $subjdir/scripts/IsRunning.lh+rh set IsRunningFile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.lh+rh if ( -e $IsRunningLH ) set bailfile = $IsRunningLH if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.lh ) set bailfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.lh if ( -e $IsRunningRH ) set bailfile = $IsRunningRH if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.rh ) set bailfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.rh endif endif if ( -e $IsRunningFile ) set bailfile = $IsRunningFile if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.lh+rh ) set bailfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/IsRunning.lh+rh if ( $#bailfile ) then if ( 0 ) then echo "------------------------------" > $IsRunningFile echo ------------------------------ echo "SUBJECT $subjid" >> $IsRunningFile echo SUBJECT CAA_022_struc echo "HEMI $hemilist" >> $IsRunningFile echo HEMI lh rh echo "DATE `date`" >> $IsRunningFile echo DATE `date` date echo "USER $user" >> $IsRunningFile echo USER pfotiad echo "HOST `hostname`" >> $IsRunningFile echo HOST `hostname` hostname echo "PROCESSID $$ " >> $IsRunningFile echo PROCESSID 6605 echo "PROCESSOR `uname -m`" >> $IsRunningFile echo PROCESSOR `uname -m` uname -m echo "OS `uname -s`" >> $IsRunningFile echo OS `uname -s` uname -s uname -a >> $IsRunningFile uname -a echo $VERSION >> $IsRunningFile echo $Id: recon-all,v 1.379.2.73 2013/05/12 23:15:37 nicks Exp $ endif endif set CSDF = $subjdir/scripts/csurfdir set CSDF = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/csurfdir if ( $DoCleanCSDF ) rm -vf $CSDF if ( 0 ) rm -vf /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/csurfdir if ( -e $CSDF ) then if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/csurfdir ) then echo $FREESURFER_HOME > $CSDF echo /usr/local/freesurfer/stable5_3_0 endif endif if ( $#SF == 0 ) then if ( 0 == 0 ) then set SF = ( $subjdir/scripts/$SF_DEFAULT_NAME ) set SF = ( /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all-status.log ) if ( -e $SF ) then if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all-status.log ) then else else echo "status file for recon-all" >> $SF echo status file for recon-all date >> $SF date cp $0 $subjdir/scripts/recon-all.local-copy cp /usr/local/freesurfer/stable5_3_0/bin/recon-all /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.local-copy if ( $#WaitForFile != 0 ) then if ( 0 != 0 ) then if ( ! $RunIt ) then if ( ! 1 ) then if ( $DoCleanSeed ) then if ( 0 ) then if ( $DoCleanCW256 ) then if ( 0 ) then if ( $DoCleanTal ) then if ( 0 ) then if ( $DoCleanLta ) then if ( 0 ) then if ( $DoCleanPFH ) then if ( 0 ) then if ( $DoCleanBM ) then if ( 0 ) then if ( $DoCleanASeg ) then if ( 0 ) then if ( $DoCleanWM ) then if ( 0 ) then if ( $DoCleanCP ) then if ( 0 ) then if ( $DoCleanBFSE ) then if ( 0 ) then if ( $DoCleanXopts ) then if ( 0 ) then if ( $DoCleanT2 ) then if ( 0 ) then if ( $DoCleanFLAIR ) then if ( 0 ) then set seedfile = $subjdir/scripts/seed-pons.crs.man.dat set seedfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-pons.crs.man.dat if ( $#PonsSeedCRS ) then if ( 0 ) then if ( -e $seedfile ) set PonsSeedCRS = `cat $seedfile | grep -v \#` if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-pons.crs.man.dat ) set PonsSeedCRS = `cat $seedfile | grep -v \#` set seedfile = $subjdir/scripts/seed-cc.crs.man.dat set seedfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-cc.crs.man.dat if ( $#CCSeedCRS ) then if ( 0 ) then if ( -e $seedfile ) set CCSeedCRS = `cat $seedfile | grep -v \#` if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-cc.crs.man.dat ) set CCSeedCRS = `cat $seedfile | grep -v \#` set seedfile = $subjdir/scripts/seed-lh.crs.man.dat set seedfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-lh.crs.man.dat if ( $#LHSeedCRS ) then if ( 0 ) then if ( -e $seedfile ) set LHSeedCRS = `cat $seedfile | grep -v \#` if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-lh.crs.man.dat ) set LHSeedCRS = `cat $seedfile | grep -v \#` set seedfile = $subjdir/scripts/seed-rh.crs.man.dat set seedfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-rh.crs.man.dat if ( $#RHSeedCRS ) then if ( 0 ) then if ( -e $seedfile ) set RHSeedCRS = `cat $seedfile | grep -v \#` if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-rh.crs.man.dat ) set RHSeedCRS = `cat $seedfile | grep -v \#` set seedfile = $subjdir/scripts/seed-ws.crs.man.dat set seedfile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-ws.crs.man.dat if ( $#WSSeedPoint ) then if ( 0 ) then if ( -e $seedfile ) set WSSeedPoint = `cat $seedfile | grep -v \#` if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/seed-ws.crs.man.dat ) set WSSeedPoint = `cat $seedfile | grep -v \#` set ControlPointsFile = $subjdir/tmp/control.dat set ControlPointsFile = /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/tmp/control.dat if ( -e $ControlPointsFile ) then if ( -e /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/tmp/control.dat ) then if ( $DoConformWidth256 ) then if ( 0 ) then if ( $DoShowEdits ) then if ( 0 ) then if ( $longitudinal ) then if ( 0 ) then if ( $#InputList != 0 ) then if ( 0 != 0 ) then if ( $DoConvertT2Input || $DoConvertFlairInput ) then if ( 0 || 0 ) then if ( $DoCreateBaseInput && $DoCreateBaseSubj ) then if ( 1 && 0 ) then if ( $DoMotionCor ) then if ( 1 ) then echo "#--------------------------------------------" | & tee -a $LF | & tee -a $CF echo #-------------------------------------------- tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.cmd #-------------------------------------------- echo "#@# MotionCor `date`" | & tee -a $SF | & tee -a $LF | & tee -a $CF echo #@# MotionCor `date` tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all-status.log date tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.cmd #@# MotionCor Tue Aug 27 13:41:21 EDT 2013 if ( $longitudinal ) then if ( 0 ) then if ( $DoCreateBaseSubj ) then if ( 0 ) then set cmd = ( ) ; set cmd = ( ) set RunList = ( ) ; set RunList = ( ) ls $subjdir/mri/orig/[0-9][0-9][0-9].mgz > & /dev/null ls /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/001.mgz /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/002.mgz if ( ! $status ) then if ( ! 0 ) then set RunList = `ls $subjdir/mri/orig/[0-9][0-9][0-9].mgz` ; set RunList = `ls $subjdir/mri/orig/[0-9][0-9][0-9].mgz` ls /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/001.mgz /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/002.mgz else else if ( $#RunList == 0 && $RunIt ) then if ( 2 == 0 && 1 ) then if ( $RunIt ) then if ( 1 ) then echo "Found $#RunList runs" | & tee -a $LF echo Found 2 runs tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log Found 2 runs foreach run ( $RunList ) foreach run ( /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/001.mgz /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/002.mgz ) echo $run | & tee -a $LF echo /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/001.mgz tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/001.mgz end end echo $run | & tee -a $LF echo /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/002.mgz tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/002.mgz end end endif endif endif endif foreach RunVol ( $RunList ) foreach RunVol ( /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/001.mgz /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/002.mgz ) echo "Checking for (invalid) multi-frame inputs..." | & tee -a $LF echo Checking for (invalid) multi-frame inputs... tee -a /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/scripts/recon-all.log Checking for (invalid) multi-frame inputs... set nframes = `mri_info --nframes $RunVol |& tail -n 1` set nframes = `mri_info --nframes $RunVol |& tail -n 1` tail -n 1 mri_info --nframes /autofs/cluster/ichresearch/Petechial/MEG/CAA_022_struc/mri/orig/001.mgz if ( $nframes != 1 ) then if ( Cannot allocate memory != 1 ) then if: Expression Syntax. Exit 1