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
public interface ExpressionExperimentDao extends CuratableDao<ExpressionExperiment>, CachedFilteringVoEnabledDao<ExpressionExperiment,ExpressionExperimentValueObject>, BrowsingDao<ExpressionExperiment>
Created by tesarst on 13/03/17.- Author:
- tesarst
-
-
Field Summary
Fields Modifier and Type Field Description static String
FREE_TEXT
Special indicator for free-text terms.static String
OBJECT_ALIAS
static String
UNCATEGORIZED
Special indicator for an uncategorized term.
-
Method Summary
-
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 Detail
-
OBJECT_ALIAS
static final String OBJECT_ALIAS
- See Also:
- Constant Field Values
-
FREE_TEXT
static final String FREE_TEXT
Special indicator for free-text terms.Free-text terms or categories have a null URI and a non-empty label.
-
UNCATEGORIZED
static final String UNCATEGORIZED
Special indicator for an uncategorized term.Uncategorized terms (or the uncategorized category) has both null URI and label.
-
-
Method Detail
-
load
ExpressionExperiment load(Long id, CacheMode cacheMode)
Load an experiment by ID with a specific cache mode.The cache mode will be effective for the remainder of the Hibernate session.
-
loadBioAssaySet
@Nullable BioAssaySet loadBioAssaySet(Long id)
-
filterByTaxon
Collection<Long> filterByTaxon(Collection<Long> ids, Taxon taxon)
-
findByShortName
ExpressionExperiment findByShortName(String shortName)
-
findByName
Collection<ExpressionExperiment> findByName(String name)
-
findOneByName
@Nullable ExpressionExperiment findOneByName(String name)
-
findByAccession
Collection<ExpressionExperiment> findByAccession(DatabaseEntry accession)
-
findByAccession
Collection<ExpressionExperiment> findByAccession(String accession)
-
findOneByAccession
@Nullable ExpressionExperiment findOneByAccession(String accession)
-
findByBibliographicReference
Collection<ExpressionExperiment> findByBibliographicReference(BibliographicReference bibRef)
-
findByBioAssay
ExpressionExperiment findByBioAssay(BioAssay ba)
-
findByBioMaterial
Collection<ExpressionExperiment> findByBioMaterial(BioMaterial bm)
-
findByBioMaterials
Map<ExpressionExperiment,Collection<BioMaterial>> findByBioMaterials(Collection<BioMaterial> bms)
-
findByExpressedGene
Collection<ExpressionExperiment> findByExpressedGene(Gene gene, Double rank)
-
findByDesign
ExpressionExperiment findByDesign(ExperimentalDesign ed)
-
findByFactor
ExpressionExperiment findByFactor(ExperimentalFactor ef)
-
findByFactorValue
ExpressionExperiment findByFactorValue(FactorValue fv)
-
findByFactorValue
ExpressionExperiment findByFactorValue(Long factorValueId)
-
findByFactorValues
Map<ExpressionExperiment,FactorValue> findByFactorValues(Collection<FactorValue> fvs)
-
findByGene
Collection<ExpressionExperiment> findByGene(Gene gene)
-
findByQuantitationType
ExpressionExperiment findByQuantitationType(QuantitationType quantitationType)
-
findByTaxon
Collection<ExpressionExperiment> findByTaxon(Taxon taxon)
-
findByUpdatedLimit
List<ExpressionExperiment> findByUpdatedLimit(Collection<Long> ids, int limit)
-
findByUpdatedLimit
List<ExpressionExperiment> findByUpdatedLimit(int limit)
-
findUpdatedAfter
Collection<ExpressionExperiment> findUpdatedAfter(Date date)
Find experiments updated on or after a given date.
-
getAnnotationCounts
Map<Long,Long> getAnnotationCounts(Collection<Long> ids)
-
getArrayDesignsUsed
Collection<ArrayDesign> getArrayDesignsUsed(BioAssaySet bas)
-
getArrayDesignsUsed
Collection<ArrayDesign> getArrayDesignsUsed(Collection<? extends BioAssaySet> ees)
-
getArrayDesignsUsed
Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment ee, QuantitationType qt, Class<? extends DataVector> dataVectorType)
-
getGenesUsedByPreferredVectors
Collection<Gene> getGenesUsedByPreferredVectors(ExpressionExperiment experimentConstraint)
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
Map<TechnologyType,Long> getTechnologyTypeUsageFrequency(Collection<Long> eeIds)
Obtain the dataset usage frequency by technology type for the given dataset IDs.Note: No ACL filtering is performed.
- See Also:
getTechnologyTypeUsageFrequency()
-
getArrayDesignsUsageFrequency
Map<ArrayDesign,Long> getArrayDesignsUsageFrequency(int maxResults)
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
Map<ArrayDesign,Long> getArrayDesignsUsageFrequency(Collection<Long> eeIds, int maxResults)
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:
getArrayDesignsUsageFrequency(int)
-
getOriginalPlatformsUsageFrequency
Map<ArrayDesign,Long> getOriginalPlatformsUsageFrequency(int maxResults)
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
Map<ArrayDesign,Long> getOriginalPlatformsUsageFrequency(Collection<Long> eeIds, int maxResults)
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:
getOriginalPlatformsUsageFrequency(int)
-
getAuditEvents
Map<Long,Collection<AuditEvent>> getAuditEvents(Collection<Long> ids)
-
getBioAssayDimensions
Collection<BioAssayDimension> getBioAssayDimensions(ExpressionExperiment expressionExperiment)
-
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
@Nullable BioAssayDimension getBioAssayDimension(ExpressionExperiment ee, QuantitationType qt)
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
long getBioMaterialCount(ExpressionExperiment expressionExperiment)
-
getRawDataVectorCount
long getRawDataVectorCount(ExpressionExperiment ee)
-
getExperimentsWithOutliers
Collection<ExpressionExperiment> getExperimentsWithOutliers()
-
getLastArrayDesignUpdate
Map<Long,Date> getLastArrayDesignUpdate(Collection<ExpressionExperiment> expressionExperiments)
-
getLastArrayDesignUpdate
Date getLastArrayDesignUpdate(ExpressionExperiment ee)
-
getPerTaxonCount
Map<Taxon,Long> getPerTaxonCount()
Obtain the count of distinct experiments per taxon.Experiments are filtered by ACLs and troubled experiments are only visible to administrators.
-
getPerTaxonCount
Map<Taxon,Long> getPerTaxonCount(Collection<Long> ids)
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
Map<Long,Long> getPopulatedFactorCounts(Collection<Long> ids)
-
getPopulatedFactorCountsExcludeBatch
Map<Long,Long> getPopulatedFactorCountsExcludeBatch(Collection<Long> ids)
-
getQuantitationTypeCount
Map<QuantitationType,Long> getQuantitationTypeCount(ExpressionExperiment ee)
-
getPreferredSingleCellQuantitationType
@Nullable QuantitationType getPreferredSingleCellQuantitationType(ExpressionExperiment ee)
Obtain the preferred quantitation type for single cell data, if available.
-
getPreferredQuantitationType
@Nullable QuantitationType getPreferredQuantitationType(ExpressionExperiment ee)
Obtain the preferred quantitation type for the raw vectors, if available.
-
getProcessedQuantitationType
@Nullable QuantitationType getProcessedQuantitationType(ExpressionExperiment ee)
Obtain the quantitation type for the processed vectors, if available.- Throws:
NonUniqueResultException
- if there is more than one set of processed vectors
-
hasProcessedExpressionData
boolean hasProcessedExpressionData(ExpressionExperiment ee)
Test if the dataset has preferred expression data vectors.
-
getSampleRemovalEvents
Map<ExpressionExperiment,Collection<AuditEvent>> getSampleRemovalEvents(Collection<ExpressionExperiment> expressionExperiments)
-
getSubSets
Collection<ExpressionExperimentSubSet> getSubSets(ExpressionExperiment expressionExperiment)
-
getSubSets
Collection<ExpressionExperimentSubSet> getSubSets(ExpressionExperiment expressionExperiment, BioAssayDimension bad)
-
getSubSetsByDimension
Map<BioAssayDimension,Set<ExpressionExperimentSubSet>> getSubSetsByDimension(ExpressionExperiment expressionExperiment)
-
getSubSetById
@Nullable ExpressionExperimentSubSet getSubSetById(ExpressionExperiment ee, Long subSetId)
-
getTaxa
<T extends BioAssaySet> Map<T,Taxon> getTaxa(Collection<T> bioAssaySets)
-
getTaxon
@Nullable Taxon getTaxon(BioAssaySet ee)
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
List<ExpressionExperiment> loadWithRelationsAndCache(List<Long> ids)
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
List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIds(Collection<Long> ids)
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
Slice<ExpressionExperimentValueObject> loadBlacklistedValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit)
-
loadLackingFactors
Collection<ExpressionExperiment> loadLackingFactors()
-
loadLackingTags
Collection<ExpressionExperiment> loadLackingTags()
-
thaw
void thaw(ExpressionExperiment expressionExperiment)
Thaw everything.Includes
thawLite(ExpressionExperiment)
and raw/processed vectors.Does not include single-cell vectors.
-
thawLiter
void thawLiter(ExpressionExperiment expressionExperiment)
Thaw experiment metadata.
-
thawLite
void thawLite(ExpressionExperiment expressionExperiment)
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
Collection<Characteristic> getExperimentSubSetAnnotations(ExpressionExperiment ee)
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
List<Characteristic> getBioMaterialAnnotations(ExpressionExperimentSubSet expressionExperiment)
-
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
List<Statement> getFactorValueAnnotations(ExpressionExperiment ee)
Obtain factor value-level annotations.
-
getFactorValueAnnotations
List<Statement> getFactorValueAnnotations(ExpressionExperimentSubSet ee)
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
MeanVarianceRelation updateMeanVarianceRelation(ExpressionExperiment ee, MeanVarianceRelation mvr)
-
countBioMaterials
long countBioMaterials(@Nullable Filters filters)
Count the number of biomaterials of datasets satisfying the given filters.The result is stored in the standard query cache.
-
getRawDataVectors
Collection<RawExpressionDataVector> getRawDataVectors(ExpressionExperiment ee, QuantitationType qt)
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.
-
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
int removeAllRawDataVectors(ExpressionExperiment ee)
Remove all raw data vectors.All affected QTs are removed.
-
removeRawDataVectors
int removeRawDataVectors(ExpressionExperiment ee, QuantitationType qt, boolean keepDimension)
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:
getProcessedQuantitationType(ExpressionExperiment)
-
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
int removeProcessedDataVectors(ExpressionExperiment ee)
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
List<SingleCellDimension> getSingleCellDimensions(ExpressionExperiment ee)
Obtain all the single cell dimensions used by the single-cell vectors of a given experiment.
-
getSingleCellDimensionsWithoutCellIds
List<SingleCellDimension> getSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee)
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 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 includeCharacteristics, boolean includeIndices)
-
getPreferredSingleCellDimension
@Nullable SingleCellDimension getPreferredSingleCellDimension(ExpressionExperiment ee)
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.
-
createSingleCellDimension
void createSingleCellDimension(ExpressionExperiment ee, SingleCellDimension singleCellDimension)
Create a single-cell dimension for a given experiment.- Throws:
IllegalArgumentException
- if the single-cell dimension is invalid
-
updateSingleCellDimension
void updateSingleCellDimension(ExpressionExperiment ee, SingleCellDimension singleCellDimension)
Update a single-cell dimensino for a given experiment.- Throws:
IllegalArgumentException
- if the single-cell dimension is invalid
-
deleteSingleCellDimension
void deleteSingleCellDimension(ExpressionExperiment ee, SingleCellDimension singleCellDimension)
Delete the given single cell dimension.
-
streamCellIds
@Nullable Stream<String> streamCellIds(SingleCellDimension dimension, boolean createNewSession)
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
@Nullable Stream<Characteristic> streamCellTypes(CellTypeAssignment cta, boolean createNewSession)
-
getCellLevelCharacteristicsCategory
@Nullable Category getCellLevelCharacteristicsCategory(CellLevelCharacteristics clc)
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)
).
-
streamCellLevelCharacteristics
@Nullable Stream<Characteristic> streamCellLevelCharacteristics(CellLevelCharacteristics clc, boolean createNewSession)
-
getCellTypeAt
@Nullable Characteristic getCellTypeAt(CellTypeAssignment cta, int cellIndex)
Obtain the cell type at a given cell index.
-
getCellTypeAt
Characteristic[] getCellTypeAt(CellTypeAssignment cta, int startIndex, int endIndexExclusive)
-
getCellLevelCharacteristicAt
@Nullable Characteristic getCellLevelCharacteristicAt(CellLevelCharacteristics clc, int cellIndex)
Obtain the characteristic at a given cell index.
-
getCellLevelCharacteristicAt
Characteristic[] getCellLevelCharacteristicAt(CellLevelCharacteristics clc, int startIndex, int endIndexExclusive)
-
getCellTypeAssignments
List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment ee)
-
getCellTypeAssignments
List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment expressionExperiment, 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
-
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.
-
getCellTypeAssignmentWithoutIndices
@Nullable CellTypeAssignment getCellTypeAssignmentWithoutIndices(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName)
Obtain a cell type assignment by name without loading the indices.
-
getCellLevelCharacteristics
List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment ee)
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
List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt)
-
getCellTypes
List<Characteristic> getCellTypes(ExpressionExperiment ee)
-
getSingleCellQuantitationTypes
List<QuantitationType> getSingleCellQuantitationTypes(ExpressionExperiment ee)
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 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:
QueryUtils.stream(Query, int)
-
streamSingleCellDataVectors
Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean createNewSession, boolean includeCellIds, boolean includeData, boolean includeDataIndices)
-
getSingleCellDataVectorWithoutCellIds
SingleCellExpressionDataVector getSingleCellDataVectorWithoutCellIds(ExpressionExperiment ee, QuantitationType quantitationType, CompositeSequence designElement)
-
getNumberOfSingleCellDataVectors
long getNumberOfSingleCellDataVectors(ExpressionExperiment ee, QuantitationType qt)
Obtain the number of single-cell vectors for a given QT.
-
getNumberOfNonZeroes
long getNumberOfNonZeroes(ExpressionExperiment ee, QuantitationType qt)
Obtain the number of non-zeroes.
-
getNumberOfNonZeroesBySample
Map<BioAssay,Long> getNumberOfNonZeroesBySample(ExpressionExperiment ee, QuantitationType qt, int fetchSize)
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
int removeAllSingleCellDataVectors(ExpressionExperiment ee)
Remove all single-cell data vectors and their quantitation types.
-
getNumberOfDesignElementsPerSample
Map<BioAssay,Long> getNumberOfDesignElementsPerSample(ExpressionExperiment expressionExperiment)
-
-