Add Zarr support to scanpy/pca#11697
Conversation
|
Follow-up pushed in 774206f. This addresses the local/CI issues I could reproduce: |
774206f to
71bbc5a
Compare
|
Update: rebased this PR onto current |
SPPearce
left a comment
There was a problem hiding this comment.
You seem to have some files in the tests folder that aren't required.
Is there a zarr file that we could test on? But from the test-datasets.
71bbc5a to
e349fc3
Compare
|
Moved the Zarr fixture out of the module tests directory and updated the tests to use Prerequisite test-data PR: nf-core/test-datasets#2076. I validated the module tests locally against that forked test-data branch; the official test-data URL will work once that PR is merged. |
|
Can I suggest that you go to the #github-invitations in the nf-core slack, you can be added to the organisation so the tests run. |
|
I requested access in the nf-core Slack |
| tuple val(meta), path("*.h5ad") , emit: h5ad | ||
| tuple val(meta), path("*.h5ad") , optional: true, emit: h5ad | ||
| tuple val(meta), path("X_*.pkl"), emit: obsm | ||
| path "versions.yml" , emit: versions | ||
| path "versions.yml" , emit: versions, topic: versions | ||
| tuple val(meta), path("*.zarr") , optional: true, emit: zarr |
| adata = sc.read_h5ad("${h5ad}") | ||
| input_file = "${h5ad}" | ||
| output_file = "${output_file}" | ||
| adata = ad.read_zarr(input_file) if input_file.endswith(".zarr") else sc.read_h5ad(input_file) |
There was a problem hiding this comment.
Please keep the logic structure consistent with #11756
PR checklist
Part of #11559
This PR adds Zarr input/output support to
scanpy/pcaas a first scverse module slice.Changes:
.zarrinputs and emit a matching.zarrAnnData output directory..h5adbehavior for.h5adinputs.zarras an optional output channel and document it inmeta.yml.versions.ymlontopic: versions.scanpyin the stub version command by usingimportlib.metadata.version("scanpy").Validation run locally on 2026-05-19:
conda run -n nfcore-topic nf-core modules lint scanpy/pca --local --plain-textconda 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 --verboseconda run -n nfcore-topic nf-test test modules/nf-core/scanpy/pca/tests/main.nf.test --profile conda --filter process --verbosegit diff --checkThis 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_topicsFollow the naming conventions.
Follow the parameters requirements.
Follow the input/output options guidelines.
Add a resource
labelUse 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:
nf-core modules test scanpy/pca --profile dockernf-core modules test scanpy/pca --profile singularitynf-core modules test scanpy/pca --profile conda