Create wrapper for STRetch

parent 49c1f48d
#! /bin/sh
### ASDP PIPELINE ###
## wrapper_gangstr.sh
## wrapper_stretch.sh
## Version : 0.0.1
## Licence : FIXME
## Description : a wrapper for qsubing GangSTR script for STR detection
## Usage : qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_gangstr.sh
## Description : a wrapper for qsubing STRetch script for STR detection
## Usage : qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_stretch.sh
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191104
## last revision date : 20191104
## Creation Date : 20191118
## last revision date : 20191118
## Known bugs : None
# Log file path option
if [ -z "$LOGFILE" ]
then
LOGFILE=gangstr.$(date +"%F_%H-%M-%S").log
LOGFILE=stretch.$(date +"%F_%H-%M-%S").log
fi
# Logging
......@@ -31,7 +31,7 @@ if [ ! -f "$INPUTFILE" ]
then
echo "Input file '$INPUTFILE' does not exist"
echo "$(date +"%F_%H-%M-%S"): END"
touch gangstr.failed
touch stretch.failed
exit 1
fi
......@@ -40,32 +40,32 @@ if [ -z "$OUTPUTPREFIX" ]
then
echo "Output prefix is not specified"
echo "$(date +"%F_%H-%M-%S"): END"
touch gangstr.failed
touch stretch.failed
exit 1
fi
# Launch script command and check exit code
echo "command : /work/gad/shared/bin/gangstr/GangSTR-2.4/bin/GangSTR \
--bam "$INPUTFILE" \
--ref /work/gad/shared/pipeline/hg19/index/hg19_essential.fa \
--regions /work/gad/shared/bin/gangstr/STRregions/hg19_ver13_1.bed \
--out "$OUTPUTPREFIX" \
--verbose"
echo "cd "$OUTPUTDIR"
/work/gad/shared/bin/stretch/STRetch-20190602/tools/bin/bpipe \
run -p \
input_regions=/work/gad/shared/bin/stretch/STRetch-20190602/reference-data/hg19.STR_disease_loci.bed \
/work/gad/shared/bin/stretch/STRetch-20190602/pipelines/STRetch_wgs_bam_pipeline.groovy \
"$INPUTFILE""
/work/gad/shared/bin/gangstr/GangSTR-2.4/bin/GangSTR \
--bam "$INPUTFILE" \
--ref /work/gad/shared/pipeline/hg19/index/hg19_essential.fa \
--regions /work/gad/shared/bin/gangstr/STRregions/hg19_ver13_1.bed \
--out "$OUTPUTPREFIX" \
--verbose
cd "$OUTPUTDIR"
/work/gad/shared/bin/stretch/STRetch-20190602/tools/bin/bpipe \
run -p
input_regions=/work/gad/shared/bin/stretch/STRetch-20190602/reference-data/hg19.STR_disease_loci.bed \
/work/gad/shared/bin/stretch/STRetch-20190602/pipelines/STRetch_wgs_bam_pipeline.groovy \
"$INPUTFILE"
gangstr_exitcode=$?
stretch_exitcode=$?
echo "gangstr exit code : $gangstr_exitcode"
if [ $gangstr_exitcode != 0 ]
echo "stretch exit code : $stretch_exitcode"
if [ $stretch_exitcode != 0 ]
then
echo "$(date +"%F_%H-%M-%S"): END"
touch gangstr.failed
touch stretch.failed
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment