Skip to content

Add Zarr support to scanpy/pca#11697

Open
ehsanestaji wants to merge 2 commits into
nf-core:masterfrom
ehsanestaji:scverse-zarr-scanpy-pca
Open

Add Zarr support to scanpy/pca#11697
ehsanestaji wants to merge 2 commits into
nf-core:masterfrom
ehsanestaji:scverse-zarr-scanpy-pca

Conversation

@ehsanestaji
Copy link
Copy Markdown
Contributor

@ehsanestaji ehsanestaji commented May 19, 2026

PR checklist

Part of #11559

This PR adds Zarr input/output support to scanpy/pca as a first scverse module slice.

Changes:

  • Detect .zarr inputs and emit a matching .zarr AnnData output directory.
  • Preserve existing .h5ad behavior for .h5ad inputs.
  • Add zarr as an optional output channel and document it in meta.yml.
  • Add a small AnnData Zarr fixture plus stub and real Zarr tests.
  • Broadcast versions.yml on topic: versions.
  • Avoid importing scanpy in the stub version command by using importlib.metadata.version("scanpy").

Validation run locally on 2026-05-19:

  • conda run -n nfcore-topic nf-core modules lint scanpy/pca --local --plain-text

  • conda run -n nfcore-topic prek run --files $(git diff --name-only)

  • conda run -n nfcore-topic nf-test test modules/nf-core/scanpy/pca/tests/main.nf.test --profile docker --filter process --verbose

  • conda run -n nfcore-topic nf-test test modules/nf-core/scanpy/pca/tests/main.nf.test --profile conda --filter process --verbose

  • git diff --check

  • This comment contains a description of changes (with reason).

  • If you've fixed a bug or added code that should be tested, add tests!

  • If you've added a new tool - have you followed the module conventions in the contribution docs

  • If necessary, include test data in your PR.

  • Remove all TODO statements.

  • Broadcast software version numbers to topic: versions - See version_topics

  • Follow the naming conventions.

  • Follow the parameters requirements.

  • Follow the input/output options guidelines.

  • Add a resource label

  • Use BioConda and BioContainers if possible to fulfil software requirements.

  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:

    • For modules:
      • nf-core modules test scanpy/pca --profile docker
      • nf-core modules test scanpy/pca --profile singularity
      • nf-core modules test scanpy/pca --profile conda

@ehsanestaji
Copy link
Copy Markdown
Contributor Author

Follow-up pushed in 774206f. This addresses the local/CI issues I could reproduce: versions.yml now broadcasts to topic: versions, the Zarr fixture metadata files have final newlines for pre-commit, and the h5ad test now checks output presence/content instead of MD5 snapshots that differ across runtimes.\n\nLocal validation passed on 2026-05-19:\n- conda run -n nfcore-topic nf-core modules lint scanpy/pca --local --plain-text\n- conda run -n nfcore-topic prek run --files $(git diff --name-only)\n- conda run -n nfcore-topic nf-test test modules/nf-core/scanpy/pca/tests/main.nf.test --profile docker --filter process --verbose\n- conda run -n nfcore-topic nf-test test modules/nf-core/scanpy/pca/tests/main.nf.test --profile conda --filter process --verbose\n- git diff --check\n\nThe GitHub workflow runs for this new commit currently show action_required before jobs start, so a maintainer may need to approve them when convenient.

@ehsanestaji ehsanestaji force-pushed the scverse-zarr-scanpy-pca branch from 774206f to 71bbc5a Compare May 19, 2026 21:51
@ehsanestaji ehsanestaji marked this pull request as ready for review May 19, 2026 21:52
@ehsanestaji
Copy link
Copy Markdown
Contributor Author

Update: rebased this PR onto current nf-core/modules:master and marked it ready for review. Latest head is 71bbc5a11.\n\nFresh local validation after the rebase:\n- conda run -n nfcore-topic nf-core modules lint scanpy/pca --local --plain-text\n- conda run -n nfcore-topic prek run --files $(git diff --name-only upstream/master...HEAD)\n- conda run -n nfcore-topic nf-test test modules/nf-core/scanpy/pca/tests/main.nf.test --profile docker --filter process --verbose\n- git diff --check\n\nThe GitHub workflows are still awaiting maintainer approval before they can run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant