Skip to content
Draft
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
14 changes: 13 additions & 1 deletion modules/nf-core/propr/grea/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,24 @@ process PROPR_GREA {

output:
tuple val(meta), path("*.grea.tsv"), emit: results
path "versions.yml", emit: versions
path "versions.yml", emit: versions, topic: versions
path "*.R_sessionInfo.log", emit: session_info

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

script:
template 'grea.R'

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.grea.tsv
touch ${prefix}.R_sessionInfo.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-propr: \$(Rscript -e "cat(as.character(packageVersion('propr')))")
END_VERSIONS
"""
}
9 changes: 7 additions & 2 deletions modules/nf-core/propr/grea/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: "propr_grea"
description: Perform Gene Ratio Enrichment Analysis
keywords:
Expand All @@ -15,7 +14,8 @@ tools:
documentation: "https://rdrr.io/cran/propr/man/propr.html"
tool_dev_url: "https://github.com/tpq/propr"
doi: "10.2202/1544-6115.1175"
licence: ["GPL-2"]
licence:
- "GPL-2"
identifier: biotools:propr
input:
- - meta:
Expand Down Expand Up @@ -77,6 +77,11 @@ output:
description: dump of R SessionInfo
pattern: "*.R_sessionInfo.log"
ontologies: []
topics:
versions:
- versions.yml:
type: string
description: The name of the process
authors:
- "@caraiz2001"
- "@suzannejin"
Expand Down
31 changes: 25 additions & 6 deletions modules/nf-core/propr/grea/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ nextflow_process {
tag "propr"
tag "propr/grea"
tag "propr/propd"
config "./nextflow.config"

test("test grea chained to propd") {

tag "default"
config "./grea_test.config"


setup {
run("PROPR_PROPD") {
Expand Down Expand Up @@ -57,9 +56,29 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.results,
process.out.versions
).match()}
sanitizeOutput(process.out, unstableKeys: ["session_info"]),
path(process.out.versions[0]).yaml
).match() }
)
}
}

test("test grea chained to propd - stub") {
options "-stub"

when {
process {
"""
input[0] = [[ id: 'test' ], []]
input[1] = [[ id: 'test' ], []]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
73 changes: 54 additions & 19 deletions modules/nf-core/propr/grea/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,26 +1,61 @@
{
"test grea chained to propd - stub": {
"content": [
{
"results": [
[
{
"id": "test"
},
"test.grea.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"session_info": [
"test.R_sessionInfo.log:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,060fcd8ce4afc482e237fa75686a0aba"
]
}
],
"timestamp": "2026-07-15T09:39:18.036935358",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
},
"test grea chained to propd": {
"content": [
[
[
{
"id": "treatment_mCherry_hND6_",
"variable": "treatment",
"reference": "mCherry",
"target": "hND6",
"blocking": ""
},
"treatment_mCherry_hND6_.grea.tsv:md5,786faeccf39926d2f7c980ef549a2697"
{
"results": [
[
{
"id": "treatment_mCherry_hND6_",
"variable": "treatment",
"reference": "mCherry",
"target": "hND6",
"blocking": ""
},
"treatment_mCherry_hND6_.grea.tsv:md5,d685990740bdf74a554d18f7c5f73f4a"
]
],
"session_info": [
"treatment_mCherry_hND6_.R_sessionInfo.log:md5,e9e64218c010b1b04ea818b92b3f3f60"
],
"versions": [
"versions.yml:md5,060fcd8ce4afc482e237fa75686a0aba"
]
],
[
"versions.yml:md5,060fcd8ce4afc482e237fa75686a0aba"
]
},
{
"PROPR_GREA": {
"r-propr": "5.1.5"
}
}
],
"timestamp": "2026-07-15T10:31:30.880768792",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.2"
},
"timestamp": "2024-12-11T13:00:02.026244403"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
}
}
}
4 changes: 2 additions & 2 deletions modules/nf-core/propr/logratio/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process PROPR_LOGRATIO {
output:
tuple val(meta), path("*.logratio.tsv") , emit: logratio
tuple val(meta), path("*.R_sessionInfo.log"), emit: session_info
path "versions.yml" , emit: versions
path "versions.yml" , emit: versions, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -22,7 +22,7 @@ process PROPR_LOGRATIO {
template 'logratio.R'

stub:
prefix = task.ext.prefix ?: "${meta.id}"
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.logratio.tsv
touch ${prefix}.R_sessionInfo.log
Expand Down
16 changes: 11 additions & 5 deletions modules/nf-core/propr/logratio/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "propr_logratio"
description: Transform the data matrix using centered logratio transformation (CLR)
or additive logratio transformation (ALR)
description: Transform the data matrix using centered logratio transformation
(CLR) or additive logratio transformation (ALR)
keywords:
- alr
- clr
Expand All @@ -15,7 +15,8 @@ tools:
documentation: "https://rdrr.io/cran/propr/man/propr.html"
tool_dev_url: "https://github.com/tpq/propr"
doi: "10.1038/s41598-017-16520-0"
licence: ["GPL-2"]
licence:
- "GPL-2"
identifier: biotools:propr
input:
- - meta:
Expand Down Expand Up @@ -44,8 +45,8 @@ output:
[id: 'test', ...]
- "*.logratio.tsv":
type: file
description: ALR/CLR transformed data matrix. With rows = variables or genes,
columns = samples or cells.
description: ALR/CLR transformed data matrix. With rows = variables or
genes, columns = samples or cells.
pattern: "*.logratio.tsv"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
Expand All @@ -68,6 +69,11 @@ output:
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
topics:
versions:
- versions.yml:
type: string
description: The name of the process
authors:
- "@suzannejin"
- "@oprana22"
Expand Down
5 changes: 2 additions & 3 deletions modules/nf-core/propr/logratio/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ nextflow_process {
)
}
}
test("mus_musculus - tsv -- stub") {
tag "stub"
test("mus_musculus - tsv - stub") {
options "-stub"
when {
params {
Expand All @@ -220,7 +219,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
sanitizeOutput(process.out),
path(process.out.versions[0]).yaml
).match() }
)
Expand Down
Loading
Loading