pbcheck 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pbcheck/__init__.py ADDED
@@ -0,0 +1,72 @@
1
+ """pbcheck - an auditor of pseudoreplication in single-cell RNA-seq differential expression.
2
+
3
+ Phase 0 (pilot): v0.1.0 ships the single-stratum audit (``pbcheck.audit``), its Markdown/HTML
4
+ report (``pbcheck.render``) and the ``pbcheck`` CLI, all outside the Phase 0 protocol. The
5
+ Phase 0 real-data harness (``controls``, ``decision``, the spec section 9 ``report``) is
6
+ specified but not built; no ``risk_score`` exists and none is promised (see README's "What
7
+ exists, and what does not"). ``pbcheck.census_select`` and ``pbcheck.io_counts`` are built but
8
+ not re-exported here: their output is CANDIDATES ONLY, not an admission, and not the section 1
9
+ pre-registration of the stratum list. No ``py.typed`` marker: annotation coverage across the
10
+ package is uneven and a deliberate call, not an oversight.
11
+ """
12
+
13
+ __version__ = "0.1.0"
14
+
15
+ from pbcheck.audit import AuditInputError, AuditSettings, audit_h5ad, run_audit
16
+ from pbcheck.design import DesignReport, audit_design
17
+ from pbcheck.example import example_adata
18
+ from pbcheck.gene_universe import UniverseTooSmall, frozen_universe
19
+ from pbcheck.methods import ebayes_from_pdata, naive_de, pseudobulk_de
20
+ from pbcheck.metrics import (
21
+ BH_PAIRED,
22
+ BH_SOLO,
23
+ NDegSeries,
24
+ empirical_perm_pvalues,
25
+ genomic_inflation,
26
+ jaccard,
27
+ lambda_over_permutations,
28
+ perm_floor,
29
+ signal_above_floor,
30
+ )
31
+ from pbcheck.mtc import PairedBH, bh_both_arms, bh_over_universe
32
+ from pbcheck.permutation import build_perms, labels_for, run_null
33
+
34
+ __all__ = [
35
+ "__version__",
36
+ # audit.py - the single-stratum audit orchestration
37
+ "AuditSettings",
38
+ "AuditInputError",
39
+ "run_audit",
40
+ "audit_h5ad",
41
+ # example.py - the offline quickstart generator
42
+ "example_adata",
43
+ # design.py - the metadata-only auditor
44
+ "audit_design",
45
+ "DesignReport",
46
+ # gene_universe.py — the frozen, label-agnostic universe both arms share
47
+ "frozen_universe",
48
+ "UniverseTooSmall",
49
+ # permutation.py — the donor-permutation null
50
+ "run_null",
51
+ "build_perms",
52
+ "labels_for",
53
+ # metrics.py — the inflation metrics (spec section 6)
54
+ "genomic_inflation",
55
+ "lambda_over_permutations",
56
+ "empirical_perm_pvalues",
57
+ "perm_floor",
58
+ "signal_above_floor",
59
+ "jaccard",
60
+ # ...and the labelled #DEG series, so the two BH conventions cannot be pooled by accident
61
+ "NDegSeries",
62
+ "BH_PAIRED",
63
+ "BH_SOLO",
64
+ # mtc.py — the shared BH correction (spec section 5)
65
+ "bh_both_arms",
66
+ "PairedBH",
67
+ "bh_over_universe",
68
+ # methods — the naive arm and the current (moderated eBayes) pseudobulk arm
69
+ "naive_de",
70
+ "ebayes_from_pdata",
71
+ "pseudobulk_de",
72
+ ]
pbcheck/__main__.py ADDED
@@ -0,0 +1,10 @@
1
+ """``python -m pbcheck``: the same entry point as the ``pbcheck`` console script."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from pbcheck.cli import main
8
+
9
+ if __name__ == "__main__":
10
+ sys.exit(main())