Skip to content

Commit

Permalink
Bump phantompeakqualtools 1.2.2 (#5889)
Browse files Browse the repository at this point in the history
* Add stub section

* Update yml

* Add nf-test

* Get rid of pytest

* Make lint happy

* Update tests

* Update tests to make lint happy

* update tests

* Make lint happy

* Using the same version as CI of nf-test locally might be a good idea

* Use wave images

* Make lint happy

* Simplify tests

---------

Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com>
  • Loading branch information
JoseEspinosa and SPPearce authored Jun 27, 2024
1 parent 0aef8ea commit 2dfe9af
Show file tree
Hide file tree
Showing 10 changed files with 232 additions and 61 deletions.
6 changes: 4 additions & 2 deletions modules/nf-core/phantompeakqualtools/environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: phantompeakqualtools
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
name: "phantompeakqualtools"
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::phantompeakqualtools=1.2.2
- "bioconda::phantompeakqualtools=1.2.2"
18 changes: 16 additions & 2 deletions modules/nf-core/phantompeakqualtools/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ process PHANTOMPEAKQUALTOOLS {
// 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 == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/phantompeakqualtools:1.2.2--0' :
'biocontainers/phantompeakqualtools:1.2.2--0' }"
'oras://community.wave.seqera.io/library/phantompeakqualtools:1.2.2--50be7727b2a72700' :
'community.wave.seqera.io/library/phantompeakqualtools:1.2.2--f8026fe2526a5e18' }"

input:
tuple val(meta), path(bam)
Expand Down Expand Up @@ -34,4 +34,18 @@ process PHANTOMPEAKQUALTOOLS {
phantompeakqualtools: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '1.2.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
touch ${prefix}.spp.pdf
touch ${prefix}.spp.Rdata
touch ${prefix}.spp.out
cat <<-END_VERSIONS > versions.yml
"${task.process}":
phantompeakqualtools: $VERSION
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/nf-core/phantompeakqualtools/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tools:
documentation: "https://github.com/kundajelab/phantompeakqualtools"
tool_dev_url: "https://github.com/kundajelab/phantompeakqualtools"
doi: "10.1101/gr.136184.111"
licence: "['BSD-3-clause']"
licence: ["BSD-3-clause"]
input:
- meta:
type: map
Expand Down
90 changes: 90 additions & 0 deletions modules/nf-core/phantompeakqualtools/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// nf-core modules test phantompeakqualtools
nextflow_process {

name "Test Process PHANTOMPEAKQUALTOOLS"
script "../main.nf"
process "PHANTOMPEAKQUALTOOLS"

tag "modules"
tag "modules_nfcore"
tag "phantompeakqualtools"

test("sarscov2 - bam - single_end") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.bam', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.spp,
file(process.out.pdf.get(0).get(1)).name,
file(process.out.rdata.get(0).get(1)).name,
process.out.versions)
.match()
}
)
}

}

test("sarscov2 - bam - paired_end") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:true ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.spp,
file(process.out.pdf.get(0).get(1)).name,
file(process.out.rdata.get(0).get(1)).name,
process.out.versions)
.match()
}
)
}

}

test("sarscov2 - bam - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true)
]
"""
}
}

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

}

}
119 changes: 119 additions & 0 deletions modules/nf-core/phantompeakqualtools/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"sarscov2 - bam - stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.spp.out:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
[
{
"id": "test",
"single_end": false
},
"test.spp.pdf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
[
{
"id": "test",
"single_end": false
},
"test.spp.Rdata:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"3": [
"versions.yml:md5,e0a48a40af2cf7d5de72c4c3cb47a4fc"
],
"pdf": [
[
{
"id": "test",
"single_end": false
},
"test.spp.pdf:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"rdata": [
[
{
"id": "test",
"single_end": false
},
"test.spp.Rdata:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"spp": [
[
{
"id": "test",
"single_end": false
},
"test.spp.out:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,e0a48a40af2cf7d5de72c4c3cb47a4fc"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-27T10:46:22.786363"
},
"sarscov2 - bam - single_end": {
"content": [
[
[
{
"id": "test",
"single_end": true
},
"test.spp.out:md5,b01d976506b6fe45b66c821b1e8a1d15"
]
],
"test.spp.pdf",
"test.spp.Rdata",
[
"versions.yml:md5,e0a48a40af2cf7d5de72c4c3cb47a4fc"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-27T16:21:12.000709154"
},
"sarscov2 - bam - paired_end": {
"content": [
[
[
{
"id": "test",
"single_end": true
},
"test.spp.out:md5,eed46e75eab119224f397a7a8b5924e6"
]
],
"test.spp.pdf",
"test.spp.Rdata",
[
"versions.yml:md5,e0a48a40af2cf7d5de72c4c3cb47a4fc"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-27T16:21:22.432426907"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/phantompeakqualtools/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
phantompeakqualtools:
- "modules/nf-core/phantompeakqualtools/**"
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1181,9 +1181,6 @@ pbptyper:
peka:
- modules/nf-core/peka/**
- tests/modules/nf-core/peka/**
phantompeakqualtools:
- modules/nf-core/phantompeakqualtools/**
- tests/modules/nf-core/phantompeakqualtools/**
phyloflash:
- modules/nf-core/phyloflash/**
- tests/modules/nf-core/phyloflash/**
Expand Down
25 changes: 0 additions & 25 deletions tests/modules/nf-core/phantompeakqualtools/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/phantompeakqualtools/nextflow.config

This file was deleted.

23 changes: 0 additions & 23 deletions tests/modules/nf-core/phantompeakqualtools/test.yml

This file was deleted.

0 comments on commit 2dfe9af

Please sign in to comment.