diff --git a/CITATIONS.md b/CITATIONS.md index 632a65b795..e2570438f6 100644 --- a/CITATIONS.md +++ b/CITATIONS.md @@ -92,6 +92,10 @@ > Chen X, Schulz-Trieglaff O, Shaw R, et al.: Manta: rapid detection of structural variants and indels for germline and cancer sequencing applications. Bioinformatics. 2016 Apr 15;32(8):1220-2. doi: 10.1093/bioinformatics/btv710. PubMed PMID: 26647377. +- [Minimap2](https://github.com/lh3/minimap2) + + > Li, H. Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics. 2018 May 10;34:3094-3100. doi:10.1093/bioinformatics/bty191. PubMed PMID: 29750242; PubMed Central PMCID: PMC6137996. + - [Mosdepth](https://academic.oup.com/bioinformatics/article/34/5/867/4583630) > Brent S Pedersen, Aaron R Quinlan, Mosdepth: quick coverage calculation for genomes and exomes, Bioinformatics, Volume 34, Issue 5, 01 March 2018, Pages 867–868. doi: 10.1093/bioinformatics/btx699. PubMed PMID: 29096012. PubMed Central PMCID: PMC6030888. diff --git a/conf/base.config b/conf/base.config index d371e9407f..fff439d038 100644 --- a/conf/base.config +++ b/conf/base.config @@ -66,8 +66,8 @@ process { cpus = { check_max( 12 * task.attempt, 'cpus' ) } memory = { check_max( 4.GB * task.attempt, 'memory' ) } } - withName: 'BWAMEM1_MEM|BWAMEM2_MEM' { - cpus = { check_max( 24 * task.attempt, 'cpus' ) } + withName: 'BWAMEM1_MEM|BWAMEM2_MEM|MINIMAP2_ALIGN' { + cpus = { check_max( 12 * task.attempt, 'cpus' ) } memory = { check_max( 30.GB * task.attempt, 'memory' ) } } withName:'CNVKIT_BATCH' { diff --git a/conf/modules/aligner.config b/conf/modules/aligner.config index 5f44e199b0..bc217b2b4d 100644 --- a/conf/modules/aligner.config +++ b/conf/modules/aligner.config @@ -29,11 +29,16 @@ process { ext.when = { params.aligner == 'dragmap' } } + withName: 'MINIMAP2_ALIGN' { + ext.args = { "-x sr -R ${meta.read_group}" } + ext.when = { params.aligner == 'minimap2' } + } + withName: 'SENTIEON_BWAMEM' { ext.when = { params.aligner == 'sentieon-bwamem' } } - withName: 'BWAMEM.*_MEM|DRAGMAP_ALIGN|SENTIEON_BWAMEM' { + withName: 'BWAMEM.*_MEM|DRAGMAP_ALIGN|MINIMAP2_ALIGN|SENTIEON_BWAMEM' { ext.prefix = { params.split_fastq > 1 ? "${meta.id}".concat('.').concat(reads.get(0).name.tokenize('.')[0]) : "${meta.id}.sorted" } publishDir = [ mode: params.publish_dir_mode, diff --git a/conf/modules/prepare_genome.config b/conf/modules/prepare_genome.config index e54138538c..aad4c982ad 100644 --- a/conf/modules/prepare_genome.config +++ b/conf/modules/prepare_genome.config @@ -76,6 +76,17 @@ process { ] } + withName: 'MINIMAP2_INDEX' { + ext.args = { "-x sr" } + ext.when = { !params.minimap2 && params.step == "mapping" && params.aligner == "minimap2" } + publishDir = [ + mode: params.publish_dir_mode, + path: { "${params.outdir}/reference/minimap2" }, + pattern: "*mmi", + saveAs: { params.save_reference || params.build_only_index ? it : null } + ] + } + withName: 'MSISENSORPRO_SCAN' { ext.when = { params.tools && params.tools.split(',').contains('msisensorpro') } publishDir = [ diff --git a/docs/output.md b/docs/output.md index ff6445e89b..a272ddb71a 100644 --- a/docs/output.md +++ b/docs/output.md @@ -20,6 +20,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d - [BWA](#bwa) - [BWA-mem2](#bwa-mem2) - [DragMap](#dragmap) + - [Minimap2](#minimap2) - [Sentieon BWA mem](#sentieon-bwa-mem) - [Mark Duplicates](#mark-duplicates) - [GATK MarkDuplicates (Spark)](#gatk-markduplicates-spark) @@ -174,6 +175,10 @@ These files are intermediate and by default not placed in the output-folder kept These files are intermediate and by default not placed in the output-folder kept in the final files delivered to users. Set `--save_mapped` to enable publishing, furthermore add the flag `save_output_as_bam` for publishing in BAM format. +### Minimap2 + +[Minimap2](https://github.com/lh3/minimap2) is a versatile pairwise aligner for genomic and spliced nucleotide sequences. The aligned reads are then coordinate-sorted (or name-sorted if [`GATK MarkDuplicatesSpark`](https://gatk.broadinstitute.org/hc/en-us/articles/5358833264411-MarkDuplicatesSpark) is used for duplicate marking) with [samtools](https://www.htslib.org/doc/samtools.html). + #### Sentieon BWA mem Sentieon [bwa mem](https://support.sentieon.com/manual/usages/general/#bwa-mem-syntax) is a subroutine for mapping low-divergent sequences against a large reference genome. It is part of the proprietary software package [DNAseq](https://www.sentieon.com/detailed-description-of-pipelines/#dnaseq) from [Sentieon](https://www.sentieon.com/). diff --git a/docs/usage.md b/docs/usage.md index b6c2aba974..8f3a25bbe3 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -827,30 +827,30 @@ nextflow run nf-core/sarek --known_indels false --genome GRCh38.GATK For GATK.GRCh38 the links for each reference file and the corresponding processes that use them is listed below. For GATK.GRCh37 the files originate from the same sources: -| File | Tools | Origin | Docs | -| :-------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | -| ascat_alleles | ASCAT | https://www.dropbox.com/s/uouszfktzgoqfy7/G1000_alleles_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | -| ascat_loci | ASCAT | https://www.dropbox.com/s/80cq0qgao8l1inj/G1000_loci_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | -| ascat_loci_gc | ASCAT | https://www.dropbox.com/s/80cq0qgao8l1inj/G1000_loci_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | -| ascat_loci_rt | ASCAT | https://www.dropbox.com/s/xlp99uneqh6nh6p/RT_G1000_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | -| bwa | bwa-mem | bwa index -p bwa/${fasta.baseName} $fasta | | -| bwamem2 | bwa-mem2 | bwa-mem2 index -p bwamem2/${fasta} $fasta | | -| dragmap | DragMap | dragen-os --build-hash-table true --ht-reference $fasta --output-directory dragmap | | -| dbsnp | Baserecalibrator, ControlFREEC, GenotypeGVCF, HaplotypeCaller | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | -| dbsnp_tbi | Baserecalibrator, ControlFREEC, GenotypeGVCF, HaplotypeCaller | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | -| dict | Baserecalibrator(Spark), CNNScoreVariant, EstimateLibraryComplexity, FilterMutectCalls, FilterVariantTranches, GatherPileupSummaries,GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, MarkDulpicates(Spark), MergeVCFs, Mutect2, Variantrecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | -| fasta | ApplyBQSR(Spark), ApplyVQSR, ASCAT, Baserecalibrator(Spark), BWA, BWAMem2, CNNScoreVariant, CNVKit, ControlFREEC, DragMap, DEEPVariant, EnsemblVEP, EstimateLibraryComplexity, FilterMutectCalls, FilterVariantTranches, FreeBayes, GatherPileupSummaries,GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, interval building, Manta, MarkDuplicates(Spark),MergeVCFs,MSISensorPro, Mutect2, Samtools, SnpEff, Strelka, Tiddit, Variantrecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | -| fasta_fai | ApplyBQSR(Spark), ApplyVQSR, ASCAT, Baserecalibrator(Spark), BWA, BWAMem2, CNNScoreVariant, CNVKit, ControlFREEC, DragMap, DEEPVariant, EnsemblVEP, EstimateLibraryComplexity, FilterMutectCalls, FilterVariantTranches, FreeBayes, GatherPileupSummaries,GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, interval building, Manta, MarkDuplicates(Spark),MergeVCFs,MSISensorPro, Mutect2, Samtools, SnpEff, Strelka, Tiddit, Variantrecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | -| germline_resource | GetPileupsummaries,Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | -| germline_resource_tbi | GetPileupsummaries,Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | -| intervals | ApplyBQSR(Spark), ASCAT, Baserecalibrator(Spark), BCFTools, CNNScoreVariants, ControlFREEC, Deepvariant, FilterVariantTranches, FreeBayes, GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, Strelka, mpileup, MSISensorPro, Mutect2, VCFTools | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | -| known_indels | BaseRecalibrator(Spark), FilterVariantTranches | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | -| known_indels_tbi | BaseRecalibrator(Spark), FilterVariantTranches | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | -| known_snps | BaseRecalibrator(Spark), FilterVariantTranches, VariantRecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | -| known_snps_tbi | BaseRecalibrator(Spark), FilterVariantTranches, VariantRecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | -| mappability | ControlFREEC | http://xfer.curie.fr/get/vyIi4w8EONl/out100m2_hg38.zip | http://boevalab.inf.ethz.ch/FREEC/tutorial.html | -| pon | Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890631-Panel-of-Normals-PON- | -| pon_tbi | Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890631-Panel-of-Normals-PON- | +| File | Tools | Origin | Docs | +| :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | +| ascat_alleles | ASCAT | https://www.dropbox.com/s/uouszfktzgoqfy7/G1000_alleles_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | +| ascat_loci | ASCAT | https://www.dropbox.com/s/80cq0qgao8l1inj/G1000_loci_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | +| ascat_loci_gc | ASCAT | https://www.dropbox.com/s/80cq0qgao8l1inj/G1000_loci_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | +| ascat_loci_rt | ASCAT | https://www.dropbox.com/s/xlp99uneqh6nh6p/RT_G1000_hg38.zip | https://github.com/VanLoo-lab/ascat/tree/master/ReferenceFiles/WGS | +| bwa | bwa-mem | bwa index -p bwa/${fasta.baseName} $fasta | | +| bwamem2 | bwa-mem2 | bwa-mem2 index -p bwamem2/${fasta} $fasta | | +| dragmap | DragMap | dragen-os --build-hash-table true --ht-reference $fasta --output-directory dragmap | | +| dbsnp | Baserecalibrator, ControlFREEC, GenotypeGVCF, HaplotypeCaller | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | +| dbsnp_tbi | Baserecalibrator, ControlFREEC, GenotypeGVCF, HaplotypeCaller | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | +| dict | Baserecalibrator(Spark), CNNScoreVariant, EstimateLibraryComplexity, FilterMutectCalls, FilterVariantTranches, GatherPileupSummaries,GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, MarkDulpicates(Spark), MergeVCFs, Mutect2, Variantrecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | +| fasta | ApplyBQSR(Spark), ApplyVQSR, ASCAT, Baserecalibrator(Spark), BWA, BWAMem2, CNNScoreVariant, CNVKit, ControlFREEC, DragMap, DEEPVariant, EnsemblVEP, EstimateLibraryComplexity, FilterMutectCalls, FilterVariantTranches, FreeBayes, GatherPileupSummaries,GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, interval building, Manta, MarkDuplicates(Spark),MergeVCFs, Minimap2, MSISensorPro, Mutect2, Samtools, SnpEff, Strelka, Tiddit, Variantrecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | +| fasta_fai | ApplyBQSR(Spark), ApplyVQSR, ASCAT, Baserecalibrator(Spark), BWA, BWAMem2, CNNScoreVariant, CNVKit, ControlFREEC, DragMap, DEEPVariant, EnsemblVEP, EstimateLibraryComplexity, FilterMutectCalls, FilterVariantTranches, FreeBayes, GatherPileupSummaries,GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, interval building, Manta, MarkDuplicates(Spark),MergeVCFs, Minimap2, MSISensorPro, Mutect2, Samtools, SnpEff, Strelka, Tiddit, Variantrecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890811-Resource-bundle | +| germline_resource | GetPileupsummaries,Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | +| germline_resource_tbi | GetPileupsummaries,Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | +| intervals | ApplyBQSR(Spark), ASCAT, Baserecalibrator(Spark), BCFTools, CNNScoreVariants, ControlFREEC, Deepvariant, FilterVariantTranches, FreeBayes, GenotypeGVCF, GetPileupSummaries, HaplotypeCaller, Strelka, mpileup, MSISensorPro, Mutect2, VCFTools | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | +| known_indels | BaseRecalibrator(Spark), FilterVariantTranches | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | +| known_indels_tbi | BaseRecalibrator(Spark), FilterVariantTranches | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | +| known_snps | BaseRecalibrator(Spark), FilterVariantTranches, VariantRecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | | +| known_snps_tbi | BaseRecalibrator(Spark), FilterVariantTranches, VariantRecalibrator | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | +| mappability | ControlFREEC | http://xfer.curie.fr/get/vyIi4w8EONl/out100m2_hg38.zip | http://boevalab.inf.ethz.ch/FREEC/tutorial.html | +| pon | Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890631-Panel-of-Normals-PON- | +| pon_tbi | Mutect2 | [GATKBundle](https://console.cloud.google.com/storage/browser/_details/genomics-public-data/resources/broad/hg38/v0/) | https://gatk.broadinstitute.org/hc/en-us/articles/360035890631-Panel-of-Normals-PON- | ## How to customise SnpEff and VEP annotation diff --git a/main.nf b/main.nf index 99e2b0b156..a087df5dd3 100644 --- a/main.nf +++ b/main.nf @@ -52,6 +52,7 @@ params.known_snps = WorkflowMain.getGenomeAttribute(params, 'known_ params.known_snps_tbi = WorkflowMain.getGenomeAttribute(params, 'known_snps_tbi') params.known_snps_vqsr = WorkflowMain.getGenomeAttribute(params, 'known_snps_vqsr') params.mappability = WorkflowMain.getGenomeAttribute(params, 'mappability') +params.minimap2 = WorkflowMain.getGenomeAttribute(params, 'minimap2') params.ngscheckmate_bed = WorkflowMain.getGenomeAttribute(params, 'ngscheckmate_bed') params.pon = WorkflowMain.getGenomeAttribute(params, 'pon') params.pon_tbi = WorkflowMain.getGenomeAttribute(params, 'pon_tbi') diff --git a/modules.json b/modules.json index 995c350b52..96761a4cd9 100644 --- a/modules.json +++ b/modules.json @@ -315,6 +315,16 @@ "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", "installed_by": ["modules"] }, + "minimap2/align": { + "branch": "master", + "git_sha": "1e2b7fb7106852388610c0360d234b0829eb980e", + "installed_by": ["modules"] + }, + "minimap2/index": { + "branch": "master", + "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "installed_by": ["modules"] + }, "mosdepth": { "branch": "master", "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", diff --git a/modules/nf-core/minimap2/align/environment.yml b/modules/nf-core/minimap2/align/environment.yml new file mode 100644 index 0000000000..cf6e775f39 --- /dev/null +++ b/modules/nf-core/minimap2/align/environment.yml @@ -0,0 +1,9 @@ +name: minimap2_align +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::minimap2=2.24 + - bioconda::samtools=1.18 + - bioconda::htslib=1.18 diff --git a/modules/nf-core/minimap2/align/main.nf b/modules/nf-core/minimap2/align/main.nf new file mode 100644 index 0000000000..53de1254f4 --- /dev/null +++ b/modules/nf-core/minimap2/align/main.nf @@ -0,0 +1,49 @@ +process MINIMAP2_ALIGN { + tag "$meta.id" + label 'process_medium' + + // Note: the versions here need to match the versions used in the mulled container below and minimap2/index + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:365b17b986c1a60c1b82c6066a9345f38317b763-0' : + 'biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:365b17b986c1a60c1b82c6066a9345f38317b763-0' }" + + input: + tuple val(meta), path(reads) + tuple val(meta2), path(reference) + val bam_format + val cigar_paf_format + val cigar_bam + + output: + tuple val(meta), path("*.paf"), optional: true, emit: paf + tuple val(meta), path("*.bam"), optional: true, emit: bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def bam_output = bam_format ? "-a | samtools sort -@ ${task.cpus} -o ${prefix}.bam ${args2}" : "-o ${prefix}.paf" + def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' + """ + minimap2 \\ + $args \\ + -t $task.cpus \\ + ${reference ?: reads} \\ + ${reads} \\ + $cigar_paf \\ + $set_cigar_bam \\ + $bam_output + + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/minimap2/align/meta.yml b/modules/nf-core/minimap2/align/meta.yml new file mode 100644 index 0000000000..408522d5c9 --- /dev/null +++ b/modules/nf-core/minimap2/align/meta.yml @@ -0,0 +1,75 @@ +name: minimap2_align +description: A versatile pairwise aligner for genomic and spliced nucleotide sequences +keywords: + - align + - fasta + - fastq + - genome + - paf + - reference +tools: + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FASTA or FASTQ files of size 1 and 2 for single-end + and paired-end data, respectively. + - meta2: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'test_ref'] + - reference: + type: file + description: | + Reference database in FASTA format. + - bam_format: + type: boolean + description: Specify that output should be in BAM format + - cigar_paf_format: + type: boolean + description: Specify that output CIGAR should be in PAF format + - cigar_bam: + type: boolean + description: | + Write CIGAR with >65535 ops at the CG tag. This is recommended when + doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - paf: + type: file + description: Alignment in PAF format + pattern: "*.paf" + - bam: + type: file + description: Alignment in BAM format + pattern: "*.bam" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@heuermh" + - "@sofstam" + - "@sateeshperi" + - "@jfy133" +maintainers: + - "@heuermh" + - "@sofstam" + - "@sateeshperi" + - "@jfy133" diff --git a/modules/nf-core/minimap2/align/tests/main.nf.test b/modules/nf-core/minimap2/align/tests/main.nf.test new file mode 100644 index 0000000000..b634468b99 --- /dev/null +++ b/modules/nf-core/minimap2/align/tests/main.nf.test @@ -0,0 +1,145 @@ +nextflow_process { + + name "Test Process MINIMAP2_ALIGN" + script "../main.nf" + process "MINIMAP2_ALIGN" + + tag "modules" + tag "modules_nfcore" + tag "minimap2" + tag "minimap2/align" + + test("sarscov2 - fastq, fasta, true, false, false") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = true + input[3] = false + input[4] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("sarscov2 - [fastq1, fastq2], fasta, true, false, false") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = true + input[3] = false + input[4] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("sarscov2 - fastq, [], true, false, false") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + [] + ] + input[2] = true + input[3] = false + input[4] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + + test("sarscov2 - fastq, fasta, true, false, false - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + input[1] = [ + [ id:'test_ref' ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[2] = true + input[3] = false + input[4] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.bam[0][1]).name, + process.out.versions + ).match() } + ) + } + + } + +} diff --git a/modules/nf-core/minimap2/align/tests/main.nf.test.snap b/modules/nf-core/minimap2/align/tests/main.nf.test.snap new file mode 100644 index 0000000000..a39a16979c --- /dev/null +++ b/modules/nf-core/minimap2/align/tests/main.nf.test.snap @@ -0,0 +1,38 @@ +{ + "sarscov2 - fastq, fasta, true, false, false": { + "content": [ + "test.bam", + [ + "versions.yml:md5,9e9eeae0002d466d580a9d6e0d003eb1" + ] + ], + "timestamp": "2023-12-04T12:07:06.01315354" + }, + "sarscov2 - fastq, fasta, true, false, false - stub": { + "content": [ + "test.bam", + [ + "versions.yml:md5,9e9eeae0002d466d580a9d6e0d003eb1" + ] + ], + "timestamp": "2023-12-04T12:07:24.487175659" + }, + "sarscov2 - [fastq1, fastq2], fasta, true, false, false": { + "content": [ + "test.bam", + [ + "versions.yml:md5,9e9eeae0002d466d580a9d6e0d003eb1" + ] + ], + "timestamp": "2023-12-04T12:07:12.50816279" + }, + "sarscov2 - fastq, [], true, false, false": { + "content": [ + "test.bam", + [ + "versions.yml:md5,9e9eeae0002d466d580a9d6e0d003eb1" + ] + ], + "timestamp": "2023-12-04T12:07:18.414974788" + } +} \ No newline at end of file diff --git a/modules/nf-core/minimap2/align/tests/tags.yml b/modules/nf-core/minimap2/align/tests/tags.yml new file mode 100644 index 0000000000..39dba37441 --- /dev/null +++ b/modules/nf-core/minimap2/align/tests/tags.yml @@ -0,0 +1,2 @@ +minimap2/align: + - "modules/nf-core/minimap2/align/**" diff --git a/modules/nf-core/minimap2/index/environment.yml b/modules/nf-core/minimap2/index/environment.yml new file mode 100644 index 0000000000..2a66e4104c --- /dev/null +++ b/modules/nf-core/minimap2/index/environment.yml @@ -0,0 +1,7 @@ +name: minimap2_index +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - bioconda::minimap2=2.24 diff --git a/modules/nf-core/minimap2/index/main.nf b/modules/nf-core/minimap2/index/main.nf new file mode 100644 index 0000000000..45e1cec066 --- /dev/null +++ b/modules/nf-core/minimap2/index/main.nf @@ -0,0 +1,34 @@ +process MINIMAP2_INDEX { + label 'process_medium' + + // Note: the versions here need to match the versions used in minimap2/align + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/minimap2:2.24--h7132678_1' : + 'biocontainers/minimap2:2.24--h7132678_1' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("*.mmi"), emit: index + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + minimap2 \\ + -t $task.cpus \\ + -d ${fasta.baseName}.mmi \\ + $args \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + minimap2: \$(minimap2 --version 2>&1) + END_VERSIONS + """ +} diff --git a/modules/nf-core/minimap2/index/meta.yml b/modules/nf-core/minimap2/index/meta.yml new file mode 100644 index 0000000000..1d29e3f2d6 --- /dev/null +++ b/modules/nf-core/minimap2/index/meta.yml @@ -0,0 +1,43 @@ +name: minimap2_index +description: Provides fasta index required by minimap2 alignment. +keywords: + - index + - fasta + - reference +tools: + - minimap2: + description: | + A versatile pairwise aligner for genomic and spliced nucleotide sequences. + homepage: https://github.com/lh3/minimap2 + documentation: https://github.com/lh3/minimap2#uguide + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: | + Reference database in FASTA format. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: Minimap2 fasta index. + pattern: "*.mmi" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yuukiiwa" + - "@drpatelh" +maintainers: + - "@yuukiiwa" + - "@drpatelh" diff --git a/nextflow.config b/nextflow.config index d49a3ceeff..72056d3831 100644 --- a/nextflow.config +++ b/nextflow.config @@ -195,6 +195,8 @@ profiles { shifter.enabled = false docker.runOptions = '-u $(id -u):$(id -g)' singularity.enabled = false + docker.runOptions = '--security-opt seccomp:unconfined' + docker.fixOwnership = true } arm { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' diff --git a/nextflow_schema.json b/nextflow_schema.json index b70486246b..5318149c6a 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -216,7 +216,7 @@ "type": "string", "default": "bwa-mem", "fa_icon": "fas fa-puzzle-piece", - "enum": ["bwa-mem", "bwa-mem2", "dragmap", "sentieon-bwamem"], + "enum": ["bwa-mem", "bwa-mem2", "dragmap", "minimap2", "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`. For more info see [here](https://gatk.broadinstitute.org/hc/en-us/articles/4407897446939--How-to-Run-germline-single-sample-short-variant-discovery-in-DRAGEN-mode)." }, @@ -729,10 +729,17 @@ "mappability": { "type": "string", "fa_icon": "fas fa-file", - "description": "Path to Control-FREEC mappability file.", + "description": "Path to minimap2 genome index file.", "hidden": true, "help_text": "If you use AWS iGenomes, this has already been set for you appropriately." }, + "minimap2": { + "type": "string", + "fa_icon": "fas fa-file", + "description": "Path to Control-FREEC mappability file.", + "hidden": true, + "help_text": "If you use AWS iGenomes, this has NOT already been set for you appropriately.\n\n> **NB** If none provided, will be generated automatically from the known FASTA file. Combine with `--save_reference` to save for future runs." + }, "ngscheckmate_bed": { "type": "string", "fa_icon": "fas fa-file", diff --git a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf index c61ac7f4cc..5cb020a619 100644 --- a/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf +++ b/subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/main.nf @@ -7,6 +7,7 @@ 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 { MINIMAP2_ALIGN } from '../../../modules/nf-core/minimap2/align/main' include { SENTIEON_BWAMEM } from '../../../modules/nf-core/sentieon/bwamem/main' workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { @@ -22,10 +23,14 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { versions = Channel.empty() reports = Channel.empty() + cigar_paf_format = false + cigar_bam = false + // 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 + MINIMAP2_ALIGN(reads, index.map{ it -> [ [ id:'index' ], it ] }, sort, cigar_paf_format, cigar_bam) // If aligner is minimap2 // The sentieon-bwamem-module does sorting as part of the conversion from sam to bam. SENTIEON_BWAMEM(reads, index.map{ it -> [ [ id:'index' ], it ] }, fasta.map{fa -> [[:], fa]}, fasta_fai.map{fai -> [[:], fai]}) // If aligner is sentieon-bwamem @@ -35,6 +40,7 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { bam = bam.mix(BWAMEM1_MEM.out.bam) bam = bam.mix(BWAMEM2_MEM.out.bam) bam = bam.mix(DRAGMAP_ALIGN.out.bam) + bam = bam.mix(MINIMAP2_ALIGN.out.bam) bam = bam.mix(SENTIEON_BWAMEM.out.bam_and_bai.map{ meta, bam, bai -> [ meta, bam ] }) bai = SENTIEON_BWAMEM.out.bam_and_bai.map{ meta, bam, bai -> [ meta, bai ] } @@ -46,6 +52,7 @@ workflow FASTQ_ALIGN_BWAMEM_MEM2_DRAGMAP_SENTIEON { versions = versions.mix(BWAMEM1_MEM.out.versions) versions = versions.mix(BWAMEM2_MEM.out.versions) versions = versions.mix(DRAGMAP_ALIGN.out.versions) + versions = versions.mix(MINIMAP2_ALIGN.out.versions) versions = versions.mix(SENTIEON_BWAMEM.out.versions) emit: diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index 5ceb16f8aa..fec45c5670 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -12,6 +12,7 @@ include { BWA_INDEX as BWAMEM1_INDEX } from '../../../modules/nf- include { BWAMEM2_INDEX } from '../../../modules/nf-core/bwamem2/index/main' include { DRAGMAP_HASHTABLE } from '../../../modules/nf-core/dragmap/hashtable/main' include { GATK4_CREATESEQUENCEDICTIONARY } from '../../../modules/nf-core/gatk4/createsequencedictionary/main' +include { MINIMAP2_INDEX } from '../../../modules/nf-core/minimap2/index/main' include { MSISENSORPRO_SCAN } from '../../../modules/nf-core/msisensorpro/scan/main' include { SAMTOOLS_FAIDX } from '../../../modules/nf-core/samtools/faidx/main' include { TABIX_TABIX as TABIX_BCFTOOLS_ANNOTATIONS } from '../../../modules/nf-core/tabix/tabix/main' @@ -50,6 +51,7 @@ workflow PREPARE_GENOME { BWAMEM1_INDEX(fasta) // If aligner is bwa-mem BWAMEM2_INDEX(fasta) // If aligner is bwa-mem2 DRAGMAP_HASHTABLE(fasta) // If aligner is dragmap + MINIMAP2_INDEX(fasta) // If aligner is minimap2 GATK4_CREATESEQUENCEDICTIONARY(fasta) MSISENSORPRO_SCAN(fasta) @@ -108,6 +110,7 @@ workflow PREPARE_GENOME { versions = versions.mix(BWAMEM2_INDEX.out.versions) versions = versions.mix(DRAGMAP_HASHTABLE.out.versions) versions = versions.mix(GATK4_CREATESEQUENCEDICTIONARY.out.versions) + versions = versions.mix(MINIMAP2_INDEX.out.versions) versions = versions.mix(MSISENSORPRO_SCAN.out.versions) versions = versions.mix(TABIX_BCFTOOLS_ANNOTATIONS.out.versions) versions = versions.mix(TABIX_DBSNP.out.versions) @@ -127,6 +130,7 @@ workflow PREPARE_GENOME { germline_resource_tbi = TABIX_GERMLINE_RESOURCE.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: germline_resource.vcf.gz.tbi known_snps_tbi = TABIX_KNOWN_SNPS.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: {known_indels*}.vcf.gz.tbi known_indels_tbi = TABIX_KNOWN_INDELS.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: {known_indels*}.vcf.gz.tbi + minimap2 = MINIMAP2_INDEX.out.index.map{ meta, index -> [index] }.collect() // path: genome.mmi msisensorpro_scan = MSISENSORPRO_SCAN.out.list.map{ meta, list -> [list] } // path: genome_msi.list pon_tbi = TABIX_PON.out.tbi.map{ meta, tbi -> [tbi] }.collect() // path: pon.vcf.gz.tbi diff --git a/tests/config/pytesttags.yml b/tests/config/pytesttags.yml index f33e55023c..bf5d3f2fa9 100644 --- a/tests/config/pytesttags.yml +++ b/tests/config/pytesttags.yml @@ -132,6 +132,14 @@ dragmap: - tests/csv/3.0/fastq_single.csv - tests/test_aligner_dragmap.yml +### minimap2 +minimap2: + - conf/modules/aligner.config + - modules/nf-core/minimap2/align/** + - subworkflows/local/fastq_align_bwamem_mem2_dragmap_sentieon/** + - tests/csv/3.0/fastq_single.csv + - tests/test_aligner_minimap2.yml + ### sentieon/bwamem sentieon/bwamem: - conf/modules/aligner.config diff --git a/tests/test_aligner_minimap2.yml b/tests/test_aligner_minimap2.yml new file mode 100644 index 0000000000..5e69e85b76 --- /dev/null +++ b/tests/test_aligner_minimap2.yml @@ -0,0 +1,91 @@ +- name: Run minimap2 + command: nextflow run main.nf -profile test_cache --aligner minimap2 --save_reference --outdir results + tags: + - aligner + - minimap2 + - 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 + # binary changes md5sums on reruns + - 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/minimap2/genome.mmi + md5sum: 26530ed9abe1f1318efe2b2cf3c84eb8 + - 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: ["test 5324 142 162 1061336 3324 2 0 0.593438 4993", "1.0 0.999998 138"] + - path: results/reports/mosdepth/test/test.md.mosdepth.global.dist.txt + md5sum: 0a9284c1496efd6fc7ce79f12c0ec7a0 + - path: results/reports/mosdepth/test/test.md.mosdepth.region.dist.txt + md5sum: f2dae85c8e57dd3c00fc6be0dc860a4d + - path: results/reports/mosdepth/test/test.md.mosdepth.summary.txt + md5sum: 0714422bef83371c37087bddbdae2485 + - path: results/reports/mosdepth/test/test.md.regions.bed.gz + md5sum: e8cee27a1207c13ee7b54a330a593d04 + - path: results/reports/mosdepth/test/test.md.regions.bed.gz.csi + md5sum: 99573817f440d12374d6eadd0241ee07 + - path: results/reports/mosdepth/test/test.recal.mosdepth.global.dist.txt + md5sum: 0a9284c1496efd6fc7ce79f12c0ec7a0 + - path: results/reports/mosdepth/test/test.recal.mosdepth.region.dist.txt + md5sum: f2dae85c8e57dd3c00fc6be0dc860a4d + - path: results/reports/mosdepth/test/test.recal.mosdepth.summary.txt + md5sum: 0714422bef83371c37087bddbdae2485 + - path: results/reports/mosdepth/test/test.recal.regions.bed.gz + md5sum: e8cee27a1207c13ee7b54a330a593d04 + - path: results/reports/mosdepth/test/test.recal.regions.bed.gz.csi + md5sum: 99573817f440d12374d6eadd0241ee07 + - 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 minimap2 + command: nextflow run main.nf -profile test_cache --build_only_index --aligner minimap2 --input false --outdir results + tags: + - aligner + - build_only_index + - minimap2 + files: + - path: results/multiqc + - path: results/reference/minimap2/genome.mmi + md5sum: 26530ed9abe1f1318efe2b2cf3c84eb8 + - 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 6478909470..3289f10282 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -50,6 +50,7 @@ def checkPathParamList = [ params.known_snps, params.known_snps_tbi, params.mappability, + params.minimap2, params.multiqc_config, params.ngscheckmate_bed, params.pon, @@ -332,11 +333,12 @@ workflow SAREK { : PREPARE_GENOME.out.bwamem2 dragmap = params.dragmap ? Channel.fromPath(params.dragmap).collect() : PREPARE_GENOME.out.hashtable + minimap2 = params.minimap2 ? Channel.fromPath(params.minimap2).collect() + : PREPARE_GENOME.out.minimap2 // Gather index for mapping given the chosen aligner index_alignement = (params.aligner == "bwa-mem" || params.aligner == "sentieon-bwamem") ? bwa : - params.aligner == "bwa-mem2" ? bwamem2 : - dragmap + params.aligner == "bwa-mem2" ? bwamem2 : params.aligner == "dragmap" ? dragmap : minimap2 // TODO: add a params for msisensorpro_scan msisensorpro_scan = PREPARE_GENOME.out.msisensorpro_scan