update picard/collecthsmetrics (#1542)

* update picard/collecthsmetrics

* syntax fixes, bugfixes

* add tests

Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com>
This commit is contained in:
Matthias De Smet 2022-04-22 10:13:57 +02:00 committed by GitHub
parent c7329a3a57
commit 35231d3949
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 9 deletions

View file

@ -15,8 +15,8 @@ process PICARD_COLLECTHSMETRICS {
path target_intervals
output:
tuple val(meta), path("*collecthsmetrics.txt"), emit: hs_metrics
path "versions.yml" , emit: versions
tuple val(meta), path("*_metrics") , emit: metrics
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
@ -41,7 +41,8 @@ process PICARD_COLLECTHSMETRICS {
-BAIT_INTERVALS $bait_intervals \\
-TARGET_INTERVALS $target_intervals \\
-INPUT $bam \\
-OUTPUT ${prefix}_collecthsmetrics.txt
-OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics
cat <<-END_VERSIONS > versions.yml
"${task.process}":
@ -52,7 +53,7 @@ process PICARD_COLLECTHSMETRICS {
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_collecthsmetrics.txt
touch ${prefix}.CollectHsMetrics.coverage_metrics
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -57,10 +57,11 @@ output:
type: file
description: File containing software versions
pattern: "versions.yml"
- hs_metrics:
- metrics:
type: file
description: The metrics file.
pattern: "*_collecthsmetrics.txt"
description: Alignment metrics files generated by picard
pattern: "*_{metrics}"
authors:
- "@projectoriented"
- "@matthdsm"

View file

@ -7,7 +7,7 @@ include { PICARD_COLLECTHSMETRICS } from '../../../../modules/picard/collecthsme
workflow test_picard_collecthsmetrics {
input = [ [ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ]
fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true)

View file

@ -5,4 +5,4 @@
- picard/collecthsmetrics
files:
# The file can't be md5'd consistently
- path: output/picard/test_collecthsmetrics.txt
- path: output/picard/test.CollectHsMetrics.coverage_metrics