Interface TableMaintenanceUtil
- All Known Implementing Classes:
TableMaintenanceUtilImpl
- Author:
- paul
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringQuery space used by theEXPRESSION_EXPERIMENT2ARRAY_DESIGNtable.static final StringQuery space used by theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.static final intRecommended batch size to use when retrieving entries from the GENE2CS table either by gene or design element.static final StringQuery space used by theGENE2CStable. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidEvict 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.intRebuild theANNOTATION_RELATIONrows a curator already wrote.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.intRebuild theAnnotationRelationBasis.EXTERNALrows that MGI's genotype-to-disease reports assert — and the ones they deny.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) Rebuild theANNOTATION_RELATIONrows a loaded ontology asserts.
-
Field Details
-
GENE2CS_QUERY_SPACE
Query space used by theGENE2CStable.You may also want to synchronize to
ArrayDesign,CompositeSequenceandGenesince entries in the GENE2CS table are removed in cascade.- See Also:
-
GENE2CS_BATCH_SIZE
static final int GENE2CS_BATCH_SIZERecommended batch size to use when retrieving entries from the GENE2CS table either by gene or design element.- See Also:
-
EE2C_QUERY_SPACE
Query space used by theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.You may also want to synchronize to
ExpressionExperimentandCharacteristicsince entries in the EE2C table are removed in cascade.- See Also:
-
EE2AD_QUERY_SPACE
Query space used by theEXPRESSION_EXPERIMENT2ARRAY_DESIGNtable.You may also want to synchronize to
ExpressionExperimentandArrayDesignsince entries in the EE2AD table are removed in cascade.- See Also:
-
-
Method Details
-
updateGene2CsEntries
@Secured("GROUP_AGENT") int updateGene2CsEntries()If necessary, update the GENE2CS table. -
updateGene2CsEntries
Update the GENE2CS table for a specificArrayDesign.- 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
@Secured("GROUP_AGENT") int updateGene2CsEntries(@Nullable Date sinceLastUpdate, boolean truncate, boolean force) Update the GENE2CS table.- 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
@Secured("GROUP_AGENT") int updateExpressionExperiment2CharacteristicEntries(@Nullable Date sinceLastUpdate, boolean truncate) Update theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.- Returns:
- the number of records that were created or updated
-
updateExpressionExperiment2CharacteristicEntries
@Secured("GROUP_AGENT") int updateExpressionExperiment2CharacteristicEntries(Class<?> level, @Nullable Date sinceLastUpdate, boolean truncate) Update a specific level of theEXPRESSION_EXPERIMENT2CHARACTERISTICtable.- Parameters:
level- the level to update which is eitherExpressionExperiment,BioMaterialorExperimentalDesign- Returns:
- the number of records that were created or updated
-
updateExpressionExperiment2CharacteristicEntries
@Secured("GROUP_AGENT") int updateExpressionExperiment2CharacteristicEntries(ExpressionExperiment ee, @Nullable Class<?> level) Update theEXPRESSION_EXPERIMENT2CHARACTERISTICtable for a specific experiment. -
updateExpressionExperiment2ArrayDesignEntries
@Secured("GROUP_AGENT") int updateExpressionExperiment2ArrayDesignEntries(@Nullable Date sinceLastUpdate, boolean truncate) Update theEXPRESSION_EXPERIMENT2_ARRAY_DESIGNtable.- 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
-
updateAnnotationRelationEntries
Rebuild theANNOTATION_RELATIONrows a curator already wrote.This is a harvest, not an inference. A curator writing
disease model: autism spectrum disorder - has_genotype -> Mef2cput a subject, a predicate and an object intoCHARACTERISTIC, and 10,040 datasets carry such a statement. The knowledge has always been there; what has never existed is an index that can be read from the object end, so "which genotypes are asserted against this disease?" has no query. Copying those triples into a table keyed both ways is the whole operation.Read from
EXPRESSION_EXPERIMENT2CHARACTERISTICrather thanCHARACTERISTICbecause EE2C has already done the work of resolving every annotation to its experiment, at every level, with the anonymous ACL mask alongside. Harvesting from the normalized table would mean re-deriving all of that and getting a second, divergent copy of it.Deletes the basis before inserting rather than upserting - see
AnnotationRelation.- Parameters:
ee- restrict to one experiment, or null for the whole corpus- Returns:
- how many relation rows were written
-
updateOntologyRelationEntries
Rebuild theANNOTATION_RELATIONrows a loaded ontology asserts.Sibling of
updateAnnotationRelationEntries(ExpressionExperiment)and deliberately a separate entry point, because the two read from different places and cannot be ordered against each other. The curated harvest readsEXPRESSION_EXPERIMENT2CHARACTERISTICand belongs beside the EE2C rebuild; this one reads the Jena models and needs CLO, CHEBI and MONDO loaded, which is minutes of warm-up an experiment-driven job has no business waiting on.🛑 An ontology that is not loaded leaves its rows alone rather than deleting them. Rebuilding from an empty model would be indistinguishable from the ontology having retracted every axiom it ever stated.
- 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
@Secured("GROUP_AGENT") int updateExternalRelationEntries()Rebuild theAnnotationRelationBasis.EXTERNALrows that MGI's genotype-to-disease reports assert — and the ones they deny.A third entry point rather than a flag on the other two, for the reason they are separate from each other: this reads two files off MGI's download server and needs MONDO loaded to translate their DOIDs, which is a different set of prerequisites again from the curated harvest (EE2C) and the ontology pass (Jena models).
🛑 The delete is scoped to
SOURCE = 'MGI'. Other EXTERNAL sources are somebody else's rows and a run here must not touch them.- Returns:
- how many relation rows were written
-
evictAnnotationRelationQueryCache
@Secured("GROUP_ADMIN") void evictAnnotationRelationQueryCache()Evict the query cache for theANNOTATION_RELATIONtable. -
evictGene2CsQueryCache
@Secured("GROUP_ADMIN") void evictGene2CsQueryCache()Evict the query cache for theGENE2CStable. -
evictEe2CQueryCache
@Secured("GROUP_ADMIN") void evictEe2CQueryCache()Evict the query cache for theEXPRESSION_EXPERIMENT2CHARACTERISTICtable. -
evictEe2AdQueryCache
@Secured("GROUP_ADMIN") void evictEe2AdQueryCache()Evict the query cache for theEXPRESSION_EXPERIMENT2_ARRAY_DESIGNtable. -
disableEmail
@Secured("GROUP_ADMIN") void disableEmail()
-