Add rapid IVCSR filter/normalize loader - #3
Merged
Merged
Conversation
Reproduces parafac2.normalize.prepare_dataset (min-count cell/gene filtering, per-cell depth normalization, log10 transform) directly against the on-disk VCSR/IVCSR layout instead of through AnnData's generic read + fancy-indexing path. Cell filtering needs no decode: a VCSR row's total is derivable from major_ptr/values/value_ptr alone. Gene filtering and normalization require every nonzero to be visited, so indices are decoded once (via the existing parallel decoder) and the filter/compact/normalize tail runs as fused numba passes rather than scipy's per-step, single- threaded, temp-array-heavy pipeline. On a 1.94M x 27K-gene / 3.3B-nonzero dataset this completes in ~17s at ~53GB peak RSS. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8AcDah6zjdbJdGGYuMCQS
…romotion in load_and_normalize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a rapid IVCSR filter and normalization loader (
load_filtered_normalized_ivcsr).Summary of Changes
main.