Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## dev - xxxx-xx-xx

### Enhancements & fixes

- Improve test suite by @Aratz [#163](https://github.com/nf-core/pixelator/pull/163)

## [[2.2.0](https://github.com/nf-core/pixelator/releases/tag/2.2.0)] - 2025-11-02

This new minor version of nf-core/pixelator introduces new panel files with clearer names. These new
Expand Down
5 changes: 3 additions & 2 deletions modules/local/experiment_summary/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ process EXPERIMENT_SUMMARY {
path("versions.yml") , emit: versions

script:

def args = task.ext.args ?: ''
"""
# Copy the full quarto dir from the read-only image into the workdir
cp -r /workspace/inst/quarto/ ./quarto/
quarto render ./quarto/pixelatorES.qmd \\
-P sample_sheet="\$PWD/${samplesheet_path}" \\
-P data_folder="\$PWD/results/"
-P data_folder="\$PWD/results/" \\
$args \\

mv ./quarto/pixelatorES.html experiment-summary.html

Expand Down
37 changes: 22 additions & 15 deletions modules/local/experiment_summary/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ nextflow_process {
tag "pixelator/pna"
tag "pixelator/experiment_summary"

test("PNA experiment summary - small") {


test("PNA experiment summary - stub") {

options "-stub"

when {
process {
"""
input[0] = [ file(params.pipelines_testdata_base_path + 'samplesheet/pna/samplesheet_pna_es.csv', checkIfExists: true) ]
input[0] = [ file(params.pipelines_testdata_base_path + 'samplesheet/pna/samplesheet_pna.csv', checkIfExists: true) ]
input[1] = [
[id:'all', design:'pna-2', panel:'proxiome-immuno-155', technology:'pna' ],
// amplicon
Expand Down Expand Up @@ -80,18 +85,19 @@ nextflow_process {
assert path(get(0).get(1)).exists()
}
},
{ assert snapshot(process.out.versions).match("versions") },
{ assert snapshot(process.out.versions).match() },
)
}
}



test("PNA experiment summary - stub") {
test("PNA experiment summary - small") {
when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ file(params.pipelines_testdata_base_path + 'samplesheet/pna/samplesheet_pna_es.csv', checkIfExists: true) ]
input[0] = [ file(params.pipelines_testdata_base_path + 'samplesheet/pna/samplesheet_pna.csv', checkIfExists: true) ]
input[1] = [
[id:'all', design:'pna-2', panel:'proxiome-immuno-155', technology:'pna' ],
// amplicon
Expand Down Expand Up @@ -151,15 +157,16 @@ nextflow_process {
}

then {
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
assertAll(
{ assert process.success },
{
with(process.out.html) {
assert path(get(0).get(1)).endsWith("experiment-summary.html")
assert path(get(0).get(1)).exists()
}
},
{ assert snapshot(process.out.versions).match("stub-versions") },
{ assert workflow.success },
{ assert snapshot(
// Number of successful tasks
workflow.trace.succeeded().size(),
// All stable path name, with a relative path
stable_name,
process.out.versions,
).match() }
)
}
}
Expand Down
21 changes: 13 additions & 8 deletions modules/local/experiment_summary/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
{
"versions": {
"PNA experiment summary - small": {
"content": [
1,
[
"pixelator",
"pixelator/experiment-summary.html"
],
[
"versions.yml:md5,1c35ddcd59548b42fc730937c4263809"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-08-27T07:10:33.460197901"
"timestamp": "2025-11-07T15:10:18.392267622"
},
"stub-versions": {
"PNA experiment summary - stub": {
"content": [
[
"versions.yml:md5,1c35ddcd59548b42fc730937c4263809"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-08-27T07:13:26.253720282"
"timestamp": "2025-11-07T15:09:02.619765414"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },

{ assert snapshot(process.out).match() }
)
}
}
Expand All @@ -43,6 +42,7 @@ nextflow_process {
when {
params {
save_all = true
outdir = "$outputDir"
}
process {
"""
Expand All @@ -58,19 +58,16 @@ nextflow_process {
}

then {
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
assertAll(
{ assert process.success },
{ assert workflow.success },
{ assert snapshot(
process.out.merged,
process.out.report_json,
process.out.metadata
).match()
},
{
with (process.out.log) {
assert path(get(0).get(1)).readLines().last().contains("Finished pixelator amplicon")
}
},
// Number of successful tasks
workflow.trace.succeeded().size(),
// All stable path name, with a relative path
stable_name,
process.out.versions,
).match() }
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,26 @@
{
"Test MPX amplicon - SCSP v1 | Immunology-I": {
"content": [
1,
[
[
{
"id": "sample01_1k_pbmcs_scsp_v1_immunology1",
"design": "D21",
"panel": "human-sc-immunology-spatial-proteomics-1",
"technology": "mpx"
},
"sample01_1k_pbmcs_scsp_v1_immunology1.merged.fastq.gz:md5,b66b4946d695f8e2202e2018dcfd6a15"
]
],
[
[
{
"id": "sample01_1k_pbmcs_scsp_v1_immunology1",
"design": "D21",
"panel": "human-sc-immunology-spatial-proteomics-1",
"technology": "mpx"
},
"sample01_1k_pbmcs_scsp_v1_immunology1.report.json:md5,5c15027e9dd0e441f8695a166817c9a5"
]
"pixelator",
"pixelator/amplicon",
"pixelator/amplicon/sample01_1k_pbmcs_scsp_v1_immunology1.merged.fastq.gz",
"pixelator/amplicon/sample01_1k_pbmcs_scsp_v1_immunology1.meta.json",
"pixelator/amplicon/sample01_1k_pbmcs_scsp_v1_immunology1.report.json",
"pixelator/logs",
"pixelator/logs/sample01_1k_pbmcs_scsp_v1_immunology1",
"pixelator/logs/sample01_1k_pbmcs_scsp_v1_immunology1/sample01_1k_pbmcs_scsp_v1_immunology1.pixelator-amplicon.log"
],
[
[
{
"id": "sample01_1k_pbmcs_scsp_v1_immunology1",
"design": "D21",
"panel": "human-sc-immunology-spatial-proteomics-1",
"technology": "mpx"
},
"sample01_1k_pbmcs_scsp_v1_immunology1.meta.json:md5,40db76b696434ea585851070cabe8baa"
]
"versions.yml:md5,60a7a0bbc070d248db9f89ab0972c46e"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.2"
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-07-28T11:06:59.496585652"
"timestamp": "2025-11-07T08:29:01.551421256"
},
"Test MPX amplicon - stub": {
"content": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ nextflow_process {
test("Test MPX analysis - SCSP v1 | Immunology-I") {
when {
params {
save_all
save_all = true
outdir = "$outputDir"
}
process {
"""
Expand All @@ -48,17 +49,16 @@ nextflow_process {
}

then {
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
assertAll(
{ assert process.success },
{assert path(process.out.report_json.get(0).get(1)).exists()},
{assert path(process.out.metadata.get(0).get(1)).exists()},
{assert path(process.out.dataset.get(0).get(1)).exists()},
{assert process.out.dataset.get(0).get(1).endsWith(".pxl")},
{
with (process.out.log) {
assert path(get(0).get(1)).readLines().last().contains("Finished pixelator analysis")
}
},
{ assert workflow.success },
{ assert snapshot(
// Number of successful tasks
workflow.trace.succeeded().size(),
// All stable path name, with a relative path
stable_name,
process.out.versions,
).match() }
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
{
"Test MPX analysis - SCSP v1 | Immunology-I": {
"content": [
1,
[
"pixelator",
"pixelator/analysis",
"pixelator/analysis/sample01_1k_pbmcs_scsp_v1_immunology1.analysis.dataset.pxl",
"pixelator/analysis/sample01_1k_pbmcs_scsp_v1_immunology1.meta.json",
"pixelator/analysis/sample01_1k_pbmcs_scsp_v1_immunology1.report.json",
"pixelator/logs",
"pixelator/logs/sample01_1k_pbmcs_scsp_v1_immunology1",
"pixelator/logs/sample01_1k_pbmcs_scsp_v1_immunology1/sample01_1k_pbmcs_scsp_v1_immunology1.pixelator-analysis.log"
],
[
"versions.yml:md5,294239a503f1320c924038c6554443a2"
]
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-11-07T10:12:24.48353731"
},
"Test MPX analysis - stub": {
"content": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ nextflow_process {
when {
params {
save_all = true
outdir = "$outputDir"
}
process {
"""
Expand All @@ -55,24 +56,16 @@ nextflow_process {
}

then {
def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}'])
assertAll(
{ assert process.success },
{assert path(process.out.report_json.get(0).get(1)).exists()},
{assert path(process.out.metadata.get(0).get(1)).exists()},
{
with (process.out.dataset.get(0)) {
assert path(get(1)).zip.extract("adata.h5ad").exists()
assert path(get(1)).zip.extract("edgelist.parquet").exists()
assert snapshot(
path(get(1)).zip.extract("metadata.json")
).match("pxl")
}
},
{
with (process.out.log) {
assert path(get(0).get(1)).readLines().last().contains("Finished pixelator annotate")
}
},
{ assert workflow.success },
{ assert snapshot(
// Number of successful tasks
workflow.trace.succeeded().size(),
// All stable path name, with a relative path
stable_name,
process.out.versions,
).match() }
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
{
"pxl": {
"Test MPX annotate - SCSP v1 | Immunology-I": {
"content": [
"metadata.json:md5,82b35492f5e5067481c04c8612f466ee"
1,
[
"pixelator",
"pixelator/annotate",
"pixelator/annotate/sample01_1k_pbmcs_scsp_v1_immunology1.annotate.dataset.pxl",
"pixelator/annotate/sample01_1k_pbmcs_scsp_v1_immunology1.meta.json",
"pixelator/annotate/sample01_1k_pbmcs_scsp_v1_immunology1.report.json",
"pixelator/logs",
"pixelator/logs/sample01_1k_pbmcs_scsp_v1_immunology1",
"pixelator/logs/sample01_1k_pbmcs_scsp_v1_immunology1/sample01_1k_pbmcs_scsp_v1_immunology1.pixelator-annotate.log"
],
[
"versions.yml:md5,f96c065a146a6d0667467f30beb8092b"
]
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-10-31T13:30:45.331289297"
"timestamp": "2025-11-07T10:13:35.389069003"
},
"Test MPX annotate - stub": {
"content": [
Expand Down
Loading