torchcell.verification
Record-level verification of built datasets at five levels, L0 to L4. levels holds the reusable checks and common the rules every dataset family shares; each family module (fitness, expression, morphology, metabolite, protein and others) applies them to one phenotype type. report defines the pydantic verification report, sourced binds a single extracted value to its source quote and sha256, and runners runs the verifiers over built datasets.
Classes
The gap census, extended to every carrier and to undeclared |
|
Accumulate the family-agnostic rules over a dataset's records. |
|
How a non-sourced statistic's value was fixed (ordered by preference). |
|
The five universal verification levels (ordered: a gate, not a set). |
|
The outcome of a single L-level check. |
|
Where a dataset's records came from, recorded alongside verification. |
|
How a derived (non-per-record-sourced) statistic was fixed, as data. |
|
Provenance + the L-level results for one dataset. |
|
A hardcoded value plus the provenance that justifies it. |
|
The complement of |
|
WHERE in the provenance chain a value died -- an honest, typed absence. |
|
Aggregate view of the |
Functions
Run every shared rule over a materialized record sequence. |
|
Return the hex sha256 of a file, read in chunks (large artifacts). |
|
Verify a |
|
True if the MinerU library root exists (audits skip when it doesn't). |
|
Tally the |
|
Wrap a census into the L1 |
|
L1 informational census of documented provenance gaps over a phenotype stream. |
|
L0: every raw record validates against its schema model. |
|
L1: observed keys cover the expected oracle set (nothing silently dropped). |
|
L1 variant: an exact record-count oracle (e.g. 4718 mutants + 122 WT). |
|
L2: two independently-derived aligned series agree within |
|
L2: numeric values are finite / in range / non-NaN as required. |
|
L3: a named units/convention assertion (e.g. expression = log2(sample/ref)). |
|
L4: overlapping entities agree across two sources. |
|
Union of all measured genes across records (the L4 cross-source key). |
|
Run the L0-L4 record-level gate for one microarray expression dataset. |
|
Union of systematic gene names deleted across records (the L4 overlap key). |
|
Run the L0-L3 record-level gate for the Ohya2005 CalMorph dataset. |
|
Run the L0-L3 record-level gate for a visual-score dataset. |
|
The host loci a dataset's records name: the L4 gene-universe overlap key. |
|
The host loci a dataset's records name: the L4 gene-universe overlap key. |
|
Run the L0-L3 record-level gate for a metabolite dataset. |
|
Union of screened deleted gene names -- the L4 gene-containment key. |
|
Run the L0-L4 record-level gate for a single-mutant fitness dataset. |