Class BaseExpressionDataMatrix<T>
- java.lang.Object
-
- ubic.gemma.core.datastructure.matrix.BaseExpressionDataMatrix<T>
-
- All Implemented Interfaces:
Serializable
,ExpressionDataMatrix<T>
- Direct Known Subclasses:
EmptyExpressionMatrix
,ExpressionDataBooleanMatrix
,ExpressionDataDoubleMatrix
,ExpressionDataIntegerMatrix
,ExpressionDataStringMatrix
public abstract class BaseExpressionDataMatrix<T> extends Object implements ExpressionDataMatrix<T>, Serializable
Base class for ExpressionDataMatrix implementations. Implementation note: The underlying DoubleMatrixNamed is indexed by Integers, which are in turn mapped to BioAssays etc. held here. Thus the 'names' of the underlying matrix are just numbers.- Author:
- pavlidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BaseExpressionDataMatrix()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.datastructure.matrix.ExpressionDataMatrix
columns, get, get, get, getColumn, getColumn, getColumns, getRawMatrix, getRow, getRow, getRows, hasMissingValues, rows, set
-
-
-
-
Method Detail
-
columns
public int columns(CompositeSequence el)
Description copied from interface:ExpressionDataMatrix
Number of columns that use the given design element. Useful if the matrix includes data from more than one array design.- Specified by:
columns
in interfaceExpressionDataMatrix<T>
- Parameters:
el
- el- Returns:
- int
-
getBestBioAssayDimension
public BioAssayDimension getBestBioAssayDimension()
- Specified by:
getBestBioAssayDimension
in interfaceExpressionDataMatrix<T>
- Returns:
- The bioassaydimension that covers all the biomaterials in this matrix.
-
getBioAssayDimension
public BioAssayDimension getBioAssayDimension(CompositeSequence designElement)
Description copied from interface:ExpressionDataMatrix
Produce a BioAssayDimension representing the matrix columns for a specific row. The designelement argument is needed because a matrix can combine data from multiple array designs, each of which will generate its own bioassaydimension. Note that if this represents a subsetted data set, the return value may be a lightweight 'fake'.- Specified by:
getBioAssayDimension
in interfaceExpressionDataMatrix<T>
- Parameters:
designElement
- de- Returns:
- bad
-
getBioAssaysForColumn
public Collection<BioAssay> getBioAssaysForColumn(int index)
- Specified by:
getBioAssaysForColumn
in interfaceExpressionDataMatrix<T>
- Parameters:
index
- i- Returns:
- bioassays that contribute data to the column. There can be multiple bioassays if more than one array was used in the study.
-
getBioMaterialForColumn
public BioMaterial getBioMaterialForColumn(int index)
- Specified by:
getBioMaterialForColumn
in interfaceExpressionDataMatrix<T>
- Parameters:
index
- i- Returns:
- BioMaterial. Note that if this represents a subsetted data set, the BioMaterial may be a lightweight 'fake'.
-
getColumnIndex
public int getColumnIndex(BioMaterial bioMaterial)
- Specified by:
getColumnIndex
in interfaceExpressionDataMatrix<T>
- Parameters:
bioMaterial
- bm- Returns:
- the index of the column for the data for the bioMaterial.
-
getDesignElements
public List<CompositeSequence> getDesignElements()
Description copied from interface:ExpressionDataMatrix
Obtain all the design elements in this data matrix.- Specified by:
getDesignElements
in interfaceExpressionDataMatrix<T>
-
getDesignElementForRow
public CompositeSequence getDesignElementForRow(int index)
- Specified by:
getDesignElementForRow
in interfaceExpressionDataMatrix<T>
- Parameters:
index
- i- Returns:
- cs
-
getExpressionExperiment
@Nullable public ExpressionExperiment getExpressionExperiment()
The associatedExpressionExperiment
, if known.- Specified by:
getExpressionExperiment
in interfaceExpressionDataMatrix<T>
- Returns:
- ee
-
getQuantitationTypes
public Collection<QuantitationType> getQuantitationTypes()
Description copied from interface:ExpressionDataMatrix
Return the quantitation types for this matrix. Often (usually) there will be just one.- Specified by:
getQuantitationTypes
in interfaceExpressionDataMatrix<T>
- Returns:
- qts
-
getRowElements
public List<ExpressionDataMatrixRowElement> getRowElements()
- Specified by:
getRowElements
in interfaceExpressionDataMatrix<T>
- Returns:
- list of elements representing the row 'labels'.
-
getRowIndex
public int getRowIndex(CompositeSequence designElement)
- Specified by:
getRowIndex
in interfaceExpressionDataMatrix<T>
-
getRowElement
public ExpressionDataMatrixRowElement getRowElement(int index)
-
vectorsToMatrix
protected abstract void vectorsToMatrix(Collection<? extends DesignElementDataVector> vectors)
-
-