Skip to content
Snippets Groups Projects
Commit 12f57bca authored by Brandi Cantarel's avatar Brandi Cantarel
Browse files

adding input options for trim and tbed option for strelka2

parent cacd8bc8
Branches
Tags
No related merge requests found
...@@ -25,12 +25,20 @@ shift $(($OPTIND -1)) ...@@ -25,12 +25,20 @@ shift $(($OPTIND -1))
baseDir="`dirname \"$0\"`" baseDir="`dirname \"$0\"`"
# Check for mandatory options # Check for mandatory options
if [[ -z $pair_id ]] || [[ -z $fq1 ]]; then if [[ -z $pair_id ]]; then
usage usage
fi fi
fqs=("$@") fqs=''
i=0
numfq=$# numfq=$#
while [[ $i -le $numfq ]]
do
fqs="$fqs $1"
i=$((i + 1))
shift 1
done
if [[ -f $fq1 ]] if [[ -f $fq1 ]]
then then
fqs="$fq1" fqs="$fq1"
...@@ -50,11 +58,11 @@ module load trimgalore/0.6.4 cutadapt/2.5 ...@@ -50,11 +58,11 @@ module load trimgalore/0.6.4 cutadapt/2.5
if [ $numfq > 1 ] if [ $numfq > 1 ]
then then
trim_galore --paired -q 25 --illumina --gzip --length 35 ${fqs} trim_galore --paired -q 25 --illumina --gzip --length 35 ${fqs}
mv ${r1base}_val_1.fq.gz ${pair_id}.trim.R1.fastq.gz mv *_val_1.fq.gz ${pair_id}.trim.R1.fastq.gz
mv ${r2base}_val_2.fq.gz ${pair_id}.trim.R2.fastq.gz mv *_val_2.fq.gz ${pair_id}.trim.R2.fastq.gz
else else
trim_galore -q 25 --illumina --gzip --length 35 ${fqs} trim_galore -q 25 --illumina --gzip --length 35 ${fqs}
mv ${r1base}_trimmed.fq.gz ${pair_id}.trim.R1.fastq.gz mv *_trimmed.fq.gz ${pair_id}.trim.R1.fastq.gz
cp ${pair_id}.trim.R1.fastq.gz ${pair_id}.trim.R2.fastq.gz cp ${pair_id}.trim.R1.fastq.gz ${pair_id}.trim.R2.fastq.gz
fi fi
......
...@@ -18,6 +18,7 @@ do ...@@ -18,6 +18,7 @@ do
p) pair_id=$OPTARG;; p) pair_id=$OPTARG;;
a) algo=$OPTARG;; a) algo=$OPTARG;;
t) rna=1;; t) rna=1;;
b) tbed=$OPTARG;;
q) pon==$OPTARG;; q) pon==$OPTARG;;
h) usage;; h) usage;;
esac esac
...@@ -131,6 +132,11 @@ then ...@@ -131,6 +132,11 @@ then
elif [[ $algo == 'strelka2' ]] elif [[ $algo == 'strelka2' ]]
then then
opt=''
if [[ -n $tbed ]]
then
opt="--callRegions ${tbed}.gz"
fi
if [[ $rna == 1 ]] if [[ $rna == 1 ]]
then then
mode="--rna" mode="--rna"
...@@ -143,7 +149,7 @@ then ...@@ -143,7 +149,7 @@ then
for i in *.bam; do for i in *.bam; do
gvcflist="$gvcflist --bam ${i}" gvcflist="$gvcflist --bam ${i}"
done done
configManta.py $gvcflist --referenceFasta ${reffa} $mode --runDir manta configManta.py $gvcflist $opt --referenceFasta ${reffa} $mode --runDir manta
manta/runWorkflow.py -m local -j $NPROC manta/runWorkflow.py -m local -j $NPROC
if [[ -f manta/results/variants/candidateSmallIndels.vcf.gz ]] if [[ -f manta/results/variants/candidateSmallIndels.vcf.gz ]]
then then
......
...@@ -93,11 +93,11 @@ module load htslib/gcc/1.8 ...@@ -93,11 +93,11 @@ module load htslib/gcc/1.8
if [ $algo == 'strelka2' ] if [ $algo == 'strelka2' ]
then then
module load strelka/2.9.10 manta/1.3.1 samtools/gcc/1.8 snpeff/4.3q vcftools/0.1.14
opt='' opt=''
if [[ -n $tbed ]] if [[ -n $tbed ]]
then then
opt="--callRegions ${tbed}.gz}" opt="--callRegions ${tbed}.gz"
module load strelka/2.9.10 manta/1.3.1 samtools/gcc/1.8 snpeff/4.3q vcftools/0.1.14
fi fi
mkdir manta mkdir manta
configManta.py --normalBam ${normal} --tumorBam ${tumor} --referenceFasta ${reffa} $opt --runDir manta configManta.py --normalBam ${normal} --tumorBam ${tumor} --referenceFasta ${reffa} $opt --runDir manta
......
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