Enum Class RelationTopicality

java.lang.Object
java.lang.Enum<RelationTopicality>
ubic.gemma.model.common.description.RelationTopicality
All Implemented Interfaces:
Serializable, Comparable<RelationTopicality>, Constable

public enum RelationTopicality extends Enum<RelationTopicality>
Whether a relation says something about the TERM, or records a parameter of an EXPERIMENT.

Every row in AnnotationRelation is a statement a curator or an ontology actually made, so none of them is wrong. But they answer two different questions, and only one of them is what somebody looking at a term wants:

disease model: Alzheimer disease  -- has_genotype -->  APP/PS1      what this disease IS modelled by
female                            -- has_genotype -->  XX           what one experiment's samples WERE

Measured by uib on the term card for female (PATO_0000383): six rows, taller than the definition above them, not one of them actionable. Across ten datasets the split is roughly four rows of experiment bookkeeping for every row of knowledge — delivered for duration 375 and has developmental stage 297, against is disease model for 61 and has disease 31.

🛑 objectBreadth does not catch this and cannot. The junk rows on female carry breadth 1–3 — maximally specific. Breadth separates a topic from a dose; it says nothing about whether a relation is about the term you are looking at. Two orthogonal filters.

Classified per ROW, not per predicate, because two predicates genuinely do both jobs:

  • GENO_0000222 has_genotype is knowledge when the subject is a disease, disease model, cell line, genotype or strain, and a sample's sex when the subject is female. Same predicate; the subject decides.
  • RO_0001000 derives from covers amplified total RNA -> total RNA (bookkeeping) and cell line -> female donor (provenance). A predicate allow-list has to drop both to be safe, which loses the second.
  • TGEMO_00171 induced by is a disease model when the subject is a disease and a differentiation protocol when the subject is a cell type — Parkinson disease --induced by--> MPTP versus lower motor neuron --induced by--> iPSC line. Same predicate, opposite meanings; the subject decides.

Nothing is dropped from the store. This is a read-time reading of two columns the row already carries, so the table stays the general thing it was built as and a caller can always ask for everything. It is computed rather than stored precisely because the rule is new: changing it is a deploy, not a migration and a re-harvest.

  • Enum Constant Details

    • TERM_LEVEL

      public static final RelationTopicality TERM_LEVEL
      The relation says what the subject term IS or where it came from: a disease it models, the patient it derives from, the tissue or organism it came from, the role a compound plays.
    • EXPERIMENT_LEVEL

      public static final RelationTopicality EXPERIMENT_LEVEL
      The relation records how one experiment was run: a dose, a duration, a developmental stage, a sample's sex. Real curation, correctly stored, and a fact about the experiment rather than about the term — so it does not belong on a term card and cannot imply an annotation.
  • Method Details

    • values

      public static RelationTopicality[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RelationTopicality valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getQuantityValuedPredicateUris

      public static Set<String> getQuantityValuedPredicateUris()
      See Also:
      • QUANTITY_VALUED_URIS
    • getQuantityValuedPredicateLabels

      public static Set<String> getQuantityValuedPredicateLabels()
      See Also:
      • QUANTITY_VALUED_LABELS
    • isQuantityValued

      public static boolean isQuantityValued(@Nullable String predicateUri, @Nullable String predicate)
      Whether a relation with this predicate relates two concepts at all.

      Either end identifies it: a row carrying the URI is caught by the URI, and a row carrying only a label is caught by the label.

    • of

      public static RelationTopicality of(@Nullable String predicateUri, @Nullable String subjectCategoryUri)
      Classify one row.

      Unknown predicates are EXPERIMENT_LEVEL. That is deliberate and is the opposite of how the harvest works: the harvest is predicate-agnostic so nothing is lost from the store, and this default is closed so nothing unvetted reaches a term card. A predicate that deserves promotion gets named here, which is one edit in one place rather than in each client.

      RO_0002200 has phenotype is deliberately NOT term-level despite reading like it — uib sampled it and found precursor cell -> astrocyte and 17 d -> neuron, which is differentiation bookkeeping. It is the sort of predicate a reader would allow-list on the name alone.

    • of

      public static RelationTopicality of(@Nullable String predicateUri, @Nullable String subjectCategoryUri, @Nullable String subjectValueUri)
      Parameters:
      subjectValueUri - the subject term's own URI, which names what it IS when the curated category disagrees — see denotesADiseaseOrPhenotype(String)
    • denotesADiseaseOrPhenotype

      public static boolean denotesADiseaseOrPhenotype(@Nullable String termUri)
      Whether a term URI names a disease or phenotype by virtue of the vocabulary it belongs to.
      See Also:
      • DISEASE_LOCAL_NAME_PREFIXES
    • subjectIsADisease

      public static boolean subjectIsADisease(@Nullable String subjectCategoryUri, @Nullable String subjectValueUri)
      Whether this row's subject is a disease, by either signal.
      See Also: