From 5bd487b3a1bf00f10fb06f9ace544b709d29634d Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Wed, 12 Apr 2023 10:46:04 +0200 Subject: [PATCH 01/12] WIP: Adding the aligner sentieon-bwamem to new subworkflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON --- conf/modules/aligner.config | 4 + conf/modules/prepare_genome.config | 10 + conf/test/test.config | 9 + modules.json | 364 +++++++++++++----- modules/nf-core/sentieon/bwaindex/main.nf | 57 +++ modules/nf-core/sentieon/bwaindex/meta.yml | 41 ++ modules/nf-core/sentieon/bwamem/main.nf | 71 ++++ modules/nf-core/sentieon/bwamem/meta.yml | 62 +++ nextflow_schema.json | 2 +- .../main.nf | 52 +++ subworkflows/local/prepare_genome/main.nf | 4 + tests/test_aligner_sentieon_bwamem.yml | 107 +++++ workflows/sarek.nf | 15 +- 13 files changed, 704 insertions(+), 94 deletions(-) create mode 100644 modules/nf-core/sentieon/bwaindex/main.nf create mode 100644 modules/nf-core/sentieon/bwaindex/meta.yml create mode 100644 modules/nf-core/sentieon/bwamem/main.nf create mode 100644 modules/nf-core/sentieon/bwamem/meta.yml create mode 100644 subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf create mode 100644 tests/test_aligner_sentieon_bwamem.yml diff --git a/conf/modules/aligner.config b/conf/modules/aligner.config index 4a8d3ef43f..e462580642 100644 --- a/conf/modules/aligner.config +++ b/conf/modules/aligner.config @@ -29,6 +29,10 @@ process { ext.args = { "--RGSM ${meta.patient}_${meta.sample} --RGID ${meta.read_group}" } } + withName: "SENTIEON_BWAMEM" { + ext.when = { params.aligner == "sentieon-bwamem" } + } + withName: "(BWAMEM.*_MEM|DRAGMAP_ALIGN)" { // Markduplicates Spark NEEDS name-sorted reads or runtime goes through the roof // However if it's skipped, reads need to be coordinate-sorted diff --git a/conf/modules/prepare_genome.config b/conf/modules/prepare_genome.config index 829184ebe6..cec34f524a 100644 --- a/conf/modules/prepare_genome.config +++ b/conf/modules/prepare_genome.config @@ -35,6 +35,16 @@ process { ] } + withName: 'SENTIEON_BWAINDEX' { + ext.when = { !params.sentieon_bwamem && params.step == "mapping" && params.aligner == "sentieon-bwamem" } + publishDir = [ + enabled: (params.save_reference || params.build_only_index), + mode: params.publish_dir_mode, + path: { "${params.outdir}/reference" }, + pattern: "bwa" + ] + } + withName: 'DRAGMAP_HASHTABLE' { ext.when = { !params.dragmap && params.step == "mapping" && params.aligner == "dragmap" } publishDir = [ diff --git a/conf/test/test.config b/conf/test/test.config index bbe0a9240e..8471731073 100644 --- a/conf/test/test.config +++ b/conf/test/test.config @@ -58,6 +58,15 @@ params { } process { + withLabel: 'sentieon' { + ext.sentieon_auth_mech_base64 = secrets.SENTIEON_AUTH_MECH_BASE64 + ext.sentieon_auth_data_base64 = secrets.SENTIEON_AUTH_DATA_BASE64 + } + + withName: 'SENTIEON_BWAMEM' { + ext.args = "-R \"@RG\\tID:sample_lane\\tPU:lane\\tSM:patient_sample\\tLB:sample\\tDS:fasta\\tPL:seqplatform\"" + } + withName:'.*:FREEC_SOMATIC'{ ext.args = { [ diff --git a/modules.json b/modules.json index fc38461b19..7d88b34a59 100644 --- a/modules.json +++ b/modules.json @@ -8,425 +8,611 @@ "ascat": { "branch": "master", "git_sha": "1fda5ab75106682f329bde25d4226640d353c3d7", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/concat": { "branch": "master", "git_sha": "582ff1755bdd205c65e2ba4c31e0a008dae299ec", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/mpileup": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bcftools/stats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bwa/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bwa/mem": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bwamem2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "bwamem2/mem": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cat/cat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cat/fastq": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cnvkit/antitarget": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cnvkit/batch": { "branch": "master", "git_sha": "8c7b23c1e7fea03374354995630af1f805900c6c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "cnvkit/reference": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "controlfreec/assesssignificance": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "controlfreec/freec": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "controlfreec/freec2bed": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "controlfreec/freec2circos": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "controlfreec/makegraph": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "deepvariant": { "branch": "master", "git_sha": "c62b41a07a00fee11ec73e2a0d4a1aec771a742b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "dragmap/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "dragmap/hashtable": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/dragmap/hashtable/dragmap-hashtable.diff" }, "ensemblvep/download": { "branch": "master", "git_sha": "bea3ca998816a7f812b1bbbcb27c3a9ffbac0706", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "ensemblvep/vep": { "branch": "master", "git_sha": "bea3ca998816a7f812b1bbbcb27c3a9ffbac0706", - "installed_by": ["vcf_annotate_ensemblvep", "modules"] + "installed_by": [ + "vcf_annotate_ensemblvep", + "modules" + ] }, "fastp": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fgbio/callmolecularconsensusreads": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fgbio/fastqtobam": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "fgbio/groupreadsbyumi": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "freebayes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/applybqsr": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/applybqsrspark": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/applyvqsr": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/baserecalibrator": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/baserecalibratorspark": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/calculatecontamination": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/cnnscorevariants": { "branch": "master", "git_sha": "c62b41a07a00fee11ec73e2a0d4a1aec771a742b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/createsequencedictionary": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/estimatelibrarycomplexity": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/filtermutectcalls": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/filtervarianttranches": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/gatherbqsrreports": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/gatherpileupsummaries": { "branch": "master", "git_sha": "0dde9c00d859ed2cd09e91a97afded6031ba3589", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/genomicsdbimport": { "branch": "master", "git_sha": "34c17664b54e3b45faf4e32b52bf4086ca249afe", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/genotypegvcfs": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/getpileupsummaries": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/haplotypecaller": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/intervallisttobed": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/learnreadorientationmodel": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/markduplicates": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/gatk4/markduplicates/gatk4-markduplicates.diff" }, "gatk4/markduplicatesspark": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/mergemutectstats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/mergevcfs": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/mutect2": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gatk4/variantrecalibrator": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "manta/germline": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "manta/somatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "manta/tumoronly": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "mosdepth": { "branch": "master", "git_sha": "def5f182583df0c20f43ec3d4355e8ebd341aaa9", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "msisensorpro/msi_somatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "msisensorpro/scan": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "multiqc": { "branch": "master", "git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samblaster": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/bam2fq": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/collatefastq": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/convert": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/faidx": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/mpileup": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/stats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/view": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] + }, + "sentieon/bwaindex": { + "branch": "master", + "git_sha": "61448300449d4d14ee437ad37bf1853ce6b91147", + "installed_by": [ + "modules" + ] + }, + "sentieon/bwamem": { + "branch": "master", + "git_sha": "8c159ebb28cfa08890042a133bfab78de932eff7", + "installed_by": [ + "modules" + ] }, "snpeff/download": { "branch": "master", "git_sha": "aeefdd170be4583012816212f1345fbebb61ccd6", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "snpeff/snpeff": { "branch": "master", "git_sha": "03eae88f7c30fbad0152b941bbeba48ae8bc3d07", - "installed_by": ["vcf_annotate_snpeff", "modules"] + "installed_by": [ + "vcf_annotate_snpeff", + "modules" + ] }, "strelka/germline": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "strelka/somatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "svdb/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "tabix/bgziptabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["vcf_annotate_snpeff", "modules"] + "installed_by": [ + "vcf_annotate_snpeff", + "modules" + ] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["vcf_annotate_ensemblvep", "modules"] + "installed_by": [ + "vcf_annotate_ensemblvep", + "modules" + ] }, "tiddit/sv": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "untar": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "unzip": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "vcftools": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] } } }, @@ -435,15 +621,19 @@ "vcf_annotate_ensemblvep": { "branch": "master", "git_sha": "82b8c4ef7d34c5c1009649581af46b684183da12", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "vcf_annotate_snpeff": { "branch": "master", "git_sha": "03eae88f7c30fbad0152b941bbeba48ae8bc3d07", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/sentieon/bwaindex/main.nf b/modules/nf-core/sentieon/bwaindex/main.nf new file mode 100644 index 0000000000..0fcf4d5b59 --- /dev/null +++ b/modules/nf-core/sentieon/bwaindex/main.nf @@ -0,0 +1,57 @@ +process SENTIEON_BWAINDEX { + tag "$fasta" + label 'process_high' + label 'sentieon' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." + } + + container 'nfcore/sentieon:202112.06' + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path(bwa), emit: index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + mkdir bwa + + sentieon \\ + bwa index \\ + $args \\ + -p bwa/${fasta.baseName} \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + bwa: \$(echo \$(sentieon bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') + END_VERSIONS + """ + + stub: + """ + mkdir bwa + + touch bwa/genome.amb + touch bwa/genome.ann + touch bwa/genome.bwt + touch bwa/genome.pac + touch bwa/genome.sa + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + bwa: \$(echo \$(sentieon bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/sentieon/bwaindex/meta.yml b/modules/nf-core/sentieon/bwaindex/meta.yml new file mode 100644 index 0000000000..5d91e22586 --- /dev/null +++ b/modules/nf-core/sentieon/bwaindex/meta.yml @@ -0,0 +1,41 @@ +name: sentieon_bwaindex +description: Create BWA index for reference genome +keywords: + - index + - fasta + - genome + - reference + - sentieon +tools: + - sentieon: + description: | + Sentieon® provides complete solutions for secondary DNA/RNA analysis for a variety of sequencing platforms, including short and long reads. + Our software improves upon BWA, STAR, Minimap2, GATK, HaplotypeCaller, Mutect, and Mutect2 based pipelines and is deployable on any generic-CPU-based computing system. + homepage: https://www.sentieon.com/ + documentation: https://www.sentieon.com/ +input: + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file +output: + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: BWA genome index files + pattern: "*.{amb,ann,bwt,pac,sa}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@drpatelh" + - "@maxulysse" diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf new file mode 100644 index 0000000000..a1cd0a7fb5 --- /dev/null +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -0,0 +1,71 @@ +process SENTIEON_BWAMEM { + tag "$meta.id" + label 'process_high' + label 'sentieon' + + secret 'SENTIEON_LICENSE_BASE64' + + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { + exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." + } + + container 'nfcore/sentieon:202112.06' + + input: + tuple val(meta), path(reads) + tuple val(meta2), path(index) + path(fasta) + path(fasta_fai) + + output: + tuple val(meta), path("*.bam"), path("*.bai"), emit: bam_and_bai + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def sentieon_auth_mech_base64 = task.ext.sentieon_auth_mech_base64 ?: '' + def sentieon_auth_data_base64 = task.ext.sentieon_auth_data_base64 ?: '' + + """ + export SENTIEON_LICENSE=\$(echo -n "\$SENTIEON_LICENSE_BASE64" | base64 -d) + if [ ${sentieon_auth_mech_base64} ] && [ ${sentieon_auth_data_base64} ]; then + # If sentieon_auth_mech_base64 and sentieon_auth_data_base64 are non-empty strings, then Sentieon is mostly likely being run with some test-license. + export SENTIEON_AUTH_MECH=\$(echo -n "${sentieon_auth_mech_base64}" | base64 -d) + export SENTIEON_AUTH_DATA=\$(echo -n "${sentieon_auth_data_base64}" | base64 -d) + echo "Decoded and exported Sentieon test-license system environment variables" + fi + + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + + sentieon bwa mem \\ + $args \\ + -t $task.cpus \\ + \$INDEX \\ + $reads \\ + | sentieon util sort -r $fasta -t $task.cpus -o ${prefix}.bam --sam2bam - + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + bwa: \$(echo \$(sentieon bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.bam.bai + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") + bwa: \$(echo \$(sentieon bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') + END_VERSIONS + """ +} diff --git a/modules/nf-core/sentieon/bwamem/meta.yml b/modules/nf-core/sentieon/bwamem/meta.yml new file mode 100644 index 0000000000..ae3c7cd788 --- /dev/null +++ b/modules/nf-core/sentieon/bwamem/meta.yml @@ -0,0 +1,62 @@ +name: sentieon_bwamem +description: Performs fastq alignment to a fasta reference using Sentieon's BWA MEM +keywords: + - mem + - bwa + - alignment + - map + - fastq + - bam + - sentieon +tools: + - sentieon: + description: | + Sentieon® provides complete solutions for secondary DNA/RNA analysis for a variety of sequencing platforms, including short and long reads. + Our software improves upon BWA, STAR, Minimap2, GATK, HaplotypeCaller, Mutect, and Mutect2 based pipelines and is deployable on any generic-CPU-based computing system. + homepage: https://www.sentieon.com/ + documentation: https://www.sentieon.com/ +input: + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Genome fastq files (single-end or paired-end) + - meta2: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: BWA genome index files + pattern: "*.{amb,ann,bwt,pac,sa}" + - fasta: + type: file + description: Genome fasta file + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the FASTA reference. + pattern: "*.fai" +output: + - meta: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file. + pattern: "*.bam" + - bai: + description: BAI file + pattern: "*.bai" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@asp8200" diff --git a/nextflow_schema.json b/nextflow_schema.json index 4ba17eeb4d..7ee7552540 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -194,7 +194,7 @@ "type": "string", "default": "bwa-mem", "fa_icon": "fas fa-puzzle-piece", - "enum": ["bwa-mem", "bwa-mem2", "dragmap"], + "enum": ["bwa-mem", "bwa-mem2", "dragmap", "sentieon-bwamem"], "description": "Specify aligner to be used to map reads to reference genome.", "help_text": "`Sarek` will build missing indices automatically if not provided. Set `--bwa false` if indices should be (re-)built.\nIf `DragMap` is selected as aligner, it is recommended to skip baserecalibration with `--skip_tools baserecalibrator`. See [here](https://gatk.broadinstitute.org/hc/en-us/articles/4407897446939--How-to-Run-germline-single-sample-short-variant-discovery-in-DRAGEN-mode) for more info.\n", "hidden": true diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf new file mode 100644 index 0000000000..99c422ef69 --- /dev/null +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -0,0 +1,52 @@ +// +// MAPPING +// +// For all modules here: +// A when clause condition is defined in the conf/modules.config to determine if the module should be run + +include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' +include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' +include { DRAGMAP_ALIGN } from '../../../modules/nf-core/dragmap/align/main' +include { SENTIEON_BWAMEM } from '../../../modules/nf-core/sentieon/bwamem/main' + +workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { + take: + reads // channel: [mandatory] meta, reads + index // channel: [mandatory] index + sort // boolean: [mandatory] true -> sort, false -> don't sort + fasta + fasta_fai + + main: + + versions = Channel.empty() + reports = Channel.empty() + + // Only one of the following should be run + BWAMEM1_MEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, sort) // If aligner is bwa-mem + BWAMEM2_MEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, sort) // If aligner is bwa-mem2 + DRAGMAP_ALIGN(reads, index.map{ it -> [ [ id:'index' ], it ] }, sort) // If aligner is dragmap + SENTIEON_BWAMEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, fasta, fasta_fai) // The sentieon-bwamem-module does sorting as part of the conversion from sam to bam. + + // Get the bam files from the aligner + // Only one aligner is run + bam = Channel.empty() + bam = bam.mix(BWAMEM1_MEM.out.bam) + bam = bam.mix(BWAMEM2_MEM.out.bam) + bam = bam.mix(DRAGMAP_ALIGN.out.bam) + bam = bam.mix(SENTIEON_BWAMEM.out.bam_and_bai.map{ meta, bam, bai -> [ meta, bam ] }) + + // Gather reports of all tools used + reports = reports.mix(DRAGMAP_ALIGN.out.log) + + // Gather versions of all tools used + versions = versions.mix(BWAMEM1_MEM.out.versions) + versions = versions.mix(BWAMEM2_MEM.out.versions) + versions = versions.mix(DRAGMAP_ALIGN.out.versions) + versions = versions.mix(SENTIEON_BWAMEM.out.versions) + + emit: + bam // channel: [ [meta], bam ] + reports + versions // channel: [ versions.yml ] +} diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index 58a6ca8b28..2f8331d360 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -10,6 +10,7 @@ include { BWA_INDEX as BWAMEM1_INDEX } from '../../../modules/nf-core/bwa/index/main' include { BWAMEM2_INDEX } from '../../../modules/nf-core/bwamem2/index/main' +include { SENTIEON_BWAINDEX } from '../../../modules/nf-core/sentieon/bwaindex/main' include { DRAGMAP_HASHTABLE } from '../../../modules/nf-core/dragmap/hashtable/main' include { GATK4_CREATESEQUENCEDICTIONARY } from '../../../modules/nf-core/gatk4/createsequencedictionary/main' include { MSISENSORPRO_SCAN } from '../../../modules/nf-core/msisensorpro/scan/main' @@ -47,6 +48,7 @@ workflow PREPARE_GENOME { BWAMEM1_INDEX(fasta) // If aligner is bwa-mem BWAMEM2_INDEX(fasta) // If aligner is bwa-mem2 + SENTIEON_BWAINDEX(fasta) // If aligner is sentieon-bwamem DRAGMAP_HASHTABLE(fasta) // If aligner is dragmap // Remap channel to match module/subworkflow @@ -103,6 +105,7 @@ workflow PREPARE_GENOME { versions = versions.mix(SAMTOOLS_FAIDX.out.versions) versions = versions.mix(BWAMEM1_INDEX.out.versions) versions = versions.mix(BWAMEM2_INDEX.out.versions) + versions = versions.mix(SENTIEON_BWAINDEX.out.versions) versions = versions.mix(DRAGMAP_HASHTABLE.out.versions) versions = versions.mix(GATK4_CREATESEQUENCEDICTIONARY.out.versions) versions = versions.mix(MSISENSORPRO_SCAN.out.versions) @@ -115,6 +118,7 @@ workflow PREPARE_GENOME { emit: bwa = BWAMEM1_INDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwa/* bwamem2 = BWAMEM2_INDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwamem2/* + sentieon_bwamem = SENTIEON_BWAINDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwa/* hashtable = DRAGMAP_HASHTABLE.out.hashmap.map{ meta, index -> [index] }.collect() // path: dragmap/* dbsnp_tbi = TABIX_DBSNP.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: dbsnb.vcf.gz.tbi dict = GATK4_CREATESEQUENCEDICTIONARY.out.dict // path: genome.fasta.dict diff --git a/tests/test_aligner_sentieon_bwamem.yml b/tests/test_aligner_sentieon_bwamem.yml new file mode 100644 index 0000000000..54d5ca11be --- /dev/null +++ b/tests/test_aligner_sentieon_bwamem.yml @@ -0,0 +1,107 @@ +- name: Run sentieon bwamem + command: nextflow run main.nf -profile test --aligner sentieon-bwamem --save_reference --outdir results + tags: + - aligner + - sentieon/bwamem + - preprocessing + files: + - path: results/csv/markduplicates.csv + md5sum: 0d6120bb99e92f6810343270711ca53e + - path: results/csv/markduplicates_no_table.csv + md5sum: 2a2d3d4842befd4def39156463859ee3 + - path: results/csv/recalibrated.csv + md5sum: 2d29d9e53894dcce96a1b5beb6ef3312 + - path: results/multiqc + - path: results/preprocessing/markduplicates/test/test.md.cram + # binary changes md5sums on reruns + - path: results/preprocessing/markduplicates/test/test.md.cram.crai + # binary changes md5sums on reruns + - path: results/preprocessing/recal_table/test/test.recal.table + md5sum: afc4b795d332c585d8289ef2d493a8c4 + - path: results/preprocessing/recalibrated/test/test.recal.cram + # binary changes md5sums on reruns + - path: results/preprocessing/recalibrated/test/test.recal.cram.crai + # binary changes md5sums on reruns + - path: results/reference/bwa/genome.amb + md5sum: 1891c1de381b3a96d4e72f590fde20c1 + - path: results/reference/bwa/genome.ann + md5sum: 2df4aa2d7580639fa0fcdbcad5e2e969 + - path: results/reference/bwa/genome.bwt + md5sum: 815eded87e4cb6b0f1daab5c4d6e30af + - path: results/reference/bwa/genome.pac + md5sum: 8569fbdb2c98c6fb16dfa73d8eacb070 + - path: results/reference/bwa/genome.sa + md5sum: e7cff62b919448a3a3d0fe4aaf427594 + - path: results/reference/dbsnp/dbsnp_146.hg38.vcf.gz.tbi + # conda changes md5sums for test + - path: results/reference/dict/genome.dict + md5sum: 2433fe2ba31257337bf4c4bd4cb8da15 + - path: results/reference/fai/genome.fasta.fai + md5sum: 3520cd30e1b100e55f578db9c855f685 + - path: results/reference/intervals/chr22_1-40001.bed + md5sum: 87a15eb9c2ff20ccd5cd8735a28708f7 + - path: results/reference/intervals/chr22_1-40001.bed.gz + md5sum: d3341fa28986c40b24fcc10a079dbb80 + - path: results/reference/intervals/genome.bed + md5sum: a87dc7d20ebca626f65cc16ff6c97a3e + - path: results/reference/known_indels/mills_and_1000G.indels.vcf.gz.tbi + # conda changes md5sums for test + - path: results/reports/fastqc/test-test_L1 + - path: results/reports/markduplicates/test/test.md.cram.metrics + contains: ["sample 8601 721 82 523429 3876 0 0 0.38594", "1.0 721 721"] + - path: results/reports/mosdepth/test/test.md.mosdepth.global.dist.txt + md5sum: a46bb1520c58ba3e000685b581b1b8fa + - path: results/reports/mosdepth/test/test.md.mosdepth.region.dist.txt + md5sum: 493d2b47fbddb57e81fed6df4f1bb86d + - path: results/reports/mosdepth/test/test.md.mosdepth.summary.txt + md5sum: a984808d4dbd52f1ae8f599e0a833222 + - path: results/reports/mosdepth/test/test.md.regions.bed.gz + md5sum: 527236278bd10caa49c540d5cfc66b83 + - path: results/reports/mosdepth/test/test.md.regions.bed.gz.csi + md5sum: 1b65ac38cd96783394e0cf9b7bdd5bc2 + - path: results/reports/mosdepth/test/test.recal.mosdepth.global.dist.txt + md5sum: a46bb1520c58ba3e000685b581b1b8fa + - path: results/reports/mosdepth/test/test.recal.mosdepth.region.dist.txt + md5sum: 493d2b47fbddb57e81fed6df4f1bb86d + - path: results/reports/mosdepth/test/test.recal.mosdepth.summary.txt + md5sum: a984808d4dbd52f1ae8f599e0a833222 + - path: results/reports/mosdepth/test/test.recal.regions.bed.gz + md5sum: 527236278bd10caa49c540d5cfc66b83 + - path: results/reports/mosdepth/test/test.recal.regions.bed.gz.csi + md5sum: 1b65ac38cd96783394e0cf9b7bdd5bc2 + - path: results/reports/samtools/test/test.md.cram.stats + # conda changes md5sums for test + - path: results/reports/samtools/test/test.recal.cram.stats + # conda changes md5sums for test +- name: Build only index with sentieon bwa + command: nextflow run main.nf -profile test --aligner sentieon-bwamem --build_only_index --input=false --outdir results + tags: + - aligner + - build_only_index + - sentieon/bwamem + files: + - path: results/multiqc + - path: results/reference/bwa/genome.amb + md5sum: 1891c1de381b3a96d4e72f590fde20c1 + - path: results/reference/bwa/genome.ann + md5sum: 2df4aa2d7580639fa0fcdbcad5e2e969 + - path: results/reference/bwa/genome.bwt + md5sum: 815eded87e4cb6b0f1daab5c4d6e30af + - path: results/reference/bwa/genome.pac + md5sum: 8569fbdb2c98c6fb16dfa73d8eacb070 + - path: results/reference/bwa/genome.sa + md5sum: e7cff62b919448a3a3d0fe4aaf427594 + - path: results/reference/dbsnp/dbsnp_146.hg38.vcf.gz.tbi + # conda changes md5sums for test + - path: results/reference/dict/genome.dict + md5sum: 2433fe2ba31257337bf4c4bd4cb8da15 + - path: results/reference/fai/genome.fasta.fai + md5sum: 3520cd30e1b100e55f578db9c855f685 + - path: results/reference/intervals/chr22_1-40001.bed + md5sum: 87a15eb9c2ff20ccd5cd8735a28708f7 + - path: results/reference/intervals/chr22_1-40001.bed.gz + md5sum: d3341fa28986c40b24fcc10a079dbb80 + - path: results/reference/intervals/genome.bed + md5sum: a87dc7d20ebca626f65cc16ff6c97a3e + - path: results/reference/known_indels/mills_and_1000G.indels.vcf.gz.tbi + # conda changes md5sums for test diff --git a/workflows/sarek.nf b/workflows/sarek.nf index f3b025909b..9145b2b97e 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -218,7 +218,7 @@ include { FASTP } from '../modules/nf-c include { FASTQ_CREATE_UMI_CONSENSUS_FGBIO } from '../subworkflows/local/fastq_create_umi_consensus_fgbio/main' // Map input reads to reference genome -include { FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP } from '../subworkflows/local/fastq_align_bwamem_mem2_dragmap/main' +include { FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON } from '../subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main' // Merge and index BAM files (optional) include { BAM_MERGE_INDEX_SAMTOOLS } from '../subworkflows/local/bam_merge_index_samtools/main' @@ -335,10 +335,13 @@ workflow SAREK { bwa = params.bwa ? Channel.fromPath(params.bwa).collect() : PREPARE_GENOME.out.bwa bwamem2 = params.bwamem2 ? Channel.fromPath(params.bwamem2).collect() : PREPARE_GENOME.out.bwamem2 dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() : PREPARE_GENOME.out.hashtable + sentieon_bwamem = params.sentieon_bwamem ? Channel.fromPath(params.sentieon_bwamem).collect() : PREPARE_GENOME.out.sentieon_bwamem + // Gather index for mapping given the chosen aligner index_alignement = params.aligner == "bwa-mem" ? bwa : params.aligner == "bwa-mem2" ? bwamem2 : - dragmap + params.aligner == "dragmap" ? dragmap : + sentieon_bwamem // TODO: add a params for msisensorpro_scan msisensorpro_scan = PREPARE_GENOME.out.msisensorpro_scan @@ -511,10 +514,10 @@ workflow SAREK { } sort_bam = true - FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP(reads_for_alignment, index_alignement, sort_bam) + FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON(reads_for_alignment, index_alignement, sort_bam, fasta, fasta_fai) // Grouping the bams from the same samples not to stall the workflow - bam_mapped = FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP.out.bam.map{ meta, bam -> + bam_mapped = FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON.out.bam.map{ meta, bam -> // Update meta.id to be meta.sample, ditching sample-lane that is not needed anymore // Update meta.data_type @@ -546,7 +549,7 @@ workflow SAREK { // Gather used softwares versions versions = versions.mix(CONVERT_FASTQ_INPUT.out.versions) - versions = versions.mix(FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP.out.versions) + versions = versions.mix(FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON.out.versions) } if (params.step in ['mapping', 'markduplicates']) { @@ -557,7 +560,7 @@ workflow SAREK { // STEP 2: markduplicates (+QC) + convert to CRAM - // ch_bam_for_markduplicates will countain bam mapped with FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP when step is mapping + // ch_bam_for_markduplicates will contain bam mapped with FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON when step is mapping // Or bams that are specified in the samplesheet.csv when step is prepare_recalibration cram_for_markduplicates = params.step == 'mapping' ? bam_mapped : input_sample.map{ meta, input, index -> [ meta, input ] } From a5649400a1cfbb746c4ef522a7a03194970b17fa Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Wed, 12 Apr 2023 12:23:51 +0200 Subject: [PATCH 02/12] Minor adjustments for sentieon bwamem --- conf/modules/aligner.config | 1 + conf/modules/prepare_genome.config | 2 +- conf/test/test.config | 4 - modules.json | 358 ++++++---------------- modules/nf-core/sentieon/bwamem/main.nf | 1 + subworkflows/local/prepare_genome/main.nf | 2 +- tests/test_aligner_sentieon_bwamem.yml | 4 +- workflows/sarek.nf | 4 +- 8 files changed, 97 insertions(+), 279 deletions(-) diff --git a/conf/modules/aligner.config b/conf/modules/aligner.config index e462580642..a68fc85167 100644 --- a/conf/modules/aligner.config +++ b/conf/modules/aligner.config @@ -31,6 +31,7 @@ process { withName: "SENTIEON_BWAMEM" { ext.when = { params.aligner == "sentieon-bwamem" } + ext.args = { "-R ${meta.read_group}" } } withName: "(BWAMEM.*_MEM|DRAGMAP_ALIGN)" { diff --git a/conf/modules/prepare_genome.config b/conf/modules/prepare_genome.config index cec34f524a..f34889237f 100644 --- a/conf/modules/prepare_genome.config +++ b/conf/modules/prepare_genome.config @@ -36,7 +36,7 @@ process { } withName: 'SENTIEON_BWAINDEX' { - ext.when = { !params.sentieon_bwamem && params.step == "mapping" && params.aligner == "sentieon-bwamem" } + ext.when = { !params.sentieon && params.step == "mapping" && params.aligner == "sentieon-bwamem" } publishDir = [ enabled: (params.save_reference || params.build_only_index), mode: params.publish_dir_mode, diff --git a/conf/test/test.config b/conf/test/test.config index 8471731073..4c511a6c8e 100644 --- a/conf/test/test.config +++ b/conf/test/test.config @@ -63,10 +63,6 @@ process { ext.sentieon_auth_data_base64 = secrets.SENTIEON_AUTH_DATA_BASE64 } - withName: 'SENTIEON_BWAMEM' { - ext.args = "-R \"@RG\\tID:sample_lane\\tPU:lane\\tSM:patient_sample\\tLB:sample\\tDS:fasta\\tPL:seqplatform\"" - } - withName:'.*:FREEC_SOMATIC'{ ext.args = { [ diff --git a/modules.json b/modules.json index 7d88b34a59..9c166adf54 100644 --- a/modules.json +++ b/modules.json @@ -8,611 +8,435 @@ "ascat": { "branch": "master", "git_sha": "1fda5ab75106682f329bde25d4226640d353c3d7", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/concat": { "branch": "master", "git_sha": "582ff1755bdd205c65e2ba4c31e0a008dae299ec", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/mpileup": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/sort": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bcftools/stats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bwa/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bwa/mem": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bwamem2/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "bwamem2/mem": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cat/cat": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cnvkit/antitarget": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cnvkit/batch": { "branch": "master", "git_sha": "8c7b23c1e7fea03374354995630af1f805900c6c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "cnvkit/reference": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "controlfreec/assesssignificance": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "controlfreec/freec": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "controlfreec/freec2bed": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "controlfreec/freec2circos": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "controlfreec/makegraph": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "custom/dumpsoftwareversions": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "deepvariant": { "branch": "master", "git_sha": "c62b41a07a00fee11ec73e2a0d4a1aec771a742b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "dragmap/align": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "dragmap/hashtable": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/dragmap/hashtable/dragmap-hashtable.diff" }, "ensemblvep/download": { "branch": "master", "git_sha": "bea3ca998816a7f812b1bbbcb27c3a9ffbac0706", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "ensemblvep/vep": { "branch": "master", "git_sha": "bea3ca998816a7f812b1bbbcb27c3a9ffbac0706", - "installed_by": [ - "vcf_annotate_ensemblvep", - "modules" - ] + "installed_by": ["vcf_annotate_ensemblvep", "modules"] }, "fastp": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fastqc": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fgbio/callmolecularconsensusreads": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fgbio/fastqtobam": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "fgbio/groupreadsbyumi": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "freebayes": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/applybqsr": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/applybqsrspark": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/applyvqsr": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/baserecalibrator": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/baserecalibratorspark": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/calculatecontamination": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/cnnscorevariants": { "branch": "master", "git_sha": "c62b41a07a00fee11ec73e2a0d4a1aec771a742b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/createsequencedictionary": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/estimatelibrarycomplexity": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/filtermutectcalls": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/filtervarianttranches": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/gatherbqsrreports": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/gatherpileupsummaries": { "branch": "master", "git_sha": "0dde9c00d859ed2cd09e91a97afded6031ba3589", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/genomicsdbimport": { "branch": "master", "git_sha": "34c17664b54e3b45faf4e32b52bf4086ca249afe", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/genotypegvcfs": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/getpileupsummaries": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/haplotypecaller": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/intervallisttobed": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/learnreadorientationmodel": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/markduplicates": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/gatk4/markduplicates/gatk4-markduplicates.diff" }, "gatk4/markduplicatesspark": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/mergemutectstats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/mergevcfs": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/mutect2": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gatk4/variantrecalibrator": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "manta/germline": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "manta/somatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "manta/tumoronly": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "mosdepth": { "branch": "master", "git_sha": "def5f182583df0c20f43ec3d4355e8ebd341aaa9", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "msisensorpro/msi_somatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "msisensorpro/scan": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "multiqc": { "branch": "master", "git_sha": "ee80d14721e76e2e079103b8dcd5d57129e584ba", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samblaster": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/bam2fq": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/collatefastq": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/convert": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/index": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/mpileup": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/stats": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/view": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "sentieon/bwaindex": { "branch": "master", "git_sha": "61448300449d4d14ee437ad37bf1853ce6b91147", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "sentieon/bwamem": { "branch": "master", "git_sha": "8c159ebb28cfa08890042a133bfab78de932eff7", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "snpeff/download": { "branch": "master", "git_sha": "aeefdd170be4583012816212f1345fbebb61ccd6", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "snpeff/snpeff": { "branch": "master", "git_sha": "03eae88f7c30fbad0152b941bbeba48ae8bc3d07", - "installed_by": [ - "vcf_annotate_snpeff", - "modules" - ] + "installed_by": ["vcf_annotate_snpeff", "modules"] }, "strelka/germline": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "strelka/somatic": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "svdb/merge": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "tabix/bgziptabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "vcf_annotate_snpeff", - "modules" - ] + "installed_by": ["vcf_annotate_snpeff", "modules"] }, "tabix/tabix": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "vcf_annotate_ensemblvep", - "modules" - ] + "installed_by": ["vcf_annotate_ensemblvep", "modules"] }, "tiddit/sv": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "untar": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "unzip": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "vcftools": { "branch": "master", "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] } } }, @@ -621,19 +445,15 @@ "vcf_annotate_ensemblvep": { "branch": "master", "git_sha": "82b8c4ef7d34c5c1009649581af46b684183da12", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "vcf_annotate_snpeff": { "branch": "master", "git_sha": "03eae88f7c30fbad0152b941bbeba48ae8bc3d07", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} diff --git a/modules/nf-core/sentieon/bwamem/main.nf b/modules/nf-core/sentieon/bwamem/main.nf index a1cd0a7fb5..734738fa92 100644 --- a/modules/nf-core/sentieon/bwamem/main.nf +++ b/modules/nf-core/sentieon/bwamem/main.nf @@ -33,6 +33,7 @@ process SENTIEON_BWAMEM { """ export SENTIEON_LICENSE=\$(echo -n "\$SENTIEON_LICENSE_BASE64" | base64 -d) + if [ ${sentieon_auth_mech_base64} ] && [ ${sentieon_auth_data_base64} ]; then # If sentieon_auth_mech_base64 and sentieon_auth_data_base64 are non-empty strings, then Sentieon is mostly likely being run with some test-license. export SENTIEON_AUTH_MECH=\$(echo -n "${sentieon_auth_mech_base64}" | base64 -d) diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index 2f8331d360..df1a311f0c 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -118,7 +118,7 @@ workflow PREPARE_GENOME { emit: bwa = BWAMEM1_INDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwa/* bwamem2 = BWAMEM2_INDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwamem2/* - sentieon_bwamem = SENTIEON_BWAINDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwa/* + sentieon = SENTIEON_BWAINDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwa/* hashtable = DRAGMAP_HASHTABLE.out.hashmap.map{ meta, index -> [index] }.collect() // path: dragmap/* dbsnp_tbi = TABIX_DBSNP.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: dbsnb.vcf.gz.tbi dict = GATK4_CREATESEQUENCEDICTIONARY.out.dict // path: genome.fasta.dict diff --git a/tests/test_aligner_sentieon_bwamem.yml b/tests/test_aligner_sentieon_bwamem.yml index 54d5ca11be..c742278c70 100644 --- a/tests/test_aligner_sentieon_bwamem.yml +++ b/tests/test_aligner_sentieon_bwamem.yml @@ -17,7 +17,7 @@ - path: results/preprocessing/markduplicates/test/test.md.cram.crai # binary changes md5sums on reruns - path: results/preprocessing/recal_table/test/test.recal.table - md5sum: afc4b795d332c585d8289ef2d493a8c4 + md5sum: 187268332b5791aa22ea3048995ef599 - path: results/preprocessing/recalibrated/test/test.recal.cram # binary changes md5sums on reruns - path: results/preprocessing/recalibrated/test/test.recal.cram.crai @@ -48,7 +48,7 @@ # conda changes md5sums for test - path: results/reports/fastqc/test-test_L1 - path: results/reports/markduplicates/test/test.md.cram.metrics - contains: ["sample 8601 721 82 523429 3876 0 0 0.38594", "1.0 721 721"] + contains: ["test 8601 721 82 523429 3876 0 0 0.38594", "1.0 721 721"] - path: results/reports/mosdepth/test/test.md.mosdepth.global.dist.txt md5sum: a46bb1520c58ba3e000685b581b1b8fa - path: results/reports/mosdepth/test/test.md.mosdepth.region.dist.txt diff --git a/workflows/sarek.nf b/workflows/sarek.nf index 9145b2b97e..1bc63fc32e 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -335,13 +335,13 @@ workflow SAREK { bwa = params.bwa ? Channel.fromPath(params.bwa).collect() : PREPARE_GENOME.out.bwa bwamem2 = params.bwamem2 ? Channel.fromPath(params.bwamem2).collect() : PREPARE_GENOME.out.bwamem2 dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() : PREPARE_GENOME.out.hashtable - sentieon_bwamem = params.sentieon_bwamem ? Channel.fromPath(params.sentieon_bwamem).collect() : PREPARE_GENOME.out.sentieon_bwamem + sentieon = params.sentieon ? Channel.fromPath(params.sentieon).collect() : PREPARE_GENOME.out.sentieon // Gather index for mapping given the chosen aligner index_alignement = params.aligner == "bwa-mem" ? bwa : params.aligner == "bwa-mem2" ? bwamem2 : params.aligner == "dragmap" ? dragmap : - sentieon_bwamem + sentieon // TODO: add a params for msisensorpro_scan msisensorpro_scan = PREPARE_GENOME.out.msisensorpro_scan From 49ad6a3d97d48d4fbdde57ed784a8daf80f7cac4 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Wed, 12 Apr 2023 13:58:27 +0200 Subject: [PATCH 03/12] Setting up CI-test of sentieon-bwamem --- .github/workflows/pytest-workflow.yml | 17 ++++ modules/nf-core/sentieon/license_message.py | 90 +++++++++++++++++++++ tests/config/tags.yml | 7 ++ 3 files changed, 114 insertions(+) create mode 100644 modules/nf-core/sentieon/license_message.py diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 91033eaced..d3ae669e84 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -53,6 +53,10 @@ jobs: tags: vep - profile: "conda" tags: concatenate_vcfs + - profile: "conda" + tags: sentieon/bwaindex + - profile: "conda" + tags: sentieon/bwamem - profile: "singularity" tags: merge - profile: "singularity" @@ -62,6 +66,7 @@ jobs: env: NXF_ANSI_LOG: false TEST_DATA_BASE: "${{ github.workspace }}/test-datasets" + SENTIEON_LICENSE_BASE64: ${{ secrets.SENTIEON_LICENSE_BASE64 }} steps: - name: Check out pipeline code uses: actions/checkout@v3 @@ -136,6 +141,18 @@ jobs: channels: conda-forge,bioconda,defaults python-version: ${{ matrix.python-version }} + # Set up secrets + - name: Set up nextflow secrets + if: env.SENTIEON_LICENSE_BASE64 != null + run: | + nextflow secrets set SENTIEON_LICENSE_BASE64 ${{ secrets.SENTIEON_LICENSE_BASE64 }} + nextflow secrets set SENTIEON_AUTH_MECH_BASE64 ${{ secrets.SENTIEON_AUTH_MECH_BASE64 }} + SENTIEON_ENCRYPTION_KEY=$(echo -n "${{ secrets.ENCRYPTION_KEY_BASE64 }}" | base64 -d) + SENTIEON_LICENSE_MESSAGE=$(echo -n "${{ secrets.LICENSE_MESSAGE_BASE64 }}" | base64 -d) + SENTIEON_AUTH_DATA=$(python modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE") + SENTIEON_AUTH_DATA_BASE64=$(echo -n "$SENTIEON_AUTH_DATA" | base64 -w 0) + nextflow secrets set SENTIEON_AUTH_DATA_BASE64 $SENTIEON_AUTH_DATA_BASE64 + - name: Conda clean if: matrix.profile == 'conda' run: conda clean -a diff --git a/modules/nf-core/sentieon/license_message.py b/modules/nf-core/sentieon/license_message.py new file mode 100644 index 0000000000..62387d26b2 --- /dev/null +++ b/modules/nf-core/sentieon/license_message.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python3 + +""" +Functions for generating and sending license messages +""" + +# Modified from - https://stackoverflow.com/a/59835994 + +import argparse +import base64 +import calendar +import re +import secrets +import sys + +from cryptography.hazmat.primitives.ciphers.aead import AESGCM +from datetime import datetime as dt + +MESSAGE_TIMEOUT = 60 * 60 * 24 # Messages are valid for 1 day +NONCE_BYTES = 12 + +class DecryptionTimeout(Exception): + # Decrypting a message that is too old + pass + +def generate_key(): + key = secrets.token_bytes(32) + return key + +def handle_generate_key(args): + key = generate_key() + key_b64 = base64.b64encode(key) + print(key_b64.decode("utf-8"), file=args.outfile) + +def encrypt_message(key, message): + nonce = secrets.token_bytes(NONCE_BYTES) + timestamp = calendar.timegm(dt.now().utctimetuple()) + data = timestamp.to_bytes(10, byteorder='big') + b"__" + message + ciphertext = nonce + AESGCM(key).encrypt(nonce, data, b"") + return ciphertext + +def handle_encrypt_message(args): + key = base64.b64decode(args.key.encode("utf-8")) + message = args.message.encode("utf-8") + ciphertext = encrypt_message(key, message) + ciphertext_b64 = base64.b64encode(ciphertext) + print(ciphertext_b64.decode("utf-8"), file=args.outfile) + +def decrypt_message(key, ciphertext, timeout=MESSAGE_TIMEOUT): + nonce, ciphertext = ciphertext[:NONCE_BYTES], ciphertext[NONCE_BYTES:] + message = AESGCM(key).decrypt(nonce, ciphertext, b"") + + msg_timestamp, message = re.split(b"__", message, maxsplit=1) + msg_timestamp = int.from_bytes(msg_timestamp, byteorder='big') + timestamp = calendar.timegm(dt.now().utctimetuple()) + if (timestamp - msg_timestamp) > timeout: + raise DecryptionTimeout("The message has an expired timeout") + return message.decode("utf-8") + +def handle_decrypt_message(args): + key = base64.b64decode(args.key.encode("utf-8")) + ciphertext = base64.b64decode(args.message.encode("utf-8")) + message = decrypt_message(key, ciphertext, timeout=args.timeout) + print(str(message), file=args.outfile) + +def parse_args(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--outfile", default=sys.stdout, type=argparse.FileType('w'), help="The output file") + + subparsers = parser.add_subparsers(help="Available sub-commands") + + gen_parser = subparsers.add_parser("generate_key", help="Generate a random key string") + gen_parser.set_defaults(func=handle_generate_key) + + encrypt_parser = subparsers.add_parser("encrypt", help="Encrypt a message") + encrypt_parser.add_argument("--key", required=True, help="The encryption key") + encrypt_parser.add_argument("--message", required=True, help="Message to encrypt") + encrypt_parser.set_defaults(func=handle_encrypt_message) + + decrypt_parser = subparsers.add_parser("decrypt", help="Decyrpt a message") + decrypt_parser.add_argument("--key", required=True, help="The encryption key") + decrypt_parser.add_argument("--message", required=True, help="Message to decrypt") + decrypt_parser.add_argument("--timeout", default=MESSAGE_TIMEOUT, type=int, help="A message timeout. Decryption will fail for older messages") + decrypt_parser.set_defaults(func=handle_decrypt_message) + + return parser.parse_args(argv) + +if __name__ == "__main__": + args = parse_args() + args.func(args) diff --git a/tests/config/tags.yml b/tests/config/tags.yml index 02b8a93126..dca6e9b5bb 100644 --- a/tests/config/tags.yml +++ b/tests/config/tags.yml @@ -129,6 +129,13 @@ markduplicates: - tests/test_markduplicates_from_bam.yml - tests/test_markduplicates_from_cram.yml +### sentieon/bwamem +sentieon/bwamem: + - conf/modules/aligner.config + - modules/nf-core/sentieon/bwamem/main.nf + - subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf + - tests/test_alignment_sentieon_bwamem.yml + ## prepare_recalibration prepare_recalibration: - conf/modules/prepare_recalibration.config From 245fcc27e77d60c88fa850014bf98348c3f1812c Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Wed, 12 Apr 2023 14:11:08 +0200 Subject: [PATCH 04/12] Adding package cryptography to python env --- .github/workflows/pytest-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index d3ae669e84..58db184f97 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -113,7 +113,7 @@ jobs: ${{ runner.os }}-pip- - name: Install Python dependencies - run: python -m pip install --upgrade pip pytest-workflow + run: python -m pip install --upgrade pip pytest-workflow cryptography - uses: actions/cache@v3 with: From 621d9dc9a1e474c56dda30ec81bd71761829a809 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Wed, 12 Apr 2023 14:28:53 +0200 Subject: [PATCH 05/12] Blackened --- modules/nf-core/sentieon/license_message.py | 22 +++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/sentieon/license_message.py b/modules/nf-core/sentieon/license_message.py index 62387d26b2..e89e339390 100644 --- a/modules/nf-core/sentieon/license_message.py +++ b/modules/nf-core/sentieon/license_message.py @@ -19,26 +19,31 @@ MESSAGE_TIMEOUT = 60 * 60 * 24 # Messages are valid for 1 day NONCE_BYTES = 12 + class DecryptionTimeout(Exception): # Decrypting a message that is too old pass + def generate_key(): key = secrets.token_bytes(32) return key + def handle_generate_key(args): key = generate_key() key_b64 = base64.b64encode(key) print(key_b64.decode("utf-8"), file=args.outfile) + def encrypt_message(key, message): nonce = secrets.token_bytes(NONCE_BYTES) timestamp = calendar.timegm(dt.now().utctimetuple()) - data = timestamp.to_bytes(10, byteorder='big') + b"__" + message + data = timestamp.to_bytes(10, byteorder="big") + b"__" + message ciphertext = nonce + AESGCM(key).encrypt(nonce, data, b"") return ciphertext + def handle_encrypt_message(args): key = base64.b64decode(args.key.encode("utf-8")) message = args.message.encode("utf-8") @@ -46,26 +51,29 @@ def handle_encrypt_message(args): ciphertext_b64 = base64.b64encode(ciphertext) print(ciphertext_b64.decode("utf-8"), file=args.outfile) + def decrypt_message(key, ciphertext, timeout=MESSAGE_TIMEOUT): nonce, ciphertext = ciphertext[:NONCE_BYTES], ciphertext[NONCE_BYTES:] message = AESGCM(key).decrypt(nonce, ciphertext, b"") msg_timestamp, message = re.split(b"__", message, maxsplit=1) - msg_timestamp = int.from_bytes(msg_timestamp, byteorder='big') + msg_timestamp = int.from_bytes(msg_timestamp, byteorder="big") timestamp = calendar.timegm(dt.now().utctimetuple()) if (timestamp - msg_timestamp) > timeout: raise DecryptionTimeout("The message has an expired timeout") return message.decode("utf-8") + def handle_decrypt_message(args): key = base64.b64decode(args.key.encode("utf-8")) ciphertext = base64.b64decode(args.message.encode("utf-8")) message = decrypt_message(key, ciphertext, timeout=args.timeout) print(str(message), file=args.outfile) + def parse_args(argv=None): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("--outfile", default=sys.stdout, type=argparse.FileType('w'), help="The output file") + parser.add_argument("--outfile", default=sys.stdout, type=argparse.FileType("w"), help="The output file") subparsers = parser.add_subparsers(help="Available sub-commands") @@ -80,11 +88,17 @@ def parse_args(argv=None): decrypt_parser = subparsers.add_parser("decrypt", help="Decyrpt a message") decrypt_parser.add_argument("--key", required=True, help="The encryption key") decrypt_parser.add_argument("--message", required=True, help="Message to decrypt") - decrypt_parser.add_argument("--timeout", default=MESSAGE_TIMEOUT, type=int, help="A message timeout. Decryption will fail for older messages") + decrypt_parser.add_argument( + "--timeout", + default=MESSAGE_TIMEOUT, + type=int, + help="A message timeout. Decryption will fail for older messages", + ) decrypt_parser.set_defaults(func=handle_decrypt_message) return parser.parse_args(argv) + if __name__ == "__main__": args = parse_args() args.func(args) From 037030b17cd5eebbf280db612683d2fd56de4db2 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Wed, 12 Apr 2023 14:52:28 +0200 Subject: [PATCH 06/12] Moving license_message.py --- .github/workflows/pytest-workflow.yml | 2 +- {modules/nf-core/sentieon => bin}/license_message.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {modules/nf-core/sentieon => bin}/license_message.py (100%) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 58db184f97..4b0166b7c0 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -149,7 +149,7 @@ jobs: nextflow secrets set SENTIEON_AUTH_MECH_BASE64 ${{ secrets.SENTIEON_AUTH_MECH_BASE64 }} SENTIEON_ENCRYPTION_KEY=$(echo -n "${{ secrets.ENCRYPTION_KEY_BASE64 }}" | base64 -d) SENTIEON_LICENSE_MESSAGE=$(echo -n "${{ secrets.LICENSE_MESSAGE_BASE64 }}" | base64 -d) - SENTIEON_AUTH_DATA=$(python modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE") + SENTIEON_AUTH_DATA=$(python bin/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE") SENTIEON_AUTH_DATA_BASE64=$(echo -n "$SENTIEON_AUTH_DATA" | base64 -w 0) nextflow secrets set SENTIEON_AUTH_DATA_BASE64 $SENTIEON_AUTH_DATA_BASE64 diff --git a/modules/nf-core/sentieon/license_message.py b/bin/license_message.py similarity index 100% rename from modules/nf-core/sentieon/license_message.py rename to bin/license_message.py From 409f9eca74fc820e43fce014429edcb71ded2151 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Thu, 13 Apr 2023 12:57:13 +0200 Subject: [PATCH 07/12] WIP: Trying to avoid using sentieon-bwaindex --- subworkflows/local/prepare_genome/main.nf | 4 ---- workflows/sarek.nf | 6 ++---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index df1a311f0c..58a6ca8b28 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -10,7 +10,6 @@ include { BWA_INDEX as BWAMEM1_INDEX } from '../../../modules/nf-core/bwa/index/main' include { BWAMEM2_INDEX } from '../../../modules/nf-core/bwamem2/index/main' -include { SENTIEON_BWAINDEX } from '../../../modules/nf-core/sentieon/bwaindex/main' include { DRAGMAP_HASHTABLE } from '../../../modules/nf-core/dragmap/hashtable/main' include { GATK4_CREATESEQUENCEDICTIONARY } from '../../../modules/nf-core/gatk4/createsequencedictionary/main' include { MSISENSORPRO_SCAN } from '../../../modules/nf-core/msisensorpro/scan/main' @@ -48,7 +47,6 @@ workflow PREPARE_GENOME { BWAMEM1_INDEX(fasta) // If aligner is bwa-mem BWAMEM2_INDEX(fasta) // If aligner is bwa-mem2 - SENTIEON_BWAINDEX(fasta) // If aligner is sentieon-bwamem DRAGMAP_HASHTABLE(fasta) // If aligner is dragmap // Remap channel to match module/subworkflow @@ -105,7 +103,6 @@ workflow PREPARE_GENOME { versions = versions.mix(SAMTOOLS_FAIDX.out.versions) versions = versions.mix(BWAMEM1_INDEX.out.versions) versions = versions.mix(BWAMEM2_INDEX.out.versions) - versions = versions.mix(SENTIEON_BWAINDEX.out.versions) versions = versions.mix(DRAGMAP_HASHTABLE.out.versions) versions = versions.mix(GATK4_CREATESEQUENCEDICTIONARY.out.versions) versions = versions.mix(MSISENSORPRO_SCAN.out.versions) @@ -118,7 +115,6 @@ workflow PREPARE_GENOME { emit: bwa = BWAMEM1_INDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwa/* bwamem2 = BWAMEM2_INDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwamem2/* - sentieon = SENTIEON_BWAINDEX.out.index.map{ meta, index -> [index] }.collect() // path: bwa/* hashtable = DRAGMAP_HASHTABLE.out.hashmap.map{ meta, index -> [index] }.collect() // path: dragmap/* dbsnp_tbi = TABIX_DBSNP.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: dbsnb.vcf.gz.tbi dict = GATK4_CREATESEQUENCEDICTIONARY.out.dict // path: genome.fasta.dict diff --git a/workflows/sarek.nf b/workflows/sarek.nf index 1bc63fc32e..ade6ebbe1a 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -335,13 +335,11 @@ workflow SAREK { bwa = params.bwa ? Channel.fromPath(params.bwa).collect() : PREPARE_GENOME.out.bwa bwamem2 = params.bwamem2 ? Channel.fromPath(params.bwamem2).collect() : PREPARE_GENOME.out.bwamem2 dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() : PREPARE_GENOME.out.hashtable - sentieon = params.sentieon ? Channel.fromPath(params.sentieon).collect() : PREPARE_GENOME.out.sentieon // Gather index for mapping given the chosen aligner - index_alignement = params.aligner == "bwa-mem" ? bwa : + index_alignement = (params.aligner == "bwa-mem" || params.aligner == "sentieon") ? bwa : params.aligner == "bwa-mem2" ? bwamem2 : - params.aligner == "dragmap" ? dragmap : - sentieon + dragmap // TODO: add a params for msisensorpro_scan msisensorpro_scan = PREPARE_GENOME.out.msisensorpro_scan From 745fa220d83b8fa64c5c0cdbc73ce707ae7ef54f Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Thu, 13 Apr 2023 12:58:01 +0200 Subject: [PATCH 08/12] Move sentieon/bwamem to aligner-section --- tests/config/tags.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/config/tags.yml b/tests/config/tags.yml index dca6e9b5bb..2a31375884 100644 --- a/tests/config/tags.yml +++ b/tests/config/tags.yml @@ -116,6 +116,13 @@ dragmap: - subworkflows/local/fastq_align_bwamem_mem2_dragmap/main.nf - tests/test_alignment_dragmap.yml +### sentieon/bwamem +sentieon/bwamem: + - conf/modules/aligner.config + - modules/nf-core/sentieon/bwamem/main.nf + - subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf + - tests/test_alignment_sentieon_bwamem.yml + ## markduplicates markduplicates: - conf/modules/markduplicates.config @@ -129,13 +136,6 @@ markduplicates: - tests/test_markduplicates_from_bam.yml - tests/test_markduplicates_from_cram.yml -### sentieon/bwamem -sentieon/bwamem: - - conf/modules/aligner.config - - modules/nf-core/sentieon/bwamem/main.nf - - subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf - - tests/test_alignment_sentieon_bwamem.yml - ## prepare_recalibration prepare_recalibration: - conf/modules/prepare_recalibration.config From 8bd20b3e4e1e612fa54c4a8c34c9186e584d73f2 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:51:11 +0200 Subject: [PATCH 09/12] Update conf/modules/prepare_genome.config Co-authored-by: Maxime U Garcia --- conf/modules/prepare_genome.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules/prepare_genome.config b/conf/modules/prepare_genome.config index f34889237f..73b17084f3 100644 --- a/conf/modules/prepare_genome.config +++ b/conf/modules/prepare_genome.config @@ -36,7 +36,7 @@ process { } withName: 'SENTIEON_BWAINDEX' { - ext.when = { !params.sentieon && params.step == "mapping" && params.aligner == "sentieon-bwamem" } + ext.when = { !params.bwa && params.step == "mapping" && params.aligner == "sentieon-bwamem" } publishDir = [ enabled: (params.save_reference || params.build_only_index), mode: params.publish_dir_mode, From 2b823ceeef78279bf9b257b0c88cfc19615e5a95 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:51:23 +0200 Subject: [PATCH 10/12] Update workflows/sarek.nf Co-authored-by: Maxime U Garcia --- workflows/sarek.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/sarek.nf b/workflows/sarek.nf index ade6ebbe1a..94a8bd09ed 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -337,7 +337,7 @@ workflow SAREK { dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() : PREPARE_GENOME.out.hashtable // Gather index for mapping given the chosen aligner - index_alignement = (params.aligner == "bwa-mem" || params.aligner == "sentieon") ? bwa : + index_alignement = (params.aligner == "bwa-mem" || params.aligner == "sentieon-bwamem") ? bwa : params.aligner == "bwa-mem2" ? bwamem2 : dragmap From 3fd474ddb8a8803219a3e2c0cf89fea4faadb35c Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen <37172585+asp8200@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:51:38 +0200 Subject: [PATCH 11/12] Update .github/workflows/pytest-workflow.yml Co-authored-by: Maxime U Garcia --- .github/workflows/pytest-workflow.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index 4b0166b7c0..c3a5fe37d8 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -53,8 +53,6 @@ jobs: tags: vep - profile: "conda" tags: concatenate_vcfs - - profile: "conda" - tags: sentieon/bwaindex - profile: "conda" tags: sentieon/bwamem - profile: "singularity" From cfab8d86e670ff7ad544fa580997f4bf3673a5b0 Mon Sep 17 00:00:00 2001 From: Anders Sune Pedersen Date: Thu, 13 Apr 2023 16:05:43 +0200 Subject: [PATCH 12/12] Fixing CI-test for sentieon/bwamem and getting rid of more sentieon/bwaindex stuff --- conf/modules/prepare_genome.config | 12 +---- modules.json | 5 -- modules/nf-core/sentieon/bwaindex/main.nf | 57 ---------------------- modules/nf-core/sentieon/bwaindex/meta.yml | 41 ---------------- 4 files changed, 1 insertion(+), 114 deletions(-) delete mode 100644 modules/nf-core/sentieon/bwaindex/main.nf delete mode 100644 modules/nf-core/sentieon/bwaindex/meta.yml diff --git a/conf/modules/prepare_genome.config b/conf/modules/prepare_genome.config index 73b17084f3..44f1ea1302 100644 --- a/conf/modules/prepare_genome.config +++ b/conf/modules/prepare_genome.config @@ -16,7 +16,7 @@ process { withName: 'BWAMEM1_INDEX' { - ext.when = { !params.bwa && params.step == "mapping" && params.aligner == "bwa-mem" } + ext.when = { !params.bwa && params.step == "mapping" && (params.aligner == "bwa-mem" || params.aligner == "sentieon-bwamem")} publishDir = [ enabled: (params.save_reference || params.build_only_index), mode: params.publish_dir_mode, @@ -35,16 +35,6 @@ process { ] } - withName: 'SENTIEON_BWAINDEX' { - ext.when = { !params.bwa && params.step == "mapping" && params.aligner == "sentieon-bwamem" } - publishDir = [ - enabled: (params.save_reference || params.build_only_index), - mode: params.publish_dir_mode, - path: { "${params.outdir}/reference" }, - pattern: "bwa" - ] - } - withName: 'DRAGMAP_HASHTABLE' { ext.when = { !params.dragmap && params.step == "mapping" && params.aligner == "dragmap" } publishDir = [ diff --git a/modules.json b/modules.json index 9c166adf54..8d6f378690 100644 --- a/modules.json +++ b/modules.json @@ -373,11 +373,6 @@ "git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c", "installed_by": ["modules"] }, - "sentieon/bwaindex": { - "branch": "master", - "git_sha": "61448300449d4d14ee437ad37bf1853ce6b91147", - "installed_by": ["modules"] - }, "sentieon/bwamem": { "branch": "master", "git_sha": "8c159ebb28cfa08890042a133bfab78de932eff7", diff --git a/modules/nf-core/sentieon/bwaindex/main.nf b/modules/nf-core/sentieon/bwaindex/main.nf deleted file mode 100644 index 0fcf4d5b59..0000000000 --- a/modules/nf-core/sentieon/bwaindex/main.nf +++ /dev/null @@ -1,57 +0,0 @@ -process SENTIEON_BWAINDEX { - tag "$fasta" - label 'process_high' - label 'sentieon' - - // Exit if running this module with -profile conda / -profile mamba - if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - exit 1, "Sentieon modules does not support Conda. Please use Docker / Singularity / Podman instead." - } - - container 'nfcore/sentieon:202112.06' - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path(bwa), emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - mkdir bwa - - sentieon \\ - bwa index \\ - $args \\ - -p bwa/${fasta.baseName} \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - bwa: \$(echo \$(sentieon bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS - """ - - stub: - """ - mkdir bwa - - touch bwa/genome.amb - touch bwa/genome.ann - touch bwa/genome.bwt - touch bwa/genome.pac - touch bwa/genome.sa - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - bwa: \$(echo \$(sentieon bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/sentieon/bwaindex/meta.yml b/modules/nf-core/sentieon/bwaindex/meta.yml deleted file mode 100644 index 5d91e22586..0000000000 --- a/modules/nf-core/sentieon/bwaindex/meta.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: sentieon_bwaindex -description: Create BWA index for reference genome -keywords: - - index - - fasta - - genome - - reference - - sentieon -tools: - - sentieon: - description: | - Sentieon® provides complete solutions for secondary DNA/RNA analysis for a variety of sequencing platforms, including short and long reads. - Our software improves upon BWA, STAR, Minimap2, GATK, HaplotypeCaller, Mutect, and Mutect2 based pipelines and is deployable on any generic-CPU-based computing system. - homepage: https://www.sentieon.com/ - documentation: https://www.sentieon.com/ -input: - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file -output: - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: BWA genome index files - pattern: "*.{amb,ann,bwt,pac,sa}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@drpatelh" - - "@maxulysse"