Repository navigation
Generic identifier, table and reference grounders, and the feedback loop - #35
Merged
Merged
Conversation
…ck loop OntologyGrounder, GeneGrounder and VariantGrounder check the ontology terms, gene symbols and HGVS variants a record cites against pinned releases; TableGrounder checks cited rows and values of a pinned table; ReferenceGrounder sends a record that a curated reference contradicts to review. Messages name what to fix. New codes BEV023 (obsolete or superseded identifier), BEV024 (malformed or wrong kind) and BEV025 (reference conflict, review only). feedback.revise runs validate, feedback and revision around any proposer: fixable findings go back as reasons, conflicts and policy decisions go to a person unchanged, and verified evidence is carried through revisions.
Evidence lines are relative to their statement: a revision that states another cell type or the opposite predicate is validated on its own evidence, instead of inheriting stances that meant something else.
'Hepatocytes' names CL:0000182 as well as 'hepatocyte' does; both sides are normalised the same way, so distinct terms stay distinct.
Ontology parses disjoint_from and inherits it through is_a. With conflict="disjoint", ReferenceGrounder reports a supporting marker only when every type the reference lists it for is declared disjoint from the claimed type, so a marker listed for a sibling type is not a conflict.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generic grounders and a generic feedback loop, so what the literature work showed (checks against pinned sources, and an agent that revises after bioevidence rejects its answer) applies to any biological domain. Part of #26. The next PR uses them for a real AI experiment on single-cell cell-type annotation.
Grounders
Each grounder checks what a record cites against a pinned release of a reference, offline and deterministically. Each one's name records the release it used, and every message says what to fix.
OntologyGroundercell_typemust be under CL:0000000).GeneGrounderVariantGrounderTableGroundercluster=3;gene=CD8A): the row exists (the message names the closest keys), and the claimed values match at the precision written.ReferenceGrounderconflict="disjoint", only terms the ontology declares disjoint (inheriteddisjoint_from, e.g. T cell and B cell). Review only, never rejects.New codes:
bioevidence validategains--ontology,--term-root,--genesand--assembly-report.Feedback loop
feedback.revise(propose, validator)wraps any proposer (a model, an agent, a person):Checks
mkdocs build --strict, wheel build and installed-wheel smoke test.ontology: cl/cl-basicwas parsed as the prefixCL/CL-BASIC;Changes after the first push, from trying the grounders on the single-cell case (next PR)
Ontologyparsesdisjoint_from, andReferenceGrounderhasconflict="disjoint". With the default rule, ASCT+B flagged CCL5 cited for an NK T cell, because ASCT+B lists it for cytotoxic T cells, a sibling type. Disjointness restricts conflicts to lineages the Cell Ontology itself declares exclusive. This needs the fullcl.obo:cl-basic.obodrops the axioms.