Class TableMaintenanceUtilImpl
- All Implemented Interfaces:
TableMaintenanceUtil
- Author:
- jsantos, paul
-
Field Summary
Fields inherited from interface TableMaintenanceUtil
EE2AD_QUERY_SPACE, EE2C_QUERY_SPACE, GENE2CS_BATCH_SIZE, GENE2CS_QUERY_SPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFor use in tests.voidEvict the query cache for theANNOTATION_RELATIONtable.voidEvict the query cache for theEXPRESSION_EXPERIMENT2_ARRAY_DESIGNtable.voidEvict the query cache for theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.voidEvict the query cache for theGENE2CStable.intRemoves the CURATED rows.intupdateExpressionExperiment2ArrayDesignEntries(Date sinceLastUpdate, boolean truncate) Update theEXPRESSION_EXPERIMENT2_ARRAY_DESIGNtable.intintupdateExpressionExperiment2CharacteristicEntries(Class<?> level, Date sinceLastUpdate, boolean truncate) Update a specific level of theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.intupdateExpressionExperiment2CharacteristicEntries(Date sinceLastUpdate, boolean truncate) Update theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.intUpdate theEXPRESSION_EXPERIMENT2CHARACTERISTICtable for a specific experiment.intNot@Transactional, for the same reason as the ontology pass: the fetch and the parse happen before there is a row to write, and the producer's own transaction wraps only the delete-and-insert.intIf necessary, update the GENE2CS table.intupdateGene2CsEntries(Date sinceLastUpdate, boolean truncate, boolean force) Update the GENE2CS table.intupdateGene2CsEntries(ArrayDesign arrayDesign, boolean force) Update the GENE2CS table for a specificArrayDesign.intupdateOntologyRelationEntries(Collection<String> sources) Not@Transactional: the producer spends minutes walking Jena models before it has a row to write, and its own transaction wraps only the delete-and-insert.
-
Constructor Details
-
TableMaintenanceUtilImpl
public TableMaintenanceUtilImpl()
-
-
Method Details
-
updateGene2CsEntries
@Transactional public int updateGene2CsEntries()Description copied from interface:TableMaintenanceUtilIf necessary, update the GENE2CS table.- Specified by:
updateGene2CsEntriesin interfaceTableMaintenanceUtil
-
updateGene2CsEntries
Description copied from interface:TableMaintenanceUtilUpdate the GENE2CS table for a specificArrayDesign.- Specified by:
updateGene2CsEntriesin interfaceTableMaintenanceUtil- Parameters:
arrayDesign- the platform for which to update the GENE2CS entriesforce- update the table even if no platforms has been modified since the last update
-
updateGene2CsEntries
@Transactional public int updateGene2CsEntries(@Nullable Date sinceLastUpdate, boolean truncate, boolean force) Description copied from interface:TableMaintenanceUtilUpdate the GENE2CS table.- Specified by:
updateGene2CsEntriesin interfaceTableMaintenanceUtil- Parameters:
sinceLastUpdate- if not null, only update entries whose correspondingArrayDesignhsa been updated after the given datetruncate- if true, the GENE2CS table will be truncated before the updateforce- update the table even if no platforms has been modified since the last update
-
updateExpressionExperiment2CharacteristicEntries
@Transactional public int updateExpressionExperiment2CharacteristicEntries(@Nullable Date sinceLastUpdate, boolean truncate) Description copied from interface:TableMaintenanceUtilUpdate theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.- Specified by:
updateExpressionExperiment2CharacteristicEntriesin interfaceTableMaintenanceUtil- Returns:
- the number of records that were created or updated
-
updateExpressionExperiment2CharacteristicEntries
@Transactional public int updateExpressionExperiment2CharacteristicEntries(Class<?> level, @Nullable Date sinceLastUpdate, boolean truncate) Description copied from interface:TableMaintenanceUtilUpdate a specific level of theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.- Specified by:
updateExpressionExperiment2CharacteristicEntriesin interfaceTableMaintenanceUtil- Parameters:
level- the level to update which is eitherExpressionExperiment,BioMaterialorExperimentalDesign- Returns:
- the number of records that were created or updated
-
updateExpressionExperiment2CharacteristicEntries
@Transactional public int updateExpressionExperiment2CharacteristicEntries(ExpressionExperiment ee, @Nullable Class<?> level) Description copied from interface:TableMaintenanceUtilUpdate theEXPRESSION_EXPERIMENT2CHARACTERISTICtable for a specific experiment.- Specified by:
updateExpressionExperiment2CharacteristicEntriesin interfaceTableMaintenanceUtil
-
updateExpressionExperiment2ArrayDesignEntries
@Transactional public int updateExpressionExperiment2ArrayDesignEntries(@Nullable Date sinceLastUpdate, boolean truncate) Description copied from interface:TableMaintenanceUtilUpdate theEXPRESSION_EXPERIMENT2_ARRAY_DESIGNtable.- Specified by:
updateExpressionExperiment2ArrayDesignEntriesin interfaceTableMaintenanceUtil- Parameters:
sinceLastUpdate- only update entries for platforms updated since this datetruncate- if true, the table will be truncated before the update- Returns:
- the number of records that were created or updated
-
updateExpressionExperiment2ArrayDesignEntries
- Specified by:
updateExpressionExperiment2ArrayDesignEntriesin interfaceTableMaintenanceUtil
-
evictGene2CsQueryCache
public void evictGene2CsQueryCache()Description copied from interface:TableMaintenanceUtilEvict the query cache for theGENE2CStable.- Specified by:
evictGene2CsQueryCachein interfaceTableMaintenanceUtil
-
evictEe2CQueryCache
public void evictEe2CQueryCache()Description copied from interface:TableMaintenanceUtilEvict the query cache for theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.- Specified by:
evictEe2CQueryCachein interfaceTableMaintenanceUtil
-
updateAnnotationRelationEntries
Removes the CURATED rows. 🛑 It no longer writes any.The harvest turned every EE2C row carrying a predicate and an object into a triple keyed by the TERM. A statement a curator wrote about ONE experiment's material therefore came back as a property of that term and landed on every other experiment using it. uib found it on experiment 24976 -- mouse EAE astrocytes under fingolimod -- which rendered three confident chips, none of them true of it:
astrocyte --derives from part of--> organoidfrom ee 31771,astrocyte --has role--> cell co-culturingfrom ee 32195, andnuclear RNA extract --derived from cell--> vasoactive intestinal peptide secreting cellfrom ee 32525.🛑 Filtering does not rescue the harvest, and this was measured rather than assumed. 15,007 of ~18,000 curated triples on prod were attested by a single experiment. The ones that recurred were the common curation PATTERNS rather than truths --
Trp53 --has_genotype--> Homozygous negativeacross 133 experiments, though Trp53 is also overexpressed and heterozygous elsewhere. Adding both breadth bars on top left a set that still read mostly experiment-local:diabetes mellitus --induced by--> streptozocinholds for STZ models rather than for diabetes,Apoe --has_allele --> APOE4is simply wrong because Apoe also carries E2 and E3, andinduced byrecords how one model was made. Paul, 2026-08-28, having read them: "most of these are not good … let's just delete all the curated records. We'll just make sure the ones we add are high quality."The delete is kept, and is what removes the rows already in the table. Curated relations are not gone as a concept -- what is gone is deriving them wholesale from annotations that were never assertions about a term. Anything added back has to be curated as a relation in its own right.
- Specified by:
updateAnnotationRelationEntriesin interfaceTableMaintenanceUtil- Parameters:
ee- restrict to one experiment, or null for the whole corpus- Returns:
- always 0; nothing is written. The count of rows REMOVED goes to the log.
-
updateOntologyRelationEntries
Not@Transactional: the producer spends minutes walking Jena models before it has a row to write, and its own transaction wraps only the delete-and-insert. Holding a connection open across the read would be a maintenance job contending with the application for no reason.- Specified by:
updateOntologyRelationEntriesin interfaceTableMaintenanceUtil- Parameters:
sources- source names to rebuild (CLO,CHEBI), or null/empty for all of them; the delete is narrowed the same way, so a partial run does not drop the rest- Returns:
- how many relation rows were written
-
updateExternalRelationEntries
public int updateExternalRelationEntries()Not@Transactional, for the same reason as the ontology pass: the fetch and the parse happen before there is a row to write, and the producer's own transaction wraps only the delete-and-insert.- Specified by:
updateExternalRelationEntriesin interfaceTableMaintenanceUtil- Returns:
- how many relation rows were written
-
evictAnnotationRelationQueryCache
public void evictAnnotationRelationQueryCache()Description copied from interface:TableMaintenanceUtilEvict the query cache for theANNOTATION_RELATIONtable.- Specified by:
evictAnnotationRelationQueryCachein interfaceTableMaintenanceUtil
-
evictEe2AdQueryCache
public void evictEe2AdQueryCache()Description copied from interface:TableMaintenanceUtilEvict the query cache for theEXPRESSION_EXPERIMENT2_ARRAY_DESIGNtable.- Specified by:
evictEe2AdQueryCachein interfaceTableMaintenanceUtil
-
disableEmail
public void disableEmail()For use in tests.- Specified by:
disableEmailin interfaceTableMaintenanceUtil
-