Class ExpressionAnalysisResultSetDaoImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractDao<O>
-
- ubic.gemma.persistence.service.AbstractVoEnabledDao<O,VO>
-
- ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao<O,VO>
-
- ubic.gemma.persistence.service.AbstractCriteriaFilteringVoEnabledDao<ExpressionAnalysisResultSet,DifferentialExpressionAnalysisResultSetValueObject>
-
- ubic.gemma.persistence.service.analysis.expression.diff.ExpressionAnalysisResultSetDaoImpl
-
- All Implemented Interfaces:
InitializingBean
,AnalysisResultSetDao<DifferentialExpressionAnalysisResult,ExpressionAnalysisResultSet>
,ExpressionAnalysisResultSetDao
,BaseDao<ExpressionAnalysisResultSet>
,BaseVoEnabledDao<ExpressionAnalysisResultSet,DifferentialExpressionAnalysisResultSetValueObject>
,FilteringDao<ExpressionAnalysisResultSet>
,FilteringVoEnabledDao<ExpressionAnalysisResultSet,DifferentialExpressionAnalysisResultSetValueObject>
@Repository public class ExpressionAnalysisResultSetDaoImpl extends AbstractCriteriaFilteringVoEnabledDao<ExpressionAnalysisResultSet,DifferentialExpressionAnalysisResultSetValueObject> implements ExpressionAnalysisResultSetDao
- 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
-
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
elementClass, log
-
-
Constructor Summary
Constructors Constructor Description ExpressionAnalysisResultSetDaoImpl(SessionFactory sessionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDelete(DifferentialExpressionAnalysis differentialExpressionAnalysis)
protected void
configureFilterableProperties(AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer configurer)
Register filterable properties.long
countResults(ExpressionAnalysisResultSet ears)
Count the number of results in a given result set.long
countResults(ExpressionAnalysisResultSet ears, double threshold)
Count the number of results in a given result set below a given corrected P-value threshold.ExpressionAnalysisResultSet
create(ExpressionAnalysisResultSet entity)
Create an object.protected DifferentialExpressionAnalysisResultSetValueObject
doLoadValueObject(ExpressionAnalysisResultSet entity)
Load a value object for a given entity.Slice<DifferentialExpressionAnalysisResultSetValueObject>
findByBioAssaySetInAndDatabaseEntryInLimit(Collection<BioAssaySet> bioAssaySets, Collection<DatabaseEntry> databaseEntries, Filters filters, int offset, int limit, Sort sort)
Retrieve result sets associated to a set ofBioAssaySet
and external database entries.protected Criteria
getFilteringCriteria(Filters filters)
Obtain aCriteria
for loading VOs.Map<Long,List<Gene>>
loadResultToGenesMap(ExpressionAnalysisResultSet resultSet)
Load aDifferentialExpressionAnalysisResult
toGene
multi-map.DifferentialExpressionAnalysisResultSetValueObject
loadValueObjectWithResults(ExpressionAnalysisResultSet entity)
Load an analysis result set with its all of its associated results.ExpressionAnalysisResultSet
loadWithResultsAndContrasts(Long id)
Load an analysis result set with its all of its associated results.ExpressionAnalysisResultSet
loadWithResultsAndContrasts(Long id, double threshold, int offset, int limit)
Load a slice of an analysis result set with a corrected P-value threshold.ExpressionAnalysisResultSet
loadWithResultsAndContrasts(Long id, int offset, int limit)
Load a slice of an analysis result set.protected void
postProcessValueObjects(List<DifferentialExpressionAnalysisResultSetValueObject> differentialExpressionAnalysisResultSetValueObjects)
Post-process VOs in bulk.void
remove(ExpressionAnalysisResultSet entity)
Remove a persistent instancevoid
thaw(ExpressionAnalysisResultSet ears)
Initialize the analysis and subset factor vale.-
Methods inherited from class ubic.gemma.persistence.service.AbstractCriteriaFilteringVoEnabledDao
afterPropertiesSet, count, getFilterablePropertyMeta, load, load, loadIds, loadValueObjects, loadValueObjects
-
Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyMeta, getFilterablePropertyType, getSort
-
Methods inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
doLoadValueObjects, loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, find, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, remove, remove, save, save, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, find, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, remove, remove, save, save, update, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringDao
count, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyType, getSort, load, load, loadIds
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledDao
loadValueObjects, loadValueObjects
-
-
-
-
Constructor Detail
-
ExpressionAnalysisResultSetDaoImpl
@Autowired public ExpressionAnalysisResultSetDaoImpl(SessionFactory sessionFactory)
-
-
Method Detail
-
create
public ExpressionAnalysisResultSet create(ExpressionAnalysisResultSet entity)
Description copied from interface:BaseDao
Create an object. If the entity type is immutable, this may also remove any existing entities identified by an appropriate 'find' method.- Specified by:
create
in interfaceBaseDao<ExpressionAnalysisResultSet>
- Overrides:
create
in classAbstractDao<ExpressionAnalysisResultSet>
- Parameters:
entity
- the entity to create- Returns:
- the persistent version of the entity
-
remove
public void remove(ExpressionAnalysisResultSet entity)
Description copied from interface:BaseDao
Remove a persistent instance- Specified by:
remove
in interfaceBaseDao<ExpressionAnalysisResultSet>
- Overrides:
remove
in classAbstractDao<ExpressionAnalysisResultSet>
- Parameters:
entity
- the entity to be removed
-
loadWithResultsAndContrasts
public ExpressionAnalysisResultSet loadWithResultsAndContrasts(Long id)
Description copied from interface:ExpressionAnalysisResultSetDao
Load an analysis result set with its all of its associated results.- Specified by:
loadWithResultsAndContrasts
in 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
public ExpressionAnalysisResultSet loadWithResultsAndContrasts(Long id, int offset, int limit)
Description copied from interface:ExpressionAnalysisResultSetDao
Load a slice of an analysis result set.Results are sorted by ascending correct P-value.
- Specified by:
loadWithResultsAndContrasts
in interfaceExpressionAnalysisResultSetDao
offset
- an offset of results to loadlimit
- a limit of results to load, or -1 to load all results starting at offset- See Also:
ExpressionAnalysisResultSetDao.loadWithResultsAndContrasts(Long)
-
loadWithResultsAndContrasts
public ExpressionAnalysisResultSet loadWithResultsAndContrasts(Long id, double threshold, int offset, int limit)
Description copied from interface:ExpressionAnalysisResultSetDao
Load 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.0
is not equivalent toExpressionAnalysisResultSetDao.loadWithResultsAndContrasts(Long, int, int)
.- Specified by:
loadWithResultsAndContrasts
in interfaceExpressionAnalysisResultSetDao
threshold
- corrected P-value maximum threshold (inclusive)
-
canDelete
public boolean canDelete(DifferentialExpressionAnalysis differentialExpressionAnalysis)
- Specified by:
canDelete
in 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:ExpressionAnalysisResultSetDao
Retrieve result sets associated to a set ofBioAssaySet
and external database entries.- Specified by:
findByBioAssaySetInAndDatabaseEntryInLimit
in 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:AbstractVoEnabledDao
Post-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
public void thaw(ExpressionAnalysisResultSet ears)
Description copied from interface:ExpressionAnalysisResultSetDao
Initialize the analysis and subset factor vale.- Specified by:
thaw
in interfaceExpressionAnalysisResultSetDao
-
countResults
public long countResults(ExpressionAnalysisResultSet ears)
Description copied from interface:ExpressionAnalysisResultSetDao
Count the number of results in a given result set.- Specified by:
countResults
in interfaceExpressionAnalysisResultSetDao
-
countResults
public long countResults(ExpressionAnalysisResultSet ears, double threshold)
Description copied from interface:ExpressionAnalysisResultSetDao
Count the number of results in a given result set below a given corrected P-value threshold.- Specified by:
countResults
in interfaceExpressionAnalysisResultSetDao
-
getFilteringCriteria
protected Criteria getFilteringCriteria(@Nullable Filters filters)
Description copied from class:AbstractCriteriaFilteringVoEnabledDao
Obtain aCriteria
for loading VOs.
-
configureFilterableProperties
protected void configureFilterableProperties(AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer configurer)
Description copied from class:AbstractFilteringVoEnabledDao
Register filterable properties.
-
doLoadValueObject
protected DifferentialExpressionAnalysisResultSetValueObject doLoadValueObject(ExpressionAnalysisResultSet entity)
Description copied from class:AbstractVoEnabledDao
Load 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)
Description copied from interface:ExpressionAnalysisResultSetDao
Load an analysis result set with its all of its associated results.- Specified by:
loadValueObjectWithResults
in interfaceExpressionAnalysisResultSetDao
- See Also:
BaseVoEnabledDao.loadValueObject(Identifiable)
-
loadResultToGenesMap
public Map<Long,List<Gene>> loadResultToGenesMap(ExpressionAnalysisResultSet resultSet)
Description copied from interface:ExpressionAnalysisResultSetDao
Load aDifferentialExpressionAnalysisResult
toGene
multi-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:
loadResultToGenesMap
in interfaceExpressionAnalysisResultSetDao
-
-