launch_expansionhunter.sh 1.11 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#! /bin/sh

### ASDP PIPELINE ###
## launch_wrapper_expansionhunter.sh
## Version : 0.0.1
## Licence : FIXME
## Description : script to launch the wrapper for qsubing ExpansionHunter script for STR detection
## Usage : 
## Output : FIXME
## Requirements : FIXME

## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191102
14
## last revision date : 20191126
15
## Known bugs : None
16

17
INPUTFILE=/work/gad/shared/analyse/STR/Data/dijen017/offtargetdijen017/dijen017.offtarget.bam
18
DATE="$(date +"%F_%H-%M-%S")"
19 20
OUTPUTDIR="/work/gad/shared/analyse/STR/ExpansionHunter/$DATE"
OUTPUTPREFIX="$OUTPUTDIR/$(basename "$INPUTFILE")_$DATE"
21
LOGFILE="$OUTPUTDIR/$DATE.log"
22

23 24 25
# 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
26
    mkdir -p "$OUTPUTDIR"
27 28
    INPUTFILE="$INPUTFILE" OUTPUTPREFIX="$OUTPUTPREFIX" LOGFILE="$LOGFILE" "$(dirname "$0")/wrapper_expansionhunter.sh"
else 
29
    mkdir -p "$OUTPUTDIR"
30
    qsub -pe smp 4 -q batch -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTPREFIX",LOGFILE="$LOGFILE" wrapper_expansionhunter.sh
31
fi