Class AnnotationRelationDao.RelationSummary
- Enclosing interface:
AnnotationRelationDao
One summary per (triple, basis), and deliberately not merged across bases.
Merging would require deciding that two bases naming different terms mean the same thing, and
they routinely do while naming different terms: MONDO's germline axiom for SURF1 points at
MONDO:0700250 (mitochondrial complex IV deficiency, nuclear type 1) where the curator
wrote MONDO:0009723 (Leigh syndrome). Those two share no xref, sit in different
branches, and neither subsumes the other - the ontology is modelling the molecular diagnosis and
the curator the clinical syndrome. Both are correct. A merge keyed on term identity would call
that a disagreement; a merge keyed on anything looser would invent an equivalence nobody
asserted. So the rows come back side by side and the caller sees both framings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionRelationSummary(String subjectValue, String subjectValueUri, String subjectCategory, String subjectCategoryUri, String predicate, String predicateUri, String objectValue, String objectValueUri, String objectCategory, String objectCategoryUri, Long taxonId, String taxonCommonName, Integer taxonNcbiId, AnnotationRelationBasis basis, AnnotationRelationStatus status, String source, String sourceVersion, long numberOfExperiments, long numberOfExperimentsAtFactorValue, long numberOfExperimentsAtTag, long numberOfExperimentsAtBioMaterial, Long exampleExperimentId, long numberOfExperimentsWithSubject, long objectBreadth, long subjectBreadth, String evidence) 🛑 Build one withbuilder(), not with this. Twenty-six positional arguments, a dozen of themlongand most of the restString, is a constructor where a transposition compiles and passes — and adding a field to it broke a stale test class three times in one day, because Maven does not recompile a test whose source has not changed and the mismatch therefore arrives at runtime asNoSuchMethodErrorrather than at compile time. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()getBasis()The claim this relation licenses, as a triple in its own right — not the stored row read backwards.Identity of the CLAIM this row licenses, as opposed togetTripleKey(), which is the identity of the row as stored.Which end of this relation licenses an inference about the other.longlonglonglonglonglongdoublegetScore()Ranking score, highest first: the basis rank dominates, and support x specificity orders within a basis.doubleThe fraction of the subject's experiments this object accounts for, or0when there is no denominator to divide by.longWhether this relation says something about the subject TERM, or records a parameter of one experiment.
-
Constructor Details
-
RelationSummary
public RelationSummary(String subjectValue, @Nullable String subjectValueUri, @Nullable String subjectCategory, @Nullable String subjectCategoryUri, @Nullable String predicate, @Nullable String predicateUri, String objectValue, @Nullable String objectValueUri, @Nullable String objectCategory, @Nullable String objectCategoryUri, @Nullable Long taxonId, @Nullable String taxonCommonName, @Nullable Integer taxonNcbiId, AnnotationRelationBasis basis, AnnotationRelationStatus status, @Nullable String source, @Nullable String sourceVersion, long numberOfExperiments, long numberOfExperimentsAtFactorValue, long numberOfExperimentsAtTag, long numberOfExperimentsAtBioMaterial, @Nullable Long exampleExperimentId, long numberOfExperimentsWithSubject, long objectBreadth, long subjectBreadth, @Nullable String evidence) 🛑 Build one withbuilder(), not with this. Twenty-six positional arguments, a dozen of themlongand most of the restString, is a constructor where a transposition compiles and passes — and adding a field to it broke a stale test class three times in one day, because Maven does not recompile a test whose source has not changed and the mismatch therefore arrives at runtime asNoSuchMethodErrorrather than at compile time.With a builder an added field is additive: existing callers keep compiling AND keep meaning what they meant, and the new field simply defaults.
-
-
Method Details
-
getSpecificity
public double getSpecificity()The fraction of the subject's experiments this object accounts for, or0when there is no denominator to divide by.This is what separates a real relation from a background co-occurrence, and support on its own cannot.
Abca4null is annotated retinal degeneration nearly every time it appears;C57BL/6Jappears against obesity a handful of times out of many hundreds of experiments, and against hundreds of other diseases besides. Ranking on raw support puts the background strain on top of every disease in the corpus - the obesity is diet-induced, the stroke surgical, the Burkitt lymphoma belongs to the cell line. The same measure demotes the drug-versus-model confusion with no special case, since a drug tested against everything has low specificity against any one thing. -
getScore
public double getScore()Ranking score, highest first: the basis rank dominates, and support x specificity orders within a basis.The basis dominating is the point - an assertion outranks any amount of co-occurrence. A score alone is never enough to act on, which is why the basis, the counts and the denominator all stay on the row for a client to apply its own bar to.
-
getSubjectValue
-
getSubjectValueUri
-
getSubjectCategory
-
getSubjectCategoryUri
-
getPredicate
-
getPredicateUri
-
getObjectValue
-
getObjectValueUri
-
getObjectCategory
-
getObjectCategoryUri
-
getTaxonId
-
getTaxonCommonName
-
getTaxonNcbiId
-
getBasis
-
getStatus
-
getSource
-
getSourceVersion
-
getNumberOfExperiments
public long getNumberOfExperiments() -
getNumberOfExperimentsAtFactorValue
public long getNumberOfExperimentsAtFactorValue() -
getNumberOfExperimentsAtTag
public long getNumberOfExperimentsAtTag() -
getNumberOfExperimentsAtBioMaterial
public long getNumberOfExperimentsAtBioMaterial() -
getExampleExperimentId
-
getNumberOfExperimentsWithSubject
public long getNumberOfExperimentsWithSubject() -
getObjectBreadth
public long getObjectBreadth() -
getSubjectBreadth
public long getSubjectBreadth()- See Also:
-
getEvidence
- See Also:
-
getTopicality
Whether this relation says something about the subject TERM, or records a parameter of one experiment. SeeRelationTopicality. -
getInferenceDirection
Which end of this relation licenses an inference about the other. A relation is readable from both ends and inferable from only one — seeRelationInferenceDirection. -
getImpliedSubject
The claim this relation licenses, as a triple in its own right — not the stored row read backwards.Gemma stores
Alzheimer disease --has_genotype--> APP/PS1, but the fact that follows from it is "APP/PS1 is a disease model of Alzheimer's": different ends, and a different verb. A consumer handed only the stored row has to invert it and choose a verb itself, and three consumers will choose three.Taxon picks the verb, which is the rule the design settled on and the reason
RO_0003301 has role in modelingwas added to the vocabulary. A mouse carryingAPP/PS1models Alzheimer disease; a human line carryingLRRK2 G2019Sis not modelling Parkinson disease, it has it. Unknown taxon falls tohas role in modeling, the weaker of the two claims, rather than being guessed at.Null when
getInferenceDirection()isRelationInferenceDirection.NEITHER— nothing is implied, so there is no claim to phrase. -
getImpliedSubjectUri
-
getImpliedObject
-
getImpliedObjectUri
-
getImpliedPredicateUri
- See Also:
-
getImpliedPredicate
-
getImpliedTripleKey
Identity of the CLAIM this row licenses, as opposed togetTripleKey(), which is the identity of the row as stored. Null when the row licenses nothing.🛑 Two different stored relations routinely derive one claim, and
tripleKeycannot see it. uib measured it on theBRCA1card, 2026-08-18:BRCA1 --has disease--> breast cancer tripleKey …/672 RO_0016002 …/MONDO_0007254 breast cancer --has_genotype--> BRCA1 tripleKey …/MONDO_0007254 GENO_0000222 …/672
Two keys, one claim —
BRCA1 — has disease → breast cancer— rendered twice, word for word.tripleKeygroups the side-by-side rows ONE relation produces across bases, which is a different shape from two relations converging on one claim, so a consumer reaching for it to deduplicate a card gets a duplicate anyway. Dedup belongs at the level the reader actually sees, which is the claim.It correctly keeps apart claims whose verb differs: the same genotype relation on a mouse implies
has role in modelingand on a human linehas disease, and those are two claims rather than one rendered twice. -
getTripleKey
-
builder
-