Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fMRISurface related pull request #136

Merged
merged 9 commits into from
Oct 12, 2019
20 changes: 12 additions & 8 deletions fMRISurface/GenericfMRISurfaceProcessingPipeline.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/bin/bash
#!/bin/bash
set -e

# Requirements for this script
# installed versions of: FSL (version 5.0.6), FreeSurfer (version 5.3.0-HCP) , gradunwarp (HCP version 1.0.2)
# installed versions of: FSL (version 5.0.6), FreeSurfer (version 5.3.0-HCP) , gradunwarp (HCP version 1.0.2)
sivcek marked this conversation as resolved.
Show resolved Hide resolved
# environment: use SetUpHCPPipeline.sh (or individually set FSLDIR, FREESURFER_HOME, HCPPIPEDIR, PATH - for gradient_unwarp.py)

########################################## PIPELINE OVERVIEW ##########################################
########################################## PIPELINE OVERVIEW ##########################################

# TODO

########################################## OUTPUT DIRECTORIES ##########################################
########################################## OUTPUT DIRECTORIES ##########################################

# TODO

# --------------------------------------------------------------------------------
# Load Function Libraries
# --------------------------------------------------------------------------------

source $HCPPIPEDIR/global/scripts/log.shlib # Logging related functions
source $HCPPIPEDIR/global/scripts/opts.shlib # Command line option functions
source ${HCPPIPEDIR}/global/scripts/log.shlib # Logging related functions
source ${HCPPIPEDIR}/global/scripts/opts.shlib # Command line option functions

################################################ SUPPORT FUNCTIONS ##################################################

Expand Down Expand Up @@ -56,8 +56,8 @@ SmoothingFWHM=`opts_GetOpt1 "--smoothingFWHM" $@` # "${14}"
GrayordinatesResolution=`opts_GetOpt1 "--grayordinatesres" $@` # "${14}"
RegName=`opts_GetOpt1 "--regname" $@`

if [ "${RegName}" = "" ]; then
RegName="FS"
if [ -z "${RegName}" ]; then
RegName="MSMSulc"
sivcek marked this conversation as resolved.
Show resolved Hide resolved
fi

RUN=`opts_GetOpt1 "--printcom" $@` # use ="echo" for just printing everything and not running the commands (default is to run)
Expand All @@ -72,6 +72,10 @@ log_Msg "GrayordinatesResolution: ${GrayordinatesResolution}"
log_Msg "RegName: ${RegName}"
log_Msg "RUN: ${RUN}"

if [ "${RegName}" = "FS" ] ; then
log_Warn "WARNING: FreeSurfer's surface registration (based on cortical folding) is deprecated in the HCP Pipelines as it results in poorer cross-subject functional and cortical areal alignment relative to MSMSulc. Additionally, FreeSurfer registration results in dramatically higher surface distortion (both isotropic and anisotropic). These things occur because FreeSurfer's registration has too little regularization of folding patterns that are imperfectly correlated with function and cortical areas, resulting in overfitting of folding patterns. See Robinson et al 2014, 2018 Neuroimage, and Coalson et al 2018 PNAS for more details."
fi

# Setup PATHS
PipelineScripts=${HCPPIPEDIR_fMRISurf}

Expand Down
21 changes: 13 additions & 8 deletions fMRISurface/GenericfMRISurfaceProcessingPipeline_1res.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/bin/bash
#!/bin/bash
set -e

# Requirements for this script
# installed versions of: FSL (version 5.0.6), FreeSurfer (version 5.3.0-HCP) , gradunwarp (HCP version 1.0.2)
# installed versions of: FSL (version 5.0.6), FreeSurfer (version 5.3.0-HCP) , gradunwarp (HCP version 1.0.2)
# environment: use SetUpHCPPipeline.sh (or individually set FSLDIR, FREESURFER_HOME, HCPPIPEDIR, PATH - for gradient_unwarp.py)

########################################## PIPELINE OVERVIEW ##########################################
########################################## PIPELINE OVERVIEW ##########################################

# TODO

########################################## OUTPUT DIRECTORIES ##########################################
########################################## OUTPUT DIRECTORIES ##########################################

# TODO

# --------------------------------------------------------------------------------
# Load Function Libraries
# --------------------------------------------------------------------------------

source $HCPPIPEDIR/global/scripts/log.shlib # Logging related functions
source $HCPPIPEDIR/global/scripts/opts.shlib # Command line option functions
source ${HCPPIPEDIR}/global/scripts/log.shlib # Logging related functions
source ${HCPPIPEDIR}/global/scripts/opts.shlib # Command line option functions

################################################ SUPPORT FUNCTIONS ##################################################

Expand Down Expand Up @@ -56,8 +56,8 @@ SmoothingFWHM=`opts_GetOpt1 "--smoothingFWHM" $@` # "${14}"
GrayordinatesResolution=`opts_GetOpt1 "--grayordinatesres" $@` # "${14}"
RegName=`opts_GetOpt1 "--regname" $@`

if [ "${RegName}" = "" ]; then
RegName="FS"
if [ -z "${RegName}" ]; then
RegName="MSMSulc"
fi

RUN=`opts_GetOpt1 "--printcom" $@` # use ="echo" for just printing everything and not running the commands (default is to run)
Expand All @@ -72,6 +72,11 @@ log_Msg "GrayordinatesResolution: ${GrayordinatesResolution}"
log_Msg "RegName: ${RegName}"
log_Msg "RUN: ${RUN}"

if [ "${RegName}" = "FS" ] ; then
logWarn "WARNING: FreeSurfer registration is deprecated in the HCP Pipelines as it results in poorer cross-subject functional and cortical areal alignment relative to MSMSulc. Additionally, FreeSurfer registration results in dramatically higher surface distortion (both isotropic and anisotropic). These things occur because FreeSurfer's registration has too little regularizattion of folding patterns that are imperfectly correlated with function and cortical areas, resulting in overfitting of folding patterns. See Robinson et al 2014, 2018 Neuroimage, and Coalson et al 2018 PNAS for more details."
fi


# Setup PATHS
PipelineScripts=${HCPPIPEDIR_fMRISurf}

Expand Down