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
8 changes: 5 additions & 3 deletions modules/nf-core/pangolin/run/environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::pangolin=4.3.1
- bioconda::pangolin-data=1.32
- bioconda::snakemake=7.32.4
- bioconda::pangolin-data=1.39
- bioconda::pangolin=4.4
- bioconda::snakemake-minimal=9.21.1
16 changes: 3 additions & 13 deletions modules/nf-core/pangolin/run/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ process PANGOLIN_RUN {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/5f/5f10f9bd63d24e2382406b2b348c65ae1ac74118e6eb17f5e30b310fbc1bc4b9/data' :
'community.wave.seqera.io/library/pangolin-data_pangolin_pip_snakemake:7987089a2a044e70' }"
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/85/858e91f6972f0d8d71dae844bf0232656f5d91112b9a5610f559659b33414c86/data' :
'community.wave.seqera.io/library/pangolin-data_pangolin_snakemake-minimal:638a1eb68adff9c7' }"

input:
tuple val(meta), path(fasta)
path(db)

output:
tuple val(meta), path('*.csv'), emit: report
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('pangolin'), eval("pangolin -v | sed 's/pangolin //'"), emit: versions_pangolin, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -31,11 +31,6 @@ process PANGOLIN_RUN {
--outfile ${prefix}.pangolin.csv \\
--threads $task.cpus \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pangolin: \$(pangolin --version | sed "s/pangolin //g")
END_VERSIONS
"""

stub:
Expand All @@ -44,10 +39,5 @@ process PANGOLIN_RUN {
export XDG_CACHE_HOME=/tmp/.cache

touch ${prefix}.pangolin.csv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pangolin: \$(pangolin --version | sed "s/pangolin //g")
END_VERSIONS
"""
}
32 changes: 23 additions & 9 deletions modules/nf-core/pangolin/run/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ tools:
Phylogenetic Assignment of Named Global Outbreak LINeages
homepage: https://github.com/cov-lineages/pangolin#pangolearn-description
manual: https://github.com/cov-lineages/pangolin#pangolearn-description
licence: ["GPL-3.0-or-later"]
licence:
- "GPL-3.0-or-later"
identifier: biotools:pangolin_cov-lineages
input:
- - meta:
Expand All @@ -27,7 +28,6 @@ input:
type: directory
description: |
Directory containing the Pangolin database

output:
report:
- - meta:
Expand All @@ -39,14 +39,28 @@ output:
description: Pangolin lineage report
pattern: "*.{csv}"
ontologies:
- edam: http://edamontology.org/format_3752 # CSV
- edam: http://edamontology.org/format_3752 #CSV
versions_pangolin:
- - ${task.process}:
type: string
description: The name of the process
- pangolin:
type: string
description: The name of the tool
- pangolin -v | sed 's/pangolin //':
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
- pangolin:
type: string
description: The name of the tool
- pangolin -v | sed 's/pangolin //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@kevinmenden"
- "@drpatelh"
Expand Down
7 changes: 2 additions & 5 deletions modules/nf-core/pangolin/run/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert path(process.out.report[0][1]).readLines().first().contains("taxon,lineage,conflict,ambiguity_score,scorpio_call,scorpio_support,scorpio_conflict,scorpio_notes,version,pangolin_version,scorpio_version,constellation_version,is_designated,qc_status,qc_notes,note") },
{ assert snapshot(
file(process.out.report[0][1]).name,
process.out.versions
).match()
}
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["report"])).match() }

)
}
}
Expand Down
77 changes: 53 additions & 24 deletions modules/nf-core/pangolin/run/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
]
],
"1": [
"versions.yml:md5,3611292dc0d16ab155d60c40b998d57e"
[
"PANGOLIN_RUN",
"pangolin",
"4.4"
]
],
"report": [
[
Expand All @@ -21,29 +25,46 @@
"test.pangolin.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,3611292dc0d16ab155d60c40b998d57e"
"versions_pangolin": [
[
"PANGOLIN_RUN",
"pangolin",
"4.4"
]
]
}
],
"timestamp": "2026-07-20T11:54:15.284245093",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-25T11:10:47.50504972"
"nf-test": "0.9.5",
"nextflow": "26.04.4"
}
},
"sarscov2 genome [fasta] - update data": {
"content": [
"test.pangolin.csv",
[
"versions.yml:md5,3611292dc0d16ab155d60c40b998d57e"
]
{
"report": [
[
{
"id": "test"
},
"test.pangolin.csv"
]
],
"versions_pangolin": [
[
"PANGOLIN_RUN",
"pangolin",
"4.4"
]
]
}
],
"timestamp": "2026-07-20T11:58:12.906874243",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-25T11:10:27.540927677"
"nf-test": "0.9.5",
"nextflow": "26.04.4"
}
},
"sarscov2 genome [fasta]": {
"content": [
Expand All @@ -53,29 +74,37 @@
{
"id": "test"
},
"test.pangolin.csv:md5,876b3d5cb0f2b438cb62931b81bb0c8c"
"test.pangolin.csv:md5,bdcdb7bcec59c2e6a12c11ac7ce43b09"
]
],
"1": [
"versions.yml:md5,3611292dc0d16ab155d60c40b998d57e"
[
"PANGOLIN_RUN",
"pangolin",
"4.4"
]
],
"report": [
[
{
"id": "test"
},
"test.pangolin.csv:md5,876b3d5cb0f2b438cb62931b81bb0c8c"
"test.pangolin.csv:md5,bdcdb7bcec59c2e6a12c11ac7ce43b09"
]
],
"versions": [
"versions.yml:md5,3611292dc0d16ab155d60c40b998d57e"
"versions_pangolin": [
[
"PANGOLIN_RUN",
"pangolin",
"4.4"
]
]
}
],
"timestamp": "2026-07-20T11:53:38.602007683",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-25T11:09:22.593905868"
"nf-test": "0.9.5",
"nextflow": "26.04.4"
}
}
}
8 changes: 5 additions & 3 deletions modules/nf-core/pangolin/updatedata/environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda

dependencies:
- bioconda::pangolin=4.3.1
- bioconda::pangolin-data=1.32
- bioconda::snakemake=7.32.4
- bioconda::pangolin-data=1.39
- bioconda::pangolin=4.4
- bioconda::snakemake-minimal=9.21.1
19 changes: 5 additions & 14 deletions modules/nf-core/pangolin/updatedata/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ process PANGOLIN_UPDATEDATA {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/5f/5f10f9bd63d24e2382406b2b348c65ae1ac74118e6eb17f5e30b310fbc1bc4b9/data' :
'community.wave.seqera.io/library/pangolin-data_pangolin_pip_snakemake:7987089a2a044e70' }"
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/85/858e91f6972f0d8d71dae844bf0232656f5d91112b9a5610f559659b33414c86/data' :
'community.wave.seqera.io/library/pangolin-data_pangolin_snakemake-minimal:638a1eb68adff9c7' }"

input:
val(dbname)

output:
path("${prefix}") , emit: db
path "versions.yml" , emit: versions
path("${prefix}") , emit: db
tuple val("${task.process}"), val('pangolin-dataset'), eval("pangolin -pv | sed -n 's/pangolin-data \\([0-9.]*\\).*/\\1/p'"), emit: versions_pangolin_dataset, topic: versions
Comment thread
ammaraziz marked this conversation as resolved.
tuple val("${task.process}"), val('pangolin'), eval("pangolin -v | sed 's/pangolin //'"), emit: versions_pangolin, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -29,21 +30,11 @@ process PANGOLIN_UPDATEDATA {
--update-data \\
--threads $task.cpus \\
--datadir ${prefix}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pangolin: \$(pangolin --version | sed "s/pangolin //g")
END_VERSIONS
"""

stub:
prefix = task.ext.prefix ?: "${dbname}"
"""
mkdir -p ${prefix}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
pangolin: \$(pangolin --version | sed "s/pangolin //g")
END_VERSIONS
"""
}
55 changes: 43 additions & 12 deletions modules/nf-core/pangolin/updatedata/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: pangolin_updatedata
description: Phylogenetic Assignment of Named Global Outbreak LINeages
keywords:
Expand All @@ -13,9 +12,9 @@ tools:
Phylogenetic Assignment of Named Global Outbreak LINeages
homepage: https://github.com/cov-lineages/pangolin#pangolearn-description
manual: https://github.com/cov-lineages/pangolin#pangolearn-description
licence: ["GPL-3.0-or-later"]
licence:
- "GPL-3.0-or-later"
identifier: biotools:pangolin_cov-lineages

input:
- dbname:
type: string
Expand All @@ -24,17 +23,49 @@ output:
db:
- ${prefix}:
type: file
description: Directory containing downloaded data with directory naming being
the user provided dbname or prefix.
description: Directory containing downloaded data with directory naming
being the user provided dbname or prefix.
ontologies: []
versions_pangolin_dataset:
- - ${task.process}:
type: string
description: The name of the process
- pangolin-dataset:
type: string
description: The name of the tool
- pangolin -pv | sed -n 's/pangolin-data \([0-9.]*\).*/\1/p':
type: eval
description: The expression to obtain the version of the tool
versions_pangolin:
- - ${task.process}:
type: string
description: The name of the process
- pangolin:
type: string
description: The name of the tool
- pangolin -v | sed 's/pangolin //':
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
- pangolin-dataset:
type: string
description: The name of the tool/dataset
- pangolin -pv | sed -n 's/pangolin-data \([0-9.]*\).*/\1/p':
type: eval
description: The expression to obtain the version of the tool
- - ${task.process}:
type: string
description: The name of the process
- pangolin:
type: string
description: The name of the tool
- pangolin -v | sed 's/pangolin //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@Joon-Klaps"
maintainers:
Expand Down
6 changes: 1 addition & 5 deletions modules/nf-core/pangolin/updatedata/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.db[0].toString()).listFiles().collect { it.name }.toSorted(), // A mix of empty and non-empty files
process.out.versions
).match()
}
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["report"])).match() }
)
}
}
Expand Down
Loading