Class EmptySingleCellExpressionDataMatrix
- java.lang.Object
-
- ubic.gemma.core.datastructure.matrix.EmptySingleCellExpressionDataMatrix
-
- All Implemented Interfaces:
ExpressionDataMatrix<Object>
,SingleCellExpressionDataMatrix<Object>
public class EmptySingleCellExpressionDataMatrix extends Object implements SingleCellExpressionDataMatrix<Object>
-
-
Constructor Summary
Constructors Constructor Description EmptySingleCellExpressionDataMatrix(ExpressionExperiment expressionExperiment, SingleCellDimension dimension, QuantitationType quantitationType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
columns()
Obtain the total number of columns.Object
get(int row, int column)
Access a single value of the matrix by row and column.BioAssay
getBioAssayForColumn(int j)
Obtain a bioassay applicable to a given column.List<BioAssay>
getBioAssays()
Obtain the list of bioassays.BioMaterial
getBioMaterialForColumn(int j)
String
getCellIdForColumn(int j)
Obtain the cell ID of a given column.List<String>
getCellIds()
Note: cell IDs are only unique within a given assayObject[]
getColumn(int column)
Access a single column of the matrix.CompositeSequence
getDesignElementForRow(int index)
Return a design element for a given index.List<CompositeSequence>
getDesignElements()
Obtain all the design elements in this data matrix.ExpressionExperiment
getExpressionExperiment()
Return the expression experiment this matrix is holding data for, if known.QuantitationType
getQuantitationType()
Return the quantitation type for this matrix.Object[]
getRow(int index)
Access a single row of the matrix, by index.Object[]
getRow(CompositeSequence designElement)
Return a row that 'came from' the given design element.ExpressionDataMatrixRowElement
getRowElement(int row)
List<ExpressionDataMatrixRowElement>
getRowElements()
int
getRowIndex(CompositeSequence designElement)
int[]
getRowIndices(CompositeSequence designElement)
Obtain all the rows that correspond to the given design element, ornull
if the design element is not found.SingleCellDimension
getSingleCellDimension()
Return the single-cell dimension for this matrix.int
rows()
-
-
-
Constructor Detail
-
EmptySingleCellExpressionDataMatrix
public EmptySingleCellExpressionDataMatrix(ExpressionExperiment expressionExperiment, SingleCellDimension dimension, QuantitationType quantitationType)
-
-
Method Detail
-
getExpressionExperiment
public ExpressionExperiment getExpressionExperiment()
Description copied from interface:ExpressionDataMatrix
Return the expression experiment this matrix is holding data for, if known.- Specified by:
getExpressionExperiment
in interfaceExpressionDataMatrix<Object>
-
getQuantitationType
public QuantitationType getQuantitationType()
Description copied from interface:SingleCellExpressionDataMatrix
Return the quantitation type for this matrix.- Specified by:
getQuantitationType
in interfaceExpressionDataMatrix<Object>
- Specified by:
getQuantitationType
in interfaceSingleCellExpressionDataMatrix<Object>
-
getDesignElements
public List<CompositeSequence> getDesignElements()
Description copied from interface:ExpressionDataMatrix
Obtain all the design elements in this data matrix.- Specified by:
getDesignElements
in interfaceExpressionDataMatrix<Object>
-
getDesignElementForRow
public CompositeSequence getDesignElementForRow(int index)
Description copied from interface:ExpressionDataMatrix
Return a design element for a given index.- Specified by:
getDesignElementForRow
in interfaceExpressionDataMatrix<Object>
-
columns
public int columns()
Description copied from interface:ExpressionDataMatrix
Obtain the total number of columns.- Specified by:
columns
in interfaceExpressionDataMatrix<Object>
-
getSingleCellDimension
public SingleCellDimension getSingleCellDimension()
Description copied from interface:SingleCellExpressionDataMatrix
Return the single-cell dimension for this matrix.- Specified by:
getSingleCellDimension
in interfaceSingleCellExpressionDataMatrix<Object>
-
getColumn
public Object[] getColumn(int column)
Description copied from interface:SingleCellExpressionDataMatrix
Access a single column of the matrix.Important note: Retrieving a column is a
O(n log m)
operation wheren
is the number of vectors andm
is the number of cells. Always favour row-oriented operations when possible.- Specified by:
getColumn
in interfaceExpressionDataMatrix<Object>
- Specified by:
getColumn
in interfaceSingleCellExpressionDataMatrix<Object>
- Parameters:
column
- index- Returns:
- T[]
-
rows
public int rows()
- Specified by:
rows
in interfaceExpressionDataMatrix<Object>
- Returns:
- int
-
getRow
public Object[] getRow(int index)
Description copied from interface:ExpressionDataMatrix
Access a single row of the matrix, by index. A complete row is returned.- Specified by:
getRow
in interfaceExpressionDataMatrix<Object>
- Parameters:
index
- i- Returns:
- t[]
-
getRow
public Object[] getRow(CompositeSequence designElement)
Description copied from interface:ExpressionDataMatrix
Return a row that 'came from' the given design element.- Specified by:
getRow
in interfaceExpressionDataMatrix<Object>
- Parameters:
designElement
- de- Returns:
- the corresponding row or null if the design element is not found in the matrix
-
getRowIndex
public int getRowIndex(CompositeSequence designElement)
- Specified by:
getRowIndex
in interfaceExpressionDataMatrix<Object>
- Returns:
- the index for the given design element, or -1 if not found
-
getRowIndices
public int[] getRowIndices(CompositeSequence designElement)
Description copied from interface:ExpressionDataMatrix
Obtain all the rows that correspond to the given design element, ornull
if the design element is not found.- Specified by:
getRowIndices
in interfaceExpressionDataMatrix<Object>
-
getRowElements
public List<ExpressionDataMatrixRowElement> getRowElements()
- Specified by:
getRowElements
in interfaceExpressionDataMatrix<Object>
- Returns:
- list of elements representing the row 'labels'.
-
getRowElement
public ExpressionDataMatrixRowElement getRowElement(int row)
- Specified by:
getRowElement
in interfaceExpressionDataMatrix<Object>
-
get
public Object get(int row, int column)
Description copied from interface:ExpressionDataMatrix
Access a single value of the matrix by row and column.- Specified by:
get
in interfaceExpressionDataMatrix<Object>
-
getBioAssays
public List<BioAssay> getBioAssays()
Description copied from interface:SingleCellExpressionDataMatrix
Obtain the list of bioassays.- Specified by:
getBioAssays
in interfaceSingleCellExpressionDataMatrix<Object>
-
getBioAssayForColumn
public BioAssay getBioAssayForColumn(int j)
Description copied from interface:SingleCellExpressionDataMatrix
Obtain a bioassay applicable to a given column.- Specified by:
getBioAssayForColumn
in interfaceSingleCellExpressionDataMatrix<Object>
-
getBioMaterialForColumn
public BioMaterial getBioMaterialForColumn(int j)
- Specified by:
getBioMaterialForColumn
in interfaceSingleCellExpressionDataMatrix<Object>
-
getCellIds
public List<String> getCellIds()
Description copied from interface:SingleCellExpressionDataMatrix
Note: cell IDs are only unique within a given assay- Specified by:
getCellIds
in interfaceSingleCellExpressionDataMatrix<Object>
-
getCellIdForColumn
public String getCellIdForColumn(int j)
Description copied from interface:SingleCellExpressionDataMatrix
Obtain the cell ID of a given column.- Specified by:
getCellIdForColumn
in interfaceSingleCellExpressionDataMatrix<Object>
-
-