Interface ExpressionExperimentDao
- All Superinterfaces:
BaseDao<ExpressionExperiment>
,BaseVoEnabledDao<ExpressionExperiment,
,ExpressionExperimentValueObject> BrowsingDao<ExpressionExperiment>
,CachedFilteringDao<ExpressionExperiment>
,CachedFilteringVoEnabledDao<ExpressionExperiment,
,ExpressionExperimentValueObject> CuratableDao<ExpressionExperiment>
,FilteringDao<ExpressionExperiment>
,FilteringVoEnabledDao<ExpressionExperiment,
ExpressionExperimentValueObject>
- All Known Implementing Classes:
ExpressionExperimentDaoImpl
- Author:
- tesarst
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionint
addRawDataVectors
(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> newVectors) Add raw data vectors with the given quantitation type.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.filterByTaxon
(Collection<Long> ids, Taxon taxon) findByAccession
(String accession) findByAccession
(DatabaseEntry accession) findByExpressedGene
(Gene gene, Double rank) findByFactorValue
(Long factorValueId) findByGene
(Gene gene) 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> expressionExperimentIds, Class<? extends Identifiable> level, int maxResults, int minFrequency, String category, Collection<String> excludedCategoryUris, Collection<String> excludedTermUris, Collection<String> retainedTermUris) Obtain annotations usage frequency for a set of givenExpressionExperiment
IDs.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.getBioMaterialAnnotations
(ExpressionExperimentSubSet expressionExperiment) 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 protocolIdentifier) 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.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) getSingleCellDimension
(ExpressionExperiment ee, QuantitationType quantitationType) 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.boolean
Test if the dataset has preferred expression data vectors.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.LikeloadDetailsValueObjects(Collection, Taxon, Sort, int, int)
, but returning a list.Flavour ofloadDetailsValueObjectsByIds(Collection)
, but using the query cache.loadDetailsValueObjectsByIdsWithCache
(Collection<Long> ids, Taxon taxon, Sort sort, int offset, int limit) Flavour ofloadDetailsValueObjectsByIds(Collection)
, but using the query cache.Load datasets by IDs with the same relation asCachedFilteringDao.loadWithCache(Filters, Sort)
.int
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
thawLite
(ExpressionExperiment expressionExperiment) 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 interface ubic.gemma.persistence.service.BaseDao
countAll, create, create, find, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadAll, loadReference, loadReference, reload, reload, remove, 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.BrowsingDao
browse, browse
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
Methods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledDao
loadValueObjects, loadValueObjects
-
Field Details
-
OBJECT_ALIAS
- See Also:
-
FREE_TEXT
Special indicator for free-text terms.Free-text terms or categories have a null URI and a non-empty label.
-
UNCATEGORIZED
Special indicator for an uncategorized term.Uncategorized terms (or the uncategorized category) has both null URI and label.
-
-
Method Details
-
load
Load an experiment by ID with a specific cache mode.The cache mode will be effective for the remainder of the Hibernate session.
-
loadAllIdentifiers
List<ExpressionExperimentDao.Identifiers> loadAllIdentifiers()Load all possible identifiers for all experiments. -
filterByTaxon
-
findByShortName
-
findByName
-
findOneByName
-
findByAccession
-
findByAccession
-
findOneByAccession
-
findByBibliographicReference
-
findByBioAssay
-
findByBioMaterial
-
findByBioMaterials
-
findByExpressedGene
-
findByDesign
-
findByFactor
-
findByFactorValue
-
findByFactorValue
-
findByFactorValues
-
findByGene
-
findByQuantitationType
-
findByTaxon
-
findByUpdatedLimit
-
findByUpdatedLimit
-
findUpdatedAfter
Find experiments updated on or after a given date. -
getAnnotationCounts
-
getArrayDesignsUsed
-
getArrayDesignsUsed
-
getArrayDesignsUsed
Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment ee, QuantitationType qt, Class<? extends DataVector> dataVectorType) -
getGenesUsedByPreferredVectors
Obtain genes used by the processed vectors of this dataset. -
getTechnologyTypeUsageFrequency
Map<TechnologyType,Long> getTechnologyTypeUsageFrequency()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.
-
getTechnologyTypeUsageFrequency
Obtain the dataset usage frequency by technology type for the given dataset IDs.Note: No ACL filtering is performed.
- See Also:
-
getArrayDesignsUsageFrequency
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.
-
getArrayDesignsUsageFrequency
Obtain dataset usage frequency by platform currently for the given dataset IDs.Note: no ACL filtering is performed. Only administrator can see troubled platforms.
- See Also:
-
getOriginalPlatformsUsageFrequency
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.
-
getOriginalPlatformsUsageFrequency
Obtain dataset usage frequency by platform currently for the given dataset IDs.Note: no ACL filtering is performed. Only administrators can see troubled platforms.
- See Also:
-
getAuditEvents
-
getBioAssayDimensions
-
getBioAssayDimensionsFromSubSets
Collection<BioAssayDimension> getBioAssayDimensionsFromSubSets(ExpressionExperiment expressionExperiment) 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.
-
getBioAssayDimension
@Nullable BioAssayDimension getBioAssayDimension(ExpressionExperiment ee, QuantitationType qt, Class<? extends BulkExpressionDataVector> dataVectorType) Retrieve a dimension for a given experiment and quantitation type.- 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, usegetBioAssayDimension(ExpressionExperiment, QuantitationType)
.- Throws:
NonUniqueResultException
- if there is more than one dimension for the given set of vectors
-
getBioAssayDimension
Retrieve a dimension for a given experiment and quantitation type.- Throws:
NonUniqueResultException
- if there is more than one dimension for the given set of vectors
-
getBioAssayDimensionById
@Nullable BioAssayDimension getBioAssayDimensionById(ExpressionExperiment ee, Long dimensionId, Class<? extends BulkExpressionDataVector> dataVectorType) Obtain a bioassay dimension by ID. -
getBioMaterialCount
-
getRawDataVectorCount
-
getExperimentsWithOutliers
Collection<ExpressionExperiment> getExperimentsWithOutliers() -
getLastArrayDesignUpdate
-
getLastArrayDesignUpdate
-
getPerTaxonCount
Obtain the count of distinct experiments per taxon.Experiments are filtered by ACLs and troubled experiments are only visible to administrators.
-
getPerTaxonCount
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.
-
getPopulatedFactorCounts
-
getPopulatedFactorCountsExcludeBatch
-
getQuantitationTypeCount
-
getPreferredSingleCellQuantitationType
Obtain the preferred quantitation type for single cell data, if available. -
getPreferredQuantitationType
Obtain the preferred quantitation type for the raw vectors, if available. -
getProcessedQuantitationType
Obtain the quantitation type for the processed vectors, if available.- Throws:
NonUniqueResultException
- if there is more than one set of processed vectors
-
hasProcessedExpressionData
Test if the dataset has preferred expression data vectors. -
getSampleRemovalEvents
Map<ExpressionExperiment,Collection<AuditEvent>> getSampleRemovalEvents(Collection<ExpressionExperiment> expressionExperiments) -
getSubSets
-
getSubSets
Collection<ExpressionExperimentSubSet> getSubSets(ExpressionExperiment expressionExperiment, BioAssayDimension bad) -
getSubSetsByDimension
Map<BioAssayDimension,Set<ExpressionExperimentSubSet>> getSubSetsByDimension(ExpressionExperiment expressionExperiment) -
getSubSetById
-
getTaxa
-
getTaxon
Determine the taxon for a given experiment or subset.- Returns:
- a unique taxon for the dataset, or null if no taxon could be determined
-
loadWithRelationsAndCache
Load datasets by IDs with the same relation asCachedFilteringDao.loadWithCache(Filters, Sort)
. -
loadDetailsValueObjects
Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjects(@Nullable Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit) Special method for front-end access. This is partly redundant withFilteringVoEnabledDao.loadValueObjects(Filters, Sort, int, int)
; however, it fills in more information, returns ExpressionExperimentDetailsValueObject- 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
Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIdsWithCache(@Nullable Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit) Flavour ofloadDetailsValueObjectsByIds(Collection)
, but using the query cache. -
loadDetailsValueObjectsByIds
LikeloadDetailsValueObjects(Collection, Taxon, Sort, int, int)
, but returning a list. -
loadDetailsValueObjectsByIdsWithCache
List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIdsWithCache(Collection<Long> ids) Flavour ofloadDetailsValueObjectsByIds(Collection)
, but using the query cache. -
loadBlacklistedValueObjects
-
loadLackingFactors
Collection<ExpressionExperiment> loadLackingFactors() -
loadLackingTags
Collection<ExpressionExperiment> loadLackingTags() -
thaw
Thaw everything.Includes
thawLite(ExpressionExperiment)
and raw/processed vectors.Does not include single-cell vectors.
-
thawLiter
Thaw experiment metadata. -
thawLite
Thaw experiment metadata and bioassays.Include
thawLiter(ExpressionExperiment)
and bioassays. -
getAllAnnotations
Map<Class<? extends Identifiable>,List<Characteristic>> getAllAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain all annotations, grouped by applicable level.- Parameters:
useEe2c
- use theEXPRESSION_EXPERIMENT2CHARACTERISTIC
table to retrieve annotations
-
getExperimentAnnotations
Collection<Characteristic> getExperimentAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain experiment-level annotations.- Parameters:
useEe2c
- use theEXPRESSION_EXPERIMENTE2CHARACTERISTIC
table,TableMaintenanceUtil
-
getExperimentSubSetAnnotations
Obtain the subset annotations. -
getBioMaterialAnnotations
List<Characteristic> getBioMaterialAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain sample-level annotations.This uses the
EE2C
table under the hood. -
getBioMaterialAnnotations
-
getExperimentalDesignAnnotations
List<Characteristic> getExperimentalDesignAnnotations(ExpressionExperiment expressionExperiment, boolean useEe2c) Obtain experimental design-level annotations.This is equivalent to the subject components of
getFactorValueAnnotations(ExpressionExperiment)
for now, but other annotations from the experimental design might be included in the future. -
getFactorValueAnnotations
Obtain factor value-level annotations. -
getFactorValueAnnotations
Obtain factor value-level annotations for a given subset. -
getCategoriesUsageFrequency
Map<Characteristic,Long> getCategoriesUsageFrequency(@Nullable Collection<Long> eeIds, @Nullable Collection<String> excludedCategoryUris, @Nullable Collection<String> excludedTermUris, @Nullable Collection<String> retainedTermUris, int maxResults) -
getAnnotationsUsageFrequency
Map<Characteristic,Long> getAnnotationsUsageFrequency(@Nullable Collection<Long> expressionExperimentIds, @Nullable Class<? extends Identifiable> level, int maxResults, int minFrequency, @Nullable String category, @Nullable Collection<String> excludedCategoryUris, @Nullable Collection<String> excludedTermUris, @Nullable Collection<String> retainedTermUris) Obtain annotations usage frequency for a set of givenExpressionExperiment
IDs.This is meant as a counterpart to
CharacteristicService.findExperimentsByUris(Collection, Taxon, int, boolean, boolean)
to answer the reverse question: which annotations can be used to filter a given set of datasets?- Parameters:
expressionExperimentIds
- 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
Collection<ExpressionExperiment> getExperimentsLackingPublications() -
updateMeanVarianceRelation
-
countBioMaterials
Count the number of biomaterials of datasets satisfying the given filters.The result is stored in the standard query cache.
-
getRawDataVectors
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. -
getRawDataVectors
Collection<RawExpressionDataVector> getRawDataVectors(ExpressionExperiment ee, List<BioAssay> assays, QuantitationType qt) Obtain a slice of the raw vectors for a given experiment and QT. -
getPreferredRawDataVectors
Obtain the preferred raw data vectors for a given experiment. -
getMissingValueVectors
Map<QuantitationType,Collection<RawExpressionDataVector>> getMissingValueVectors(ExpressionExperiment ee) Obtain the missing value vectors for a given experiment. -
addRawDataVectors
int addRawDataVectors(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> newVectors) Add raw data vectors with the given quantitation type.- Returns:
- the number of raw data vectors created
-
removeAllRawDataVectors
Remove all raw data vectors.All affected QTs are removed.
-
removeRawDataVectors
Remove raw data vectors for a given quantitation type.Unused
BioAssayDimension
are removed unless keepDimension is set totrue
.- 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,replaceRawDataVectors(ExpressionExperiment, QuantitationType, Collection)
can be used.- Returns:
- the number of removed raw vectors
-
replaceRawDataVectors
int replaceRawDataVectors(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> vectors) Replace raw data vectors for a given quantitation type.- Returns:
- the number of replaced raw vectors
-
getProcessedDataVectors
@Nullable Collection<ProcessedExpressionDataVector> getProcessedDataVectors(ExpressionExperiment ee) 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.- Returns:
- the processed vectors, or null if there are no processed vectors
- See Also:
-
getProcessedDataVectors
@Nullable Collection<ProcessedExpressionDataVector> getProcessedDataVectors(ExpressionExperiment ee, List<BioAssay> assays) Retrieve a slice of processed vectors for an experiment.- Returns:
- the processed vectors, or null if there are no processed vectors
-
createProcessedDataVectors
int createProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Add processed data vectorsThe number of vectors
ExpressionExperiment.getNumberOfDataVectors()
is updated.- Returns:
- the number of created processed vectors
-
removeProcessedDataVectors
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.- Returns:
- the number of removed processed vectors
-
replaceProcessedDataVectors
int replaceProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Replace processed data vectors.The QT is reused and the number of vectors
ExpressionExperiment.getNumberOfDataVectors()
is updated. Unused dimensions are removed.- Returns:
- the number of vectors replaced
-
getSingleCellDimensions
Obtain all the single cell dimensions used by the single-cell vectors of a given experiment. -
getSingleCellDimensionsWithoutCellIds
Obtain all the single cell dimensions used by the single-cell vectors of a given experiment.Cell IDs are not loaded.
-
getSingleCellDimensionsWithoutCellIds
List<SingleCellDimension> getSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeProtocol, boolean includeCharacteristics, boolean includeIndices) -
getSingleCellDimension
@Nullable SingleCellDimension getSingleCellDimension(ExpressionExperiment ee, QuantitationType quantitationType) Obtain the single-cell dimension used by a specific QT. -
getSingleCellDimensionWithoutCellIds
@Nullable SingleCellDimension getSingleCellDimensionWithoutCellIds(ExpressionExperiment ee, QuantitationType qt) Load a single-cell dimension used by a specific QT without its cell IDs. -
getSingleCellDimensionWithoutCellIds
@Nullable SingleCellDimension getSingleCellDimensionWithoutCellIds(ExpressionExperiment ee, QuantitationType qt, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeProtocol, boolean includeCharacteristics, boolean includeIndices) -
getPreferredSingleCellDimension
Obtain the preferred single cell dimension, that is the dimension associated to the preferred set of single-cell vectors. -
getPreferredSingleCellDimensionWithoutCellIds
@Nullable SingleCellDimension getPreferredSingleCellDimensionWithoutCellIds(ExpressionExperiment ee) Load a single-cell dimension without its cell IDs. -
getPreferredSingleCellDimensionsWithoutCellIds
@Nullable SingleCellDimension getPreferredSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeProtocol, boolean includeCharacteristics, boolean includeIndices) -
createSingleCellDimension
Create a single-cell dimension for a given experiment.- Throws:
IllegalArgumentException
- if the single-cell dimension is invalid
-
updateSingleCellDimension
Update a single-cell dimensino for a given experiment.- Throws:
IllegalArgumentException
- if the single-cell dimension is invalid
-
deleteSingleCellDimension
Delete the given single cell dimension. -
streamCellIds
Stream the cell IDs of a dimension.- 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
-
getCellLevelCharacteristicsCategory
Obtain the category of a cell-level characteristic.This handles the case where the characteristics were not loaded (i.e. using
getSingleCellDimensionsWithoutCellIds(ExpressionExperiment, boolean, boolean, boolean, boolean, boolean, boolean)
). -
streamCellLevelCharacteristics
@Nullable Stream<Characteristic> streamCellLevelCharacteristics(CellLevelCharacteristics clc, boolean createNewSession) -
getCellTypeAt
Obtain the cell type at a given cell index. -
getCellTypeAt
-
getCellLevelCharacteristicAt
Obtain the characteristic at a given cell index. -
getCellLevelCharacteristicAt
Characteristic[] getCellLevelCharacteristicAt(CellLevelCharacteristics clc, int startIndex, int endIndexExclusive) -
getCellTypeAssignments
-
getCellTypeAssignments
List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment expressionExperiment, QuantitationType qt) -
getCellTypeAssignmentsWithoutIndices
Collection<CellTypeAssignment> getCellTypeAssignmentsWithoutIndices(ExpressionExperiment ee, QuantitationType qt) -
getPreferredCellTypeAssignment
@Nullable CellTypeAssignment getPreferredCellTypeAssignment(ExpressionExperiment ee) throws NonUniqueResultException Obtain the preferred assignment of the preferred single-cell vectors.- Throws:
NonUniqueResultException
- if there are multiple preferred cell-type labellings
-
getPreferredCellTypeAssignment
@Nullable CellTypeAssignment getPreferredCellTypeAssignment(ExpressionExperiment ee, QuantitationType qt) throws NonUniqueResultException Obtain the preferred assignment for the given quantitation type.- Throws:
NonUniqueResultException
- if there are multiple preferred cell-type labellings
-
getPreferredCellTypeAssignmentWithoutIndices
@Nullable CellTypeAssignment getPreferredCellTypeAssignmentWithoutIndices(ExpressionExperiment ee, QuantitationType qt) throws NonUniqueResultException Obtain the preferred assignment for the given quantitation type without loading the indices.- Throws:
NonUniqueResultException
- if there are multiple preferred cell-type labellings
-
getCellTypeAssignment
@Nullable CellTypeAssignment getCellTypeAssignment(ExpressionExperiment expressionExperiment, QuantitationType qt, Long ctaId) Obtain a cell type assignment by ID. -
getCellTypeAssignmentWithoutIndices
@Nullable CellTypeAssignment getCellTypeAssignmentWithoutIndices(ExpressionExperiment expressionExperiment, QuantitationType qt, Long ctaId) Obtain a cell type assignment by ID without loading the indices. -
getCellTypeAssignment
@Nullable CellTypeAssignment getCellTypeAssignment(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName) Obtain a cell type assignment by name. -
getCellTypeAssignmentProtocols
Collection<Protocol> getCellTypeAssignmentProtocols()Obtain all cell type assignment protocols currently used. -
getCellTypeAssignmentByProtocol
@Nullable Collection<CellTypeAssignment> getCellTypeAssignmentByProtocol(ExpressionExperiment ee, QuantitationType qt, String protocolIdentifier) -
getCellTypeAssignmentWithoutIndices
@Nullable CellTypeAssignment getCellTypeAssignmentWithoutIndices(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName) Obtain a cell type assignment by name without loading the indices. -
getCellLevelCharacteristics
Obtain all cell-level characteristics from all single cell dimensions. -
getCellLevelCharacteristics
List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment ee, Category category) Obtain all cell-level characteristics from all single cell dimensions matching the given category. -
getCellLevelCharacteristics
@Nullable CellLevelCharacteristics getCellLevelCharacteristics(ExpressionExperiment ee, QuantitationType qt, Long clcId) 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. -
getCellLevelCharacteristics
@Nullable CellLevelCharacteristics getCellLevelCharacteristics(ExpressionExperiment ee, QuantitationType qt, String clcName) -
getCellLevelCharacteristics
List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt) -
getCellLevelCharacteristics
List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt, Category category) -
getCellLevelCharacteristicsWithoutIndices
@Nullable CellLevelCharacteristics getCellLevelCharacteristicsWithoutIndices(ExpressionExperiment ee, QuantitationType qt, Long clcId) -
getCellLevelCharacteristicsWithoutIndices
@Nullable CellLevelCharacteristics getCellLevelCharacteristicsWithoutIndices(ExpressionExperiment ee, QuantitationType qt, String clcName) -
getCellLevelCharacteristicsWithoutIndices
Collection<CellLevelCharacteristics> getCellLevelCharacteristicsWithoutIndices(ExpressionExperiment ee, QuantitationType qt) -
getCellTypes
-
getSingleCellQuantitationTypes
Obtain a list of single-cell QTs. -
getSingleCellDataVectors
List<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment expressionExperiment, QuantitationType quantitationType) Obtain a set of single-cell data vectors for the given quantitation type. -
getSingleCellDataVectors
List<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, boolean includeCellIds, boolean includeData, boolean includeDataIndices) Obtain a set of single-cell data vectors for the given quantitation type. -
streamSingleCellDataVectors
Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean useCursorFetchIfSupported, boolean createNewSession) Obtain a stream over the vectors for a given QT.- 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
Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean useCursorFetchIfSupported, boolean createNewSession, boolean includeCellIds, boolean includeData, boolean includeDataIndices) -
getSingleCellDataVectorWithoutCellIds
SingleCellExpressionDataVector getSingleCellDataVectorWithoutCellIds(ExpressionExperiment ee, QuantitationType quantitationType, CompositeSequence designElement) -
getNumberOfSingleCellDataVectors
Obtain the number of single-cell vectors for a given QT. -
getNumberOfNonZeroes
Obtain the number of non-zeroes. -
getNumberOfNonZeroesBySample
Map<BioAssay,Long> getNumberOfNonZeroesBySample(ExpressionExperiment ee, QuantitationType qt, int fetchSize, boolean useCursorFetchIfSupported) Obtain the number of non-zeroes by sample.This is quite costly because the indices of each vector has to be examined.
-
removeSingleCellDataVectors
int removeSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, boolean deleteQt) Remove the given single-cell data vectors.- 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
Remove all single-cell data vectors and their quantitation types. -
getNumberOfDesignElementsPerSample
-