Analysis: an#
Downstream statistical analysis library. Pure functions with no project-specific knowledge, organised into four subpackages by role:
Subpackage |
Input |
Output |
|---|---|---|
|
numpy arrays / DataFrames |
arrays / dicts (no I/O) |
|
results + |
figure written to disk |
|
obs or var DataFrame |
boolean |
|
none (static) |
configuration dicts |
Compute#
Pure statistical compute functions. No AnnData dependency (except ep_classification).
autocorrelation.py — NaN-aware binary autocorrelation over irregularly spaced positions. |
|
NaN-aware position × position Pearson correlation matrices. |
|
Interval extraction from binary HMM feature layers. |
|
Enhancer/promoter NDR state classification per read. |
|
ls_periodicity.py — Lomb-Scargle periodogram utilities for nucleosome analysis. |
|
dimensionality_reduction.py — PCA → UMAP → KNN → Leiden pipeline for per-read matrices. |
|
metrics_store.py — Per-run Zarr store for computed per-read analysis metrics. |
|
Matrix-level helpers for 1D CNN binary classifiers. |
|
Matrix-level helpers for binary classifier fitting and evaluation. |
|
Matrix/table-level split helpers for machine-learning evaluation. |
|
Reader/writer utilities for the per-read modification matrix cache. |
Plot#
Figure rendering. Accepts results and an explicit output_path; writes a figure to disk.
heatmaps.py — Pearson correlation and covariance heatmap rendering. |
|
histograms.py — Interval distribution histograms with rolling mean, peak calling, and optional Gaussian fit overlay. |
|
autocorr.py — ACF overlay, LS periodogram, paired barplot, and metric histogram rendering. |
|
embeddings.py — Scatter and density plots for 2D embeddings (PCA/UMAP). |
|
locus.py — Locus map rendering for SMF accessibility data. |
|
Generic plotting helpers for binary classifier evaluation. |
Filters#
Boolean mask builders for obs-level and var-level (position) selection.
Composable obs-level filters for AnnData. |
|
position_filters.py — Genomic position selection from AnnData var coordinates. |
Config#
Static configuration objects; no runtime inputs.
Per-feature-type binning, rolling-mean, and peak-calling config for HMM feature histograms. |