Skip to content

Ensure that additional adata columns are not removed in the denoise step#307

Merged
ptajvar merged 4 commits intodevfrom
fix/PNA-2075-keep-old-adata-columns
Feb 18, 2026
Merged

Ensure that additional adata columns are not removed in the denoise step#307
ptajvar merged 4 commits intodevfrom
fix/PNA-2075-keep-old-adata-columns

Conversation

@ptajvar
Copy link
Contributor

@ptajvar ptajvar commented Feb 17, 2026

Information added to adata are removed in the denoise step. This happens because marker adata is recalculated since denoising changes marker counts for each component and some of the statistics should be recalculated. The fix is to add back any columns that are missing in the new adata from the old adata.

Fixes: #PNA-2075

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

We now add a dummy column before denoising and check if it still exists after denoising.

PR checklist:

  • This comment contains a description of changes (with reason).
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • If a new tool or package is included, I have updated dependencies in pyproject.toml and cited it properly
  • I have checked my code and documentation and corrected any misspellings
  • I have documented any significant changes to the code in CHANGELOG.md

Copy link
Contributor

@johandahlberg johandahlberg left a comment

Choose a reason for hiding this comment

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

See my inline comment. Lets fix that and then merge this.

@ptajvar ptajvar merged commit fef176d into dev Feb 18, 2026
15 checks passed
@ptajvar ptajvar deleted the fix/PNA-2075-keep-old-adata-columns branch February 18, 2026 14:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments