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 intcolumns()Obtain the total number of columns.Objectget(int row, int column)Access a single value of the matrix by row and column.BioAssaygetBioAssayForColumn(int j)Obtain a bioassay applicable to a given column.List<BioAssay>getBioAssays()Obtain the list of bioassays.BioMaterialgetBioMaterialForColumn(int j)StringgetCellIdForColumn(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.CompositeSequencegetDesignElementForRow(int index)Return a design element for a given index.List<CompositeSequence>getDesignElements()Obtain all the design elements in this data matrix.ExpressionExperimentgetExpressionExperiment()Return the expression experiment this matrix is holding data for, if known.QuantitationTypegetQuantitationType()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.ExpressionDataMatrixRowElementgetRowElement(int row)List<ExpressionDataMatrixRowElement>getRowElements()intgetRowIndex(CompositeSequence designElement)int[]getRowIndices(CompositeSequence designElement)Obtain all the rows that correspond to the given design element, ornullif the design element is not found.SingleCellDimensiongetSingleCellDimension()Return the single-cell dimension for this matrix.introws()
-
-
-
Constructor Detail
-
EmptySingleCellExpressionDataMatrix
public EmptySingleCellExpressionDataMatrix(ExpressionExperiment expressionExperiment, SingleCellDimension dimension, QuantitationType quantitationType)
-
-
Method Detail
-
getExpressionExperiment
public ExpressionExperiment getExpressionExperiment()
Description copied from interface:ExpressionDataMatrixReturn the expression experiment this matrix is holding data for, if known.- Specified by:
getExpressionExperimentin interfaceExpressionDataMatrix<Object>
-
getQuantitationType
public QuantitationType getQuantitationType()
Description copied from interface:SingleCellExpressionDataMatrixReturn the quantitation type for this matrix.- Specified by:
getQuantitationTypein interfaceExpressionDataMatrix<Object>- Specified by:
getQuantitationTypein interfaceSingleCellExpressionDataMatrix<Object>
-
getDesignElements
public List<CompositeSequence> getDesignElements()
Description copied from interface:ExpressionDataMatrixObtain all the design elements in this data matrix.- Specified by:
getDesignElementsin interfaceExpressionDataMatrix<Object>
-
getDesignElementForRow
public CompositeSequence getDesignElementForRow(int index)
Description copied from interface:ExpressionDataMatrixReturn a design element for a given index.- Specified by:
getDesignElementForRowin interfaceExpressionDataMatrix<Object>
-
columns
public int columns()
Description copied from interface:ExpressionDataMatrixObtain the total number of columns.- Specified by:
columnsin interfaceExpressionDataMatrix<Object>
-
getSingleCellDimension
public SingleCellDimension getSingleCellDimension()
Description copied from interface:SingleCellExpressionDataMatrixReturn the single-cell dimension for this matrix.- Specified by:
getSingleCellDimensionin interfaceSingleCellExpressionDataMatrix<Object>
-
getColumn
public Object[] getColumn(int column)
Description copied from interface:SingleCellExpressionDataMatrixAccess a single column of the matrix.Important note: Retrieving a column is a
O(n log m)operation wherenis the number of vectors andmis the number of cells. Always favour row-oriented operations when possible.- Specified by:
getColumnin interfaceExpressionDataMatrix<Object>- Specified by:
getColumnin interfaceSingleCellExpressionDataMatrix<Object>- Parameters:
column- index- Returns:
- T[]
-
rows
public int rows()
- Specified by:
rowsin interfaceExpressionDataMatrix<Object>- Returns:
- int
-
getRow
public Object[] getRow(int index)
Description copied from interface:ExpressionDataMatrixAccess a single row of the matrix, by index. A complete row is returned.- Specified by:
getRowin interfaceExpressionDataMatrix<Object>- Parameters:
index- i- Returns:
- t[]
-
getRow
public Object[] getRow(CompositeSequence designElement)
Description copied from interface:ExpressionDataMatrixReturn a row that 'came from' the given design element.- Specified by:
getRowin 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:
getRowIndexin 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:ExpressionDataMatrixObtain all the rows that correspond to the given design element, ornullif the design element is not found.- Specified by:
getRowIndicesin interfaceExpressionDataMatrix<Object>
-
getRowElements
public List<ExpressionDataMatrixRowElement> getRowElements()
- Specified by:
getRowElementsin interfaceExpressionDataMatrix<Object>- Returns:
- list of elements representing the row 'labels'.
-
getRowElement
public ExpressionDataMatrixRowElement getRowElement(int row)
- Specified by:
getRowElementin interfaceExpressionDataMatrix<Object>
-
get
public Object get(int row, int column)
Description copied from interface:ExpressionDataMatrixAccess a single value of the matrix by row and column.- Specified by:
getin interfaceExpressionDataMatrix<Object>
-
getBioAssays
public List<BioAssay> getBioAssays()
Description copied from interface:SingleCellExpressionDataMatrixObtain the list of bioassays.- Specified by:
getBioAssaysin interfaceSingleCellExpressionDataMatrix<Object>
-
getBioAssayForColumn
public BioAssay getBioAssayForColumn(int j)
Description copied from interface:SingleCellExpressionDataMatrixObtain a bioassay applicable to a given column.- Specified by:
getBioAssayForColumnin interfaceSingleCellExpressionDataMatrix<Object>
-
getBioMaterialForColumn
public BioMaterial getBioMaterialForColumn(int j)
- Specified by:
getBioMaterialForColumnin interfaceSingleCellExpressionDataMatrix<Object>
-
getCellIds
public List<String> getCellIds()
Description copied from interface:SingleCellExpressionDataMatrixNote: cell IDs are only unique within a given assay- Specified by:
getCellIdsin interfaceSingleCellExpressionDataMatrix<Object>
-
getCellIdForColumn
public String getCellIdForColumn(int j)
Description copied from interface:SingleCellExpressionDataMatrixObtain the cell ID of a given column.- Specified by:
getCellIdForColumnin interfaceSingleCellExpressionDataMatrix<Object>
-
-