Class ExpressionExperimentDaoImpl
- 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.AbstractQueryFilteringVoEnabledDao<C,VO>
-
- ubic.gemma.persistence.service.common.auditAndSecurity.curation.AbstractCuratableDao<ExpressionExperiment,ExpressionExperimentValueObject>
-
- ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentDaoImpl
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,BaseDao<ExpressionExperiment>
,BaseVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
,BrowsingDao<ExpressionExperiment>
,CachedFilteringDao<ExpressionExperiment>
,CachedFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
,CuratableDao<ExpressionExperiment>
,ExpressionExperimentDao
,FilteringDao<ExpressionExperiment>
,FilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
@Repository public class ExpressionExperimentDaoImpl extends AbstractCuratableDao<ExpressionExperiment,ExpressionExperimentValueObject> implements ExpressionExperimentDao
- Author:
- pavlidis
- See Also:
ExpressionExperiment
-
-
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.common.auditAndSecurity.curation.AbstractCuratableDao
CURATION_DETAILS_ALIAS
-
Fields inherited from class ubic.gemma.persistence.service.AbstractVoEnabledDao
REPORT_SLOW_QUERY_AFTER_MS
-
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
log
-
Fields inherited from interface ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentDao
FREE_TEXT, OBJECT_ALIAS, UNCATEGORIZED
-
-
Constructor Summary
Constructors Constructor Description ExpressionExperimentDaoImpl(SessionFactory sessionFactory)
-
Method Summary
-
Methods inherited from class ubic.gemma.persistence.service.common.auditAndSecurity.curation.AbstractCuratableDao
addEventsToMap, addNonTroubledFilter, distinctIfNecessary, formNativeNonTroubledClause, formNonTroubledClause, groupByIfNecessary, loadTroubledIds, updateCurationDetailsFromAuditEvent
-
Methods inherited from class ubic.gemma.persistence.service.AbstractQueryFilteringVoEnabledDao
count, countWithCache, getEntityTransformer, load, load, loadIds, loadIdsWithCache, loadValueObjectsWithCache, loadValueObjectsWithCache, loadWithCache, loadWithCache
-
Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
afterPropertiesSet, getFilter, getFilter, 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, create, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, save, streamAll, streamAll, streamQuery, 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, create, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, reload, reload, remove, remove, save, save, streamAll, streamAll, update, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledDao
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIds
-
Methods inherited from interface ubic.gemma.persistence.service.CachedFilteringDao
countWithCache, loadIdsWithCache, loadWithCache, loadWithCache
-
Methods inherited from interface ubic.gemma.persistence.service.CachedFilteringVoEnabledDao
loadValueObjectsWithCache, loadValueObjectsWithCache
-
Methods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.curation.CuratableDao
loadTroubledIds, updateCurationDetailsFromAuditEvent
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringDao
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyType, getSort, load, load, loadIds
-
-
-
-
Constructor Detail
-
ExpressionExperimentDaoImpl
@Autowired public ExpressionExperimentDaoImpl(SessionFactory sessionFactory)
-
-
Method Detail
-
load
public ExpressionExperiment load(Long id, CacheMode cacheMode)
Description copied from interface:ExpressionExperimentDao
Load an experiment by ID with a specific cache mode.The cache mode will be effective for the remainder of the Hibernate session.
- Specified by:
load
in interfaceExpressionExperimentDao
-
loadAllIdAndName
public SortedMap<Long,String> loadAllIdAndName()
- Specified by:
loadAllIdAndName
in interfaceExpressionExperimentDao
-
loadAllShortNameAndName
public SortedMap<String,String> loadAllShortNameAndName()
- Specified by:
loadAllShortNameAndName
in interfaceExpressionExperimentDao
-
loadAllName
public SortedSet<String> loadAllName()
- Specified by:
loadAllName
in interfaceExpressionExperimentDao
-
loadAllAccessionAndName
public SortedMap<String,String> loadAllAccessionAndName()
- Specified by:
loadAllAccessionAndName
in interfaceExpressionExperimentDao
-
browse
public List<ExpressionExperiment> browse(int start, int limit)
- Specified by:
browse
in interfaceBrowsingDao<ExpressionExperiment>
-
browse
public List<ExpressionExperiment> browse(int start, int limit, String orderField, boolean descending)
- Specified by:
browse
in interfaceBrowsingDao<ExpressionExperiment>
-
loadBioAssaySet
public BioAssaySet loadBioAssaySet(Long id)
- Specified by:
loadBioAssaySet
in interfaceExpressionExperimentDao
-
filterByTaxon
public Collection<Long> filterByTaxon(@Nullable Collection<Long> ids, Taxon taxon)
- Specified by:
filterByTaxon
in interfaceExpressionExperimentDao
-
findByShortName
public ExpressionExperiment findByShortName(String shortName)
- Specified by:
findByShortName
in interfaceExpressionExperimentDao
-
findByName
public Collection<ExpressionExperiment> findByName(String name)
- Specified by:
findByName
in interfaceExpressionExperimentDao
-
findOneByName
public ExpressionExperiment findOneByName(String name)
- Specified by:
findOneByName
in interfaceExpressionExperimentDao
-
find
public ExpressionExperiment find(ExpressionExperiment entity)
Description copied from interface:BaseDao
Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).- Specified by:
find
in interfaceBaseDao<ExpressionExperiment>
- Overrides:
find
in classAbstractDao<ExpressionExperiment>
- Parameters:
entity
- the entity to look for.- Returns:
- an entity that was found in the persistent storage, or null if no such entity was found.
-
findByAccession
public Collection<ExpressionExperiment> findByAccession(DatabaseEntry accession)
- Specified by:
findByAccession
in interfaceExpressionExperimentDao
-
findByAccession
public Collection<ExpressionExperiment> findByAccession(String accession)
- Specified by:
findByAccession
in interfaceExpressionExperimentDao
-
findOneByAccession
@Nullable public ExpressionExperiment findOneByAccession(String accession)
- Specified by:
findOneByAccession
in interfaceExpressionExperimentDao
-
findByBibliographicReference
public Collection<ExpressionExperiment> findByBibliographicReference(BibliographicReference bibRef)
- Specified by:
findByBibliographicReference
in interfaceExpressionExperimentDao
-
findByBioAssay
public ExpressionExperiment findByBioAssay(BioAssay ba)
- Specified by:
findByBioAssay
in interfaceExpressionExperimentDao
-
findByBioMaterial
public Collection<ExpressionExperiment> findByBioMaterial(BioMaterial bm)
- Specified by:
findByBioMaterial
in interfaceExpressionExperimentDao
-
findByBioMaterials
public Map<ExpressionExperiment,Collection<BioMaterial>> findByBioMaterials(Collection<BioMaterial> bms)
- Specified by:
findByBioMaterials
in interfaceExpressionExperimentDao
-
findByExpressedGene
public Collection<ExpressionExperiment> findByExpressedGene(Gene gene, Double rank)
- Specified by:
findByExpressedGene
in interfaceExpressionExperimentDao
-
findByDesign
public ExpressionExperiment findByDesign(ExperimentalDesign ed)
- Specified by:
findByDesign
in interfaceExpressionExperimentDao
-
findByFactor
public ExpressionExperiment findByFactor(ExperimentalFactor ef)
- Specified by:
findByFactor
in interfaceExpressionExperimentDao
-
findByFactorValue
public ExpressionExperiment findByFactorValue(FactorValue fv)
- Specified by:
findByFactorValue
in interfaceExpressionExperimentDao
-
findByFactorValue
public ExpressionExperiment findByFactorValue(Long factorValueId)
- Specified by:
findByFactorValue
in interfaceExpressionExperimentDao
-
findByFactorValues
public Map<ExpressionExperiment,FactorValue> findByFactorValues(Collection<FactorValue> fvs)
- Specified by:
findByFactorValues
in interfaceExpressionExperimentDao
-
findByGene
public Collection<ExpressionExperiment> findByGene(Gene gene)
- Specified by:
findByGene
in interfaceExpressionExperimentDao
-
findByQuantitationType
public ExpressionExperiment findByQuantitationType(QuantitationType quantitationType)
- Specified by:
findByQuantitationType
in interfaceExpressionExperimentDao
-
findByTaxon
public Collection<ExpressionExperiment> findByTaxon(Taxon taxon)
- Specified by:
findByTaxon
in interfaceExpressionExperimentDao
-
findByUpdatedLimit
public List<ExpressionExperiment> findByUpdatedLimit(Collection<Long> ids, int limit)
- Specified by:
findByUpdatedLimit
in interfaceExpressionExperimentDao
-
findByUpdatedLimit
public List<ExpressionExperiment> findByUpdatedLimit(int limit)
- Specified by:
findByUpdatedLimit
in interfaceExpressionExperimentDao
-
findUpdatedAfter
public Collection<ExpressionExperiment> findUpdatedAfter(@Nullable Date date)
Description copied from interface:ExpressionExperimentDao
Find experiments updated on or after a given date.- Specified by:
findUpdatedAfter
in interfaceExpressionExperimentDao
-
getAnnotationCounts
public Map<Long,Long> getAnnotationCounts(Collection<Long> ids)
- Specified by:
getAnnotationCounts
in interfaceExpressionExperimentDao
-
getAllAnnotations
public Map<Class<? extends Identifiable>,List<Characteristic>> getAllAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c)
Description copied from interface:ExpressionExperimentDao
Obtain all annotations, grouped by applicable level.- Specified by:
getAllAnnotations
in interfaceExpressionExperimentDao
useEe2c
- use theEXPRESSION_EXPERIMENT2CHARACTERISTIC
table to retrieve annotations
-
getExperimentAnnotations
public List<Characteristic> getExperimentAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c)
Description copied from interface:ExpressionExperimentDao
Obtain experiment-level annotations.- Specified by:
getExperimentAnnotations
in interfaceExpressionExperimentDao
useEe2c
- use theEXPRESSION_EXPERIMENTE2CHARACTERISTIC
table,TableMaintenanceUtil
-
getExperimentSubSetAnnotations
public Collection<Characteristic> getExperimentSubSetAnnotations(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain the subset annotations.- Specified by:
getExperimentSubSetAnnotations
in interfaceExpressionExperimentDao
-
getBioMaterialAnnotations
public List<Characteristic> getBioMaterialAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c)
Description copied from interface:ExpressionExperimentDao
Obtain sample-level annotations.This uses the
EE2C
table under the hood.- Specified by:
getBioMaterialAnnotations
in interfaceExpressionExperimentDao
-
getBioMaterialAnnotations
public List<Characteristic> getBioMaterialAnnotations(ExpressionExperimentSubSet subset)
- Specified by:
getBioMaterialAnnotations
in interfaceExpressionExperimentDao
-
getExperimentalDesignAnnotations
public List<Characteristic> getExperimentalDesignAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c)
Description copied from interface:ExpressionExperimentDao
Obtain experimental design-level annotations.This is equivalent to the subject components of
ExpressionExperimentDao.getFactorValueAnnotations(ExpressionExperiment)
for now, but other annotations from the experimental design might be included in the future.- Specified by:
getExperimentalDesignAnnotations
in interfaceExpressionExperimentDao
-
getFactorValueAnnotations
public List<Statement> getFactorValueAnnotations(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain factor value-level annotations.- Specified by:
getFactorValueAnnotations
in interfaceExpressionExperimentDao
-
getFactorValueAnnotations
public List<Statement> getFactorValueAnnotations(ExpressionExperimentSubSet subset)
Description copied from interface:ExpressionExperimentDao
Obtain factor value-level annotations for a given subset.- Specified by:
getFactorValueAnnotations
in interfaceExpressionExperimentDao
-
getCategoriesUsageFrequency
public Map<Characteristic,Long> getCategoriesUsageFrequency(@Nullable Collection<Long> eeIds, @Nullable Collection<String> excludedCategoryUris, @Nullable Collection<String> excludedTermUris, @Nullable Collection<String> retainedTermUris, int maxResults)
- Specified by:
getCategoriesUsageFrequency
in interfaceExpressionExperimentDao
-
getAnnotationsUsageFrequency
public Map<Characteristic,Long> getAnnotationsUsageFrequency(@Nullable Collection<Long> eeIds, @Nullable Class<? extends Identifiable> level, int maxResults, int minFrequency, @Nullable String category, @Nullable Collection<String> excludedCategoryUris, @Nullable Collection<String> excludedTermUris, @Nullable Collection<String> retainedTermUris)
We're making two assumptions: a dataset cannot have a characteristic more than once and a dataset cannot have the same characteristic at multiple levels to make counting more efficient.- Specified by:
getAnnotationsUsageFrequency
in interfaceExpressionExperimentDao
- Parameters:
eeIds
- IDs ofExpressionExperiment
to use for restricting annotations, or null to consider everythinglevel
- applicable annotation level, one ofExpressionExperiment
,ExperimentalDesign
orBioMaterial
maxResults
- maximum number of annotations to return, or -1 to return everythingminFrequency
- minimum usage frequency to be reported (0 effectively allows everything)category
- a category URI or free text category to restrict the results to, or null to consider everything, empty string to consider uncategorized termsretainedTermUris
- a collection of term to retain even if they don't meet the minimum frequency criteria
-
getExperimentsLackingPublications
public Collection<ExpressionExperiment> getExperimentsLackingPublications()
- Specified by:
getExperimentsLackingPublications
in interfaceExpressionExperimentDao
-
updateMeanVarianceRelation
public MeanVarianceRelation updateMeanVarianceRelation(ExpressionExperiment ee, MeanVarianceRelation mvr)
- Specified by:
updateMeanVarianceRelation
in interfaceExpressionExperimentDao
-
countBioMaterials
public long countBioMaterials(@Nullable Filters filters)
Description copied from interface:ExpressionExperimentDao
Count the number of biomaterials of datasets satisfying the given filters.The result is stored in the standard query cache.
- Specified by:
countBioMaterials
in interfaceExpressionExperimentDao
-
getArrayDesignsUsed
public Collection<ArrayDesign> getArrayDesignsUsed(BioAssaySet bas)
- Specified by:
getArrayDesignsUsed
in interfaceExpressionExperimentDao
-
getArrayDesignsUsed
public Collection<ArrayDesign> getArrayDesignsUsed(Collection<? extends BioAssaySet> ees)
- Specified by:
getArrayDesignsUsed
in interfaceExpressionExperimentDao
-
getArrayDesignsUsed
public Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment ee, QuantitationType qt, Class<? extends DataVector> dataVectorType)
- Specified by:
getArrayDesignsUsed
in interfaceExpressionExperimentDao
-
getGenesUsedByPreferredVectors
public Collection<Gene> getGenesUsedByPreferredVectors(ExpressionExperiment experimentConstraint)
Description copied from interface:ExpressionExperimentDao
Obtain genes used by the processed vectors of this dataset.- Specified by:
getGenesUsedByPreferredVectors
in interfaceExpressionExperimentDao
-
getTechnologyTypeUsageFrequency
public Map<TechnologyType,Long> getTechnologyTypeUsageFrequency()
Description copied from interface:ExpressionExperimentDao
Obtain the dataset usage frequency by technology type.If a dataset was switched to a platform of a different technology type, it is counted toward both.
- Specified by:
getTechnologyTypeUsageFrequency
in interfaceExpressionExperimentDao
-
getTechnologyTypeUsageFrequency
public Map<TechnologyType,Long> getTechnologyTypeUsageFrequency(Collection<Long> eeIds)
Description copied from interface:ExpressionExperimentDao
Obtain the dataset usage frequency by technology type for the given dataset IDs.Note: No ACL filtering is performed.
- Specified by:
getTechnologyTypeUsageFrequency
in interfaceExpressionExperimentDao
- See Also:
ExpressionExperimentDao.getTechnologyTypeUsageFrequency()
-
getArrayDesignsUsageFrequency
public Map<ArrayDesign,Long> getArrayDesignsUsageFrequency(int maxResults)
Description copied from interface:ExpressionExperimentDao
Obtain dataset usage frequency by platform currently used.Note that a dataset counts toward all the platforms mentioned through its
BioAssay
.This method uses ACLs and the troubled status to only displays the counts of datasets the current user is entitled to see. Only administrator can see troubled platforms.
- Specified by:
getArrayDesignsUsageFrequency
in interfaceExpressionExperimentDao
-
getArrayDesignsUsageFrequency
public Map<ArrayDesign,Long> getArrayDesignsUsageFrequency(Collection<Long> eeIds, int maxResults)
Description copied from interface:ExpressionExperimentDao
Obtain dataset usage frequency by platform currently for the given dataset IDs.Note: no ACL filtering is performed. Only administrator can see troubled platforms.
- Specified by:
getArrayDesignsUsageFrequency
in interfaceExpressionExperimentDao
- See Also:
ExpressionExperimentDao.getArrayDesignsUsageFrequency(int)
-
getOriginalPlatformsUsageFrequency
public Map<ArrayDesign,Long> getOriginalPlatformsUsageFrequency(int maxResults)
Description copied from interface:ExpressionExperimentDao
Obtain dataset usage frequency by original platforms.Note that a dataset counts toward all the platforms mentioned through its
BioAssay
. Datasets whose platform hasn't been switched (i.e. the original is the same as the current one) are ignored.This method uses ACLs and the troubled status to only displays the counts of datasets the current user is entitled to see. Only administrators can see troubled platforms.
- Specified by:
getOriginalPlatformsUsageFrequency
in interfaceExpressionExperimentDao
-
getOriginalPlatformsUsageFrequency
public Map<ArrayDesign,Long> getOriginalPlatformsUsageFrequency(Collection<Long> eeIds, int maxResults)
Description copied from interface:ExpressionExperimentDao
Obtain dataset usage frequency by platform currently for the given dataset IDs.Note: no ACL filtering is performed. Only administrators can see troubled platforms.
- Specified by:
getOriginalPlatformsUsageFrequency
in interfaceExpressionExperimentDao
- See Also:
ExpressionExperimentDao.getOriginalPlatformsUsageFrequency(int)
-
getAuditEvents
public Map<Long,Collection<AuditEvent>> getAuditEvents(Collection<Long> ids)
- Specified by:
getAuditEvents
in interfaceExpressionExperimentDao
-
getBioAssayDimensions
public Collection<BioAssayDimension> getBioAssayDimensions(ExpressionExperiment expressionExperiment)
- Specified by:
getBioAssayDimensions
in interfaceExpressionExperimentDao
-
getBioAssayDimensionsFromSubSets
public Collection<BioAssayDimension> getBioAssayDimensionsFromSubSets(ExpressionExperiment expressionExperiment)
Description copied from interface:ExpressionExperimentDao
RetrieveBioAssayDimension
that are used by subsets of a givenExpressionExperiment
.This covers cases where BAs in a subset are not the same as the BAs in the experiment such as for single-cell data where we use sub-assays.
- Specified by:
getBioAssayDimensionsFromSubSets
in interfaceExpressionExperimentDao
-
getBioAssayDimension
public BioAssayDimension getBioAssayDimension(ExpressionExperiment ee, QuantitationType qt, Class<? extends BulkExpressionDataVector> dataVectorType)
Description copied from interface:ExpressionExperimentDao
Retrieve a dimension for a given experiment and quantitation type.- Specified by:
getBioAssayDimension
in interfaceExpressionExperimentDao
dataVectorType
- the type of data vectors to consider, this is necessary because otherwise all the vector tables would have to be looked at. If you do nto know the type of vector, useExpressionExperimentDao.getBioAssayDimension(ExpressionExperiment, QuantitationType)
.
-
getBioAssayDimension
public BioAssayDimension getBioAssayDimension(ExpressionExperiment ee, QuantitationType qt)
Description copied from interface:ExpressionExperimentDao
Retrieve a dimension for a given experiment and quantitation type.- Specified by:
getBioAssayDimension
in interfaceExpressionExperimentDao
-
getBioAssayDimensionById
public BioAssayDimension getBioAssayDimensionById(ExpressionExperiment ee, Long dimensionId, Class<? extends BulkExpressionDataVector> dataVectorType)
Description copied from interface:ExpressionExperimentDao
Obtain a bioassay dimension by ID.- Specified by:
getBioAssayDimensionById
in interfaceExpressionExperimentDao
-
getBioMaterialCount
public long getBioMaterialCount(ExpressionExperiment expressionExperiment)
- Specified by:
getBioMaterialCount
in interfaceExpressionExperimentDao
-
getRawDataVectorCount
public long getRawDataVectorCount(ExpressionExperiment ee)
- Specified by:
getRawDataVectorCount
in interfaceExpressionExperimentDao
- Parameters:
ee
- the expression experiment- Returns:
- count of RAW vectors.
-
getExperimentsWithOutliers
public Collection<ExpressionExperiment> getExperimentsWithOutliers()
- Specified by:
getExperimentsWithOutliers
in interfaceExpressionExperimentDao
-
getLastArrayDesignUpdate
public Map<Long,Date> getLastArrayDesignUpdate(Collection<ExpressionExperiment> expressionExperiments)
- Specified by:
getLastArrayDesignUpdate
in interfaceExpressionExperimentDao
-
getLastArrayDesignUpdate
public Date getLastArrayDesignUpdate(ExpressionExperiment ee)
- Specified by:
getLastArrayDesignUpdate
in interfaceExpressionExperimentDao
-
getPerTaxonCount
public Map<Taxon,Long> getPerTaxonCount()
Description copied from interface:ExpressionExperimentDao
Obtain the count of distinct experiments per taxon.Experiments are filtered by ACLs and troubled experiments are only visible to administrators.
- Specified by:
getPerTaxonCount
in interfaceExpressionExperimentDao
-
getPerTaxonCount
public Map<Taxon,Long> getPerTaxonCount(Collection<Long> ids)
Description copied from interface:ExpressionExperimentDao
Obtain the count of distinct experiments per taxon for experiments with the given IDs.Experiments are not filtered by ACLs and toubled experiments are only visible to administrators.
- Specified by:
getPerTaxonCount
in interfaceExpressionExperimentDao
-
getPopulatedFactorCounts
public Map<Long,Long> getPopulatedFactorCounts(Collection<Long> ids)
- Specified by:
getPopulatedFactorCounts
in interfaceExpressionExperimentDao
-
getPopulatedFactorCountsExcludeBatch
public Map<Long,Long> getPopulatedFactorCountsExcludeBatch(Collection<Long> ids)
- Specified by:
getPopulatedFactorCountsExcludeBatch
in interfaceExpressionExperimentDao
-
getQuantitationTypeCount
public Map<QuantitationType,Long> getQuantitationTypeCount(ExpressionExperiment ee)
- Specified by:
getQuantitationTypeCount
in interfaceExpressionExperimentDao
-
getPreferredSingleCellQuantitationType
public QuantitationType getPreferredSingleCellQuantitationType(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain the preferred quantitation type for single cell data, if available.- Specified by:
getPreferredSingleCellQuantitationType
in interfaceExpressionExperimentDao
-
getPreferredQuantitationType
public QuantitationType getPreferredQuantitationType(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain the preferred quantitation type for the raw vectors, if available.- Specified by:
getPreferredQuantitationType
in interfaceExpressionExperimentDao
-
getProcessedQuantitationType
public QuantitationType getProcessedQuantitationType(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain the quantitation type for the processed vectors, if available.- Specified by:
getProcessedQuantitationType
in interfaceExpressionExperimentDao
-
hasProcessedExpressionData
public boolean hasProcessedExpressionData(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Test if the dataset has preferred expression data vectors.- Specified by:
hasProcessedExpressionData
in interfaceExpressionExperimentDao
-
getSampleRemovalEvents
public Map<ExpressionExperiment,Collection<AuditEvent>> getSampleRemovalEvents(Collection<ExpressionExperiment> expressionExperiments)
- Specified by:
getSampleRemovalEvents
in interfaceExpressionExperimentDao
-
getSubSets
public Collection<ExpressionExperimentSubSet> getSubSets(ExpressionExperiment expressionExperiment)
- Specified by:
getSubSets
in interfaceExpressionExperimentDao
-
getSubSets
public Collection<ExpressionExperimentSubSet> getSubSets(ExpressionExperiment expressionExperiment, BioAssayDimension bad)
- Specified by:
getSubSets
in interfaceExpressionExperimentDao
-
getSubSetsByDimension
public Map<BioAssayDimension,Set<ExpressionExperimentSubSet>> getSubSetsByDimension(ExpressionExperiment expressionExperiment)
- Specified by:
getSubSetsByDimension
in interfaceExpressionExperimentDao
-
getSubSetById
public ExpressionExperimentSubSet getSubSetById(ExpressionExperiment ee, Long subSetId)
- Specified by:
getSubSetById
in interfaceExpressionExperimentDao
-
getTaxa
public <T extends BioAssaySet> Map<T,Taxon> getTaxa(Collection<T> bioAssaySets)
- Specified by:
getTaxa
in interfaceExpressionExperimentDao
-
getTaxon
public Taxon getTaxon(BioAssaySet ee)
Description copied from interface:ExpressionExperimentDao
Determine the taxon for a given experiment or subset.- Specified by:
getTaxon
in interfaceExpressionExperimentDao
- Returns:
- a unique taxon for the dataset, or null if no taxon could be determined
-
loadWithRelationsAndCache
public List<ExpressionExperiment> loadWithRelationsAndCache(List<Long> ids)
Description copied from interface:ExpressionExperimentDao
Load datasets by IDs with the same relation asCachedFilteringDao.loadWithCache(Filters, Sort)
.- Specified by:
loadWithRelationsAndCache
in interfaceExpressionExperimentDao
-
loadDetailsValueObjects
public Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjects(@Nullable Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit)
Description copied from interface:ExpressionExperimentDao
Special method for front-end access. This is partly redundant withFilteringVoEnabledDao.loadValueObjects(Filters, Sort, int, int)
; however, it fills in more information, returns ExpressionExperimentDetailsValueObject- Specified by:
loadDetailsValueObjects
in interfaceExpressionExperimentDao
- Parameters:
ids
- only list specific ids, or null to ignoretaxon
- only list EEs in the specified taxon, or null to ignoresort
- the field to order the results by.offset
- offsetlimit
- maximum number of results to return- Returns:
- a list of EE details VOs representing experiments matching the given arguments.
-
loadDetailsValueObjectsByIdsWithCache
public Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIdsWithCache(@Nullable Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit)
Description copied from interface:ExpressionExperimentDao
Flavour ofExpressionExperimentDao.loadDetailsValueObjectsByIds(Collection)
, but using the query cache.- Specified by:
loadDetailsValueObjectsByIdsWithCache
in interfaceExpressionExperimentDao
-
loadDetailsValueObjectsByIds
public List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIds(Collection<Long> ids)
Description copied from interface:ExpressionExperimentDao
LikeExpressionExperimentDao.loadDetailsValueObjects(Collection, Taxon, Sort, int, int)
, but returning a list.- Specified by:
loadDetailsValueObjectsByIds
in interfaceExpressionExperimentDao
-
loadDetailsValueObjectsByIdsWithCache
public List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIdsWithCache(Collection<Long> ids)
Description copied from interface:ExpressionExperimentDao
Flavour ofExpressionExperimentDao.loadDetailsValueObjectsByIds(Collection)
, but using the query cache.- Specified by:
loadDetailsValueObjectsByIdsWithCache
in interfaceExpressionExperimentDao
-
loadBlacklistedValueObjects
public Slice<ExpressionExperimentValueObject> loadBlacklistedValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit)
- Specified by:
loadBlacklistedValueObjects
in interfaceExpressionExperimentDao
-
loadLackingFactors
public Collection<ExpressionExperiment> loadLackingFactors()
- Specified by:
loadLackingFactors
in interfaceExpressionExperimentDao
-
loadLackingTags
public Collection<ExpressionExperiment> loadLackingTags()
- Specified by:
loadLackingTags
in interfaceExpressionExperimentDao
-
doLoadValueObject
protected ExpressionExperimentValueObject doLoadValueObject(ExpressionExperiment 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.- Specified by:
doLoadValueObject
in classAbstractVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
-
postProcessValueObjects
protected void postProcessValueObjects(List<ExpressionExperimentValueObject> results)
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)
- Overrides:
postProcessValueObjects
in classAbstractVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
-
loadValueObjects
public List<ExpressionExperimentValueObject> loadValueObjects(@Nullable Filters filters, @Nullable Sort sort)
Description copied from interface:FilteringVoEnabledDao
Load VOs with minimal ordering and filtering.Use this as an alternative to
FilteringVoEnabledDao.loadValueObjects(Filters, Sort, int, int)
if you do not intend to provide pagination capabilities.- Specified by:
loadValueObjects
in interfaceFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
- Overrides:
loadValueObjects
in classAbstractQueryFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
- See Also:
FilteringDao.load(Filters, Sort)
,FilteringVoEnabledDao.loadValueObjects(Filters, Sort, int, int)
-
loadValueObjects
public Slice<ExpressionExperimentValueObject> loadValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit)
Description copied from interface:FilteringVoEnabledDao
Load VOs with ordering, filtering and offset/limit.Consider using
FilteringDao.getFilter(String, Filter.Operator, String)
andFilteringDao.getSort(String, Sort.Direction, Sort.NullMode)
to produce the filters and sort safely from user input.- Specified by:
loadValueObjects
in interfaceFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
- Overrides:
loadValueObjects
in classAbstractQueryFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
- Parameters:
filters
- filters applied on the search. The properties mentioned in theFilter
must exist and be visible to Hibernate. You can use nested properties such as "curationDetails.lastUpdated".sort
- an object property and direction to order by. This property must exist and be visible to Hibernate. You can use nested properties such as "curationDetails.lastUpdated".offset
- an offset from which entities are retrieved when sorted according to the sort argument, or 0 to ignorelimit
- a limit on the number of returned results, or -1 to ignore- Returns:
- a slice of the relevant data
- See Also:
FilteringDao.load(Filters, Sort, int, int)
-
getValueObjectTransformer
protected TypedResultTransformer<ExpressionExperimentValueObject> getValueObjectTransformer()
Description copied from class:AbstractQueryFilteringVoEnabledDao
Obtain a value object transformer for the results ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.By default, it will process the first element of the tuple with
AbstractVoEnabledDao.doLoadValueObjects(Collection)
and then post-process the resulting VOs withAbstractVoEnabledDao.postProcessValueObjects(List)
.
-
remove
public void remove(ExpressionExperiment ee)
Description copied from interface:BaseDao
Remove a persistent instance- Specified by:
remove
in interfaceBaseDao<ExpressionExperiment>
- Overrides:
remove
in classAbstractDao<ExpressionExperiment>
- Parameters:
ee
- the entity to be removed
-
thaw
public void thaw(ExpressionExperiment expressionExperiment)
Description copied from interface:ExpressionExperimentDao
Thaw everything.Includes
ExpressionExperimentDao.thawLite(ExpressionExperiment)
and raw/processed vectors.Does not include single-cell vectors.
- Specified by:
thaw
in interfaceExpressionExperimentDao
-
thawLite
public void thawLite(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Thaw experiment metadata and bioassays.Include
ExpressionExperimentDao.thawLiter(ExpressionExperiment)
and bioassays.- Specified by:
thawLite
in interfaceExpressionExperimentDao
-
thawLiter
public void thawLiter(ExpressionExperiment expressionExperiment)
Description copied from interface:ExpressionExperimentDao
Thaw experiment metadata.- Specified by:
thawLiter
in interfaceExpressionExperimentDao
-
getSingleCellDimensions
public List<SingleCellDimension> getSingleCellDimensions(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain all the single cell dimensions used by the single-cell vectors of a given experiment.- Specified by:
getSingleCellDimensions
in interfaceExpressionExperimentDao
-
getSingleCellDimensionsWithoutCellIds
public List<SingleCellDimension> getSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain all the single cell dimensions used by the single-cell vectors of a given experiment.Cell IDs are not loaded.
- Specified by:
getSingleCellDimensionsWithoutCellIds
in interfaceExpressionExperimentDao
-
getSingleCellDimensionsWithoutCellIds
public List<SingleCellDimension> getSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeCharacteristics, boolean includeIndices)
- Specified by:
getSingleCellDimensionsWithoutCellIds
in interfaceExpressionExperimentDao
-
getSingleCellDimension
public SingleCellDimension getSingleCellDimension(ExpressionExperiment ee, QuantitationType qt)
Description copied from interface:ExpressionExperimentDao
Obtain the single-cell dimension used by a specific QT.- Specified by:
getSingleCellDimension
in interfaceExpressionExperimentDao
-
getSingleCellDimensionWithoutCellIds
public SingleCellDimension getSingleCellDimensionWithoutCellIds(ExpressionExperiment ee, QuantitationType qt)
Description copied from interface:ExpressionExperimentDao
Load a single-cell dimension used by a specific QT without its cell IDs.- Specified by:
getSingleCellDimensionWithoutCellIds
in interfaceExpressionExperimentDao
-
getSingleCellDimensionWithoutCellIds
public SingleCellDimension getSingleCellDimensionWithoutCellIds(ExpressionExperiment ee, QuantitationType qt, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeCharacteristics, boolean includeIndices)
- Specified by:
getSingleCellDimensionWithoutCellIds
in interfaceExpressionExperimentDao
-
getPreferredSingleCellDimension
public SingleCellDimension getPreferredSingleCellDimension(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain the preferred single cell dimension, that is the dimension associated to the preferred set of single-cell vectors.- Specified by:
getPreferredSingleCellDimension
in interfaceExpressionExperimentDao
-
getPreferredSingleCellDimensionWithoutCellIds
public SingleCellDimension getPreferredSingleCellDimensionWithoutCellIds(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Load a single-cell dimension without its cell IDs.- Specified by:
getPreferredSingleCellDimensionWithoutCellIds
in interfaceExpressionExperimentDao
-
createSingleCellDimension
public void createSingleCellDimension(ExpressionExperiment ee, SingleCellDimension singleCellDimension)
Description copied from interface:ExpressionExperimentDao
Create a single-cell dimension for a given experiment.- Specified by:
createSingleCellDimension
in interfaceExpressionExperimentDao
-
updateSingleCellDimension
public void updateSingleCellDimension(ExpressionExperiment ee, SingleCellDimension singleCellDimension)
Description copied from interface:ExpressionExperimentDao
Update a single-cell dimensino for a given experiment.- Specified by:
updateSingleCellDimension
in interfaceExpressionExperimentDao
-
deleteSingleCellDimension
public void deleteSingleCellDimension(ExpressionExperiment ee, SingleCellDimension singleCellDimension)
Description copied from interface:ExpressionExperimentDao
Delete the given single cell dimension.- Specified by:
deleteSingleCellDimension
in interfaceExpressionExperimentDao
-
streamCellIds
public Stream<String> streamCellIds(SingleCellDimension dimension, boolean createNewSession)
Description copied from interface:ExpressionExperimentDao
Stream the cell IDs of a dimension.- Specified by:
streamCellIds
in interfaceExpressionExperimentDao
createNewSession
- create a new session held by the stream, allowing to use the stream beyond the lifetime current session. If you set this to true, make absolutely sure that the resulting stream is closed.- Returns:
- a stream of cell IDs, or null if the dimension is not found
-
streamCellTypes
public Stream<Characteristic> streamCellTypes(CellTypeAssignment cta, boolean createNewSession)
- Specified by:
streamCellTypes
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristicsCategory
public Category getCellLevelCharacteristicsCategory(CellLevelCharacteristics clc)
Description copied from interface:ExpressionExperimentDao
Obtain the category of a cell-level characteristic.This handles the case where the characteristics were not loaded (i.e. using
ExpressionExperimentDao.getSingleCellDimensionsWithoutCellIds(ExpressionExperiment, boolean, boolean, boolean, boolean, boolean)
).- Specified by:
getCellLevelCharacteristicsCategory
in interfaceExpressionExperimentDao
-
getCellTypeAt
public Characteristic getCellTypeAt(CellTypeAssignment cta, int cellIndex)
Description copied from interface:ExpressionExperimentDao
Obtain the cell type at a given cell index.- Specified by:
getCellTypeAt
in interfaceExpressionExperimentDao
-
getCellTypeAt
public Characteristic[] getCellTypeAt(CellTypeAssignment cta, int startIndex, int endIndexExclusive)
- Specified by:
getCellTypeAt
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristicAt
public Characteristic getCellLevelCharacteristicAt(CellLevelCharacteristics clc, int cellIndex)
Description copied from interface:ExpressionExperimentDao
Obtain the characteristic at a given cell index.- Specified by:
getCellLevelCharacteristicAt
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristicAt
public Characteristic[] getCellLevelCharacteristicAt(CellLevelCharacteristics clc, int startIndex, int endIndexExclusive)
- Specified by:
getCellLevelCharacteristicAt
in interfaceExpressionExperimentDao
-
streamCellLevelCharacteristics
public Stream<Characteristic> streamCellLevelCharacteristics(CellLevelCharacteristics clc, boolean createNewSession)
- Specified by:
streamCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellTypeAssignments
public List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment ee)
- Specified by:
getCellTypeAssignments
in interfaceExpressionExperimentDao
-
getCellTypeAssignments
public List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment expressionExperiment, QuantitationType qt)
- Specified by:
getCellTypeAssignments
in interfaceExpressionExperimentDao
-
getPreferredCellTypeAssignment
public CellTypeAssignment getPreferredCellTypeAssignment(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain the preferred assignment of the preferred single-cell vectors.- Specified by:
getPreferredCellTypeAssignment
in interfaceExpressionExperimentDao
-
getCellTypeAssignment
public CellTypeAssignment getCellTypeAssignment(ExpressionExperiment expressionExperiment, QuantitationType qt, Long ctaId)
Description copied from interface:ExpressionExperimentDao
Obtain a cell type assignment by ID.- Specified by:
getCellTypeAssignment
in interfaceExpressionExperimentDao
-
getCellTypeAssignmentWithoutIndices
public CellTypeAssignment getCellTypeAssignmentWithoutIndices(ExpressionExperiment expressionExperiment, QuantitationType qt, Long ctaId)
Description copied from interface:ExpressionExperimentDao
Obtain a cell type assignment by ID without loading the indices.- Specified by:
getCellTypeAssignmentWithoutIndices
in interfaceExpressionExperimentDao
-
getCellTypeAssignment
public CellTypeAssignment getCellTypeAssignment(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName)
Description copied from interface:ExpressionExperimentDao
Obtain a cell type assignment by name.- Specified by:
getCellTypeAssignment
in interfaceExpressionExperimentDao
-
getCellTypeAssignmentWithoutIndices
public CellTypeAssignment getCellTypeAssignmentWithoutIndices(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName)
Description copied from interface:ExpressionExperimentDao
Obtain a cell type assignment by name without loading the indices.- Specified by:
getCellTypeAssignmentWithoutIndices
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristics
public List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain all cell-level characteristics from all single cell dimensions.- Specified by:
getCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristics
public List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment ee, Category category)
Description copied from interface:ExpressionExperimentDao
Obtain all cell-level characteristics from all single cell dimensions matching the given category.- Specified by:
getCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristics
public CellLevelCharacteristics getCellLevelCharacteristics(ExpressionExperiment ee, QuantitationType qt, Long clcId)
Description copied from interface:ExpressionExperimentDao
Obtain a specific cell-level characteristic by ID.When using this method, no
CellTypeAssignment
can be returned as those are stored in a different table.- Specified by:
getCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristics
public List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt)
- Specified by:
getCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellTypes
public List<Characteristic> getCellTypes(ExpressionExperiment ee)
- Specified by:
getCellTypes
in interfaceExpressionExperimentDao
-
getSingleCellQuantitationTypes
public List<QuantitationType> getSingleCellQuantitationTypes(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Obtain a list of single-cell QTs.- Specified by:
getSingleCellQuantitationTypes
in interfaceExpressionExperimentDao
-
getSingleCellDataVectors
public List<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment expressionExperiment, QuantitationType quantitationType)
Description copied from interface:ExpressionExperimentDao
Obtain a set of single-cell data vectors for the given quantitation type.- Specified by:
getSingleCellDataVectors
in interfaceExpressionExperimentDao
-
getSingleCellDataVectors
public List<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, boolean includeCellIds, boolean includeData, boolean includeDataIndices)
Description copied from interface:ExpressionExperimentDao
Obtain a set of single-cell data vectors for the given quantitation type.- Specified by:
getSingleCellDataVectors
in interfaceExpressionExperimentDao
-
streamSingleCellDataVectors
public Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean createNewSession)
Description copied from interface:ExpressionExperimentDao
Obtain a stream over the vectors for a given QT.- Specified by:
streamSingleCellDataVectors
in interfaceExpressionExperimentDao
fetchSize
- number of vectors to fetch at oncecreateNewSession
- create a new session held by the stream. If you set this to true, make absolutely sure that the resulting stream is closed because it is attached to aSession
object.- See Also:
QueryUtils.stream(Query, int)
-
streamSingleCellDataVectors
public Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean createNewSession, boolean includeCellIds, boolean includeData, boolean includeDataIndices)
- Specified by:
streamSingleCellDataVectors
in interfaceExpressionExperimentDao
-
getSingleCellDataVectorWithoutCellIds
public SingleCellExpressionDataVector getSingleCellDataVectorWithoutCellIds(ExpressionExperiment ee, QuantitationType quantitationType, CompositeSequence designElement)
- Specified by:
getSingleCellDataVectorWithoutCellIds
in interfaceExpressionExperimentDao
-
getNumberOfSingleCellDataVectors
public long getNumberOfSingleCellDataVectors(ExpressionExperiment ee, QuantitationType qt)
Description copied from interface:ExpressionExperimentDao
Obtain the number of single-cell vectors for a given QT.- Specified by:
getNumberOfSingleCellDataVectors
in interfaceExpressionExperimentDao
-
getNumberOfNonZeroes
public long getNumberOfNonZeroes(ExpressionExperiment ee, QuantitationType qt)
Description copied from interface:ExpressionExperimentDao
Obtain the number of non-zeroes.- Specified by:
getNumberOfNonZeroes
in interfaceExpressionExperimentDao
-
getNumberOfNonZeroesBySample
public Map<BioAssay,Long> getNumberOfNonZeroesBySample(ExpressionExperiment ee, QuantitationType qt, int fetchSize)
Description copied from interface:ExpressionExperimentDao
Obtain the number of non-zeroes by sample.This is quite costly because the indices of each vector has to be examined.
- Specified by:
getNumberOfNonZeroesBySample
in interfaceExpressionExperimentDao
-
removeSingleCellDataVectors
public int removeSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, boolean deleteQt)
Description copied from interface:ExpressionExperimentDao
Remove the given single-cell data vectors.- Specified by:
removeSingleCellDataVectors
in interfaceExpressionExperimentDao
quantitationType
- quantitation to removedeleteQt
- if true, detach the QT from the experiment and delete it TODO: add a replaceSingleCellDataVectors to avoid needing this
-
removeAllSingleCellDataVectors
public int removeAllSingleCellDataVectors(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Remove all single-cell data vectors and their quantitation types.- Specified by:
removeAllSingleCellDataVectors
in interfaceExpressionExperimentDao
-
getNumberOfDesignElementsPerSample
public Map<BioAssay,Long> getNumberOfDesignElementsPerSample(ExpressionExperiment expressionExperiment)
- Specified by:
getNumberOfDesignElementsPerSample
in interfaceExpressionExperimentDao
-
getFilteringQuery
protected Query getFilteringQuery(@Nullable Filters filters, @Nullable Sort sort)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Produce a query for retrieving value objects after applying a set of filters and a given ordering.Note that if your implementation does not produce a
List
ofAbstractQueryFilteringVoEnabledDao
whenQuery.list()
is invoked, you must overrideAbstractQueryFilteringVoEnabledDao.getValueObjectTransformer()
.The make the cached query (i.e.
AbstractQueryFilteringVoEnabledDao.loadWithCache(Filters, Sort)
behave the same, you also have to explicitly initialize any lazy relations inAbstractVoEnabledDao.doLoadValueObject(Identifiable)
because the VO constructor will not initialize them.- Specified by:
getFilteringQuery
in classAbstractQueryFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
- Returns:
- a
Query
that produce a list ofAbstractQueryFilteringVoEnabledDao
-
initializeCachedFilteringResult
protected void initializeCachedFilteringResult(ExpressionExperiment ee)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Initialize a result fromAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
retrieved from the HibernateStandardQueryCache
.Lazy-loaded relations that are fetched in
AbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
must be initialized manually in this method to ensure that the entity has all the expected fields if they are retrieved from the second-level cache.
-
getFilteringIdQuery
protected Query getFilteringIdQuery(@Nullable Filters filters, @Nullable Sort sort)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Produce a query that will be used to retrieve IDs ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.
-
getFilteringCountQuery
protected Query getFilteringCountQuery(@Nullable Filters filters)
Description copied from class:AbstractQueryFilteringVoEnabledDao
Produce a query that will be used to retrieve the size ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.- Overrides:
getFilteringCountQuery
in classAbstractQueryFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>
- Returns:
- a
Query
which must return a singleLong
value
-
configureFilterableProperties
protected void configureFilterableProperties(AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer configurer)
Description copied from class:AbstractFilteringVoEnabledDao
Register filterable properties.- Overrides:
configureFilterableProperties
in classAbstractCuratableDao<ExpressionExperiment,ExpressionExperimentValueObject>
-
getFilterablePropertyMeta
protected AbstractFilteringVoEnabledDao.FilterablePropertyMeta getFilterablePropertyMeta(String propertyName)
Checks for special properties that are allowed to be referenced on certain objects. E.g. characteristics on EEs. Obtain various meta-information used to infer what to use in aFilter
orSort
.This is used by
AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, String)
andFilteringDao.getSort(String, Sort.Direction, Sort.NullMode)
.Include filtering by
lastUpdated
,troubled
andneedsAttention
from the associated curation details.- Overrides:
getFilterablePropertyMeta
in classAbstractCuratableDao<ExpressionExperiment,ExpressionExperimentValueObject>
- See Also:
AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, String)
,AbstractFilteringVoEnabledDao.getFilter(String, Filter.Operator, Collection)
,FilteringDao.getSort(String, Sort.Direction, Sort.NullMode)
-
getRawDataVectors
public Collection<RawExpressionDataVector> getRawDataVectors(ExpressionExperiment ee, QuantitationType qt)
Description copied from interface:ExpressionExperimentDao
Obtain raw vectors for a given experiment and QT.This is preferable to using
ExpressionExperiment.getRawExpressionDataVectors()
as it only loads vectors relevant to the given QT.- Specified by:
getRawDataVectors
in interfaceExpressionExperimentDao
-
getRawDataVectors
public Collection<RawExpressionDataVector> getRawDataVectors(ExpressionExperiment ee, List<BioAssay> assays, QuantitationType qt)
Description copied from interface:ExpressionExperimentDao
Obtain a slice of the raw vectors for a given experiment and QT.- Specified by:
getRawDataVectors
in interfaceExpressionExperimentDao
-
addRawDataVectors
public int addRawDataVectors(ExpressionExperiment ee, QuantitationType newQt, Collection<RawExpressionDataVector> newVectors)
Description copied from interface:ExpressionExperimentDao
Add raw data vectors with the given quantitation type.- Specified by:
addRawDataVectors
in interfaceExpressionExperimentDao
- Returns:
- the number of raw data vectors created
-
removeAllRawDataVectors
public int removeAllRawDataVectors(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Remove all raw data vectors.All affected QTs are removed.
- Specified by:
removeAllRawDataVectors
in interfaceExpressionExperimentDao
-
removeRawDataVectors
public int removeRawDataVectors(ExpressionExperiment ee, QuantitationType qt, boolean keepDimension)
Description copied from interface:ExpressionExperimentDao
Remove raw data vectors for a given quantitation type.Unused
BioAssayDimension
are removed unless keepDimension is set totrue
.- Specified by:
removeRawDataVectors
in interfaceExpressionExperimentDao
keepDimension
- keep theBioAssayDimension
if it is not used by any other vectors. Use this only if you intend to reuse the dimension for another set of vectors. Alternatively,ExpressionExperimentDao.replaceRawDataVectors(ExpressionExperiment, QuantitationType, Collection)
can be used.- Returns:
- the number of removed raw vectors
-
replaceRawDataVectors
public int replaceRawDataVectors(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> vectors)
Description copied from interface:ExpressionExperimentDao
Replace raw data vectors for a given quantitation type.- Specified by:
replaceRawDataVectors
in interfaceExpressionExperimentDao
- Returns:
- the number of replaced raw vectors
-
getProcessedDataVectors
public Collection<ProcessedExpressionDataVector> getProcessedDataVectors(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Retrieve the processed vector for an experiment.Unlike
ExpressionExperiment.getProcessedExpressionDataVectors()
, this is guaranteed to return only one set of vectors and will raise aNonUniqueResultException
if there is more than one processed QTs.- Specified by:
getProcessedDataVectors
in interfaceExpressionExperimentDao
- Returns:
- the processed vectors, or null if there are no processed vectors
- See Also:
ExpressionExperimentDao.getProcessedQuantitationType(ExpressionExperiment)
-
getProcessedDataVectors
public Collection<ProcessedExpressionDataVector> getProcessedDataVectors(ExpressionExperiment ee, List<BioAssay> assays)
Description copied from interface:ExpressionExperimentDao
Retrieve a slice of processed vectors for an experiment.- Specified by:
getProcessedDataVectors
in interfaceExpressionExperimentDao
- Returns:
- the processed vectors, or null if there are no processed vectors
-
createProcessedDataVectors
public int createProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors)
Description copied from interface:ExpressionExperimentDao
Add processed data vectorsThe number of vectors
ExpressionExperiment.getNumberOfDataVectors()
is updated.- Specified by:
createProcessedDataVectors
in interfaceExpressionExperimentDao
- Returns:
- the number of created processed vectors
-
removeProcessedDataVectors
public int removeProcessedDataVectors(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentDao
Remove processed data vectors.Their corresponding QT is detached from the experiment and removed. The number of vectors (i.e.
ExpressionExperiment.getNumberOfDataVectors()
is set to zero. Unused dimensions are removed.- Specified by:
removeProcessedDataVectors
in interfaceExpressionExperimentDao
- Returns:
- the number of removed processed vectors
-
replaceProcessedDataVectors
public int replaceProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors)
Description copied from interface:ExpressionExperimentDao
Replace processed data vectors.The QT is reused and the number of vectors
ExpressionExperiment.getNumberOfDataVectors()
is updated. Unused dimensions are removed.- Specified by:
replaceProcessedDataVectors
in interfaceExpressionExperimentDao
- Returns:
- the number of vectors replaced
-
-