Skip to content

new module: insitugame - #13471

Open
Lukecele wants to merge 8 commits into
nf-core:masterfrom
Lukecele:insitugame
Open

Lukecele wants to merge 8 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 new module insitugame to nf-core/modules.

insitugame is a computational oncology assay for inferring tumor subclonal payoff matrices, resolving Nash coexistence equilibria, and evaluating adaptive therapy regimens directly from intact spatial transcriptomics data (10x Genomics Visium, CytAssist, and spatial coordinates).

Verification & Compliance

  • Built using official nf-core modules create templating (nf-core/tools v4.1.0).
  • Linting: Passed all 59/59 tests with 0 warnings and 0 errors (nf-core modules lint insitugame).
  • Testing: Both regular and -stub test suites pass via nf-test test modules/nf-core/insitugame/tests/main.nf.test with recorded snapshots.
  • Software availability: Official Bioconda recipe merged and published (bioconda::insitugame=1.0.6). BioContainers image publication is pending (see comment below).

Checklist

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

@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 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?

@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

'Resistant': resistant,
'Stroma': stroma
}
assay = InSituGameAssay(gene_spec)
Comment thread modules/nf-core/insitugame/meta.yml Outdated
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.

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.

3 participants