Class CellTypeAssignment
- All Implemented Interfaces:
Describable,Identifiable,CellLevelCharacteristics
- Author:
- poirigui
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<CellTypeAssignment> static final intA special indicator forcellTypeIndiceswhen the cell type is unknown.Fields inherited from interface ubic.gemma.model.expression.bioAssayData.CellLevelCharacteristics
UNKNOWN_CHARACTERISTIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanImportant note: Two objects with the same class and non-null ID must be considered equal.getCellType(int cellIndex) Obtain the type assignment of a given cell.int[]Cell types assignment to individual cells from thecellTypescollections.List of cell types.getCharacteristic(int cellIndex) UsegetCellType(int)instead.Deprecated.int[]Deprecated.UsegetCellTypeIndices()instead.Obtain the number of cells assigned with a characteristic.intNumber of cell types.intDeprecated.UsegetNumberOfCellTypes()instead.inthashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.booleanIndicate if this assignment is the preferred one.voidsetCellTypeIndices(int[] cellTypeIndices) Cell types assignment to individual cells from thecellTypescollections.voidsetCellTypes(List<Characteristic> cellTypes) List of cell types.voidsetNumberOfAssignedCells(Integer numberOfAssignedCells) voidsetNumberOfCellTypes(int numberOfCellTypes) Number of cell types.voidsetPreferred(boolean preferred) Indicate if this assignment is the preferred one.toString()Methods inherited from class ubic.gemma.model.analysis.Analysis
getName, getProtocol, setName, setProtocolMethods inherited from class ubic.gemma.model.common.AbstractDescribable
getDescription, setDescriptionMethods inherited from class ubic.gemma.model.common.AbstractIdentifiable
getId, setIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ubic.gemma.model.expression.bioAssayData.CellLevelCharacteristics
getNameMethods inherited from interface ubic.gemma.model.common.Describable
getDescriptionMethods inherited from interface ubic.gemma.model.common.Identifiable
getId
-
Field Details
-
COMPARATOR
-
UNKNOWN_CELL_TYPE
public static final int UNKNOWN_CELL_TYPEA special indicator forcellTypeIndiceswhen the cell type is unknown.- See Also:
-
-
Constructor Details
-
CellTypeAssignment
public CellTypeAssignment()
-
-
Method Details
-
getCellType
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
Deprecated.UsegetCellTypes()instead.Description copied from interface:CellLevelCharacteristicsList of characteristic.- Specified by:
getCharacteristicsin interfaceCellLevelCharacteristics
-
getNumberOfCharacteristics
Deprecated.UsegetNumberOfCellTypes()instead.Description copied from interface:CellLevelCharacteristicsThe number of characteristics inCellLevelCharacteristics.getCharacteristics().- Specified by:
getNumberOfCharacteristicsin interfaceCellLevelCharacteristics
-
getIndices
Deprecated.UsegetCellTypeIndices()instead.Description copied from interface:CellLevelCharacteristicsEach entry indicate which characteristic fromCellLevelCharacteristics.getCharacteristics()is applicable for a given cell.CellLevelCharacteristics.UNKNOWN_CHARACTERISTICis 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:
getIndicesin interfaceCellLevelCharacteristics
-
getCharacteristic
UsegetCellType(int)instead.- Specified by:
getCharacteristicin interfaceCellLevelCharacteristics- Returns:
- the characteristic or
nullif the cell is assigned toCellLevelCharacteristics.UNKNOWN_CHARACTERISTIC.
-
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.- Overrides:
hashCodein classAbstractDescribable
-
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 classAbstractDescribable
-
isPreferred
public boolean isPreferred()Indicate if this assignment is the preferred one.There can only be one preferred cell type assignment for a given
SingleCellDimension. -
getCellTypeIndices
public int[] getCellTypeIndices()Cell types assignment to individual cells from thecellTypescollections.The value
-1is used to indicate an unknown cell type. -
getNumberOfAssignedCells
Description copied from interface:CellLevelCharacteristicsObtain the number of cells assigned with a characteristic.This is equal to the number of entries in
CellLevelCharacteristics.getIndices()that are notCellLevelCharacteristics.UNKNOWN_CHARACTERISTIC.TOOD: switch to a regular
intonce existing CLCs have all been back-filled.- Specified by:
getNumberOfAssignedCellsin interfaceCellLevelCharacteristics
-
getCellTypes
List of cell types. -
getNumberOfCellTypes
public int getNumberOfCellTypes()Number of cell types.This must always be equal to number of elements of
cellTypes. -
setPreferred
public void setPreferred(boolean preferred) Indicate if this assignment is the preferred one.There can only be one preferred cell type assignment for a given
SingleCellDimension. -
setCellTypeIndices
public void setCellTypeIndices(int[] cellTypeIndices) Cell types assignment to individual cells from thecellTypescollections.The value
-1is used to indicate an unknown cell type. -
setNumberOfAssignedCells
-
setCellTypes
List of cell types. -
setNumberOfCellTypes
public void setNumberOfCellTypes(int numberOfCellTypes) Number of cell types.This must always be equal to number of elements of
cellTypes.
-
getCellTypes()instead.