launch_tredparse.sh 854 Bytes
Newer Older
1 2 3
#! /bin/sh

### ASDP PIPELINE ###
4 5
## Version: 0.0.1
## Licence: AGPLv3
6
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
7 8 9
## Description: script to launch the wrapper for qsubing Tredparse script for STR detection


10

11
INPUTFILE=/work/gad/shared/analyse/STR/Data/dijen561.bam
12 13 14
DATE="$(date +"%F_%H-%M-%S")"
OUTPUTDIR="/work/gad/shared/analyse/STR/Tredparse/$DATE"
LOGFILE="$OUTPUTDIR/$(basename "$INPUTFILE")_$DATE.log"
15 16 17 18 19 20 21

# Launch the script on local host with --local option and on SGE with qsub without the --local option
if [ $# -eq 1 ] && [ "x$1" = x--local ]
then
    mkdir -p "$OUTPUTDIR"
    INPUTFILE="$INPUTFILE" OUTPUTDIR="$OUTPUTDIR" LOGFILE="$LOGFILE" "$(dirname "$0")/wrapper_tredparse.sh"
else 
22
    mkdir -p "$OUTPUTDIR"
23
    qsub -pe smp 4 -q batch -v INPUTFILE="$INPUTFILE",OUTPUTDIR="$OUTPUTDIR",LOGFILE="$LOGFILE" wrapper_tredparse.sh
24
fi