Skip to content

Preserve gene presence when extending an atlas - #426

Open
nictru wants to merge 1 commit into
devfrom
fix/425-gene-presence
Open

nictru wants to merge 1 commit into
devfrom
fix/425-gene-presence

Conversation

@nictru

@nictru nictru commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Keep a base atlas’s saved gene intersection when scdownstream merges in new samples. Record per-sample feature presence in varm["gene_presence"] and mark incomplete history in uns["gene_presence_complete"].

Fixes #425.

Evidence

  • The regression reproduced the issue on dev: the second merge flagged every gene as shared. It now checks the intersection and the per-sample flags in both saved H5AD outputs.
  • The merge, COMBINE, and gene-subsetting cases passed. nf-test regenerated the affected snapshots.
  • The default end-to-end test passed. The final scVI and Symphony extension H5AD retained the query presence and the legacy intersection.
  • Local nf-core lint reported three logo mismatches. All three also reproduce on clean dev.

Merge risk

The two new AnnData fields are limited to the merged H5AD output. Older bases retain their saved intersection and report incomplete sample history. The output change is reversible by reverting the commit for future runs.

Generated by Codex

PR checklist

  • This comment contains a description of changes and their reason.
  • The bug fix has a regression test.
  • Make sure the pipeline lints in CI.
  • Ensure the full test suite passes.
  • Output documentation is updated.
  • CHANGELOG.md is updated.

@github-actions

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 57c37bf

+| ✅ 335 tests passed       |+
#| ❔   5 tests were ignored |#
#| ❔   1 tests had warnings |#
!| ❗   3 tests had warnings |!
Details

❗ Test warnings:

  • readme - README contains the placeholder zenodo.XXXXXXX. This should be replaced with the zenodo doi (after the first release).
  • pipeline_todos - TODO string in README.md: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file.
  • pipeline_todos - TODO string in CHANGELOG.md: ## v0.0.1dev - [unreleased replace with date on release ]

❔ Tests ignored:

  • files_exist - File is ignored: .github/workflows/linting_comment.yml
  • files_exist - File is ignored: conf/igenomes.config
  • files_exist - File is ignored: conf/igenomes_ignored.config
  • files_unchanged - File ignored due to lint config: .github/workflows/branch.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml

❔ Tests fixed:

✅ Tests passed:

Run details

  • nf-core/tools version 4.2.2
  • Run at 2026-11-25 19:38:33

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.

Gene intersection can expand when extending a merged atlas

1 participant