Skip to content

Add rapid IVCSR filter/normalize loader - #3

Merged
aarmey merged 4 commits into
mainfrom
rapid-load
Aug 23, 2026
Merged

Add rapid IVCSR filter/normalize loader#3
aarmey merged 4 commits into
mainfrom
rapid-load

Conversation

@aarmey

@aarmey aarmey commented Aug 23, 2026

Copy link
Copy Markdown
Member

This PR introduces a rapid IVCSR filter and normalization loader (load_filtered_normalized_ivcsr).

Summary of Changes

  • Adds fast filtering and normalization tailored for on-disk VCSR/IVCSR formats.
  • Implements fused Numba passes for index compacting, gene/cell count filtering, total count normalization, and log10 transformation.
  • Merged latest changes from main.
  • Includes unit tests covering filtering, normalization, and AnnData reconstruction.

aarmey and others added 4 commits August 13, 2026 08:33
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
@aarmey
aarmey merged commit 2fd336a into main Aug 23, 2026
@aarmey
aarmey deleted the rapid-load branch August 23, 2026 04:27
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