Skip to content

Commit fc25c2d

Browse files
committed
fix: change back to gatk3
1 parent a2b7da6 commit fc25c2d

File tree

5 files changed

+34
-19
lines changed

5 files changed

+34
-19
lines changed

docker/logan_base/Dockerfile

+10-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ WORKDIR /opt2
1717
# This section installs system packages required for your project
1818
# If you need extra system packages add them here.
1919
# python/3.8.0 and python/2.7.16 (strelka and manta)
20-
# JDK 17 for DISCVRSeq
2120
RUN apt-get update \
2221
&& apt-get -y upgrade \
2322
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
24-
bc \
25-
openjdk-17-jdk
23+
bc
2624

2725
# Common bioinformatics tools
2826
# bwa/0.7.17-4 bowtie/1.2.3 bowtie2/2.3.5.1
@@ -54,9 +52,15 @@ RUN wget https://github.com/broadinstitute/gatk/releases/download/4.3.0.0/gatk-4
5452
&& /opt2/gatk-4.3.0.0/gatk --list
5553
ENV PATH="/opt2/gatk-4.3.0.0:$PATH"
5654

57-
# Use DISCVRSeq For CombineVariants Replacement
58-
RUN wget https://github.com/BimberLab/DISCVRSeq/releases/download/1.3.61/DISCVRSeq-1.3.61.jar
59-
ENV DISCVRSeq_JAR="/opt2/DISCVRSeq-1.3.61.jar"
55+
# Install last release of GATK3 (GATK/3.8-1)
56+
# Only being used for the CombineVariants
57+
# command that is not available in GATK4
58+
# Available via env variable: $GATK_JAR
59+
# Requires Java8 or 1.8
60+
RUN wget https://storage.googleapis.com/gatk-software/package-archive/gatk/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef.tar.bz2 \
61+
&& tar -xvjf /opt2/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef.tar.bz2 \
62+
&& rm /opt2/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef.tar.bz2
63+
ENV GATK_JAR="/opt2/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef/GenomeAnalysisTK.jar"
6064

6165
# Install dependencies needed to add a new repository over HTTPS
6266
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \

nextflow.config

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ params {
2323
script_freecpaired = "${projectDir}/workflow/scripts/freec_paired.pl"
2424
freec_significance = "${projectDir}/workflow/scripts/assess_significance.R"
2525
freec_plot = "${projectDir}/workflow/scripts/makeGraph.R"
26-
lofreq_convert = "${projectDir}/workflow/scripts/lofreq_convert.sh"
26+
lofreq_convert = "${projectDir}/workflow/scripts/add_gt_lofreq.sh"
2727
vep_cache = "/fdb/VEP/102/cache"
2828

2929
//Biowulf
@@ -84,6 +84,10 @@ profiles {
8484
withLabel: process_somaticcaller {
8585
container = 'docker://dnousome/ccbr_logan_base:v0.3.3'
8686
}
87+
//Name Based
88+
withName:bwamem2 {
89+
container = 'docker://dnousome/ccbr_logan_base:v0.3.3'
90+
}
8791
withName:fastq_screen {
8892
container = 'docker://nciccbr/ccbr_fastq_screen_0.13.0:v2.0'
8993
}

workflow/modules/trim_align.nf

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ process bwamem2 {
6363
${GENOMEREF} \
6464
${samplename}.R1.trimmed.fastq.gz ${samplename}.R2.trimmed.fastq.gz | \
6565
samblaster -M | \
66-
samtools sort -@$task.cpus -m 4G - -o ${samplename}.bam
66+
samtools sort -@ $task.cpus -m 4G - -o ${samplename}.bam
6767
6868
samtools index -@ $task.cpus ${samplename}.bam ${samplename}.bai
6969

workflow/modules/variant_calling.nf

+16-9
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ process vardict_tn {
360360
-S \
361361
-f 0.05 > ${tumor.simpleName}_vs_${normal.simpleName}_${bed.simpleName}.vardict.vcf
362362
363-
printf "${normal.Name}\t${normalname}\t${tumor.Name}\t${tumorname}\n" > sampname
363+
printf "${normal.Name}\t${normalname}\n${tumor.Name}\t${tumorname}\n" > sampname
364364
365365
bcftools reheader -s sampname ${tumor.simpleName}_vs_${normal.simpleName}_${bed.simpleName}.vardict.vcf \
366366
| bcftools view -Oz -o ${tumor.simpleName}_vs_${normal.simpleName}_${bed.simpleName}.vardict.vcf.gz
@@ -493,8 +493,15 @@ process lofreq_tn {
493493
${tumorname}_vs_${normalname}_${bed.simpleName}_somatic_final_minus-dbsnp.indels.vcf.gz --threads $task.cpus -Oz -o \
494494
${tumorname}_vs_${normalname}_${bed.simpleName}_temp_lofreq.vcf.gz
495495
496-
$LOFREQ_CONVERT ${tumorname}_vs_${normalname}_${bed.simpleName}_temp_lofreq.vcf.gz ${tumorname} \
497-
| bcftools view -Oz -o ${tumorname}_vs_${normalname}_${bed.simpleName}_lofreq.vcf.gz
496+
$LOFREQ_CONVERT -i ${tumorname}_vs_${normalname}_${bed.simpleName}_temp_lofreq.vcf.gz -g 1/0 \
497+
-n ${tumorname} -o ${tumorname}_vs_${normalname}_${bed.simpleName}_temp1_lofreq.vcf.gz
498+
499+
bcftools view -h ${tumorname}_vs_${normalname}_${bed.simpleName}_temp1_lofreq.vcf.gz >temphead
500+
501+
sed 's/^##FORMAT=<ID=DP4,Number=4,Type=Integer,Description="Counts for ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">/##FORMAT=<ID=DP4,Number=1,Type=String,Description="Strand read counts: ref\\/fwd, ref\\/rev, var\\/fwd, var\\/rev">/' temphead > temphead1
502+
bcftools reheader ${tumorname}_vs_${normalname}_${bed.simpleName}_temp1_lofreq.vcf.gz -h temphead1 |\
503+
bcftools view -Oz -o ${tumorname}_vs_${normalname}_${bed.simpleName}_lofreq.vcf.gz
504+
498505
bcftools index -t ${tumorname}_vs_${normalname}_${bed.simpleName}_lofreq.vcf.gz
499506
500507
"""
@@ -738,12 +745,12 @@ process somaticcombine {
738745
vcfin1=[callers, vcfs].transpose().collect { a, b -> a + " " + b }
739746
vcfin2="-V:" + vcfin1.join(" -V:")
740747

741-
"""
742-
java -jar \$DISCVRSeq_JAR MergeVcfsAndGenotypes \
743-
-R $GENOMEREF \
744-
--genotypeMergeOption PRIORITIZE \
745-
--priority_list mutect2,strelka,octopus,muse,lofreq,vardict,varscan \
746-
--filteredRecordsMergeType KEEP_IF_ANY_UNFILTERED \
748+
"""
749+
java -jar \$GATK_JAR -T CombineVariants \
750+
-nt $task.cpus \
751+
--filteredrecordsmergetype KEEP_IF_ANY_UNFILTERED \
752+
--genotypemergeoption PRIORITIZE \
753+
--rod_priority_list mutect2,strelka,muse,lofreq,vardict,varscan \
747754
-O ${tumorsample}_vs_${normal}_combined.vcf.gz \
748755
$vcfin2
749756
"""

workflow/modules/variant_calling_tonly.nf

+2-2
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ process somaticcombine_tonly {
364364
vcfin2="-V:" + vcfin1.join(" -V:")
365365

366366
"""
367-
java -jar \$DISCVRSeq_JAR MergeVcfsAndGenotypes \
368-
-R $GENOMEREF \
367+
java -jar \$GATK_JAR -T CombineVariants \
368+
-nt $task.cpus \
369369
--genotypeMergeOption PRIORITIZE \
370370
--priority_list mutect2_tonly,octopus_tonly,vardict_tonly,varscan_tonly \
371371
--filteredRecordsMergeType KEEP_IF_ANY_UNFILTERED \

0 commit comments

Comments
 (0)