-
Notifications
You must be signed in to change notification settings - Fork 12
/
init_vars
executable file
·126 lines (100 loc) · 5.56 KB
/
init_vars
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/bin/bash
#
# Script name: init_vars
#
# Description: Script to initalise the variables needed for the pipeline.
#
# Authors: Fidel Alfaro-Almagro, Stephen M. Smith & Mark Jenkinson
#
# Copyright 2017 University of Oxford
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################
# #
# USER MUST MODIFY THE INDICATED LINES #
# #
###########################################
# UKBB ROOT DIR LOCATION
export BBDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd ..; pwd )"
#SETUP FSL
export FSLDIR=/opt/fsl #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
. $FSLDIR/etc/fslconf/fsl.sh
export FSLCONFDIR="${FSLDIR}/config"
export FSLOUTPUTTYPE="NIFTI_GZ"
export FSLGECUDAQ=cuda.q #TO BE MODIFIED BY USER
#TODO implement this in the files
export QUEUE_STANDARD="all.q" #TO BE MODIFIED BY USER
export QUEUE_MORE_MEM="bigmem_16.q" #TO BE MODIFIED BY USER
export QUEUE_MAX_MEM="bigmem_64.q" #TO BE MODIFIED BY USER
# option 1: true; use full-GPU probtrackx call. default.
# option 2: gpu_batch; split GPU probtrackx into 10 smaller batches.
# for low-memory systems.
# option 3: false: use CPU probtrackx split into 10 smaller batches.
# use for systems without CUDA GPU
export PROBTRACKX_GPU="true"
export REPARCELLATE="false" #TO BE MODIFIED BY USER
#SETUP AFNI
# export AFNIDIR=/opt/afni #TO BE MODIFIED BY USER
export AFNIDIR="/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Compiler/gcc9/afni/20.3.05"
#SETUP FREESURFER
# export FREESURFER_HOME=/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/freesurfer/5.3.0/bin/freesurfer #TO BE MODIFIED BY USER
# if usin on Compute Canada, load module first
source $EBROOTFREESURFER/FreeSurferEnv.sh
# source $FREESURFER_HOME/SetUpFreeSurfer.sh > /dev/null
#SETUP ANTS
export ANTSPATH="/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Compiler/gcc9/ants/2.3.5/bin"
export SOFTDIR="/opt/tvb-pipeline" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
# SET UP MATLAB
export MCROOT="/opt/mcr" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
export MCRV="v93"
#Move $FSLDIR/bin before $FREESURFER_HOME in the path
FSLDIRseddable=`echo $FSLDIR | sed 's|/|\\\/|g'`
PATH=`echo $PATH | sed "s|$FSLDIR/bin||g"`
export PATH="$FSLDIR/bin:$PATH"
#SETUP EXTERNAL LIBRARIES
export R_LIBS="/usr/lib/R/library" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
export R_DIR="/usr/lib/R" #TO BE MODIFIED BY USER (DEFAULT FOR SINGULARITY)
#SET LOCALE FOR FLOATING POINT FORMATTING
export LC_ALL=C
#ENV VARIABLES FOR BIOBANK
export BB_BIN_DIR="$BBDIR/tvb-ukbb"
export FSLGPUDIR="$BB_BIN_DIR/bb_diffusion_pipeline/bb_bedpostx"
export MNI="$FSLDIR/data/standard/MNI152_T1_1mm.nii.gz"
export MNI_mask="$FSLDIR/data/standard/MNI152_T1_1mm_brain_mask.nii.gz"
export MNI_brain="$FSLDIR/data/standard/MNI152_T1_1mm_brain.nii.gz"
export MNI_dir="$FSLDIR/data/standard"
export templ="$BB_BIN_DIR/templates"
export PYTHONPATH="$SOFTDIR/software/env/bin/python"
export FSL_FIXDIR="$BB_BIN_DIR/bb_functional_pipeline/bb_fix_dir"
export PARC_IMG="$templ/parcellations/TVB_SchaeferTian/TVB_SchaeferTian_420.nii.gz" #TO BE MODIFIED BY USER
export PARC_LUT="$templ/parcellations/TVB_SchaeferTian/TVB_SchaeferTian_420_LUT.tsv" #TO BE MODIFIED BY USER
export PARC_NAME="TVBSchaeferTian420" #TO BE MODIFIED BY USER
export SUSCEPT_ROIS="$templ/parcellations/TVB_SchaeferTian/SusceptibilityROIs_SchaeferTian_420.nii.gz" #TO BE MODIFIED BY USER
# export numROI="436" #TO BE MODIFIED BY USER
export TRAINING_FILE="ADNI3_Training.RData" #TO BE MODIFIED BY USER
export SynB0="y" #TO BE MODIFIED BY USER
export PE_direction="0 -1 0" #TO BE MODIFIED BY USER
export topupValue="0.1" #TO BE MODIFIED BY USER - leave empty "" for no value
export topupValue_default="0.1" #TO BE MODIFIED BY USER - leave empty "" for no value
export EPIfactor="50" #TO BE MODIFIED BY USER
# set to 1 for single shell diffusion data and 2 for multi-shell
export DIFF_SHELL_TYPE="1"
#INCLUDE 3 MAIN BIOBANK DIRECTORIES IN PATH
export PATH="$BB_BIN_DIR/bb_pipeline_tools/:$BB_BIN_DIR/bb_general_tools/:$PATH"
#SET PATH FOR MCR
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$MCROOT/$MCRV/runtime/glnxa64:$MCROOT/$MCRV/bin/glnxa64:$MCROOT/$MCRV/sys/os/glnxa64:$MCROOT/$MCRV/sys/opengl/lib/glnxa64:$LD_LIBRARY_PATH"
export MATLAB_COMPILER_RUNTIME="$MCROOT/$MCRV"
export XAPPLRESDIR="$MCROOT/$MCRV/X11/app-defaults"
# source activate $SOFTDIR/software/env
source activate $SOFTDIR/software/env