Remove scripts for HipSTR STRetch STRscan LobSTR

parent 9eeb4779
#! /bin/sh
### ASDP PIPELINE ###
## pipeline.sh
## Version : 0.0.1
## Licence : FIXME
## Description : script to get automatically results from pipeline.sh script in a tsv format on the FMR1 X fragile locus
## Usage :
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191215
## last revision date : 20191215
## Known bugs : None
cd /work/gad/shared/analyse/STR/pipeline/
(
echo -e 'dijenxxx\tEH\tTred\tGangSTR'
ls -d dijen* | while read dijen
do
(
echo "$dijen"
awk '$1 == "chrX" && $2 == "146993568" {print $5}' $dijen/eh/$dijen.vcf |
sed 's@<STR\([0-9]\+\)>@\1@g'
gunzip -c $dijen/tredparse/$dijen.tred.vcf.gz |
awk '$1 == "chrX" && $2 == "146993569" && $3 == "FXS" {print $8}' |
tr ';' '\n' |
awk -F '=' '$1 == "RPA" {print $2}'
awk '$1 == "chrX" && $2 == "146993569" {print $9 " " $10}' $dijen/gangstr/$dijen.vcf |
python3 -c 'import sys; format, genotype = sys.stdin.read().split(); print(genotype.split(":")[format.split(":").index("REPCN")]) if genotype != "." else print(".")'
) |
tr '\n' '\t'
echo
done
) > results
#! /bin/sh
### ASDP PIPELINE ###
## launch_wrapper_hipstr.sh
## Version : 0.0.1
## Licence : FIXME
## Description : script to launch the wrapper for qsubing HipSTR script for STR detection
## Usage : FIXME
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191104
## last revision date : 20191104
## Known bugs : None
INPUTFILE=/work/gad/shared/analyse/STR/Data/dijen017/dijen017/dijen017.bam
DATE="$(date +"%F_%H-%M-%S")"
OUTPUTDIR="/work/gad/shared/analyse/STR/HipSTR/$DATE"
OUTPUTPREFIX="$OUTPUTDIR/$(basename -s .bam "$INPUTFILE")_$DATE"
OUTPUTFILE="$OUTPUTPREFIX.vcf.gz"
LOGFILE="$OUTPUTDIR/$DATE.log"
# 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" OUTPUTFILE="$OUTPUTFILE" LOGFILE="$LOGFILE" "$(dirname "$0")/wrapper_hipstr.sh"
else
mkdir -p "$OUTPUTDIR"
qsub -pe smp 2 -q batch -v INPUTFILE="$INPUTFILE",OUTPUTFILE="$OUTPUTFILE",LOGFILE="$LOGFILE" wrapper_hipstr.sh
fi
#! /bin/sh
### ASDP PIPELINE ###
## launch_wrapper_lobstr.sh
## Version : 0.0.1
## Licence : FIXME
## Description : script to launch the wrapper for qsubing LobSTR script for STR detection
## Usage : FIXME
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191104
## last revision date : 20191104
## Known bugs : None
INPUTFILE=/work/gad/shared/analyse/STR/Data/dijen017/lobSTR/2019-11-18/dijen017.sorted.bam
DATE="$(date +"%F_%H-%M-%S")"
OUTPUTDIR="/work/gad/shared/analyse/STR/LobSTR/$DATE"
OUTPUTPREFIX="$OUTPUTDIR/$(basename "$INPUTFILE")_$DATE"
LOGFILE="$OUTPUTDIR/$(basename "$INPUTFILE")_$DATE.log"
# 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" OUTPUTPREFIX="$OUTPUTPREFIX" LOGFILE="$LOGFILE" "$(dirname "$0")/wrapper_lobstr.sh"
else
mkdir -p "$OUTPUTDIR"
qsub -pe smp 4 -q batch -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTPREFIX",LOGFILE="$LOGFILE" wrapper_lobstr.sh
fi
#! /bin/sh
### ASDP PIPELINE ###
## launch_wrapper_stretch.sh
## Version : 0.0.1
## Licence : FIXME
## Description : script to launch the wrapper for qsubing STRetch script for STR detection
## Usage : FIXME
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191118
## last revision date : 20191127
## Known bugs : None
# INPUTFILE=/work/gad/shared/analyse/STR/Data/dijen017/dijen017/dijen017.bam
INPUTFILE=/work/gad/shared/analyse/STR/Data/dijen017/shortdijen017/dijen017.short.bam
DATE="$(date +"%F_%H-%M-%S")"
OUTPUTDIR="/work/gad/shared/analyse/STR/STRetch/$DATE"
LOGFILE="$OUTPUTDIR/$(basename "$INPUTFILE")_$DATE.log"
# 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" OUTPUTPREFIX="$OUTPUTDIR" LOGFILE="$LOGFILE" "$(dirname "$0")/wrapper_stretch.sh"
else
mkdir -p "$OUTPUTDIR"
qsub -pe smp 16 -q batch -v INPUTFILE="$INPUTFILE",OUTPUTPREFIX="$OUTPUTDIR",LOGFILE="$LOGFILE" wrapper_stretch.sh
fi
#! /bin/sh
### ASDP PIPELINE ###
## wrapper_hipstr.sh
## Version : 0.0.1
## Licence : FIXME
## Description : a wrapper for qsubing HipSTR 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_hipstr.sh
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191104
## last revision date : 20191104
## Known bugs : None
# Log file path option
if [ -z "$LOGFILE" ]
then
LOGFILE=hipstr.$(date +"%F_%H-%M-%S").log
fi
# Logging
exec 1>> "$LOGFILE" 2>&1
echo "$(date +"%F_%H-%M-%S"): START"
# Check if input file exists
if [ ! -f "$INPUTFILE" ]
then
echo "Input file '$INPUTFILE' does not exist"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Check if output prefix is specified
if [ -z "$OUTPUTFILE" ]
then
echo "Output file is not specified"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Launch script command and check exit code
echo "command : FIXME"
/work/gad/shared/bin/hipstr/HipSTR-2019-11-04/HipSTR \
--bams "$INPUTFILE" \
--fasta /work/gad/shared/pipeline/hg19/index/hg19_essential.fa \
--str-vcf "$OUTPUTFILE"
# --regions /work/gad/shared/bin/hipstr/STRregions/hg19.hipstr_reference.bed
hipstr_exitcode=$?
echo "hipstr exit code : $hipstr_exitcode"
if [ $hipstr_exitcode != 0 ]
then
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
echo "$(date +"%F_%H-%M-%S"): END"
#! /bin/sh
### ASDP PIPELINE ###
## wrapper_lobstr.sh
## Version : 0.0.1
## Licence : FIXME
## Description : a wrapper for qsubing LobSTR 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_lobstr.sh
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191104
## last revision date : 20191104
## Known bugs : None
# Log file path option
if [ -z "$LOGFILE" ]
then
LOGFILE=lobstr.$(date +"%F_%H-%M-%S").log
fi
# Logging
exec 1>> "$LOGFILE" 2>&1
echo "$(date +"%F_%H-%M-%S"): START"
# Check if input file exists
if [ ! -f "$INPUTFILE" ]
then
echo "Input file '$INPUTFILE' does not exist"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Check if output prefix is specified
if [ -z "$OUTPUTPREFIX" ]
then
echo "Output prefix is not specified"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Launch script command and check exit code
echo "command : FIXME"
#FIXME
echo "command : FIXME /work/gad/shared/bin/lobstr/lobSTR-4.0.6/bin/lobSTR \
--bampair -f /archive/gad/shared/bam_new_genome_temp/dijen017.bam \
--rg-lib /archive/gad/shared/bam_new_genome_temp/dijen017.bam \
--rg-sample /archive/gad/shared/bam_new_genome_temp/dijen017.bam \
--index-prefix /work/gad/shared/bin/lobstr/ref/hg19_v3.0.2/lobstr_v3.0.2_hg19_ref/lobSTR_ \
-o ~/test \
-v"
/work/gad/shared/bin/lobstr/lobSTR-4.0.6/bin/lobSTR \
--bampair -f "$INPUTFILE" \
--rg-lib "$INPUTFILE" \
--rg-sample "$INPUTFILE" \
--index-prefix /work/gad/shared/bin/lobstr/ref/hg19_v3.0.2/lobstr_v3.0.2_hg19_ref/lobSTR_ \
-o "$OUTPUTPREFIX" \
-v
lobstr_exitcode=$?
echo "lobstr exit code : $lobstr_exitcode"
if [ $lobstr_exitcode != 0 ]
then
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
echo "$(date +"%F_%H-%M-%S"): END"
#! /bin/sh
samtools sort -n -@64 --check=quiet -T sortbyread /work/gad/shared/analyse/STR/Data/dijen017/lobSTR/2019-11-26 -o /work/gad/shared/analyse/STR/Data/dijen017/lobSTR/2019-11-26/dijen017.sorted.bam /work/gad/shared/analyse/STR/Data/dijen017/lobSTR/dijen017.bam
#! /bin/sh
### ASDP PIPELINE ###
## Version: 0.0.1
## Licence: AGPLv3
## Author: anne-sophie.denomme-pichon@u-bourgogne.fr
## 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
# Log file path option
if [ -z "$LOGFILE" ]
then
LOGFILE=stretch.$(date +"%F_%H-%M-%S").log
fi
# Logging
exec 1>> "$LOGFILE" 2>&1
echo "$(date +"%F_%H-%M-%S"): START"
# Check if input file exists
if [ ! -f "$INPUTFILE" ]
then
echo "Input file '$INPUTFILE' does not exist"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Check if output prefix is specified
if [ -z "$OUTPUTPREFIX" ]
then
echo "Output prefix is not specified"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Launch script command and check exit code
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""
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"
stretch_exitcode=$?
echo "stretch exit code : $stretch_exitcode"
if [ $stretch_exitcode != 0 ]
then
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
echo "$(date +"%F_%H-%M-%S"): END"
#! /bin/sh
### ASDP PIPELINE ###
## wrapper_gangstr.sh
## Version : 0.0.1
## Licence : FIXME
## Description : a wrapper for qsubing STRScan 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_strscan.sh
## Output : FIXME
## Requirements : FIXME
## Author : anne-sophie.denomme-pichon@u-bourgogne.fr
## Creation Date : 20191115
## last revision date : 20191115
## Known bugs : None
# Log file path option
if [ -z "$LOGFILE" ]
then
LOGFILE=strscan.$(date +"%F_%H-%M-%S").log
fi
# Logging
exec 1>> "$LOGFILE" 2>&1
echo "$(date +"%F_%H-%M-%S"): START"
# Check if input file exists
if [ ! -f "$INPUTFILE" ]
then
echo "Input file '$INPUTFILE' does not exist"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Check if output prefix is specified
if [ -z "$OUTPUTPREFIX" ]
then
echo "Output prefix is not specified"
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
# Launch script command and check exit code
echo "command : /work/gad/shared/bin/strscan/STRScan_2019-11-05/STRScan \
-i "$INPUTFILE" \
-p /work/gad/shared/bin/gangstr/STRregions/hg19_ver13_1.bed \
-o "$OUTPUTFILE""
/work/gad/shared/bin/strscan/STRScan_2019-11-05/STRScan \
-i "$INPUTFILE" \
-p /work/gad/shared/bin/gangstr/STRregions/hg19_ver13_1.bed \
-o "$OUTPUTFILE"
strscan_exitcode=$?
echo "strscan exit code : $strscan_exitcode"
if [ $strscan_exitcode != 0 ]
then
echo "$(date +"%F_%H-%M-%S"): END"
exit 1
fi
echo "$(date +"%F_%H-%M-%S"): END"
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