torchcell.verification.SharedRecordRules

class SharedRecordRules(*, background_genes: frozenset[str] = frozenset({}), resolve_gene_name: Callable[[str], GeneNameResolution] | None = None, sgd_genes: set[str] | None = None, gene_universe_label: str = 'reference', min_containment: float = 0.9)[source]

Bases: object

Accumulate the family-agnostic rules over a dataset’s records.

One instance consumes the records of ONE dataset (add per record, results at the end), so the eager and streaming verifiers run identical rules with identical messages. sgd_genes is optional: when it is given the L4 gene rules are emitted here; when it is not, the caller owns L4 (the segregant verifier derives its gene set from the genome, not from perturbations).

add(record: Mapping[str, Any]) → None[source]

Fold one stored {"experiment": ..., "reference": ...} record in.

add_all(records: Iterable[Mapping[str, Any]]) → None[source]

Fold a sequence of records in (the eager verifiers’ entrypoint).

results() → list[LevelResult][source]

Every shared level result, in level order.

census() → CarrierGapCensus[source]

The finished gap + silent-None census.