diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6188e7f..ff2c4b5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,6 +20,7 @@ jobs: run: | docker run -v $PWD:/opt2 nextflow/nextflow:22.10.8 \ python /opt2/logan --fastq "/opt2/.tests/*R{1,2}.fastq.gz" \ + --genome hg38 \ --vc --sv --cnv \ --output /opt2/output_tn_fqs \ --sample_sheet "/opt2/.tests/pairs.tsv" --stub @@ -27,5 +28,6 @@ jobs: run: | docker run -v $PWD:/opt2 nextflow/nextflow:22.10.8 \ python /opt2/logan --fastq "/opt2/.tests/*R{1,2}.fastq.gz" \ - --vc \ + --genome hg38 \ + --vc --sv --cnv \ --output /opt2/output_tonly_fqs --stub \ No newline at end of file diff --git a/docker/logan_base/Dockerfile b/docker/logan_base/Dockerfile index 5182c64..f0b2eca 100644 --- a/docker/logan_base/Dockerfile +++ b/docker/logan_base/Dockerfile @@ -20,7 +20,8 @@ WORKDIR /opt2 RUN apt-get update \ && apt-get -y upgrade \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - bc + bc \ + openjdk-17-jdk # Common bioinformatics tools # bwa/0.7.17-4 bowtie/1.2.3 bowtie2/2.3.5.1 @@ -44,23 +45,9 @@ RUN wget https://github.com/biod/sambamba/releases/download/v0.8.1/sambamba-0.8. && mv /opt2/sambamba-0.8.1-linux-amd64-static /opt2/sambamba \ && chmod a+rx /opt2/sambamba -# Install GATK4 (GATK/4.3.0.0) -# Requires Java8 or 1.8 -RUN wget https://github.com/broadinstitute/gatk/releases/download/4.3.0.0/gatk-4.3.0.0.zip \ - && unzip /opt2/gatk-4.3.0.0.zip \ - && rm /opt2/gatk-4.3.0.0.zip \ - && /opt2/gatk-4.3.0.0/gatk --list -ENV PATH="/opt2/gatk-4.3.0.0:$PATH" - -# Install last release of GATK3 (GATK/3.8-1) -# Only being used for the CombineVariants -# command that is not available in GATK4 -# Available via env variable: $GATK_JAR -# Requires Java8 or 1.8 -RUN wget https://storage.googleapis.com/gatk-software/package-archive/gatk/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef.tar.bz2 \ - && tar -xvjf /opt2/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef.tar.bz2 \ - && rm /opt2/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef.tar.bz2 -ENV GATK_JAR="/opt2/GenomeAnalysisTK-3.8-1-0-gf15c1c3ef/GenomeAnalysisTK.jar" +# Use DISCVRSeq For CombineVariants Replacement +RUN wget https://github.com/BimberLab/DISCVRSeq/releases/download/1.3.61/DISCVRSeq-1.3.62.jar +ENV DISCVRSeq_JAR="/opt2/DISCVRSeq-1.3.62.jar" # Install dependencies needed to add a new repository over HTTPS RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ diff --git a/logan b/logan index ea0da83..1d5edca 100755 --- a/logan +++ b/logan @@ -159,19 +159,18 @@ def main(): in1="--file_input "+args.file_input if (args.stub and args.profile is None): profile="-profile localstub" + splitreg="4" elif args.profile=="local": profile="-profile local" + splitreg=str(args.splitregions) elif (args.profile=="biowulf" or args.profile is None): profile="-profile biowulf" + splitreg=str(args.splitregions) if args.resume: resume="-resume" else: resume="" ###COMBINE ALL COMMANDS (PIPE ALIGN) - if args.stub: - splitreg="4" - else: - splitreg=str(args.splitregions) commandbase=["nextflow run",dirname + '/main.nf',"-c "+ dirname +"/nextflow.config", in1,profile,resume,sample_path,"--genome",args.genome, "--output '" +args.output+"'"+" --split_regions " + splitreg] diff --git a/workflow/modules/variant_calling.nf b/workflow/modules/variant_calling.nf index 1e6bb0a..d7b3bf9 100644 --- a/workflow/modules/variant_calling.nf +++ b/workflow/modules/variant_calling.nf @@ -744,13 +744,13 @@ process somaticcombine { script: vcfin1=[callers, vcfs].transpose().collect { a, b -> a + " " + b } vcfin2="-V:" + vcfin1.join(" -V:") - - """ - java -jar \$GATK_JAR -T CombineVariants \ - -nt $task.cpus \ - --filteredrecordsmergetype KEEP_IF_ANY_UNFILTERED \ - --genotypemergeoption PRIORITIZE \ - --rod_priority_list mutect2,strelka,muse,lofreq,vardict,varscan \ + + """ + java -jar \$DISCVRSeq_JAR MergeVcfsAndGenotypes \ + -R $GENOMEREF \ + --genotypeMergeOption PRIORITIZE \ + --priority_list mutect2,strelka,octopus,muse,lofreq,vardict,varscan \ + --filteredRecordsMergeType KEEP_IF_ANY_UNFILTERED \ -O ${tumorsample}_vs_${normal}_combined.vcf.gz \ $vcfin2 """ diff --git a/workflow/modules/variant_calling_tonly.nf b/workflow/modules/variant_calling_tonly.nf index 81a35c7..3d67e26 100644 --- a/workflow/modules/variant_calling_tonly.nf +++ b/workflow/modules/variant_calling_tonly.nf @@ -364,8 +364,8 @@ process somaticcombine_tonly { vcfin2="-V:" + vcfin1.join(" -V:") """ - java -jar \$GATK_JAR -T CombineVariants \ - -nt $task.cpus \ + java -jar \$DISCVRSeq_JAR MergeVcfsAndGenotypes \ + -R $GENOMEREF \ --genotypeMergeOption PRIORITIZE \ --priority_list mutect2_tonly,octopus_tonly,vardict_tonly,varscan_tonly \ --filteredRecordsMergeType KEEP_IF_ANY_UNFILTERED \