Class AnnotationRelationHarvestTest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseDatabaseTest5
ubic.gemma.persistence.service.maintenance.AnnotationRelationHarvestTest

public class AnnotationRelationHarvestTest extends BaseDatabaseTest5
The CURATED harvest: EE2C rows that already carry a predicate and an object become queryable relations.

Driven from EE2C rows directly rather than from the EE2C rebuild, because the harvest's contract is exactly "an EE2C row with a predicate in, a relation out" — running the rebuild first would test that instead, and its correctness is not what is in question here.

Nothing in this is an inference. The curator wrote the triple; all that was missing was an index that can be read from the object end.

  • Constructor Details

    • AnnotationRelationHarvestTest

      public AnnotationRelationHarvestTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
    • testACuratedStatementIsNotHarvestedIntoARelation

      @Test public void testACuratedStatementIsNotHarvestedIntoARelation()
      🛑 The rule, and the reason this class no longer tests a harvest: a curated statement does NOT become a relation.

      The harvest keyed each statement by the TERM, so what a curator wrote about one experiment's material came back as a property of that term on every other experiment using it. Experiment 24976 -- mouse EAE astrocytes under fingolimod -- showed three such chips, none true of it, each traceable to a single unrelated experiment. Filtering did not rescue it: 15,007 of ~18,000 curated triples on prod were attested by one experiment, and the recurring ones were common curation patterns rather than truths. Paul ruled the harvest out on 2026-08-28.

      This goes red the moment the insert is restored, which is the point.

    • testARunRemovesCuratedRowsAndLeavesEveryOtherBasis

      @Test public void testARunRemovesCuratedRowsAndLeavesEveryOtherBasis()
      A run still REMOVES the curated rows already in the table -- that is how the ones harvested before the rule changed leave -- and the ONTOLOGY row beside it is the control: the delete is scoped to CURATED and is not a table wipe. Without that second row a delete of everything would pass just as well.