Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in background signature estimation #317

Merged
merged 3 commits into from
Mar 27, 2025
Merged

Bug fix in background signature estimation #317

merged 3 commits into from
Mar 27, 2025

Conversation

yihming
Copy link
Member

@yihming yihming commented Mar 27, 2025

Issue

When estimating background signature given a sparse count matrix, in pegasus.cylib.calc_sig_background_sparse function, the calculation ignores zero entries of the matrix, while their centered expression should be considered because the gene mean expressions are likely non-zero.

However, if given a dense count matrix, the calculation does not have this issue since it uses a different Cython function pegasus.cylib.calc_sig_background_dense.

Solution

Include all entries during the calculation, with tricks to speed up.

Other improvement

Add standardize parameter to calc_signature_score function to allow return non-standardized signature scores. By default, standardize the scores.

@yihming yihming merged commit 5f56dad into master Mar 27, 2025
5 checks passed
@yihming yihming deleted the fix-sig-score branch March 27, 2025 18:32
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