Interface SingleCellExpressionExperimentService
-
- All Known Implementing Classes:
SingleCellExpressionExperimentServiceImpl
public interface SingleCellExpressionExperimentService
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SingleCellExpressionExperimentService.SingleCellVectorInitializationConfig
-
Method Summary
-
-
-
Method Detail
-
loadWithSingleCellVectors
@Nullable @Secured({"GROUP_USER","AFTER_ACL_READ"}) ExpressionExperiment loadWithSingleCellVectors(Long id)
Load an experiment with its single-cell data vectors initialized.The rest of the experiment is also initialized as per
ExpressionExperimentDao.thawLite(ExpressionExperiment)
.
-
getSingleCellQuantitationTypes
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<QuantitationType> getSingleCellQuantitationTypes(ExpressionExperiment ee)
-
getPreferredSingleCellQuantitationType
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<QuantitationType> getPreferredSingleCellQuantitationType(ExpressionExperiment ee)
Obtain the preferred single cell quantitation type.
-
getPreferredSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<Collection<SingleCellExpressionDataVector>> getPreferredSingleCellDataVectors(ExpressionExperiment ee)
Obtain preferred single-cell vectors.
-
getSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType)
Obtain single-cell vectors for a given quantitation type.
-
getSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, SingleCellExpressionExperimentService.SingleCellVectorInitializationConfig config)
-
getSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment ee, List<BioAssay> samples, QuantitationType quantitationType)
Obtain single-cell vectors for a particular sample.
-
getSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<SingleCellExpressionDataVector> getSingleCellDataVectors(ExpressionExperiment ee, List<BioAssay> samples, QuantitationType quantitationType, SingleCellExpressionExperimentService.SingleCellVectorInitializationConfig config)
-
streamSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean createNewSession)
Obtain a stream over single-cell vectors for a given quantitation type.
-
streamSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, int fetchSize, boolean createNewSession, SingleCellExpressionExperimentService.SingleCellVectorInitializationConfig config)
-
streamSingleCellDataVectors
Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, List<BioAssay> samples, QuantitationType quantitationType, int fetchSize, boolean createNewSession, SingleCellExpressionExperimentService.SingleCellVectorInitializationConfig config)
-
streamSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Stream<SingleCellExpressionDataVector> streamSingleCellDataVectors(ExpressionExperiment ee, List<BioAssay> samples, QuantitationType quantitationType, int fetchSize, boolean createNewSession)
-
getSingleCellDataVectorWithoutCellIds
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) SingleCellExpressionDataVector getSingleCellDataVectorWithoutCellIds(ExpressionExperiment ee, QuantitationType quantitationType, CompositeSequence designElement)
Obtain a single single-cell vector without initializing cell IDs.
-
getNumberOfSingleCellDataVectors
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) long getNumberOfSingleCellDataVectors(ExpressionExperiment ee, QuantitationType qt)
Obtain the number of single-cell vectors for a given quantitation type.
-
getNumberOfNonZeroes
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) long getNumberOfNonZeroes(ExpressionExperiment ee, QuantitationType qt)
-
getNumberOfNonZeroesBySample
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Map<BioAssay,Long> getNumberOfNonZeroesBySample(ExpressionExperiment ee, QuantitationType qt, int fetchSize)
-
getSingleCellExpressionDataMatrix
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) SingleCellExpressionDataMatrix<?> getSingleCellExpressionDataMatrix(ExpressionExperiment expressionExperiment, List<BioAssay> samples, QuantitationType quantitationType)
Obtain a single-cell expression data matrix for the given quantitation type.
-
getSingleCellExpressionDataMatrix
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) SingleCellExpressionDataMatrix<?> getSingleCellExpressionDataMatrix(ExpressionExperiment expressionExperiment, QuantitationType quantitationType)
Obtain a single-cell expression data matrix for the given quantitation type.
-
addSingleCellDataVectors
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) int addSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, Collection<SingleCellExpressionDataVector> vectors, @Nullable String details)
Add single-cell data vectors.- Returns:
- the number of vectors that were added
-
replaceSingleCellDataVectors
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) int replaceSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, Collection<SingleCellExpressionDataVector> vectors, @Nullable String details)
Replace existing single-cell data vectors for the given quantitation type.- Parameters:
details
- additional details to include in the audit event- Returns:
- the number of vectors that were replaced
-
updateSparsityMetrics
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void updateSparsityMetrics(ExpressionExperiment ee)
Update the sparsity metrics.If no preferred single-cell vectors are present, the sparsity metrics will be cleared.
-
removeSingleCellDataVectors
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) int removeSingleCellDataVectors(ExpressionExperiment ee, QuantitationType quantitationType)
Remove single-cell data vectors for the given quantitation type.- Returns:
- the number of vectors that were removed
-
getSingleCellDimensions
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<SingleCellDimension> getSingleCellDimensions(ExpressionExperiment ee)
Obtain all the single-cell dimensions used by a given dataset.
-
getSingleCellDimensionsWithoutCellIds
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<SingleCellDimension> getSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee)
-
getSingleCellDimensionsWithoutCellIds
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<SingleCellDimension> getSingleCellDimensionsWithoutCellIds(ExpressionExperiment ee, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeCharacteristics, boolean includeIndices)
-
getSingleCellDimension
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) SingleCellDimension getSingleCellDimension(ExpressionExperiment ee, QuantitationType qt)
Obtain a single-cell dimension used for a given dataset and QT.
-
getSingleCellDimensionWithCellLevelCharacteristics
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) SingleCellDimension getSingleCellDimensionWithCellLevelCharacteristics(ExpressionExperiment ee, QuantitationType qt)
-
getSingleCellDimensionWithoutCellIds
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) SingleCellDimension getSingleCellDimensionWithoutCellIds(ExpressionExperiment ee, QuantitationType qt)
-
getSingleCellDimensionWithoutCellIds
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) SingleCellDimension getSingleCellDimensionWithoutCellIds(ExpressionExperiment ee, QuantitationType qt, boolean includeBioAssays, boolean includeCtas, boolean includeClcs, boolean includeCharacteristics, boolean includeIndices)
-
getPreferredSingleCellDimension
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<SingleCellDimension> getPreferredSingleCellDimension(ExpressionExperiment ee)
Obtain the preferred single-cell dimension.Cell type assignments and other cell-level characteristics are eagerly initialized.
-
getPreferredSingleCellDimensionWithoutCellIds
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<SingleCellDimension> getPreferredSingleCellDimensionWithoutCellIds(ExpressionExperiment ee)
Obtain the preferred single-cell dimension without its cell IDs.The returned object is not persistent since it's a projection.
-
getPreferredSingleCellDimensionWithCellLevelCharacteristics
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<SingleCellDimension> getPreferredSingleCellDimensionWithCellLevelCharacteristics(ExpressionExperiment ee)
Obtain the preferred single-cell dimension.Cell type assignments and other cell-level characteristics are eagerly initialized.
-
streamCellIds
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<Stream<String>> streamCellIds(ExpressionExperiment ee, boolean createNewSession)
-
streamCellIds
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Stream<String> streamCellIds(ExpressionExperiment ee, QuantitationType qt, boolean createNewSession)
-
streamCellTypes
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Stream<Characteristic> streamCellTypes(ExpressionExperiment ee, CellTypeAssignment cta, boolean createNewSession)
-
getCellTypeAt
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Characteristic getCellTypeAt(ExpressionExperiment ee, QuantitationType qt, Long ctaId, int cellIndex)
-
getCellTypeAt
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Characteristic[] getCellTypeAt(ExpressionExperiment ee, QuantitationType qt, Long ctaId, int startIndex, int endIndexExclusive)
-
getCellTypeAt
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Characteristic getCellTypeAt(ExpressionExperiment ee, QuantitationType qt, String ctaName, int cellIndex)
-
getCellTypeAt
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Characteristic[] getCellTypeAt(ExpressionExperiment ee, QuantitationType qt, String ctaName, int startIndex, int endIndexExclusive)
-
getCellLevelCharacteristicsCategory
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Category getCellLevelCharacteristicsCategory(ExpressionExperiment ee, CellLevelCharacteristics clc)
-
streamCellLevelCharacteristics
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Stream<Characteristic> streamCellLevelCharacteristics(ExpressionExperiment ee, CellLevelCharacteristics clc, boolean createNewSession)
-
relabelCellTypes
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) CellTypeAssignment relabelCellTypes(ExpressionExperiment ee, QuantitationType qt, SingleCellDimension dimension, List<String> newCellTypeLabels, @Nullable Protocol labellingProtocol, @Nullable String description)
Relabel the cell types of an existing set of single-cell vectors.- Parameters:
newCellTypeLabels
- the new cell types labels, must match the number of cellslabellingProtocol
- the protocol used to generate the new labelling, or null if unknown- Returns:
- a new, preferred cell type labelling
-
addCellTypeAssignment
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) CellTypeAssignment addCellTypeAssignment(ExpressionExperiment ee, QuantitationType qt, SingleCellDimension dimension, CellTypeAssignment cellTypeAssignment)
-
removeCellTypeAssignment
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void removeCellTypeAssignment(ExpressionExperiment ee, SingleCellDimension scd, CellTypeAssignment cellTypeAssignment)
Remove the given cell type assignment.If the cell type labelling is preferred and applies to the preferred vectors as per
getPreferredCellTypeAssignment(ExpressionExperiment)
, the cell type factor will be removed.
-
removeCellTypeAssignment
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void removeCellTypeAssignment(ExpressionExperiment ee, QuantitationType qt, CellTypeAssignment cellTypeAssignment)
Remove the given cell type assignment by QT.
-
getCellTypeAssignments
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment ee)
Obtain all the cell type labellings from all single-cell vectors.
-
getCellTypeAssignments
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<CellTypeAssignment> getCellTypeAssignments(ExpressionExperiment expressionExperiment, QuantitationType qt)
-
getCellTypeAssignment
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) CellTypeAssignment getCellTypeAssignment(ExpressionExperiment expressionExperiment, QuantitationType qt, Long ctaId)
Obtain a cell type assignment by ID.- Returns:
- that cell type assignmente, or null if none is found
-
getCellTypeAssignment
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) CellTypeAssignment getCellTypeAssignment(ExpressionExperiment expressionExperiment, QuantitationType qt, String ctaName)
Obtain a cell type assignment by name.- Returns:
- that cell type assignmente, or null if none is found
-
getPreferredCellTypeAssignment
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<CellTypeAssignment> getPreferredCellTypeAssignment(ExpressionExperiment ee)
Obtain the preferred cell type labelling from the preferred single-cell vectors.
-
getPreferredCellTypeAssignment
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<CellTypeAssignment> getPreferredCellTypeAssignment(ExpressionExperiment ee, QuantitationType qt)
-
addCellLevelCharacteristics
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) CellLevelCharacteristics addCellLevelCharacteristics(ExpressionExperiment ee, SingleCellDimension scd, CellLevelCharacteristics clc)
Add new cell-level characteristics.
-
removeCellLevelCharacteristics
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void removeCellLevelCharacteristics(ExpressionExperiment ee, SingleCellDimension scd, CellLevelCharacteristics clc)
Remove existing cell-level characteristics.
-
removeCellLevelCharacteristics
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void removeCellLevelCharacteristics(ExpressionExperiment ee, QuantitationType qt, CellLevelCharacteristics clc)
Remove existing cell-level characteristics by QT.
-
getCellLevelCharacteristics
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment ee)
-
getCellLevelCharacteristics
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment ee, Category category)
Obtain CLC for given category.
-
getCellLevelCharacteristics
@Nullable @Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) CellLevelCharacteristics getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt, Long id)
-
getCellLevelCharacteristics
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<CellLevelCharacteristics> getCellLevelCharacteristics(ExpressionExperiment expressionExperiment, QuantitationType qt)
-
getCellTypes
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) List<Characteristic> getCellTypes(ExpressionExperiment ee)
Obtain the cell types of a given single-cell dataset.Only the cell types applicable to the preferred single-cell vectors and labelling are returned.
-
getCellTypeFactor
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Optional<ExperimentalFactor> getCellTypeFactor(ExpressionExperiment ee)
Obtain the cell type factor.- Returns:
- a cell type factor, or null of none exist
- Throws:
IllegalStateException
- if there is more than one such factor
-
recreateCellTypeFactor
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) ExperimentalFactor recreateCellTypeFactor(ExpressionExperiment ee)
Recreate the cell type factor based on the preferred labelling of the preferred single-cell vectors.Analyses involving the factor are removed and samples mentioning the factor values are updated as per
ExperimentalFactorService.remove(ExperimentalFactor)
.- Returns:
- the created cell type factor
- Throws:
IllegalStateException
- if the dataset does not have a preferred cell type labelling for its preferred set of single-cell vectors or if there is more than one cell type factor present in the dataset
-
-