torchcell.verification.provenance_gap_census

provenance_gap_census(phenotypes: Iterable[Mapping[str, Any]]) → ProvenanceGapCensus[source]

Tally the provenance_gaps carried by a stream of phenotype records.

Accepts phenotype MAPPINGS (the JSON dicts a built LMDB yields), reading phenotype["provenance_gaps"] (absent/empty -> no gaps). Single-pass and memory-light: keeps only counters + the distinct deferred worklist fields, so it scales to a streaming verifier over a large dataset.