Fix some bugs

parent 2b4c77e7
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
- [ ] Brancher EHDN et outlier - [ ] Brancher EHDN et outlier
- [ ] Séparer case et contrôles - [ ] Séparer case et contrôles
- [ ] Ajouter EHDN dans GetResults - [ ] Ajouter EHDN dans GetResults
- [ ] Ajouter le sample dans le nom de fichier de log - [ ] Ajouter le sample dans le nom de fichier de log pour pieline.sh
- [ ] Changer le répertoire de sortie : /STR/pipeline car pipeline n'est pas explicite (répertoire avec fichiers de sortie des outils de détection de STR) - [ ] Changer le répertoire de sortie : /STR/pipeline car pipeline n'est pas explicite (répertoire avec fichiers de sortie des outils de détection de STR)
- [ ] Remove dijen from str_outliers.py - [ ] Remove dijen from str_outliers.py
...@@ -21,46 +21,47 @@ fi ...@@ -21,46 +21,47 @@ fi
# Source the configuration file # Source the configuration file
. "$(dirname "$0")/config.sh" . "$(dirname "$0")/config.sh"
if [ "x$INPUTDIR" = "x$OUTPUTDIR"] if [ "x$INPUTDIR" = "x$OUTPUTDIR" ]
then then
echo "Input directory is the same as output directory. Please change it to prevent the pipeline from deleting or overwriting raw data." echo "Input directory is the same as output directory. Please change it to prevent the pipeline from deleting or overwriting raw data."
exit 1 exit 1
fi fi
INPUTFILE="INPUTDIR/$SAMPLE.bam" INPUTFILE="$INPUTDIR/$SAMPLE.bam"
DATE="$(date +"%F_%H-%M-%S")" DATE="$(date +"%F_%H-%M-%S")"
OUTPUTDIR="OUTPUTDIR/$SAMPLE" OUTPUTDIR="$OUTPUTDIR/$SAMPLE"
TRANSFER_JOB="" TRANSFER_JOB=""
WD="$(dirname "$(readlink -f "$0")")"
# Transfer bam and bai from archive to work Transfer bam and bai from archive to work
if [ "x$TRANSFER" = "xyes" ] if [ "x$TRANSFER" = "xyes" ]
then then
mkdir -p "$OUTPUTDIR" mkdir -p "$OUTPUTDIR"
TRANSFER_JOB="transfer_$SAMPLE" TRANSFER_JOB="transfer_$SAMPLE"
qsub -pe smp 1 -q "$TRANSFER_QUEUE" -N "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTDIR="$OUTPUTDIR",LOGFILE="$OUTPUTDIR/transfer_$DATE.log" "$(dirname "$0")/wrapper_transfer.sh" qsub -wd "$WD" -pe smp 1 -q "$TRANSFER_QUEUE" -N "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",TRANSFER_OUTPUTDIR="$OUTPUTDIR",LOGFILE="$OUTPUTDIR/transfer_$DATE.log" wrapper_transfer.sh
INPUTFILE="$OUTPUTDIR/$SAMPLE.bam" INPUTFILE="$OUTPUTDIR/$SAMPLE.bam"
fi fi
# Launch ExpansionHunter # Launch ExpansionHunter
mkdir -p "$OUTPUTDIR/eh" mkdir -p "$OUTPUTDIR/eh"
qsub -pe smp 4 -q "$COMPUTE_QUEUE" -N "eh_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTDIR/eh/$SAMPLE",LOGFILE="$OUTPUTDIR/eh/$DATE.log" "$(dirname "$0")/wrapper_expansionhunter.sh" qsub -wd "$WD" -pe smp 4 -q "$COMPUTE_QUEUE" -N "eh_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTDIR/eh/$SAMPLE",LOGFILE="$OUTPUTDIR/eh/$DATE.log" wrapper_expansionhunter.sh
# Launch Tredparse # Launch Tredparse
mkdir -p "$OUTPUTDIR/tredparse" mkdir -p "$OUTPUTDIR/tredparse"
qsub -pe smp 4 -q "$COMPUTE_QUEUE" -N "tredparse_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTDIR="$OUTPUTDIR/tredparse",LOGFILE="$OUTPUTDIR/tredparse/$DATE.log" "$(dirname "$0")/wrapper_tredparse.sh" qsub -wd "$WD" -pe smp 4 -q "$COMPUTE_QUEUE" -N "tredparse_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",TREDPARSE_OUTPUTDIR="$OUTPUTDIR/tredparse",LOGFILE="$OUTPUTDIR/tredparse/$DATE.log" wrapper_tredparse.sh
# Launch GangSTR # Launch GangSTR
mkdir -p "$OUTPUTDIR/gangstr" mkdir -p "$OUTPUTDIR/gangstr"
qsub -pe smp 4 -q "$COMPUTE_QUEUE" -N "gangstr_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTDIR/gangstr/$SAMPLE",LOGFILE="$OUTPUTDIR/gangstr/$DATE.log" "$(dirname "$0")/wrapper_gangstr.sh" qsub -wd "$WD" -pe smp 4 -q "$COMPUTE_QUEUE" -N "gangstr_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTDIR/gangstr/$SAMPLE",LOGFILE="$OUTPUTDIR/gangstr/$DATE.log" wrapper_gangstr.sh
# Launch ehdn profile # Launch ehdn profile
mkdir -p "$OUTPUTDIR/ehdn" mkdir -p "$OUTPUTDIR/ehdn"
qsub -pe smp 4 -q "$COMPUTE_QUEUE" -N "ehdn_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTDIR/ehdn/$SAMPLE",LOGFILE="$OUTPUTDIR/ehdn/$DATE.log" "$(dirname "$0")/wrapper_ehdn_profile.sh" qsub -wd "$WD" -pe smp 4 -q "$COMPUTE_QUEUE" -N "ehdn_$SAMPLE" -hold_jid "$TRANSFER_JOB" -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTDIR/ehdn/$SAMPLE",LOGFILE="$OUTPUTDIR/ehdn/$DATE.log" wrapper_ehdn_profile.sh
# Delete transfered bam and bai # Delete transfered bam and bai
if [ "x$TRANSFER" = "xyes" ] if [ "x$TRANSFER" = "xyes" ]
then then
qsub -pe smp 1 -q "$COMPUTE_QUEUE" -N "delete_$SAMPLE" -hold_jid "eh_$SAMPLE,tredparse_$SAMPLE,gangstr_$SAMPLE,ehdn_$SAMPLE" -sync y -v SAMPLE="$SAMPLE",LOGFILE="$OUTPUTDIR/delete_$DATE.log" "$(dirname "$0")/wrapper_delete.sh" qsub -wd "$WD" -pe smp 1 -q "$COMPUTE_QUEUE" -N "delete_$SAMPLE" -hold_jid "eh_$SAMPLE,tredparse_$SAMPLE,gangstr_$SAMPLE,ehdn_$SAMPLE" -sync y -v SAMPLE="$SAMPLE",LOGFILE="$OUTPUTDIR/delete_$DATE.log" wrapper_delete.sh
else else
qsub -pe smp 1 -q "$COMPUTE_QUEUE" -N "delete_$SAMPLE" -hold_jid "eh_$SAMPLE,tredparse_$SAMPLE,gangstr_$SAMPLE,ehdn_$SAMPLE" -sync y -b y echo "Nothing to delete." qsub -wd "$WD" -pe smp 1 -q "$COMPUTE_QUEUE" -N "delete_$SAMPLE" -hold_jid "eh_$SAMPLE,tredparse_$SAMPLE,gangstr_$SAMPLE,ehdn_$SAMPLE" -sync y -b y echo "Nothing to delete."
fi fi
...@@ -11,5 +11,5 @@ ...@@ -11,5 +11,5 @@
CASE="$1" CASE="$1"
qsub -pe smp 1 -q "$COMPUTE_QUEUE" -N "ehdn_outlier_$CASE" -sync y -v CASE="$CASE" "$(dirname "$0")/wrapper_ehdn_outlier.sh" qsub -wd "$(dirname "$(readlink -f "$0")")" -pe smp 1 -q "$COMPUTE_QUEUE" -N "ehdn_outlier_$CASE" -sync y -v CASE="$CASE" wrapper_ehdn_outlier.sh
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
## Usage: qsub -pe smp 1 -v SAMPLE=<sample>,[LOGFILE=<path to the log file>] wrapper_delete.sh ## Usage: qsub -pe smp 1 -v SAMPLE=<sample>,[LOGFILE=<path to the log file>] wrapper_delete.sh
# Source the configuration file # Source the configuration file
. "$(dirname "$0")/config.sh" . ./config.sh
# Log file path option # Log file path option
if [ -z "$LOGFILE" ] if [ -z "$LOGFILE" ]
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
## Description: script to generate automatically a manifest and multisampleprofile in a tsv format, then do outlier analyses for a single patient ## Description: script to generate automatically a manifest and multisampleprofile in a tsv format, then do outlier analyses for a single patient
# Source the configuration file # Source the configuration file
. "$(dirname "$0")/config.sh" . ./config.sh
# Logging # Logging
LOGFILE="$OUTPUTDIR/$CASE/ehdn/$CASE.ehdn_outlier.$(date +"%F_%H-%M-%S").log" LOGFILE="$OUTPUTDIR/$CASE/ehdn/$CASE.ehdn_outlier.$(date +"%F_%H-%M-%S").log"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_ehdn_profile.sh ## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_ehdn_profile.sh
# Source the configuration file # Source the configuration file
. "$(dirname "$0")/config.sh" . ./config.sh
# Log file path option # Log file path option
if [ -z "$LOGFILE" ] if [ -z "$LOGFILE" ]
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_expansionhunter.sh ## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_expansionhunter.sh
# Source the configuration file # Source the configuration file
. "$(dirname "$0")/config.sh"
. ./config.sh
# Log file path option # Log file path option
if [ -z "$LOGFILE" ] if [ -z "$LOGFILE" ]
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_gangstr.sh ## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTPREFIX=<output prefix>,[LOGFILE=<path to the log file>] wrapper_gangstr.sh
# Source the configuration file # Source the configuration file
. "$(dirname "$0")/config.sh" . ./config.sh
# Log file path option # Log file path option
if [ -z "$LOGFILE" ] if [ -z "$LOGFILE" ]
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
## Licence: AGPLv3 ## Licence: AGPLv3
## Author: anne-sophie.denomme-pichon@u-bourgogne.fr ## Author: anne-sophie.denomme-pichon@u-bourgogne.fr
## Description: a wrapper for qsubing bam transfer for STR pipeline ## Description: a wrapper for qsubing bam transfer for STR pipeline
## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTDIR=<output directory>,[LOGFILE=<path to the log file>] wrapper_transfer.sh ## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,TRANSFER_OUTPUTDIR=<output directory>,[LOGFILE=<path to the log file>] wrapper_transfer.sh
# Log file path option # Log file path option
...@@ -28,7 +28,7 @@ then ...@@ -28,7 +28,7 @@ then
fi fi
# Check if output directory is specified # Check if output directory is specified
if [ -z "$OUTPUTDIR" ] if [ -z "$TRANSFER_OUTPUTDIR" ]
then then
echo "Output directory is not specified" echo "Output directory is not specified"
echo "$(date +"%F_%H-%M-%S"): END" echo "$(date +"%F_%H-%M-%S"): END"
...@@ -36,12 +36,12 @@ then ...@@ -36,12 +36,12 @@ then
fi fi
# Transfer and check exit code # Transfer and check exit code
echo "command : rsync -aAX \ echo "command : rsync -aX \
$INPUTFILE $(echo "$INPUTFILE" | sed 's/\.bam$/.bai/') \ $INPUTFILE $(echo "$INPUTFILE" | sed 's/\.bam$/.bai/') \
$OUTPUTDIR" $TRANSFER_OUTPUTDIR"
rsync -aAX \ rsync -aX \
"$INPUTFILE" "$(echo "$INPUTFILE" | sed 's/\.bam$/.bai/')" \ "$INPUTFILE" "$(echo "$INPUTFILE" | sed 's/\.bam$/.bai/')" \
"$OUTPUTDIR" "$TRANSFER_OUTPUTDIR"
transfer_exitcode=$? transfer_exitcode=$?
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
## Licence: AGPLv3 ## Licence: AGPLv3
## Author: anne-sophie.denomme-pichon@u-bourgogne.fr ## Author: anne-sophie.denomme-pichon@u-bourgogne.fr
## Description: a wrapper for qsubing Tredparse script for STR detection ## Description: a wrapper for qsubing Tredparse script for STR detection
## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,OUTPUTDIR=<output directory>,[LOGFILE=<path to the log file>] wrapper_tredparse.sh ## Usage: qsub -pe smp 1 -v INPUTFILE=<path to the bam file>,TREDPARSE_OUTPUTDIR=<output directory>,[LOGFILE=<path to the log file>] wrapper_tredparse.sh
# Source the configuration file # Source the configuration file
. "$(dirname "$0")/config.sh" . ./config.sh
# Log file path option # Log file path option
if [ -z "$LOGFILE" ] if [ -z "$LOGFILE" ]
...@@ -30,7 +30,7 @@ then ...@@ -30,7 +30,7 @@ then
fi fi
# Check if output prefix is specified # Check if output prefix is specified
if [ -z "$OUTPUTDIR" ] if [ -z "$TREDPARSE_OUTPUTDIR" ]
then then
echo "Output directory is not specified" echo "Output directory is not specified"
echo "$(date +"%F_%H-%M-%S"): END" echo "$(date +"%F_%H-%M-%S"): END"
...@@ -44,8 +44,8 @@ then ...@@ -44,8 +44,8 @@ then
fi fi
# Launch script command and check exit code # Launch script command and check exit code
echo "command : $TREDPARSE $INPUTFILE --workdir $OUTPUTDIR --ref hg19" echo "command : $TREDPARSE $INPUTFILE --workdir $TREDPARSE_OUTPUTDIR --ref hg19"
"$TREDPARSE" "$INPUTFILE" --workdir "$OUTPUTDIR" --ref hg19 "$TREDPARSE" "$INPUTFILE" --workdir "$TREDPARSE_OUTPUTDIR" --ref hg19
tredparse_exitcode=$? tredparse_exitcode=$?
......
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