diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index d20014bf..ac829515 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -23,6 +23,7 @@ process PICARD_MARKDUPLICATES { output: tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*.bai") , optional:true, emit: bai tuple val(meta), path("*.metrics.txt"), emit: metrics path "*.version.txt" , emit: version @@ -40,9 +41,9 @@ process PICARD_MARKDUPLICATES { -Xmx${avail_mem}g \\ MarkDuplicates \\ $options.args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.bam \\ - METRICS_FILE=${prefix}.MarkDuplicates.metrics.txt + -I $bam \\ + -O ${prefix}.bam \\ + -M ${prefix}.MarkDuplicates.metrics.txt echo \$(picard MarkDuplicates --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d: > ${software}.version.txt """ diff --git a/modules/picard/markduplicates/meta.yml b/modules/picard/markduplicates/meta.yml index 6420ce9a..b651b3a0 100644 --- a/modules/picard/markduplicates/meta.yml +++ b/modules/picard/markduplicates/meta.yml @@ -1,46 +1,51 @@ name: picard_markduplicates description: Locate and tag duplicate reads in a BAM file keywords: - - markduplicates - - pcr - - duplicates - - bam - - sam - - cram + - markduplicates + - pcr + - duplicates + - bam + - sam + - cram tools: - - picard: - description: | - A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) - data and formats such as SAM/BAM/CRAM and VCF. - homepage: https://broadinstitute.github.io/picard/ - documentation: https://broadinstitute.github.io/picard/ + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file - pattern: "*.{bam}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.{bam}" output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: BAM file with duplicate reads marked/removed - pattern: "*.{bam}" - - metrics: - type: file - description: Duplicate metrics file generated by picard - pattern: "*.{metrics.txt}" - - version: - type: file - description: File containing software version - pattern: "*.{version.txt}" + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file with duplicate reads marked/removed + pattern: "*.{bam}" + - bai: + type: file + description: An optional BAM index file. If desired, --CREATE_INDEX must be passed as a flag + pattern: "*.{bai}" + - metrics: + type: file + description: Duplicate metrics file generated by picard + pattern: "*.{metrics.txt}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" authors: - - "@drpatelh" + - "@drpatelh" + - "@projectoriented" diff --git a/tests/modules/picard/markduplicates/test.yml b/tests/modules/picard/markduplicates/test.yml index 24f468ce..ffb385f3 100644 --- a/tests/modules/picard/markduplicates/test.yml +++ b/tests/modules/picard/markduplicates/test.yml @@ -6,8 +6,7 @@ files: - path: ./output/picard/test.MarkDuplicates.metrics.txt - path: ./output/picard/test.bam - md5sum: 3270bb142039e86aaf2ab83c540225d5 - + md5sum: b520ccdc3a9edf3c6a314983752881f2 - name: picard markduplicates on unsorted bam command: nextflow run ./tests/modules/picard/markduplicates -entry test_picard_markduplicates_unsorted_bam -c tests/config/nextflow.config tags: