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