torchcell.verification.verify_metabolite_dataset

verify_metabolite_dataset(records: Sequence[dict[str, Any]], *, dataset_name: str, provenance: Provenance, expected_count: int, reference_centered: bool = True, protocol_measurement_types: frozenset[str] | None = None, environment_keyed: bool = False, allow_duplicate_strains: bool = False) → VerificationReport[source]

Run the L0-L3 record-level gate for a metabolite dataset.

reference_centered (default True): assert the reference level is identically 0, for population-CENTERED scores (Cachera CRI-SPA). Set False for ABSOLUTE-quantity datasets (Mulleder amino-acid concentrations), where the reference is a WT-equivalent baseline and is instead checked for finiteness + key-consistency.

protocol_measurement_types (default None): the declared measurement_types of a dataset released under several protocols on different scales (one record per strain per protocol). When set, L1 uniqueness keys on (strain, protocol) and L3 requires each record’s type to be declared and its reference to share it.

environment_keyed (default False): set for a dataset that varies the ENVIRONMENT at a fixed genotype, where one strain legitimately appears in several records (Ishii 2007’s wild type at four chemostat dilution rates). L1 uniqueness then keys on (strain, environment).

allow_duplicate_strains (default False): set for a release whose rows of one strain carry no key that tells them apart (Cooper 2010’s replicate rows); every row is a record and L1 uniqueness reports the collisions as a finding.

L4 (cross-source gene overlap with the deletion collection) is asserted by the caller across datasets.