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 +72 -0
- pbcheck/__main__.py +10 -0
- pbcheck/audit.py +1223 -0
- pbcheck/audit_schema.py +755 -0
- pbcheck/census_select.py +1084 -0
- pbcheck/cli.py +257 -0
- pbcheck/design.py +184 -0
- pbcheck/example.py +120 -0
- pbcheck/gate_config.py +210 -0
- pbcheck/gene_universe.py +74 -0
- pbcheck/io_counts.py +1483 -0
- pbcheck/methods/__init__.py +12 -0
- pbcheck/methods/de.py +50 -0
- pbcheck/methods/moderated.py +410 -0
- pbcheck/methods/naive.py +86 -0
- pbcheck/methods/naive_engine.py +434 -0
- pbcheck/methods/pseudobulk.py +254 -0
- pbcheck/metrics.py +217 -0
- pbcheck/mtc.py +151 -0
- pbcheck/permutation.py +358 -0
- pbcheck/product_constants.py +24 -0
- pbcheck/render/__init__.py +74 -0
- pbcheck/render/html.py +89 -0
- pbcheck/render/markdown.py +61 -0
- pbcheck/render/sections.py +682 -0
- pbcheck/render/text.py +550 -0
- pbcheck-0.1.0.dist-info/METADATA +345 -0
- pbcheck-0.1.0.dist-info/RECORD +31 -0
- pbcheck-0.1.0.dist-info/WHEEL +4 -0
- pbcheck-0.1.0.dist-info/entry_points.txt +2 -0
- pbcheck-0.1.0.dist-info/licenses/LICENSE +28 -0
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
|
+
]
|