Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions modules/nf-core/verifybamid/verifybamid/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ process VERIFYBAMID_VERIFYBAMID {
tag "${meta.id}"
label "process_single"

// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/verifybamid%3A1.1.3--h5b5514e_6':
Expand All @@ -12,21 +13,22 @@ process VERIFYBAMID_VERIFYBAMID {
path refvcf

output:
tuple val(meta), path("*.log") , emit: log
tuple val(meta), path("*.selfSM") , optional:true, emit: selfsm
tuple val(meta), path("*.depthSM") , optional:true, emit: depthsm
tuple val(meta), path("*.selfRG") , optional:true, emit: selfrg
tuple val(meta), path("*.depthRG") , optional:true, emit: depthrg
tuple val(meta), path("*.bestSM") , optional:true, emit: bestsm
tuple val(meta), path("*.bestRG") , optional:true, emit: bestrg
path "versions.yml" , emit: versions
tuple val(meta), path("*.log") , emit: log
tuple val(meta), path("*.selfSM") , emit: selfsm , optional:true
tuple val(meta), path("*.depthSM"), emit: depthsm, optional:true
tuple val(meta), path("*.selfRG") , emit: selfrg , optional:true
tuple val(meta), path("*.depthRG"), emit: depthrg, optional:true
tuple val(meta), path("*.bestSM") , emit: bestsm , optional:true
tuple val(meta), path("*.bestRG") , emit: bestrg , optional:true
tuple val("${task.process}"), val('verifybamid'), eval("echo '1.1.3'"), emit: versions_verifybamid, topic: versions
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.1.3' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.

"""
verifyBamID \\
Expand All @@ -35,10 +37,16 @@ process VERIFYBAMID_VERIFYBAMID {
--out ${prefix} \\
${args} \\
> ${prefix}.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
verifybamid: $VERSION
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.log
touch ${prefix}.bestSM
touch ${prefix}.bestRG
touch ${prefix}.depthRG
touch ${prefix}.depthSM
touch ${prefix}.selfRG
touch ${prefix}.selfSM
"""
}
60 changes: 39 additions & 21 deletions modules/nf-core/verifybamid/verifybamid/meta.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "verifybamid_verifybamid"
description: Detecting and estimating inter-sample DNA contamination became a crucial
quality assessment step to ensure high quality sequence reads and reliable downstream
analysis.
description: Detecting and estimating inter-sample DNA contamination became a
crucial quality assessment step to ensure high quality sequence reads and
reliable downstream analysis.
keywords:
- qc
- contamination
Expand All @@ -15,7 +15,8 @@ tools:
documentation: "http://genome.sph.umich.edu/wiki/VerifyBamID"
tool_dev_url: "https://github.com/statgen/verifyBamID"
doi: "10.1016/j.ajhg.2012.09.004"
licence: ["GPL v3"]
licence:
- "GPL v3"
identifier: biotools:verifybamid
input:
- - meta:
Expand Down Expand Up @@ -64,8 +65,8 @@ output:
e.g. [ id:'test', single_end:false ]
- "*.selfSM":
type: file
description: Per-sample statistics describing how well the sample matches
to the annotated sample.
description: Per-sample statistics describing how well the sample
matches to the annotated sample.
pattern: "*.selfSM"
ontologies: []
depthsm:
Expand All @@ -87,8 +88,9 @@ output:
e.g. [ id:'test', single_end:false ]
- "*.selfRG":
type: file
description: Per-readGroup statistics describing how well each lane matches
to the annotated sample. (available only without --ignoreRG option)
description: Per-readGroup statistics describing how well each lane
matches to the annotated sample. (available only without --ignoreRG
option)
pattern: "*.selfRG"
ontologies: []
depthrg:
Expand All @@ -99,8 +101,8 @@ output:
e.g. [ id:'test', single_end:false ]
- "*.depthRG":
type: file
description: The depth distribution of the sequence reads per readGroup. (available
only without --ignoreRG option)
description: The depth distribution of the sequence reads per readGroup.
(available only without --ignoreRG option)
pattern: "*.depthRG"
ontologies: []
bestsm:
Expand All @@ -111,8 +113,8 @@ output:
e.g. [ id:'test', single_end:false ]
- "*.bestSM":
type: file
description: Per-sample best-match statistics with best-matching sample among
the genotyped sample (available only with --best option)
description: Per-sample best-match statistics with best-matching sample
among the genotyped sample (available only with --best option)
pattern: "*.bestSM"
ontologies: []
bestrg:
Expand All @@ -123,18 +125,34 @@ output:
e.g. [ id:'test', single_end:false ]
- "*.bestRG":
type: file
description: Per-readgroup best-match statistics with best-matching sample
among the genotyped sample (available only with --best and without --ignoreRG
option)
description: Per-readgroup best-match statistics with best-matching
sample among the genotyped sample (available only with --best and
without --ignoreRG option)
pattern: "*.bestRG"
ontologies: []
versions_verifybamid:
- - ${task.process}:
type: string
description: The name of the process
- verifybamid:
type: string
description: The name of the tool
- echo '1.1.3':
type: eval
description: The expression to obtain the version of the tool

topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- verifybamid:
type: string
description: The name of the tool
- echo '1.1.3':
type: eval
description: The expression to obtain the version of the tool

authors:
- "@manifestoso"
maintainers:
Expand Down
36 changes: 26 additions & 10 deletions modules/nf-core/verifybamid/verifybamid/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ nextflow_process {
name "Test Process VERIFYBAMID_VERIFYBAMID"
script "../main.nf"
process "VERIFYBAMID_VERIFYBAMID"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
Expand All @@ -27,18 +26,35 @@ nextflow_process {
}

then {
assert process.success
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.log[0][1]).name,
process.out.depthrg,
process.out.depthsm,
process.out.selfrg,
process.out.selfsm,
process.out.versions,
).match() }
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["log"])).match() }
)
}
}

test("test-verifybamid-verifybamid - stub") {
options "-stub"
when {
process {
"""
input[0] = [ [ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
]
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/vcf/genmod.vcf.gz', checkIfExists: true)

"""
}
}

then {
assert process.success
assertAll(
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}


}
Loading
Loading