# # SAMTOOLS runtime environment script for Nordugrid ARC # # Runtime environment scripts are called (bash source) # from NorduGrid ARC with argument 0,1 or 2. # First call with argument "0" is made before the the batch # job submission script is written on the frontend. # Second call is made with argument "1" just prior to execution of the # user specified executable on the node. # Third "clean-up" call is made with argument "2" after the user # specified executable has returned on the node. # # # shared directory for application installation application_base_path=/v/linux26_x86_64/appl/molbio # number of threads for execution case "$1" in 0 ) # Here we can reserve a whole node (with $num_threads cores) for running BWA threaded. # This can be done for example by reserving memory worth of one node, if no # more elegant ways are available. # We set the number of threads and check that the user has specified # the thread count option in the script and is able to take advantage of # multiple thread reservation. ;; 1 ) # set SAMTOOLS directory export SAMTOOLS_DIR=$application_base_path/samtools/samtools-0.1.18/bin # set path to the SAMTOOLS binaries export PATH=$PATH:$SAMTOOLS_DIR/ ;; 2 ) # If you need to create the temporary directory manually instead of LRMS # this is the place to clean it up. ;; * ) # Now, calling argument is wrong or missing. # If call was made from NorduGrid ARC, it is considered # an error. return 1 ;; esac