Skip to content

new module: insitugame - #13471

Merged
Lukecele merged 30 commits into
nf-core:masterfrom
Lukecele:insitugame
Nov 8, 2026
Merged

Lukecele merged 30 commits into
nf-core:masterfrom
Lukecele:insitugame

Conversation

@Lukecele

@Lukecele Lukecele commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This pull request introduces the insitugame module to nf-core/modules.

insitugame performs computational oncology analysis on spatial transcriptomics tables, inferring subclonal payoff matrices and equilibrium results from the supplied marker measurements.

Verification & Compliance

  • Built using the official nf-core modules create template.
  • Uses the native insitugame CLI (version 1.0.7); no inline analysis code.
  • Uses Seqera Wave container references for Docker and Singularity/Apptainer.
  • Advertises only supported TSV/CSV input formats.
  • Regular and stub nf-test suites pass.
  • Module lint and pre-commit checks pass.

Checklist

  • This PR fixes an issue or adds a new module.
  • I have read the contribution guidelines.
  • I have updated meta.yml and environment.yml with valid metadata and dependencies.

@Lukecele

Copy link
Copy Markdown
Contributor Author

Hi @famosab the module works fine locally and Conda tests are passing perfectly here in CI (~50s). However, Docker and Singularity keep failing with Error 125 due to a container pull issue from GHCR. The GHCR container is set to public. Could you take a look or let me know if there is a workaround to bypass this network timeout and get it merged?"

@Lukecele

Copy link
Copy Markdown
Contributor Author

Update: license header added to main.nf (per #13448). The remaining CI failures are not caused by this PR:

  1. pre-commit fails on subworkflows/nf-core/bcl_demultiplex/main.nf ("Shebang comment should appear at the first line @ line 4"), a file this PR does not touch. This branch is up to date with master.
  2. Docker/Singularity fail because the BioContainers image quay.io/biocontainers/insitugame:1.0.6--pyhdfd78af_0 is not published yet. The Bioconda recipe (Add insitugame v1.0.6 bioconda/bioconda-recipes#70794) was merged today and the upload job ran, but other recently merged new packages (e.g. naivede) are in the same state, while an older one (lrcorrect, merged yesterday) is available. I will re-run CI once the image is pullable.

Conda tests and module lint pass.

Comment thread modules/nf-core/insitugame/main.nf Outdated
Comment on lines +10 to +11
'https://depot.galaxyproject.org/singularity/insitugame:1.0.6--pyhdfd78af_0':
'quay.io/biocontainers/insitugame:1.0.6--pyhdfd78af_0' }"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using seqera containers for the modules now :) Can you change to that?

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are the author of the tool right? Can you work on the tool side so that there is no need for a whole python script in the module main?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @famosab, the tool-side CLI is now available in insitugame 1.0.7. The module uses the native insitugame --input ... --output-prefix ... command, with the Seqera/Wave containers and updated tests. The inline Python was removed; only the required input-column validation remains before invoking the CLI. Could you please re-review this update?

@Lukecele

Copy link
Copy Markdown
Contributor Author

Hi @famosab, I can update the module to the Seqera/Wave container, but the package does not currently expose a CLI, so I cannot remove the inline Python without a new insitugame release. Could you provide the Wave-generated Docker image and Singularity/Apptainer digest for insitugame 1.0.6, or confirm the expected Wave package/container reference? I do not want to commit a guessed image tag. Once provided, I will update only main.nf and rerun the module tests.

@famosab

famosab commented Oct 28, 2026

Copy link
Copy Markdown
Member

Can you expose the CLI then? I think that is a better way of handling things.

You can generate the containers yourself here https://seqera.io/containers/

@Lukecele

Lukecele commented Oct 28, 2026 via email

Copy link
Copy Markdown
Contributor Author

@famosab famosab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for the underlying tool to expose the CLI :)

@Lukecele

Copy link
Copy Markdown
Contributor Author

Hi @famosab, thank you again for the guidance. I have prepared the CLI change in a separate review PR so the package-side change can be checked independently before updating this module: Lukecele/spatial-game-assay#1

The PR adds the insitugame console entry point, preserves the current JSON/CSV output contract, and passes CI on Python 3.9–3.13. Once the package change is reviewed and released, I will generate the matching Seqera container and update this nf-core module.

@Lukecele
Lukecele requested review from famosab and a balanced review from Copilot October 28, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The module reports completion without running the assay or exporting analytical results, and its advertised H5AD input format is incompatible with the CSV-only loader.

2 open issues
What changed in this PR

Introduces an insitugame module intended to support spatial evolutionary game analysis in nf-core pipelines, with dependency configuration, metadata and tests.

Changes:

  • Adds a Nextflow process with JSON/CSV outputs, version reporting and stub behaviour.
  • Pins insitugame to version 1.0.6 and documents the module’s interface.
  • Adds regular and stub tests with recorded snapshots and test tags.
File Description
modules/​nf-core/​insitugame/​tests/​tags.yml Associates the module path with its test tag.
modules/​nf-core/​insitugame/​tests/​main.nf.test.snap Records regular and stub output snapshots.
modules/​nf-core/​insitugame/​tests/​main.nf.test Adds TSV-based regular and stub tests.
modules/​nf-core/​insitugame/​meta.yml Documents the tool, inputs, outputs and maintainers.
modules/​nf-core/​insitugame/​main.nf Defines the process, metadata-only outputs and stub.
modules/​nf-core/​insitugame/​environment.yml Pins the Bioconda dependency to 1.0.6.

Review effort: Balanced

Comment thread modules/nf-core/insitugame/main.nf Resolved
Comment thread modules/nf-core/insitugame/meta.yml Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The module reports completion without running inference, producing metadata and row counts instead of the promised payoff matrices and Nash equilibria.

1 open issue
1 resolved since last review

Review effort: Balanced

@Lukecele

Copy link
Copy Markdown
Contributor Author

I re-read the module and found a correctness issue beyond the container/CLI migration: the previous inline code instantiated InSituGameAssay but never called fit(), so the JSON/CSV outputs were metadata-only. I corrected this in the CLI follow-up PR: Lukecele/spatial-game-assay#2 (20 package tests pass).

I am holding the nf-core branch update until that release is published to Bioconda: the current latest release/container is v1.0.6 and cannot contain the merged CLI, so changing the module to a guessed 1.0.7 Wave image would break Conda/Docker/Singularity. Once Bioconda has 1.0.7, I will generate the matching Seqera references, replace the inline Python with insitugame, update the snapshot, and rerun all module tests. Thanks @famosab for pointing me to the CLI/Wave approach.

@vagkaratzas vagkaratzas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • nf-test fails on all profiles because spatial_omics/insitugame/insitugame.tsv does not exist on the test-datasets modules branch yet (CI log). Once nf-core/test-datasets#2368 is merged, please re-run CI. A CSV file for the new test could go into that PR too.
  • The tool reads .gz input directly, so the gzip step and the gzip dependency can go. The current containers do not match environment.yml anyway.
  • Add a CSV test.

Diff 3.79/10 · Overall 3.79/10
nf-core-reviewer 0.7.0dev / vagkaratzas-review (rubric v5) · claude-opus-5-5

Comment thread modules/nf-core/insitugame/main.nf Outdated
Comment on lines +28 to +35
def input_file = spatial_data.name.endsWith('.gz') ? 'input.tsv' : spatial_data
def decompress = spatial_data.name.endsWith('.gz') ? "gzip -dc ${spatial_data} > ${input_file}" : ''
"""
${decompress}
insitugame \\
${args} \\
--input "${input_file}" \\
--output-prefix "${prefix}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

insitugame reads the table with pd.read_csv(..., sep=None), which detects .gz compression from the file name, so the manual decompression is not needed. Dropping it also removes the unquoted ${spatial_data} in the gzip call.

Suggested change
def input_file = spatial_data.name.endsWith('.gz') ? 'input.tsv' : spatial_data
def decompress = spatial_data.name.endsWith('.gz') ? "gzip -dc ${spatial_data} > ${input_file}" : ''
"""
${decompress}
insitugame \\
${args} \\
--input "${input_file}" \\
--output-prefix "${prefix}"
"""
insitugame \\
${args} \\
--input "${spatial_data}" \\
--output-prefix "${prefix}"
"""

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit e6d265c: the module passes the original spatial_data path directly to insitugame, which handles gzip input natively.

- bioconda
dependencies:
- "bioconda::insitugame=1.0.7"
- "conda-forge::gzip=1.14"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the module stops decompressing, gzip is no longer needed. The containers were also built without it: the snapshot reports gzip 1.12, not the pinned 1.14, and the Wave tag is insitugame:1.0.7 only. Remove this line, the versions_gzip output and its meta.yml entries, then rebuild the containers with nf-core modules containers create.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit e6d265c: removed the gzip dependency, manual decompression, and gzip version metadata; the module container is no longer coupled to gzip.

Comment on lines +53 to +55
}

test("spatial - tsv - stub") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta.yml accepts CSV as well as TSV, but only TSV is tested. Please add a csv test (plain or gzipped) so the CSV path is covered too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit e6d265c: added the real spatial - csv test and published insitugame.csv in nf-core/test-datasets#2368.

Let insitugame read TSV, CSV, and gzip inputs directly, remove the redundant gzip dependency and version output, and add CSV nf-tests.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the latest review comments in commit e6d265c83:

  • removed manual gzip -dc decompression because the insitugame CLI/Pandas handles .gz inputs natively
  • removed the redundant gzip Conda dependency, version output, and metadata entries
  • added a real CSV fixture and spatial - csv nf-test
  • retained TSV, TSV.GZ, CSV, and stub coverage with sanitized snapshots

Validation: nf-core lint 69/69, Nextflow lint passed, and Docker nf-test passed 4/4 in CI mode.

@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @vagkaratzas, thank you for the detailed review. The requested changes are now implemented in commit e6d265c83:

  • removed manual gzip decompression and the gzip dependency/version output
  • added a real CSV fixture and spatial - csv nf-test
  • retained TSV, TSV.GZ, CSV, and stub coverage with sanitized snapshots

The current CI failures occur before the process starts because insitugame.tsv is not yet available on the upstream nf-core/test-datasets/modules branch. The approved test-data PR nf-core/test-datasets#2368 now contains TSV, TSV.GZ, CSV, and README documentation. Once it is merged, the CI should be rerun.

Luca and others added 2 commits November 6, 2026 14:22
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vagkaratzas

Copy link
Copy Markdown
Contributor

@Lukecele, I merged the dataset and pulled master in the branch; ci still failing. Have a look and poke me when green.

Snapshot output filenames and the tool version instead of environment-dependent file hashes.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

The rerun exposed a portability issue in the nf-test snapshots: the generated CSV MD5 differs between Conda and Docker even though both executions succeed. Fixed in commit cc985280a by snapshotting output filenames and the insitugame version instead of environment-dependent file hashes.

Validation: nf-test 4/4 in CI mode and nf-core lint 71/71.

@Lukecele

Lukecele commented Nov 6, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

CI is green now after the dataset merge and the portable snapshot fix:

  • Conda: 4/4 passed
  • Docker: 4/4 passed
  • Singularity: 4/4 passed
  • nf-core lint: passed
  • pre-commit: passed
  • nf-test confirmation: passed

Thanks @vagkaratzas for the review and for merging the test dataset.

@vagkaratzas vagkaratzas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Tests snapshot only output file names, so the module's results are never checked. Please switch all four tests to snapshot(sanitizeOutput(process.out)) and regenerate the snapshot.
  • Small: quote the stub paths and consider process_single.

Thanks for the contribution! CI lint and nf-test pass, nextflow lint is clean, and the module wires every file the CLI reads and writes.

Diff 8.97/10 · Overall 8.97/10
nf-core-reviewer 0.7.0dev / vagkaratzas-review (rubric v5) · claude-opus-5-5

Comment on lines +26 to +33
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() },
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests snapshot only the file names, so a wrong or empty _results.json/_tables.csv still passes. Snapshot the whole sanitised output instead; it also covers the versions channel. If a JSON field changes between runs, put that channel in unstableKeys and add a .contains() check on a line the tool always writes.

Suggested change
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() },
)
assertAll(
{ assert snapshot(sanitizeOutput(process.out)).match() },
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 925b79f: the test now snapshots sanitizeOutput(process.out), keeps results/tables as unstable because their hashes vary across environments, and checks stable JSON/CSV content.

Comment on lines +53 to +60
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() },
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: snapshot sanitizeOutput(process.out) so the gzipped-input test checks content, not just names.

Suggested change
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() },
)
assertAll(
{ assert snapshot(sanitizeOutput(process.out)).match() },
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 925b79f with the same sanitized snapshot and stable content checks for the TSV.GZ test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Updated to snapshot(sanitizeOutput(process.out)) with stable content and line count assertions. Thank you!

Comment on lines +80 to +87
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() },
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here for the CSV test.

Suggested change
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() },
)
assertAll(
{ assert snapshot(sanitizeOutput(process.out)).match() },
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 925b79f with the same sanitized snapshot and stable content checks for the CSV test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Switched to sanitized snapshot asserting output content and structure. Thank you!

Comment on lines +109 to +116
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() }
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stub too: sanitizeOutput(process.out) rather than a hand-built map.

Suggested change
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]
assertAll(
{ assert snapshot(outputs).match() }
)
assertAll(
{ assert snapshot(sanitizeOutput(process.out)).match() }
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 925b79f: the stub now uses snapshot(sanitizeOutput(process.out)) directly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Updated the stub test to use sanitizeOutput(process.out) and cleaned up dead code. Thank you!

Comment thread modules/nf-core/insitugame/main.nf Outdated
Comment on lines +37 to +38
touch ${prefix}_results.json
touch ${prefix}_tables.csv

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote the stub paths like the script block does, in case the prefix has spaces.

Suggested change
touch ${prefix}_results.json
touch ${prefix}_tables.csv
touch "${prefix}_results.json"
touch "${prefix}_tables.csv"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 925b79f: stub output paths are quoted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Quoted all stub paths cleanly. Thank you!

Comment thread modules/nf-core/insitugame/main.nf Outdated

process INSITUGAME {
tag "${meta.id}"
label 'process_medium'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI runs single-threaded (no threads option), so process_single fits better than process_medium.

Suggested change
label 'process_medium'
label 'process_single'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 925b79f: changed the process label to process_single.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Changed process label to process_single as insitugame runs single-threaded. Thank you!

Snapshot sanitized outputs with unstable analytical file hashes and assert stable JSON/CSV content while quoting stub paths and using process_single.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the latest review comments in commit 925b79ff1:

  • switched all four tests to full snapshot(sanitizeOutput(process.out)) coverage
  • used unstableKeys: ["results", "tables"] only for environment-dependent analytical file hashes
  • added stable JSON/CSV content assertions so empty or incorrect outputs cannot pass
  • quoted stub output paths
  • changed the process label to process_single

Validation: nf-test 4/4 in CI mode, nf-core lint 71/71, and Nextflow lint passed.

@vagkaratzas vagkaratzas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the earlier points are all fixed: sanitizeOutput in every test, quoted stub paths, and process_single.

  • One thing left: the results and tables channels are exempted through unstableKeys, so add their line counts inside the snapshot.
  • Small: remove the unused outputs map in the stub test.

Note: the script flagged tests/main.nf.test:103 as a separate versions assertion. That is a false positive, because the map is dead code and asserts nothing.

Diff 9.66/10 · Overall 9.66/10
nf-core-reviewer 0.7.0dev / vagkaratzas-review (rubric v5) · claude-opus-5-5

Comment on lines +27 to +29
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["results", "tables"])).match() },
{ assert file(process.out.results[0][1]).text.contains('"status": "completed"') },
{ assert file(process.out.tables[0][1]).readLines().first() == "focal_phenotype,T_S,T_R,S_CAF" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good use of unstableKeys. Please put the stable checks for the exempted channels back inside the same snapshot(...), as line counts (the tables CSV is always 4 lines). That way a change in output shape fails the snapshot. Your content asserts can stay next to it. Regenerate the snapshot afterwards.

Suggested change
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["results", "tables"])).match() },
{ assert file(process.out.results[0][1]).text.contains('"status": "completed"') },
{ assert file(process.out.tables[0][1]).readLines().first() == "focal_phenotype,T_S,T_R,S_CAF" },
{ assert snapshot(
sanitizeOutput(process.out, unstableKeys: ["results", "tables"]),
path(process.out.results[0][1]).readLines().size(),
path(process.out.tables[0][1]).readLines().size(),
).match() },
{ assert file(process.out.results[0][1]).text.contains('"status": "completed"') },
{ assert file(process.out.tables[0][1]).readLines().first() == "focal_phenotype,T_S,T_R,S_CAF" },

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 28f6835: results/tables line counts are now included inside the same sanitized snapshot, while stable JSON/CSV assertions remain adjacent.

then {
assert process.success
assertAll(
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["results", "tables"])).match() },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same line-count change here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 28f6835: the TSV.GZ snapshot now includes results/tables line counts.

then {
assert process.success
assertAll(
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["results", "tables"])).match() },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same line-count change here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 28f6835: the CSV snapshot now includes results/tables line counts.

Comment on lines +100 to +104
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The outputs map isn't used any more, now that the stub snapshots sanitizeOutput(process.out). Please remove it.

Suggested change
def outputs = [
results: process.out.results.collect { meta, output_file -> [meta, file(output_file).name] },
tables: process.out.tables.collect { meta, output_file -> [meta, file(output_file).name] },
versions_insitugame: process.out.versions_insitugame,
]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 28f6835: the unused outputs map was removed from the stub test.

@vagkaratzas

Copy link
Copy Markdown
Contributor

Another round, getting there! Can you please reply to the line by line comments as you go, so we can close if they have been addressed? Thanks :D

Keep stable output shape inside sanitized snapshots while allowing environment-dependent analytical hashes.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Replied line-by-line to the remaining review comments. Commit 28f683505 now includes the stable results/tables line counts inside each sanitized snapshot and removes the unused stub map.

Validation: nf-test 4/4 in CI mode, nf-core lint 71/71, and Nextflow lint passed.

@vagkaratzas vagkaratzas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, both of the last points are fixed: the output line counts are now inside the snapshot, and the unused outputs map is gone.

Approval should be on its way soon.

Diff 10.00/10 · Overall 10.00/10
nf-core-reviewer 0.8.0dev / vagkaratzas-review (rubric v7) · claude-opus-5-5

@vagkaratzas vagkaratzas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready!

@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@famosab @vagkaratzas tell is ready... sorry guys for all your times on this.... hope will be helpful.... i'm little obsessed with those thigs ahahah

@Lukecele
Lukecele requested a review from famosab November 6, 2026 15:31
@Lukecele

Lukecele commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @famosab, Evangelos has now formally approved the PR after the line-by-line fixes. All CI checks are green, and all previous review comments have been answered and addressed. GitHub still shows the old CHANGES_REQUESTED state from the earlier review, so could you please take a final look and update your review when convenient? Thank you very much.

@Lukecele

Lukecele commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Hi @vagkaratzas,

Thank you again for your time and review! I have gone through and replied directly to each of the line-by-line review comments:

  • Switched all tests to snapshot(sanitizeOutput(process.out)) with stable content and line count assertions
  • Quoted all stub output paths
  • Updated the process label to process_single
  • Cleaned up the unused stub map

All 71 nf-core lint checks, nf-test 4/4 in CI mode, and Nextflow formatting are 100% green.

Whenever you have a moment, please let me know if anything else is needed for approval. Thank you so much for your guidance!

@famosab famosab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If @vagkaratzas approves I remove my blocking review :)

@Lukecele
Lukecele added this pull request to the merge queue Nov 8, 2026
Merged via the queue into nf-core:master with commit fb8dd13 Nov 8, 2026
31 checks passed
@Lukecele
Lukecele deleted the insitugame branch November 8, 2026 07:31
@Lukecele Lukecele mentioned this pull request Nov 17, 2026
15 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants