Skip to content

Commit

Permalink
pangolin - use seqera containers + nf-test; rm pytests (#6740)
Browse files Browse the repository at this point in the history
* use seqera containers + nf-test; rm pytests

* Update modules/nf-core/pangolin/main.nf

Co-authored-by: Joon Klaps <[email protected]>

* update snapshots

* fix home path sing & update conda env

* Fixing the meta.yml and pining pangolin-data

---------

Co-authored-by: Joon Klaps <[email protected]>
  • Loading branch information
sateeshperi and Joon-Klaps authored Oct 18, 2024
1 parent a591752 commit 9530ba6
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 34 deletions.
4 changes: 3 additions & 1 deletion modules/nf-core/pangolin/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::pangolin=4.2
- bioconda::pangolin-data=1.30
- bioconda::pangolin=4.3
- bioconda::snakemake=7.30.1
6 changes: 4 additions & 2 deletions modules/nf-core/pangolin/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process PANGOLIN {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pangolin:4.2--pyhdfd78af_1' :
'biocontainers/pangolin:4.2--pyhdfd78af_1' }"
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/bb/bb7bac48e43a9cd6274e1f99c761a5785b74f6d8a55313ee634aaffbe87c1869/data' :
'community.wave.seqera.io/library/pangolin-data_pangolin_snakemake:5bbc297f7502ff33' }"

input:
tuple val(meta), path(fasta)
Expand All @@ -21,6 +21,8 @@ process PANGOLIN {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
export XDG_CACHE_HOME=/tmp/.cache
pangolin \\
$fasta\\
--outfile ${prefix}.pangolin.csv \\
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/pangolin/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- pangolin
- lineage
tools:
- star:
- pangolin:
description: |
Phylogenetic Assignment of Named Global Outbreak LINeages
homepage: https://github.com/cov-lineages/pangolin#pangolearn-description
Expand All @@ -24,9 +24,9 @@ input:
output:
- report:
- meta:
type: file
description: Pangolin lineage report
pattern: "*.{csv}"
type: map
description: |
Groovy Map containing sample information
- "*.csv":
type: file
description: Pangolin lineage report
Expand Down
57 changes: 57 additions & 0 deletions modules/nf-core/pangolin/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "pangolin"

test("sarscov2 genome [fasta]") {

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

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

}

test("sarscov2 genome [fasta] - stub") {

options "-stub"

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

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

}

}
68 changes: 68 additions & 0 deletions modules/nf-core/pangolin/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"sarscov2 genome [fasta] - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.pangolin.csv:md5,2cc701567cf37bad5c6574c29aa595d4"
]
],
"1": [
"versions.yml:md5,65ec45a19faa92a922073b9b08d90a8a"
],
"report": [
[
{
"id": "test"
},
"test.pangolin.csv:md5,2cc701567cf37bad5c6574c29aa595d4"
]
],
"versions": [
"versions.yml:md5,65ec45a19faa92a922073b9b08d90a8a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-18T10:33:48.797026222"
},
"sarscov2 genome [fasta]": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.pangolin.csv:md5,2cc701567cf37bad5c6574c29aa595d4"
]
],
"1": [
"versions.yml:md5,65ec45a19faa92a922073b9b08d90a8a"
],
"report": [
[
{
"id": "test"
},
"test.pangolin.csv:md5,2cc701567cf37bad5c6574c29aa595d4"
]
],
"versions": [
"versions.yml:md5,65ec45a19faa92a922073b9b08d90a8a"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-18T10:33:17.535254436"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,6 @@ nucmer:
oncocnv:
- modules/nf-core/oncocnv/**
- tests/modules/nf-core/oncocnv/**
pangolin:
- modules/nf-core/pangolin/**
- tests/modules/nf-core/pangolin/**
parabricks/applybqsr:
- modules/nf-core/parabricks/applybqsr/**
- tests/modules/nf-core/parabricks/applybqsr/**
Expand Down
12 changes: 0 additions & 12 deletions tests/modules/nf-core/pangolin/main.nf

This file was deleted.

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

This file was deleted.

7 changes: 0 additions & 7 deletions tests/modules/nf-core/pangolin/test.yml

This file was deleted.

0 comments on commit 9530ba6

Please sign in to comment.