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

updates variant calling isdocker; module load

parent ac7a88b4
Branches
Tags
No related merge requests found
......@@ -62,9 +62,11 @@ then
interval=$tbed
fi
source /etc/profile.d/modules.sh
module load python/2.7.x-anaconda picard/2.10.3 samtools/gcc/1.8 bcftools/gcc/1.8 bedtools/2.26.0 snpeff/4.3q vcftools/0.1.14 parallel
if [[ -z $isdocker ]]
then
source /etc/profile.d/modules.sh
module load python/2.7.x-anaconda picard/2.10.3 samtools/gcc/1.8 bcftools/gcc/1.8 bedtools/2.26.0 snpeff/4.3q vcftools/0.1.14 parallel
fi
for i in *.bam; do
if [[ ! -f ${i}.bai ]]
then
......@@ -81,7 +83,10 @@ then
bgzip ${pair_id}.sam.vcf
elif [[ $algo == 'fb' ]]
then
module load freebayes/gcc/1.2.0 parallel/20150122
if [[ -z $isdocker ]]
then
module load freebayes/gcc/1.2.0 parallel/20150122
fi
bamlist=''
for i in *.bam; do
bamlist="$bamlist --bam ${PWD}/${i}"
......@@ -92,7 +97,10 @@ then
vcf-concat fb.*.vcf | vcf-sort | vcf-annotate -n --fill-type | bcftools norm -c s -f ${reffa} -w 10 -O z -o ${pair_id}.fb.vcf.gz -
elif [[ $algo == 'platypus' ]]
then
module load platypus/gcc/0.8.1
if [[ -z $isdocker ]]
then
module load platypus/gcc/0.8.1
fi
bamlist=`join_by , *.bam`
Platypus.py callVariants --minMapQual=0 --minReads=3 --mergeClusteredVariants=1 --nCPU=$NPROC --bamFiles=${bamlist} --refFile=${reffa} --output=platypus.vcf
vcf-sort platypus.vcf |vcf-annotate -n --fill-type -n |bgzip > platypus.vcf.gz
......@@ -107,7 +115,10 @@ then
usage
fi
user=$USER
module load gatk/4.1.4.0
if [[ -z $isdocker ]]
then
module load gatk/4.1.4.0
fi
gvcflist=''
for i in *.bam; do
prefix="${i%.bam}"
......@@ -123,14 +134,17 @@ then
tabix ${pair_id}.gatk.vcf.gz
elif [ $algo == 'mutect' ]
then
module load gatk/4.1.4.0 parallel/20150122
threads=`expr $NPROC / 2`
bamlist=''
for i in *.bam; do
bamlist+="-I ${i} "
done
gatk --java-options "-Xmx20g" Mutect2 $ponopt -R ${reffa} ${bamlist} --output ${pair_id}.mutect.vcf -RF AllowAllReadsReadFilter --independent-mates --tmp-dir `pwd` -L $interval
vcf-sort ${pair_id}.mutect.vcf | vcf-annotate -n --fill-type | java -jar $SNPEFF_HOME/SnpSift.jar filter -p '(GEN[*].DP >= 10)' | bgzip > ${pair_id}.mutect.vcf.gz
if [[ -z $isdocker ]]
then
module load gatk/4.1.4.0 parallel/20150122
fi
threads=`expr $NPROC / 2`
bamlist=''
for i in *.bam; do
bamlist+="-I ${i} "
done
gatk --java-options "-Xmx20g" Mutect2 $ponopt -R ${reffa} ${bamlist} --output ${pair_id}.mutect.vcf -RF AllowAllReadsReadFilter --independent-mates --tmp-dir `pwd` -L $interval
vcf-sort ${pair_id}.mutect.vcf | vcf-annotate -n --fill-type | java -jar $SNPEFF_HOME/SnpSift.jar filter -p '(GEN[*].DP >= 10)' | bgzip > ${pair_id}.mutect.vcf.gz
elif [[ $algo == 'strelka2' ]]
then
opt=''
......@@ -152,7 +166,10 @@ then
else
mode="--exome"
fi
module load strelka/2.9.10 manta/1.3.1
if [[ -z $isdocker ]]
then
module load strelka/2.9.10 manta/1.3.1
fi
mkdir manta strelka
gvcflist=''
for i in *.bam; do
......
......@@ -34,8 +34,11 @@ do
esac
done
source /etc/profile.d/modules.sh
module load htslib/gcc/1.8 samtools/gcc/1.8 snpeff/4.3q vcftools/0.1.14
if [[ -z $isdocker ]]
then
source /etc/profile.d/modules.sh
module load htslib/gcc/1.8 samtools/gcc/1.8 snpeff/4.3q vcftools/0.1.14
fi
export PATH=/project/shared/bicf_workflow_ref/seqprg/bin:$PATH
shift $(($OPTIND -1))
......@@ -83,7 +86,10 @@ fi
if [ $algo == 'strelka2' ]
then
module load strelka/2.9.10 manta/1.3.1
if [[ -z $isdocker ]]
then
module load strelka/2.9.10 manta/1.3.1
fi
opt=''
if [[ -n $tbed ]]
then
......@@ -110,7 +116,10 @@ then
vcf-concat strelka/results/variants/*.vcf.gz | vcf-annotate -n --fill-type -n |vcf-sort |java -jar $SNPEFF_HOME/SnpSift.jar filter "(GEN[*].DP >= 10)" | perl -pe "s/TUMOR/${tid}/g" | perl -pe "s/NORMAL/${nid}/g" |bgzip > ${pair_id}.strelka2.vcf.gz
elif [ $algo == 'virmid' ]
then
module load virmid/1.2
if [[ -z $isdocker ]]
then
module load virmid/1.2
fi
cosmic=${index_path}/cosmic.vcf.gz
if [[ ! -f "${index_path}/cosmic.vcf.gz" ]]
then
......@@ -120,20 +129,29 @@ then
virmid -R ${reffa} -D ${tumor} -N ${normal} -s ${cosmic} -t $NPROC -M 2000 -c1 10 -c2 10
perl $baseDir/addgt_virmid.pl ${tumor}.virmid.som.passed.vcf
perl $baseDir/addgt_virmid.pl ${tumor}.virmid.loh.passed.vcf
module rm java/oracle/jdk1.7.0_51
module load snpeff/4.3q
if [[ -z $isdocker ]]
then
module rm java/oracle/jdk1.7.0_51
module load snpeff/4.3q
fi
vcf-concat *gt.vcf | vcf-sort | vcf-annotate -n --fill-type -n | java -jar $SNPEFF_HOME/SnpSift.jar filter '((NDP >= 10) & (DDP >= 10))' | perl -pe "s/TUMOR/${tid}/g" | perl -pe "s/NORMAL/${nid}/g" | bgzip > ${pair_id}.virmid.vcf.gz
elif [ $algo == 'mutect' ]
then
module load gatk/4.1.4.0 parallel/20150122
if [[ -z $isdocker ]]
then
module load gatk/4.1.4.0 parallel/20150122
fi
threads=`expr $NPROC / 2`
gatk --java-options "-Xmx20g" Mutect2 $ponopt --independent-mates -RF AllowAllReadsReadFilter -R ${reffa} -I ${tumor} -tumor ${tid} -I ${normal} -normal ${nid} --output ${tid}.mutect.vcf -L $interval
vcf-concat ${tid}.mutect.*vcf | vcf-sort | vcf-annotate -n --fill-type | java -jar $SNPEFF_HOME/SnpSift.jar filter -p '(GEN[*].DP >= 10)' | bgzip > ${pair_id}.mutect.vcf.gz
elif [ $algo == 'varscan' ]
then
module load bcftools/gcc/1.8 VarScan/2.4.2
module rm java/oracle/jdk1.7.0_51
module load snpeff/4.3q
if [[ -z $isdocker ]]
then
module load bcftools/gcc/1.8 VarScan/2.4.2
module rm java/oracle/jdk1.7.0_51
module load snpeff/4.3q
fi
samtools mpileup -C 50 -f ${reffa} $tumor > t.mpileup
samtools mpileup -C 50 -f ${reffa} $normal > n.mpileup
VarScan somatic n.mpileup t.mpileup vscan --output-vcf 1
......@@ -141,13 +159,14 @@ then
vcf-concat vscan*.vcf | vcf-sort | vcf-annotate -n --fill-type -n | java -jar $SNPEFF_HOME/SnpSift.jar filter '((exists SOMATIC) & (GEN[*].DP >= 10))' | perl -pe "s/TUMOR/${tid}/" | perl -pe "s/NORMAL/${nid}/g" | bgzip > ${pair_id}.varscan.vcf.gz
elif [ $algo == 'shimmer' ]
then
module load R/3.6.1-gccmkl
module rm perl/5.18.2
if [[ -z $isdocker ]]
then
module load R/3.6.1-gccmkl
module rm perl/5.18.2
fi
shimmer.pl --minqual 25 --ref ${reffa} ${normal} ${tumor} --outdir shimmer 2> shimmer.err
perl $baseDir/add_readct_shimmer.pl
module rm java/oracle/jdk1.7.0_51
module load snpeff/4.3q
vcf-annotate -n --fill-type shimmer/somatic_diffs.readct.vcf | java -jar $SNPEFF_HOME/SnpSift.jar filter '(GEN[*].DP >= 10)' | perl -pe "s/TUMOR/${tid}/" | perl -pe "s/NORMAL/${nid}/g" | bgzip > ${pair_id}.shimmer.vcf.gz
fi
......@@ -58,9 +58,11 @@ if [[ -z $snpeffgeno ]]
then
snpeffgeno='GRCh38.86'
fi
source /etc/profile.d/modules.sh
module load htslib/gcc/1.8 samtools/gcc/1.8 bcftools/gcc/1.8 bedtools/2.26.0 snpeff/4.3q vcftools/0.1.14
if [[ -z $isdocker ]]
then
source /etc/profile.d/modules.sh
module load htslib/gcc/1.8 samtools/gcc/1.8 bcftools/gcc/1.8 bedtools/2.26.0 snpeff/4.3q vcftools/0.1.14
fi
export PATH=/project/shared/bicf_workflow_ref/seqprg/bin:$PATH
mkdir -p temp
......@@ -146,7 +148,10 @@ then
java -Xmx10g -jar $SNPEFF_HOME/snpEff.jar -no-intergenic -lof -c $SNPEFF_HOME/snpEff.config ${snpeffgeno} lumpy.sv.vcf.gz | java -jar $SNPEFF_HOME/SnpSift.jar filter " ( GEN[*].DV >= 20 )" | bgzip > ${pair_id}.lumpy.vcf.gz
elif [[ $method == 'pindel' ]]
then
module load pindel/0.2.5-intel
if [[ -z $isdocker ]]
then
module load pindel/0.2.5-intel
fi
genomefiledate=`find ${reffa} -maxdepth 0 -printf "%TY%Tm%Td\n"`
touch ${pair_id}.pindel.config
for i in *.bam; do
......
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