Class SingleCellDimension
- All Implemented Interfaces:
Identifiable
SingleCellExpressionDataVector.- Author:
- poirigui
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanImportant note: Two objects with the same class and non-null ID must be considered equal.getBioAssay(int cellIndex) Obtain theBioAssayfor a given cell position.List ofBioAssays applicable to the cells.int[]Offsets of theBioAssayincellIds.Cell identifiers.getCellIdsBySample(int sampleIndex) Obtain a list of cell IDs for the given sample.Set of cell-level characteristics.Set of cell types assignment to individual cells.getId()intNumber of cell IDs.intgetNumberOfCellIdsBySample(int sampleIndex) Obtain the number for cells for the given sample.inthashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.voidsetBioAssays(List<BioAssay> bioAssays) List ofBioAssays applicable to the cells.voidsetBioAssaysOffset(int[] bioAssaysOffset) Offsets of theBioAssayincellIds.voidsetCellIds(List<String> cellIds) Cell identifiers.voidsetCellLevelCharacteristics(Set<CellLevelCharacteristics> cellLevelCharacteristics) Set of cell-level characteristics.voidsetCellTypeAssignments(Set<CellTypeAssignment> cellTypeAssignments) Set of cell types assignment to individual cells.voidvoidsetNumberOfCellIds(int numberOfCellIds) Number of cell IDs.toString()
-
Constructor Details
-
SingleCellDimension
public SingleCellDimension()
-
-
Method Details
-
getBioAssay
Obtain theBioAssayfor a given cell position.- Parameters:
cellIndex- the cell position incellIds- Throws:
IllegalArgumentException- if the sparse range array is invalid as perSparseListUtils.getSparseRangeArrayElement(List, int[], int, int)IndexOutOfBoundsException- if the index is out of bounds
-
getCellIdsBySample
Obtain a list of cell IDs for the given sample.- Parameters:
sampleIndex- the sample position inbioAssays
-
getNumberOfCellIdsBySample
public int getNumberOfCellIdsBySample(int sampleIndex) Obtain the number for cells for the given sample.This is more efficient than looking up the size of
getCellIdsBySample(int).- Parameters:
sampleIndex- the sample position inbioAssays
-
hashCode
public int hashCode()Description copied from class:AbstractIdentifiableImportant note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Specified by:
hashCodein classAbstractIdentifiable
-
equals
Description copied from class:AbstractIdentifiableImportant note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality.- Specified by:
equalsin classAbstractIdentifiable
-
toString
- Overrides:
toStringin classAbstractIdentifiable
-
getId
- Specified by:
getIdin interfaceIdentifiable- Overrides:
getIdin classAbstractIdentifiable
-
getCellIds
Cell identifiers.Those are user-supplied cell identifiers. Each cell from a given
BioAssaymust be assigned a unique id.This is stored as a compressed, gzipped blob in the database. See
CompressedStringListTypefor more details. -
getNumberOfCellIds
public int getNumberOfCellIds()Number of cell IDs.This is *not* the number of cells
This must always be equal to the size of
cellIds. -
getBioAssays
List ofBioAssays applicable to the cells.The
BioAssayinbioAssays[sampleIndex]applies to all the cells in the interval[bioAssaysOffset[sampleIndex], bioAssaysOffset[sampleIndex+1][except for the last sample which owns the remaining cells.To find the
BioAssayof a given cell, usegetBioAssay(int). -
getBioAssaysOffset
public int[] getBioAssaysOffset()Offsets of theBioAssayincellIds.This must always contain
bioAssays.size()elements.This is stored in the database using
ByteArrayType.This may be set to
nullto keep the model lightweight. -
getCellTypeAssignments
Set of cell types assignment to individual cells.This is empty if no cell types have been assigned and should always contain a preferred assignment as per
CellTypeAssignment.isPreferred()if non-empty. -
getCellLevelCharacteristics
Set of cell-level characteristics.Cell types have a special treatment and should be added to
cellTypeAssignments. -
setId
- Overrides:
setIdin classAbstractIdentifiable
-
setCellIds
Cell identifiers.Those are user-supplied cell identifiers. Each cell from a given
BioAssaymust be assigned a unique id.This is stored as a compressed, gzipped blob in the database. See
CompressedStringListTypefor more details. -
setNumberOfCellIds
public void setNumberOfCellIds(int numberOfCellIds) Number of cell IDs.This is *not* the number of cells
This must always be equal to the size of
cellIds. -
setBioAssays
List ofBioAssays applicable to the cells.The
BioAssayinbioAssays[sampleIndex]applies to all the cells in the interval[bioAssaysOffset[sampleIndex], bioAssaysOffset[sampleIndex+1][except for the last sample which owns the remaining cells.To find the
BioAssayof a given cell, usegetBioAssay(int). -
setBioAssaysOffset
public void setBioAssaysOffset(int[] bioAssaysOffset) Offsets of theBioAssayincellIds.This must always contain
bioAssays.size()elements.This is stored in the database using
ByteArrayType.This may be set to
nullto keep the model lightweight. -
setCellTypeAssignments
Set of cell types assignment to individual cells.This is empty if no cell types have been assigned and should always contain a preferred assignment as per
CellTypeAssignment.isPreferred()if non-empty. -
setCellLevelCharacteristics
Set of cell-level characteristics.Cell types have a special treatment and should be added to
cellTypeAssignments.
-