Skip to content

Commit

Permalink
Merge pull request #21 from CCBR/dev/feature-SVCNV
Browse files Browse the repository at this point in the history
Dev/feature svcnv
  • Loading branch information
dnousome authored Nov 29, 2023
2 parents 2beaaa8 + 0ef17df commit ea93087
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 32 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ 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
- name: Tumor-only FastQ Stub Run
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
23 changes: 5 additions & 18 deletions docker/logan_base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
7 changes: 3 additions & 4 deletions logan
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
14 changes: 7 additions & 7 deletions workflow/modules/variant_calling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
4 changes: 2 additions & 2 deletions workflow/modules/variant_calling_tonly.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit ea93087

Please sign in to comment.