Class ExpressionAnalysisResultSetDaoImpl
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,AnalysisResultSetDao<DifferentialExpressionAnalysisResult,,ExpressionAnalysisResultSet> ExpressionAnalysisResultSetDao,BaseDao<ExpressionAnalysisResultSet>,BaseVoEnabledDao<ExpressionAnalysisResultSet,,DifferentialExpressionAnalysisResultSetValueObject> FilteringDao<ExpressionAnalysisResultSet>,FilteringVoEnabledDao<ExpressionAnalysisResultSet,DifferentialExpressionAnalysisResultSetValueObject>
- Author:
- Paul
-
Nested Class Summary
Nested classes/interfaces inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer, AbstractFilteringVoEnabledDao.FilterablePropertyMeta -
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDelete(DifferentialExpressionAnalysis differentialExpressionAnalysis) protected voidconfigureFilterableProperties(AbstractFilteringVoEnabledDao<ExpressionAnalysisResultSet, DifferentialExpressionAnalysisResultSetValueObject>.FilterablePropertiesConfigurer configurer) Register filterable properties.longCount the number of results in a given result set.longcountResults(ExpressionAnalysisResultSet ears, double threshold) Count the number of results in a given result set below a given corrected P-value threshold.create(ExpressionAnalysisResultSet entity) Create an object.Load a value object for a given entity.findByBioAssaySetInAndDatabaseEntryInLimit(Collection<BioAssaySet> bioAssaySets, Collection<DatabaseEntry> databaseEntries, Filters filters, int offset, int limit, Sort sort) Retrieve result sets associated to a set ofBioAssaySetand external database entries.Retrieve the baseline for the given result set.getBaselinesForInteractions(Collection<ExpressionAnalysisResultSet> resultSets, boolean initializeFactorValues) Retrieve baselines for all the given result sets representing factor interactions.getBaselinesForInteractionsByIds(Collection<Long> ids, boolean initializeFactorValues) Retrieve baselines using result set IDs representing factor interactions.protected CriteriagetFilteringCriteria(Filters filters) Obtain aCriteriafor loading VOs.Obtain a histogram of the P-value distribution for a given result set.loadResultToGenesMap(ExpressionAnalysisResultSet resultSet, boolean queryByResult) Load aDifferentialExpressionAnalysisResulttoGenemulti-map.loadValueObjectWithResults(ExpressionAnalysisResultSet entity, boolean includeFactorValuesInContrasts, boolean queryGenesByResult, boolean includeTaxonInGenes) Load an analysis result set with its all of its associated results.Load an analysis result set with its all of its associated results.loadWithResultsAndContrasts(Long id, double threshold, int offset, int limit) Load a slice of an analysis result set with a corrected P-value threshold.loadWithResultsAndContrasts(Long id, int offset, int limit) Load a slice of an analysis result set.protected voidpostProcessValueObjects(List<DifferentialExpressionAnalysisResultSetValueObject> differentialExpressionAnalysisResultSetValueObjects) Post-process VOs in bulk.voidremove(ExpressionAnalysisResultSet entity) Remove a persistent instancevoidInitialize the analysis and subset factor vale.Methods inherited from class ubic.gemma.persistence.service.AbstractCriteriaFilteringVoEnabledDao
afterPropertiesSet, count, load, load, loadIds, loadValueObjects, loadValueObjects, resolveFilterablePropertyMetaMethods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyMeta, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, resolveFilterablePropertyMetaMethods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, find, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getEntityName, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, save, streamAll, streamAll, streamQuery, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, find, findOrCreate, getElementClass, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, save, streamAll, streamAll, update, updateMethods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from interface ubic.gemma.persistence.service.FilteringDao
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, load, load, loadIdsMethods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledDao
loadValueObjects, loadValueObjects
-
Constructor Details
-
ExpressionAnalysisResultSetDaoImpl
-
-
Method Details
-
create
Description copied from interface:BaseDaoCreate an object. If the entity type is immutable, this may also remove any existing entities identified by an appropriate 'find' method.- Specified by:
createin interfaceBaseDao<ExpressionAnalysisResultSet>- Overrides:
createin classAbstractDao<ExpressionAnalysisResultSet>- Parameters:
entity- the entity to create- Returns:
- the persistent version of the entity
-
remove
Description copied from interface:BaseDaoRemove a persistent instance- Specified by:
removein interfaceBaseDao<ExpressionAnalysisResultSet>- Overrides:
removein classAbstractDao<ExpressionAnalysisResultSet>- Parameters:
entity- the entity to be removed
-
loadWithResultsAndContrasts
Description copied from interface:ExpressionAnalysisResultSetDaoLoad an analysis result set with its all of its associated results.- Specified by:
loadWithResultsAndContrastsin interfaceExpressionAnalysisResultSetDao- Parameters:
id- the ID of the analysis result set- Returns:
- the analysis result set with its associated results, or null if not found
-
loadWithResultsAndContrasts
Description copied from interface:ExpressionAnalysisResultSetDaoLoad a slice of an analysis result set.Results are sorted by ascending correct P-value.
- Specified by:
loadWithResultsAndContrastsin interfaceExpressionAnalysisResultSetDao- Parameters:
offset- an offset of results to loadlimit- a limit of results to load, or -1 to load all results starting at offset- See Also:
-
loadWithResultsAndContrasts
public ExpressionAnalysisResultSet loadWithResultsAndContrasts(Long id, double threshold, int offset, int limit) Description copied from interface:ExpressionAnalysisResultSetDaoLoad a slice of an analysis result set with a corrected P-value threshold.Important note: when using a threshold, results with null P-values will not be included, thus setting the threshold to
1.0is not equivalent toExpressionAnalysisResultSetDao.loadWithResultsAndContrasts(Long, int, int).- Specified by:
loadWithResultsAndContrastsin interfaceExpressionAnalysisResultSetDao- Parameters:
threshold- corrected P-value maximum threshold (inclusive)
-
canDelete
- Specified by:
canDeletein interfaceExpressionAnalysisResultSetDao
-
findByBioAssaySetInAndDatabaseEntryInLimit
public Slice<DifferentialExpressionAnalysisResultSetValueObject> findByBioAssaySetInAndDatabaseEntryInLimit(@Nullable Collection<BioAssaySet> bioAssaySets, @Nullable Collection<DatabaseEntry> databaseEntries, @Nullable Filters filters, int offset, int limit, @Nullable Sort sort) Description copied from interface:ExpressionAnalysisResultSetDaoRetrieve result sets associated to a set ofBioAssaySetand external database entries.- Specified by:
findByBioAssaySetInAndDatabaseEntryInLimitin interfaceExpressionAnalysisResultSetDao- Parameters:
bioAssaySets- relatedBioAssaySet, or any if nulldatabaseEntries- related external identifier associated to theBioAssaySet, or any if nullfilters- filters for restricting resultslimit- maximum number of results to returnsort- field and direction by which the collection is ordered
-
postProcessValueObjects
protected void postProcessValueObjects(List<DifferentialExpressionAnalysisResultSetValueObject> differentialExpressionAnalysisResultSetValueObjects) Description copied from class:AbstractVoEnabledDaoPost-process VOs in bulk.Use this as an opportunity to load extra informations that could not be populated in the initial
AbstractVoEnabledDao.doLoadValueObject(Identifiable)orAbstractVoEnabledDao.doLoadValueObjects(Collection) -
thaw
Description copied from interface:ExpressionAnalysisResultSetDaoInitialize the analysis and subset factor vale.- Specified by:
thawin interfaceExpressionAnalysisResultSetDao
-
countResults
Description copied from interface:ExpressionAnalysisResultSetDaoCount the number of results in a given result set.- Specified by:
countResultsin interfaceExpressionAnalysisResultSetDao
-
countResults
Description copied from interface:ExpressionAnalysisResultSetDaoCount the number of results in a given result set below a given corrected P-value threshold.- Specified by:
countResultsin interfaceExpressionAnalysisResultSetDao
-
getBaseline
Description copied from interface:ExpressionAnalysisResultSetDaoRetrieve the baseline for the given result set.Factor values are always initialized.
- Specified by:
getBaselinein interfaceExpressionAnalysisResultSetDao- Returns:
- a baseline, or null if none could be determined for the given result set
-
getBaselinesForInteractions
public Map<ExpressionAnalysisResultSet,Baseline> getBaselinesForInteractions(Collection<ExpressionAnalysisResultSet> resultSets, boolean initializeFactorValues) Description copied from interface:ExpressionAnalysisResultSetDaoRetrieve baselines for all the given result sets representing factor interactions.- Specified by:
getBaselinesForInteractionsin interfaceExpressionAnalysisResultSetDao- Parameters:
initializeFactorValues- whether to initialize factor values
-
getBaselinesForInteractionsByIds
public Map<Long,Baseline> getBaselinesForInteractionsByIds(Collection<Long> ids, boolean initializeFactorValues) Description copied from interface:ExpressionAnalysisResultSetDaoRetrieve baselines using result set IDs representing factor interactions.- Specified by:
getBaselinesForInteractionsByIdsin interfaceExpressionAnalysisResultSetDao- Parameters:
initializeFactorValues- whether to initialize factor values
-
loadPvalueDistribution
Description copied from interface:ExpressionAnalysisResultSetDaoObtain a histogram of the P-value distribution for a given result set.- Specified by:
loadPvalueDistributionin interfaceExpressionAnalysisResultSetDao
-
getFilteringCriteria
Description copied from class:AbstractCriteriaFilteringVoEnabledDaoObtain aCriteriafor loading VOs.- Overrides:
getFilteringCriteriain classAbstractCriteriaFilteringVoEnabledDao<ExpressionAnalysisResultSet,DifferentialExpressionAnalysisResultSetValueObject> - See Also:
-
configureFilterableProperties
protected void configureFilterableProperties(AbstractFilteringVoEnabledDao<ExpressionAnalysisResultSet, DifferentialExpressionAnalysisResultSetValueObject>.FilterablePropertiesConfigurer configurer) Description copied from class:AbstractFilteringVoEnabledDaoRegister filterable properties. -
doLoadValueObject
protected DifferentialExpressionAnalysisResultSetValueObject doLoadValueObject(ExpressionAnalysisResultSet entity) Description copied from class:AbstractVoEnabledDaoLoad a value object for a given entity.This should be fast and efficient, and avoid any database query or post-processing. If you need to perform additional queries, implement
AbstractVoEnabledDao.postProcessValueObjects(List)instead. -
loadValueObjectWithResults
public DifferentialExpressionAnalysisResultSetValueObject loadValueObjectWithResults(ExpressionAnalysisResultSet entity, boolean includeFactorValuesInContrasts, boolean queryGenesByResult, boolean includeTaxonInGenes) Description copied from interface:ExpressionAnalysisResultSetDaoLoad an analysis result set with its all of its associated results.- Specified by:
loadValueObjectWithResultsin interfaceExpressionAnalysisResultSetDao- Parameters:
includeFactorValuesInContrasts- include complete FV in the contrasts, only IDs are displayed if falsequeryGenesByResult- query genes by results instead of result set, this is considerably faster if the results are sliced (i.e. fromExpressionAnalysisResultSetDao.loadWithResultsAndContrasts(Long, int, int))includeTaxonInGenes- include complete taxon in the contrasts, only the ID is displayed if false- See Also:
-
loadResultToGenesMap
public Map<Long,Set<Gene>> loadResultToGenesMap(ExpressionAnalysisResultSet resultSet, boolean queryByResult) Description copied from interface:ExpressionAnalysisResultSetDaoLoad aDifferentialExpressionAnalysisResulttoGenemulti-map.This is much faster than navigating through the probe's alignments, transcripts and then genes as it uses the internal GENE2CS table described in
TableMaintenanceUtil.updateGene2CsEntries().Note: Not all probes have associated genes, so you should use
Map.getOrDefault(Object, Object)with an empty collection to handle this case.- Specified by:
loadResultToGenesMapin interfaceExpressionAnalysisResultSetDao- Parameters:
queryByResult- query by results instead of result set, this is considerably faster if the results are sliced (i.e. fromExpressionAnalysisResultSetDao.loadWithResultsAndContrasts(Long, int, int))
-