Class AbstractBulkExpressionDataMatrix<T>
java.lang.Object
ubic.gemma.core.datastructure.matrix.AbstractExpressionDataMatrix<T>
ubic.gemma.core.datastructure.matrix.AbstractBulkExpressionDataMatrix<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
BulkExpressionDataMatrix<T>
,ExpressionDataMatrix<T>
- Direct Known Subclasses:
BulkExpressionDataDoubleMatrix
,BulkExpressionDataIntMatrix
,EmptyBulkExpressionDataMatrix
public abstract class AbstractBulkExpressionDataMatrix<T>
extends AbstractExpressionDataMatrix<T>
implements BulkExpressionDataMatrix<T>
Base class for bulk expression data matrices.
If you need to handle multiple BioAssay
per BioMaterial
, use AbstractMultiAssayExpressionDataMatrix
instead.
- Author:
- poirigui
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractBulkExpressionDataMatrix
(List<? extends BulkExpressionDataVector> vectors) protected
AbstractBulkExpressionDataMatrix
(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, QuantitationType quantitationType, List<CompositeSequence> designElements) -
Method Summary
Modifier and TypeMethodDescriptionint
columns()
Obtain the total number of columns.get
(CompositeSequence designElement, BioAssay bioAssay) Access a single value of the matrix.Obtain the dimension for the columns of this matrix.getBioAssayForColumn
(int index) Obtain an assay corresponding to a given column.getBioMaterialForColumn
(int index) Obtain a biomaterial corresponding to a column.T[]
Access a single column of the matrix.int
getColumnIndex
(BioAssay bioAssay) int
getColumnIndex
(BioMaterial bioMaterial) protected String
getColumnLabel
(int j) Obtain a label suitable for describing a column of the matrix.getDesignElementForRow
(int index) Return a design element for a given index.Obtain all the design elements in this data matrix.Return the expression experiment this matrix is holding data for, if known.Obtain the quantitation type for this matrix.T[]
getRow
(CompositeSequence designElement) Return a row that 'came from' the given design element.getRowElement
(int row) 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.protected String
getRowLabel
(int i) Obtain a label suitable for describing a row of the matrix.int
rows()
Methods inherited from class ubic.gemma.core.datastructure.matrix.AbstractExpressionDataMatrix
format, format, format, formatRepresentation, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ubic.gemma.core.datastructure.matrix.BulkExpressionDataMatrix
getRawMatrix, hasMissingValues
Methods inherited from interface ubic.gemma.core.datastructure.matrix.ExpressionDataMatrix
get, getColumn, getRow
-
Constructor Details
-
AbstractBulkExpressionDataMatrix
protected AbstractBulkExpressionDataMatrix(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, QuantitationType quantitationType, List<CompositeSequence> designElements) -
AbstractBulkExpressionDataMatrix
-
-
Method Details
-
getExpressionExperiment
Description copied from interface:ExpressionDataMatrix
Return the expression experiment this matrix is holding data for, if known.- Specified by:
getExpressionExperiment
in interfaceExpressionDataMatrix<T>
-
getQuantitationType
Description copied from interface:ExpressionDataMatrix
Obtain the quantitation type for this matrix.- Specified by:
getQuantitationType
in interfaceExpressionDataMatrix<T>
-
getBioAssayDimension
Description copied from interface:BulkExpressionDataMatrix
Obtain the dimension for the columns of this matrix.- Specified by:
getBioAssayDimension
in interfaceBulkExpressionDataMatrix<T>
-
columns
public int columns()Description copied from interface:ExpressionDataMatrix
Obtain the total number of columns.- Specified by:
columns
in interfaceExpressionDataMatrix<T>
-
getColumn
Description copied from interface:BulkExpressionDataMatrix
Access a single column of the matrix.- Specified by:
getColumn
in interfaceBulkExpressionDataMatrix<T>
- Returns:
- a vector for the given column, or null if the column is not present
-
getColumnIndex
- Specified by:
getColumnIndex
in interfaceBulkExpressionDataMatrix<T>
- Returns:
- the index of the column for the data for the bioAssay, or -1 if missing
-
getColumnIndex
- Specified by:
getColumnIndex
in interfaceBulkExpressionDataMatrix<T>
-
getBioAssayForColumn
Description copied from interface:BulkExpressionDataMatrix
Obtain an assay corresponding to a given column.- Specified by:
getBioAssayForColumn
in interfaceBulkExpressionDataMatrix<T>
-
getBioMaterialForColumn
Description copied from interface:BulkExpressionDataMatrix
Obtain a biomaterial corresponding to a column.- Specified by:
getBioMaterialForColumn
in interfaceBulkExpressionDataMatrix<T>
-
rows
public int rows()- Specified by:
rows
in interfaceExpressionDataMatrix<T>
- Returns:
- int
-
getRow
Description copied from interface:ExpressionDataMatrix
Return a row that 'came from' the given design element.- Specified by:
getRow
in interfaceExpressionDataMatrix<T>
- Parameters:
designElement
- de- Returns:
- the corresponding row or null if the design element is not found in the matrix
-
getRowIndex
- Specified by:
getRowIndex
in interfaceExpressionDataMatrix<T>
- Returns:
- the index for the given design element, or -1 if not found
-
getRowIndices
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<T>
-
getDesignElements
Description copied from interface:ExpressionDataMatrix
Obtain all the design elements in this data matrix.- Specified by:
getDesignElements
in interfaceExpressionDataMatrix<T>
-
getDesignElementForRow
Description copied from interface:ExpressionDataMatrix
Return a design element for a given index.- Specified by:
getDesignElementForRow
in interfaceExpressionDataMatrix<T>
-
get
Description copied from interface:BulkExpressionDataMatrix
Access a single value of the matrix. Note that because there can be multiple bioassays per column and multiple design elements per row, it is possible for this method to retrieve a data that does not come from the bioassay and/or designelement arguments.- Specified by:
get
in interfaceBulkExpressionDataMatrix<T>
- Parameters:
designElement
- debioAssay
- ba- Returns:
- the value at the given design element and bioassay, or
null
if the value is missing
-
getRowElements
- Specified by:
getRowElements
in interfaceExpressionDataMatrix<T>
- Returns:
- list of elements representing the row 'labels'.
-
getRowElement
- Specified by:
getRowElement
in interfaceExpressionDataMatrix<T>
-
getRowLabel
Description copied from class:AbstractExpressionDataMatrix
Obtain a label suitable for describing a row of the matrix.- Specified by:
getRowLabel
in classAbstractExpressionDataMatrix<T>
-
getColumnLabel
Description copied from class:AbstractExpressionDataMatrix
Obtain a label suitable for describing a column of the matrix.- Specified by:
getColumnLabel
in classAbstractExpressionDataMatrix<T>
-