# # LECA Bash library # # The LECA bash library provides a set of function used for helping # development of bash script mainly to write job script on the luke # cluster # # The files from the LECA Bash library must be sourced from your main script # # # Provides a set of variables relative to the LECA environement # ============================================================= # # The lecaluke module provides a set of variable defining emplacement # where LECA ressources are stored on the LUKE cluster. include logging logdebug "Load lecaluke package" include tempdir if onluke; then logdebug "Script run on the LUKE cluster" # Source the ciment & leca environment: . /nfs_scratch/LECA_ENVIRONEMENT/env.bash # Register scratch_dir as place where to create temp directory if [[ ! -z "$LOCAL_SCRATCH_DIR" ]] ; then registertmpdir $LOCAL_SCRATCH_DIR registertmpdir $SHARED_SCRATCH_DIR fi # Where is located the LECA_ENVIRONEMENT LECA_ENVIRONEMENT=/nfs_scratch/LECA_ENVIRONEMENT # Load the LECA envoronement . ${LECA_ENVIRONEMENT}/etc/bashrc # Lock files are stored in a common place LOCK_DIR="${LECA_ENVIRONEMENT}/locks" # All the data shared among users can be stored here DATA_DIR="${LECA_ENVIRONEMENT}/data" # All the molecular public databases downloaded for users on the luke cluster # will be downloaded here BIODATA_DIR="${DATA_DIR}/biodatabase" # Main directory for the NCBI taxonomy TAXONOMY_DIR="${BIODATA_DIR}/taxonomy" TREMBL_DIR="${BIODATA_DIR}/trembl" SWISSPROT_DIR="${BIODATA_DIR}/swissprot" function latest_taxonomy() { echo "${TAXONOMY_DIR}/$(ls -ltr "${BIODATA_DIR}/taxonomy" | awk '/^d/ {print $NF}' | tail -1)" } else logwarning Script is not running on the LUKE cluster if onfroggy ; then logdebug Script run on the FROGGY cluster # Register scratch_dir as place where to create temp directory registertmpdir $LOCAL_SCRATCH_DIR registertmpdir $SHARED_SCRATCH_DIR else logwarning Script is not running on the FROGGY cluster fi fi