Class 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>
- Author:
- pavlidis
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledDao
AbstractFilteringVoEnabledDao.FilterablePropertiesConfigurer, AbstractFilteringVoEnabledDao.FilterablePropertyMeta
Nested classes/interfaces inherited from interface ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentDao
ExpressionExperimentDao.Identifiers
-
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 -
Method Summary
Modifier and TypeMethodDescriptionint
addRawDataVectors
(ExpressionExperiment ee, QuantitationType newQt, Collection<RawExpressionDataVector> newVectors) Add raw data vectors with the given quantitation type.browse
(int start, int limit) protected void
configureFilterableProperties
(AbstractFilteringVoEnabledDao<ExpressionExperiment, ExpressionExperimentValueObject>.FilterablePropertiesConfigurer configurer) Register filterable properties.long
countBioMaterials
(Filters filters) Count the number of biomaterials of datasets satisfying the given filters.int
createProcessedDataVectors
(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Add processed data vectorsvoid
createSingleCellDimension
(ExpressionExperiment ee, SingleCellDimension singleCellDimension) Create a single-cell dimension for a given experiment.void
deleteSingleCellDimension
(ExpressionExperiment ee, SingleCellDimension singleCellDimension) Delete the given single cell dimension.protected ExpressionExperimentValueObject
Load a value object for a given entity.filterByTaxon
(Collection<Long> ids, Taxon taxon) find
(ExpressionExperiment entity) Does a look up for the given entity in the persistent storage, usually looking for a specific identifier ( either id or a string property).findByAccession
(String accession) findByAccession
(DatabaseEntry accession) findByExpressedGene
(Gene gene, Double rank) findByFactorValue
(Long factorValueId) findByGene
(Gene gene) uses GENE2CS table.findByName
(String name) findByQuantitationType
(QuantitationType quantitationType) findByShortName
(String shortName) findByTaxon
(Taxon taxon) findByUpdatedLimit
(int limit) findByUpdatedLimit
(Collection<Long> ids, int limit) findOneByAccession
(String accession) findOneByName
(String name) findUpdatedAfter
(Date date) Find experiments updated on or after a given date.Map
<Class<? extends Identifiable>, List<Characteristic>> getAllAnnotations
(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain all annotations, grouped by applicable level.getAnnotationsUsageFrequency
(Collection<Long> eeIds, Class<? extends Identifiable> level, int maxResults, int minFrequency, String category, Collection<String> excludedCategoryUris, Collection<String> excludedTermUris, 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.getArrayDesignsUsageFrequency
(int maxResults) Obtain dataset usage frequency by platform currently used.getArrayDesignsUsageFrequency
(Collection<Long> eeIds, int maxResults) Obtain dataset usage frequency by platform currently for the given dataset IDs.getArrayDesignsUsed
(ExpressionExperiment ee, QuantitationType qt, Class<? extends DataVector> dataVectorType) getAuditEvents
(Collection<Long> ids) Retrieve a dimension for a given experiment and quantitation type.getBioAssayDimension
(ExpressionExperiment ee, QuantitationType qt, Class<? extends BulkExpressionDataVector> dataVectorType) Retrieve a dimension for a given experiment and quantitation type.getBioAssayDimensionById
(ExpressionExperiment ee, Long dimensionId, Class<? extends BulkExpressionDataVector> dataVectorType) Obtain a bioassay dimension by ID.getBioAssayDimensions
(ExpressionExperiment expressionExperiment) getBioAssayDimensionsFromSubSets
(ExpressionExperiment expressionExperiment) RetrieveBioAssayDimension
that are used by subsets of a givenExpressionExperiment
.getBioMaterialAnnotations
(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain sample-level annotations.long
getBioMaterialCount
(ExpressionExperiment expressionExperiment) getCategoriesUsageFrequency
(Collection<Long> eeIds, Collection<String> excludedCategoryUris, Collection<String> excludedTermUris, Collection<String> retainedTermUris, int maxResults) getCellLevelCharacteristicAt
(CellLevelCharacteristics clc, int cellIndex) Obtain the characteristic at a given cell index.getCellLevelCharacteristicAt
(CellLevelCharacteristics clc, int startIndex, int endIndexExclusive) Obtain all cell-level characteristics from all single cell dimensions.getCellLevelCharacteristics
(ExpressionExperiment ee, Category category) Obtain all cell-level characteristics from all single cell dimensions matching the given category.getCellLevelCharacteristics
(ExpressionExperiment expressionExperiment, QuantitationType qt) getCellLevelCharacteristics
(ExpressionExperiment ee, QuantitationType qt, Long clcId) Obtain a specific cell-level characteristic by ID.getCellLevelCharacteristics
(ExpressionExperiment ee, QuantitationType qt, String clcName) getCellLevelCharacteristics
(ExpressionExperiment expressionExperiment, QuantitationType qt, Category category) Obtain the category of a cell-level characteristic.getCellLevelCharacteristicsWithoutIndices
(ExpressionExperiment ee, QuantitationType qt, String clcName) getCellTypeAssignment
(ExpressionExperiment expressionExperiment, QuantitationType qt, Long ctaId) Obtain a cell type assignment by ID.getCellTypeAssignment
(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName) Obtain a cell type assignment by name.getCellTypeAssignmentByProtocol
(ExpressionExperiment ee, QuantitationType qt, String protocolName) Obtain all cell type assignment protocols currently used.getCellTypeAssignments
(ExpressionExperiment expressionExperiment, QuantitationType qt) getCellTypeAssignmentWithoutIndices
(ExpressionExperiment expressionExperiment, QuantitationType qt, Long ctaId) Obtain a cell type assignment by ID without loading the indices.getCellTypeAssignmentWithoutIndices
(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName) Obtain a cell type assignment by name without loading the indices.getCellTypeAt
(CellTypeAssignment cta, int cellIndex) Obtain the cell type at a given cell index.getCellTypeAt
(CellTypeAssignment cta, int startIndex, int endIndexExclusive) getExperimentalDesignAnnotations
(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain experimental design-level annotations.getExperimentAnnotations
(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain experiment-level annotations.Obtain the subset annotations.Obtain factor value-level annotations.Obtain factor value-level annotations for a given subset.getFilterablePropertyMeta
(String propertyName) Checks for special properties that are allowed to be referenced on certain objects.protected Query
getFilteringCountQuery
(Filters filters) Produce a query that will be used to retrieve the size ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.protected Query
getFilteringIdQuery
(Filters filters, Sort sort) Produce a query that will be used to retrieve IDs ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.protected Query
getFilteringQuery
(Filters filters, Sort sort) Produce a query for retrieving value objects after applying a set of filters and a given ordering.getGenesUsedByPreferredVectors
(ExpressionExperiment experimentConstraint) Obtain genes used by the processed vectors of this dataset.getLastArrayDesignUpdate
(Collection<ExpressionExperiment> expressionExperiments) Obtain the missing value vectors for a given experiment.getNumberOfDesignElementsPerSample
(ExpressionExperiment expressionExperiment) long
Obtain the number of non-zeroes.getNumberOfNonZeroesBySample
(ExpressionExperiment ee, QuantitationType qt, int fetchSize, boolean useCursorFetchIfSupported) Obtain the number of non-zeroes by sample.long
Obtain the number of single-cell vectors for a given QT.getOriginalPlatformsUsageFrequency
(int maxResults) Obtain dataset usage frequency by original platforms.getOriginalPlatformsUsageFrequency
(Collection<Long> eeIds, int maxResults) Obtain dataset usage frequency by platform currently for the given dataset IDs.Obtain the count of distinct experiments per taxon.getPerTaxonCount
(Collection<Long> ids) Obtain the count of distinct experiments per taxon for experiments with the given IDs.Obtain the preferred assignment of the preferred single-cell vectors.Obtain the preferred assignment for the given quantitation type.Obtain the preferred assignment for the given quantitation type without loading the indices.Obtain the preferred quantitation type for the raw vectors, if available.Obtain the preferred raw data vectors for a given experiment.Obtain the preferred single cell dimension, that is the dimension associated to the preferred set of single-cell vectors.getPreferredSingleCellDimensionsWithoutCellIds
(ExpressionExperiment ee, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeProtocol, boolean includeCharacteristics, boolean includeIndices) Load a single-cell dimension without its cell IDs.Obtain the preferred quantitation type for single cell data, if available.Retrieve the processed vector for an experiment.getProcessedDataVectors
(ExpressionExperiment ee, List<BioAssay> assays) Retrieve a slice of processed vectors for an experiment.Obtain the quantitation type for the processed vectors, if available.long
getRawDataVectors
(ExpressionExperiment ee, List<BioAssay> assays, QuantitationType qt) Obtain a slice of the raw vectors for a given experiment and QT.Obtain raw vectors for a given experiment and QT.getSampleRemovalEvents
(Collection<ExpressionExperiment> expressionExperiments) getSingleCellDataVectors
(ExpressionExperiment expressionExperiment, QuantitationType quantitationType) Obtain a set of single-cell data vectors for the given quantitation type.getSingleCellDataVectors
(ExpressionExperiment ee, QuantitationType quantitationType, boolean includeCellIds, boolean includeData, boolean includeDataIndices) Obtain a set of single-cell data vectors for the given quantitation type.getSingleCellDataVectorWithoutCellIds
(ExpressionExperiment ee, QuantitationType quantitationType, CompositeSequence designElement) Obtain the single-cell dimension used by a specific QT.Obtain all the single cell dimensions used by the single-cell vectors of a given experiment.Obtain all the single cell dimensions used by the single-cell vectors of a given experiment.getSingleCellDimensionsWithoutCellIds
(ExpressionExperiment ee, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeProtocol, boolean includeCharacteristics, boolean includeIndices) Load a single-cell dimension used by a specific QT without its cell IDs.getSingleCellDimensionWithoutCellIds
(ExpressionExperiment ee, QuantitationType qt, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeProtocol, boolean includeCharacteristics, boolean includeIndices) Obtain a list of single-cell QTs.getSubSetById
(ExpressionExperiment ee, Long subSetId) getSubSets
(ExpressionExperiment expressionExperiment) getSubSets
(ExpressionExperiment expressionExperiment, BioAssayDimension bad) getSubSetsByDimension
(ExpressionExperiment expressionExperiment) Determine the taxon for a given experiment or subset.Obtain the dataset usage frequency by technology type.Obtain the dataset usage frequency by technology type for the given dataset IDs.Obtain a value object transformer for the results ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
.boolean
Test if the dataset has preferred expression data vectors.protected void
Initialize a result fromAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
retrieved from the HibernateStandardQueryCache
.Load an experiment by ID with a specific cache mode.Load all possible identifiers for all experiments.loadBlacklistedValueObjects
(Filters filters, Sort sort, int offset, int limit) loadDetailsValueObjects
(Collection<Long> ids, Taxon taxon, Sort sort, int offset, int limit) Special method for front-end access.LikeExpressionExperimentDao.loadDetailsValueObjects(Collection, Taxon, Sort, int, int)
, but returning a list.Flavour ofExpressionExperimentDao.loadDetailsValueObjectsByIds(Collection)
, but using the query cache.loadDetailsValueObjectsByIdsWithCache
(Collection<Long> ids, Taxon taxon, Sort sort, int offset, int limit) Flavour ofExpressionExperimentDao.loadDetailsValueObjectsByIds(Collection)
, but using the query cache.loadValueObjects
(Filters filters, Sort sort) Load VOs with minimal ordering and filtering.loadValueObjects
(Filters filters, Sort sort, int offset, int limit) Load VOs with ordering, filtering and offset/limit.Load datasets by IDs with the same relation asCachedFilteringDao.loadWithCache(Filters, Sort)
.protected void
Post-process VOs in bulk.void
Remove a persistent instanceint
Remove all raw data vectors.int
Remove all single-cell data vectors and their quantitation types.int
Remove processed data vectors.int
removeRawDataVectors
(ExpressionExperiment ee, QuantitationType qt, boolean keepDimension) Remove raw data vectors for a given quantitation type.int
removeSingleCellDataVectors
(ExpressionExperiment ee, QuantitationType quantitationType, boolean deleteQt) Remove the given single-cell data vectors.int
replaceProcessedDataVectors
(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Replace processed data vectors.int
replaceRawDataVectors
(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> vectors) Replace raw data vectors for a given quantitation type.streamCellIds
(SingleCellDimension dimension, boolean createNewSession) Stream the cell IDs of a dimension.streamCellLevelCharacteristics
(CellLevelCharacteristics clc, boolean createNewSession) streamCellTypes
(CellTypeAssignment cta, boolean createNewSession) streamSingleCellDataVectors
(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean useCursorFetchIfSupported, boolean createNewSession) Obtain a stream over the vectors for a given QT.streamSingleCellDataVectors
(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean useCursorFetchIfSupported, boolean createNewSession, boolean includeCellIds, boolean includeData, boolean includeDataIndices) void
thaw
(ExpressionExperiment expressionExperiment) Thaw everything.void
Thaw experiment metadata and bioassays.void
thawLiter
(ExpressionExperiment expressionExperiment) Thaw experiment metadata.void
updateSingleCellDimension
(ExpressionExperiment ee, SingleCellDimension singleCellDimension) Update a single-cell dimensino for a given experiment.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 Details
-
ExpressionExperimentDaoImpl
-
-
Method Details
-
load
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
-
loadAllIdentifiers
Description copied from interface:ExpressionExperimentDao
Load all possible identifiers for all experiments.- Specified by:
loadAllIdentifiers
in interfaceExpressionExperimentDao
-
browse
- 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>
-
filterByTaxon
- Specified by:
filterByTaxon
in interfaceExpressionExperimentDao
-
findByShortName
- Specified by:
findByShortName
in interfaceExpressionExperimentDao
-
findByName
- Specified by:
findByName
in interfaceExpressionExperimentDao
-
findOneByName
- Specified by:
findOneByName
in interfaceExpressionExperimentDao
-
find
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
- Specified by:
findByAccession
in interfaceExpressionExperimentDao
-
findByAccession
- Specified by:
findByAccession
in interfaceExpressionExperimentDao
-
findOneByAccession
- Specified by:
findOneByAccession
in interfaceExpressionExperimentDao
-
findByBibliographicReference
- Specified by:
findByBibliographicReference
in interfaceExpressionExperimentDao
-
findByBioAssay
- Specified by:
findByBioAssay
in interfaceExpressionExperimentDao
-
findByBioMaterial
- Specified by:
findByBioMaterial
in interfaceExpressionExperimentDao
-
findByBioMaterials
public Map<ExpressionExperiment,Collection<BioMaterial>> findByBioMaterials(Collection<BioMaterial> bms) - Specified by:
findByBioMaterials
in interfaceExpressionExperimentDao
-
findByExpressedGene
- Specified by:
findByExpressedGene
in interfaceExpressionExperimentDao
-
findByDesign
- Specified by:
findByDesign
in interfaceExpressionExperimentDao
-
findByFactor
- Specified by:
findByFactor
in interfaceExpressionExperimentDao
-
findByFactorValue
- Specified by:
findByFactorValue
in interfaceExpressionExperimentDao
-
findByFactorValue
- Specified by:
findByFactorValue
in interfaceExpressionExperimentDao
-
findByFactorValues
- Specified by:
findByFactorValues
in interfaceExpressionExperimentDao
-
findByGene
uses GENE2CS table.- Specified by:
findByGene
in interfaceExpressionExperimentDao
-
findByQuantitationType
- Specified by:
findByQuantitationType
in interfaceExpressionExperimentDao
-
findByTaxon
- Specified by:
findByTaxon
in interfaceExpressionExperimentDao
-
findByUpdatedLimit
- Specified by:
findByUpdatedLimit
in interfaceExpressionExperimentDao
-
findByUpdatedLimit
- Specified by:
findByUpdatedLimit
in interfaceExpressionExperimentDao
-
findUpdatedAfter
Description copied from interface:ExpressionExperimentDao
Find experiments updated on or after a given date.- Specified by:
findUpdatedAfter
in interfaceExpressionExperimentDao
-
getAnnotationCounts
- 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
- Parameters:
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
- Parameters:
useEe2c
- use theEXPRESSION_EXPERIMENTE2CHARACTERISTIC
table,TableMaintenanceUtil
-
getExperimentSubSetAnnotations
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
- 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
Description copied from interface:ExpressionExperimentDao
Obtain factor value-level annotations.- Specified by:
getFactorValueAnnotations
in interfaceExpressionExperimentDao
-
getFactorValueAnnotations
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
- Specified by:
getExperimentsLackingPublications
in interfaceExpressionExperimentDao
-
updateMeanVarianceRelation
public MeanVarianceRelation updateMeanVarianceRelation(ExpressionExperiment ee, MeanVarianceRelation mvr) - Specified by:
updateMeanVarianceRelation
in interfaceExpressionExperimentDao
-
countBioMaterials
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
- Specified by:
getArrayDesignsUsed
in interfaceExpressionExperimentDao
-
getArrayDesignsUsed
- Specified by:
getArrayDesignsUsed
in interfaceExpressionExperimentDao
-
getArrayDesignsUsed
public Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment ee, QuantitationType qt, Class<? extends DataVector> dataVectorType) - Specified by:
getArrayDesignsUsed
in interfaceExpressionExperimentDao
-
getGenesUsedByPreferredVectors
Description copied from interface:ExpressionExperimentDao
Obtain genes used by the processed vectors of this dataset.- Specified by:
getGenesUsedByPreferredVectors
in interfaceExpressionExperimentDao
-
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
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:
-
getArrayDesignsUsageFrequency
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
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:
-
getOriginalPlatformsUsageFrequency
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:
-
getAuditEvents
- 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
- Parameters:
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
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
- Specified by:
getBioMaterialCount
in interfaceExpressionExperimentDao
-
getRawDataVectorCount
- Specified by:
getRawDataVectorCount
in interfaceExpressionExperimentDao
- Parameters:
ee
- the expression experiment- Returns:
- count of RAW vectors.
-
getExperimentsWithOutliers
- Specified by:
getExperimentsWithOutliers
in interfaceExpressionExperimentDao
-
getLastArrayDesignUpdate
public Map<Long,Date> getLastArrayDesignUpdate(Collection<ExpressionExperiment> expressionExperiments) - Specified by:
getLastArrayDesignUpdate
in interfaceExpressionExperimentDao
-
getLastArrayDesignUpdate
- Specified by:
getLastArrayDesignUpdate
in interfaceExpressionExperimentDao
-
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
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
- Specified by:
getPopulatedFactorCounts
in interfaceExpressionExperimentDao
-
getPopulatedFactorCountsExcludeBatch
- Specified by:
getPopulatedFactorCountsExcludeBatch
in interfaceExpressionExperimentDao
-
getQuantitationTypeCount
- Specified by:
getQuantitationTypeCount
in interfaceExpressionExperimentDao
-
getPreferredSingleCellQuantitationType
Description copied from interface:ExpressionExperimentDao
Obtain the preferred quantitation type for single cell data, if available.- Specified by:
getPreferredSingleCellQuantitationType
in interfaceExpressionExperimentDao
-
getPreferredQuantitationType
Description copied from interface:ExpressionExperimentDao
Obtain the preferred quantitation type for the raw vectors, if available.- Specified by:
getPreferredQuantitationType
in interfaceExpressionExperimentDao
-
getProcessedQuantitationType
Description copied from interface:ExpressionExperimentDao
Obtain the quantitation type for the processed vectors, if available.- Specified by:
getProcessedQuantitationType
in interfaceExpressionExperimentDao
-
hasProcessedExpressionData
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
- 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
- Specified by:
getSubSetById
in interfaceExpressionExperimentDao
-
getTaxa
- Specified by:
getTaxa
in interfaceExpressionExperimentDao
-
getTaxon
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
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
- Specified by:
loadLackingFactors
in interfaceExpressionExperimentDao
-
loadLackingTags
- Specified by:
loadLackingTags
in interfaceExpressionExperimentDao
-
doLoadValueObject
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
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:
-
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:
-
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
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
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
Description copied from interface:ExpressionExperimentDao
Thaw experiment metadata and bioassays.Include
ExpressionExperimentDao.thawLiter(ExpressionExperiment)
and bioassays.- Specified by:
thawLite
in interfaceExpressionExperimentDao
-
thawLiter
Description copied from interface:ExpressionExperimentDao
Thaw experiment metadata.- Specified by:
thawLiter
in interfaceExpressionExperimentDao
-
getSingleCellDimensions
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
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 includeProtocol, boolean includeCharacteristics, boolean includeIndices) - Specified by:
getSingleCellDimensionsWithoutCellIds
in interfaceExpressionExperimentDao
-
getSingleCellDimension
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 includeProtocol, boolean includeCharacteristics, boolean includeIndices) - Specified by:
getSingleCellDimensionWithoutCellIds
in interfaceExpressionExperimentDao
-
getPreferredSingleCellDimension
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
Description copied from interface:ExpressionExperimentDao
Load a single-cell dimension without its cell IDs.- Specified by:
getPreferredSingleCellDimensionWithoutCellIds
in interfaceExpressionExperimentDao
-
getPreferredSingleCellDimensionsWithoutCellIds
public SingleCellDimension getPreferredSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeProtocol, boolean includeCharacteristics, boolean includeIndices) - Specified by:
getPreferredSingleCellDimensionsWithoutCellIds
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
Description copied from interface:ExpressionExperimentDao
Stream the cell IDs of a dimension.- Specified by:
streamCellIds
in interfaceExpressionExperimentDao
- Parameters:
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
- Specified by:
streamCellTypes
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristicsCategory
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, boolean)
).- Specified by:
getCellLevelCharacteristicsCategory
in interfaceExpressionExperimentDao
-
getCellTypeAt
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
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
- Specified by:
getCellTypeAssignments
in interfaceExpressionExperimentDao
-
getCellTypeAssignments
public List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment expressionExperiment, QuantitationType qt) - Specified by:
getCellTypeAssignments
in interfaceExpressionExperimentDao
-
getCellTypeAssignmentsWithoutIndices
public Collection<CellTypeAssignment> getCellTypeAssignmentsWithoutIndices(ExpressionExperiment ee, QuantitationType qt) - Specified by:
getCellTypeAssignmentsWithoutIndices
in interfaceExpressionExperimentDao
-
getPreferredCellTypeAssignment
Description copied from interface:ExpressionExperimentDao
Obtain the preferred assignment of the preferred single-cell vectors.- Specified by:
getPreferredCellTypeAssignment
in interfaceExpressionExperimentDao
-
getPreferredCellTypeAssignment
public CellTypeAssignment getPreferredCellTypeAssignment(ExpressionExperiment ee, QuantitationType qt) throws NonUniqueResultException Description copied from interface:ExpressionExperimentDao
Obtain the preferred assignment for the given quantitation type.- Specified by:
getPreferredCellTypeAssignment
in interfaceExpressionExperimentDao
- Throws:
NonUniqueResultException
- if there are multiple preferred cell-type labellings
-
getPreferredCellTypeAssignmentWithoutIndices
public CellTypeAssignment getPreferredCellTypeAssignmentWithoutIndices(ExpressionExperiment ee, QuantitationType qt) throws NonUniqueResultException Description copied from interface:ExpressionExperimentDao
Obtain the preferred assignment for the given quantitation type without loading the indices.- Specified by:
getPreferredCellTypeAssignmentWithoutIndices
in interfaceExpressionExperimentDao
- Throws:
NonUniqueResultException
- if there are multiple preferred cell-type labellings
-
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
-
getCellTypeAssignmentProtocols
Description copied from interface:ExpressionExperimentDao
Obtain all cell type assignment protocols currently used.- Specified by:
getCellTypeAssignmentProtocols
in interfaceExpressionExperimentDao
-
getCellTypeAssignmentByProtocol
@Nullable public Collection<CellTypeAssignment> getCellTypeAssignmentByProtocol(ExpressionExperiment ee, QuantitationType qt, String protocolName) - Specified by:
getCellTypeAssignmentByProtocol
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
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
@Nullable public CellLevelCharacteristics getCellLevelCharacteristics(ExpressionExperiment ee, QuantitationType qt, String clcName) - Specified by:
getCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristics
public List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt) - Specified by:
getCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristics
public List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt, Category category) - Specified by:
getCellLevelCharacteristics
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristicsWithoutIndices
public CellLevelCharacteristics getCellLevelCharacteristicsWithoutIndices(ExpressionExperiment ee, QuantitationType qt, Long clcId) - Specified by:
getCellLevelCharacteristicsWithoutIndices
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristicsWithoutIndices
public CellLevelCharacteristics getCellLevelCharacteristicsWithoutIndices(ExpressionExperiment ee, QuantitationType qt, String clcName) - Specified by:
getCellLevelCharacteristicsWithoutIndices
in interfaceExpressionExperimentDao
-
getCellLevelCharacteristicsWithoutIndices
public Collection<CellLevelCharacteristics> getCellLevelCharacteristicsWithoutIndices(ExpressionExperiment ee, QuantitationType qt) - Specified by:
getCellLevelCharacteristicsWithoutIndices
in interfaceExpressionExperimentDao
-
getCellTypes
- Specified by:
getCellTypes
in interfaceExpressionExperimentDao
-
getSingleCellQuantitationTypes
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 useCursorFetchIfSupported, boolean createNewSession) Description copied from interface:ExpressionExperimentDao
Obtain a stream over the vectors for a given QT.- Specified by:
streamSingleCellDataVectors
in interfaceExpressionExperimentDao
- Parameters:
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:
-
streamSingleCellDataVectors
public Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean useCursorFetchIfSupported, 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
Description copied from interface:ExpressionExperimentDao
Obtain the number of single-cell vectors for a given QT.- Specified by:
getNumberOfSingleCellDataVectors
in interfaceExpressionExperimentDao
-
getNumberOfNonZeroes
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, boolean useCursorFetchIfSupported) 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
- Parameters:
quantitationType
- quantitation to removedeleteQt
- if true, detach the QT from the experiment and delete it TODO: add a replaceSingleCellDataVectors to avoid needing this
-
removeAllSingleCellDataVectors
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
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
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
Description copied from class:AbstractQueryFilteringVoEnabledDao
Produce a query that will be used to retrieve IDs ofAbstractQueryFilteringVoEnabledDao.getFilteringQuery(Filters, Sort)
. -
getFilteringCountQuery
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<ExpressionExperiment, ExpressionExperimentValueObject>.FilterablePropertiesConfigurer configurer) Description copied from class:AbstractFilteringVoEnabledDao
Register filterable properties. -
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:
-
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
-
getPreferredRawDataVectors
Description copied from interface:ExpressionExperimentDao
Obtain the preferred raw data vectors for a given experiment.- Specified by:
getPreferredRawDataVectors
in interfaceExpressionExperimentDao
-
getMissingValueVectors
public Map<QuantitationType,Collection<RawExpressionDataVector>> getMissingValueVectors(ExpressionExperiment ee) Description copied from interface:ExpressionExperimentDao
Obtain the missing value vectors for a given experiment.- Specified by:
getMissingValueVectors
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
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
- Parameters:
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
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:
-
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
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
-