Class CellTypeAssignment
- java.lang.Object
-
- ubic.gemma.model.common.AbstractIdentifiable
-
- ubic.gemma.model.common.AbstractDescribable
-
- ubic.gemma.model.analysis.Analysis
-
- ubic.gemma.model.expression.bioAssayData.CellTypeAssignment
-
- All Implemented Interfaces:
Describable
,Identifiable
,CellLevelCharacteristics
public class CellTypeAssignment extends Analysis implements CellLevelCharacteristics
Represents a cell type assignment where cells from a given dataset are assigned cell types.- Author:
- poirigui
- See Also:
SingleCellDimension
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CellTypeAssignment.Factory
-
Field Summary
Fields Modifier and Type Field Description static int
UNKNOWN_CELL_TYPE
A special indicator forcellTypeIndices
when the cell type is unknown.-
Fields inherited from interface ubic.gemma.model.expression.bioAssayData.CellLevelCharacteristics
UNKNOWN_CHARACTERISTIC
-
-
Constructor Summary
Constructors Constructor Description CellTypeAssignment()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object object)
Important note: Two objects with the same class and non-null ID must be considered equal.Characteristic
getCellType(int cellIndex)
Obtain the type assignment of a given cell.Characteristic
getCharacteristic(int cellIndex)
UsegetCellType(int)
instead.List<Characteristic>
getCharacteristics()
Deprecated.Use#getCellTypes()
instead.int[]
getIndices()
Deprecated.Use#getCellTypeIndices()
instead.int
getNumberOfCharacteristics()
Deprecated.Use#getNumberOfCellTypes()
instead.int
hashCode()
Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.String
toString()
-
Methods inherited from class ubic.gemma.model.analysis.Analysis
getProtocol, setProtocol
-
Methods inherited from class ubic.gemma.model.common.AbstractDescribable
getDescription, getName, setDescription, setName
-
Methods inherited from class ubic.gemma.model.common.AbstractIdentifiable
getId, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ubic.gemma.model.expression.bioAssayData.CellLevelCharacteristics
getNumberOfAssignedCells
-
Methods inherited from interface ubic.gemma.model.common.Identifiable
getId
-
-
-
-
Field Detail
-
UNKNOWN_CELL_TYPE
public static final int UNKNOWN_CELL_TYPE
A special indicator forcellTypeIndices
when the cell type is unknown.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCellType
@Nullable public Characteristic getCellType(int cellIndex) throws IndexOutOfBoundsException
Obtain the type assignment of a given cell.- Returns:
- the type assignment of a given cell, or null if the type was assigne to
UNKNOWN_CELL_TYPE
. - Throws:
IndexOutOfBoundsException
- if the cell index is out of bounds
-
getCharacteristics
public List<Characteristic> getCharacteristics()
Deprecated.Use#getCellTypes()
instead.Description copied from interface:CellLevelCharacteristics
List of characteristic.- Specified by:
getCharacteristics
in interfaceCellLevelCharacteristics
-
getNumberOfCharacteristics
public int getNumberOfCharacteristics()
Deprecated.Use#getNumberOfCellTypes()
instead.Description copied from interface:CellLevelCharacteristics
The number of characteristics inCellLevelCharacteristics.getCharacteristics()
.- Specified by:
getNumberOfCharacteristics
in interfaceCellLevelCharacteristics
-
getIndices
public int[] getIndices()
Deprecated.Use#getCellTypeIndices()
instead.Description copied from interface:CellLevelCharacteristics
Each entry indicate which characteristic fromCellLevelCharacteristics.getCharacteristics()
is applicable for a given cell.CellLevelCharacteristics.UNKNOWN_CHARACTERISTIC
is used to indicate a missing value for a cell. In this case,CellLevelCharacteristics.getCharacteristic(int)
returnsnull
.The size of this array is the number of cells, typically in a
SingleCellDimension
.- Specified by:
getIndices
in interfaceCellLevelCharacteristics
-
getCharacteristic
@Nullable public Characteristic getCharacteristic(int cellIndex)
UsegetCellType(int)
instead.- Specified by:
getCharacteristic
in interfaceCellLevelCharacteristics
- Returns:
- the characteristic or
null
if the cell is assigned toCellLevelCharacteristics.UNKNOWN_CHARACTERISTIC
.
-
hashCode
public int hashCode()
Description copied from class:AbstractIdentifiable
Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Overrides:
hashCode
in classAbstractDescribable
-
equals
public boolean equals(Object object)
Description copied from class:AbstractIdentifiable
Important 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:
equals
in classAbstractIdentifiable
-
toString
public String toString()
- Overrides:
toString
in classAbstractDescribable
-
-