Skip to content

Feat/macs3/anndata 3methods#727

Merged
taoliu merged 8 commits intomainfrom
feat/macs3/anndata_3methods
Apr 2, 2026
Merged

Feat/macs3/anndata 3methods#727
taoliu merged 8 commits intomainfrom
feat/macs3/anndata_3methods

Conversation

@taoliu
Copy link
Copy Markdown
Contributor

@taoliu taoliu commented Mar 27, 2026

Implemented PETrackII.return_anndata to use a single non-overlapping sweep method. The method now copies and merges input regions once, then builds the barcode × peak matrix with a vectorized two-pointer/searchsorted approach over cached NumPy start/end/count arrays, using dense barcode-to-row indexing and chunked CSR assembly.

This is faster because the method no longer spends time in Python-level per-overlap branching and repeated structured-array field access. Instead, it computes overlap ranges in bulk with np.searchsorted, expands only the required triplets with NumPy operations, and constructs the sparse matrix directly from contiguous integer buffers.

@taoliu taoliu added the v3.0.5 label Mar 28, 2026
@taoliu taoliu merged commit 2c57cbf into main Apr 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants