Class ExpressionDataDoubleMatrix
- java.lang.Object
- 
- ubic.gemma.core.datastructure.matrix.BaseExpressionDataMatrix<Double>
- 
- ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix
 
 
- 
- All Implemented Interfaces:
- Serializable,- ExpressionDataMatrix<Double>
 
 public class ExpressionDataDoubleMatrix extends BaseExpressionDataMatrix<Double> A data structure that holds a reference to the data for a given expression experiment. The data can be queried by row or column, returning data for a specific DesignElement or data for a specific BioAssay. This class is not database aware so the vectors provided must already be 'thawed'.- Author:
- pavlidis, keshav
- See Also:
- Serialized Form
 
- 
- 
Constructor Summary
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intcolumns()Total number of columns.Doubleget(int row, int column)Access a single value of the matrix.Double[][]get(List<CompositeSequence> designElements, List<BioAssay> bioAssays)Access a submatrixDoubleget(CompositeSequence designElement, BioAssay bioAssay)Access a single value of the matrix.Double[]getColumn(Integer index)Access a single column of the matrix.Double[]getColumn(BioAssay bioAssay)Access a single column of the matrix.Double[][]getColumns(List<BioAssay> bioAssays)Access a submatrix slice by columnsDoubleMatrix<CompositeSequence,BioMaterial>getMatrix()Map<CompositeSequence,Double>getRanks()Double[][]getRawMatrix()Access the entire matrix.double[]getRawRow(Integer index)Double[]getRow(Integer index)Access a single row of the matrix, by index.Double[]getRow(CompositeSequence designElement)Return a row that 'came from' the given design element.List<CompositeSequence>getRowNames()Double[][]getRows(List<CompositeSequence> designElements)Access a submatrixbooleanhasMissingValues()introws()voidset(int row, int column, Double value)Set a value in the matrix, by indexvoidset(CompositeSequence designElement, BioAssay bioAssay, Double value)voidsetRow(int rowIndex, Double[] data)Sets the row of matrix to the input data.Collection<ProcessedExpressionDataVector>toProcessedDataVectors()Collection<RawExpressionDataVector>toRawDataVectors()Same as toProcessedDataVectors but uses RawExpressionDataVectorStringtoString()protected voidvectorsToMatrix(Collection<? extends DesignElementDataVector> vectors)ConvertDesignElementDataVectors into Double matrix.- 
Methods inherited from class ubic.gemma.core.datastructure.matrix.BaseExpressionDataMatrixcolumns, getBestBioAssayDimension, getBioAssayDimension, getBioAssaysForColumn, getBioMaterialForColumn, getColumnIndex, getDesignElementForRow, getDesignElements, getExpressionExperiment, getQuantitationTypes, getRowElement, getRowElements, getRowIndex
 
- 
 
- 
- 
- 
Constructor Detail- 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix() To comply with bean specifications. Not to be instantiated.
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(Collection<? extends DesignElementDataVector> vectors) 
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) 
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(Collection<? extends DesignElementDataVector> dataVectors, Collection<QuantitationType> quantitationTypes) 
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(Collection<? extends DesignElementDataVector> dataVectors, QuantitationType quantitationType) 
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(ExpressionDataDoubleMatrix sourceMatrix, DoubleMatrix<CompositeSequence,BioMaterial> dataMatrix, Collection<QuantitationType> quantitationTypes) Create a data matrix like sourceMatrix but use the values and quantitations from dataMatrix.Note: The rows can be different from the original matrix, but the columns must be the same. - Parameters:
- sourceMatrix- source matrix from which most of the meta-data will be imported
- dataMatrix- data matrix to use
- quantitationTypes- quantitation types used by the dataMatrix
 
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(ExpressionDataDoubleMatrix sourceMatrix, List<CompositeSequence> rowsToUse) Create a matrix based on another one's selected rows.- Parameters:
- rowsToUse- rows
- sourceMatrix- matrix
 
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(ExpressionExperiment ee, QuantitationType qt, DoubleMatrix<CompositeSequence,BioMaterial> matrix) Create a matrix given a 'raw' matrix that uses the same samples as the experiment. Only simple situations are supported (one platform, not subsetting the dataset).- Parameters:
- ee- to be associated with this
- qt- to be associated with this
- matrix- with valid row and column elements, and the data
 
 - 
ExpressionDataDoubleMatrixpublic ExpressionDataDoubleMatrix(ExpressionDataDoubleMatrix sourceMatrix, List<BioMaterial> columnsToUse, BioAssayDimension reorderedDim) Create a matrix based on another one's selected columns. The results will be somewhat butchered - only a single BioAssayDimension and the ranks will be copied over (not recomputed based on the selected columns).- Parameters:
- columnsToUse- columns
- sourceMatrix- matrix
- reorderedDim- the reordered bioAssayDimension.
 
 
- 
 - 
Method Detail- 
columnspublic int columns() Description copied from interface:ExpressionDataMatrixTotal number of columns.- Returns:
- int
 
 - 
getpublic Double get(CompositeSequence designElement, BioAssay bioAssay) Description copied from interface:ExpressionDataMatrixAccess a single value of the matrix. Note that because there can be multiple bioassays per column and multiple designelements per row, it is possible for this method to retrieve a data that does not come from the bioassay and/or designelement arguments.- Parameters:
- designElement- de
- bioAssay- ba
- Returns:
- T t
 
 - 
getpublic Double get(int row, int column) Description copied from interface:ExpressionDataMatrixAccess a single value of the matrix. This is generally the easiest way to do it.- Parameters:
- row- row
- column- col
- Returns:
- t
 
 - 
getpublic Double[][] get(List<CompositeSequence> designElements, List<BioAssay> bioAssays) Description copied from interface:ExpressionDataMatrixAccess a submatrix- Parameters:
- designElements- de
- bioAssays- bas
- Returns:
- T[][]
 
 - 
getColumnpublic Double[] getColumn(BioAssay bioAssay) Description copied from interface:ExpressionDataMatrixAccess a single column of the matrix.- Parameters:
- bioAssay- i
- Returns:
- T[]
 
 - 
getColumnpublic Double[] getColumn(Integer index) Description copied from interface:ExpressionDataMatrixAccess a single column of the matrix.- Parameters:
- index- index
- Returns:
- T[]
 
 - 
getColumnspublic Double[][] getColumns(List<BioAssay> bioAssays) Description copied from interface:ExpressionDataMatrixAccess a submatrix slice by columns- Parameters:
- bioAssays- ba
- Returns:
- t[][]
 
 - 
getRawMatrixpublic Double[][] getRawMatrix() Description copied from interface:ExpressionDataMatrixAccess the entire matrix.- Returns:
- T[][]
 
 - 
getRowpublic Double[] getRow(CompositeSequence designElement) Description copied from interface:ExpressionDataMatrixReturn a row that 'came from' the given design element.- Parameters:
- designElement- de
- Returns:
- t
 
 - 
getRowpublic Double[] getRow(Integer index) Description copied from interface:ExpressionDataMatrixAccess a single row of the matrix, by index. A complete row is returned.- Parameters:
- index- i
- Returns:
- t[]
 
 - 
getRowspublic Double[][] getRows(List<CompositeSequence> designElements) Description copied from interface:ExpressionDataMatrixAccess a submatrix- Parameters:
- designElements- de
- Returns:
- T[][]
 
 - 
hasMissingValuespublic boolean hasMissingValues() - Returns:
- true if any values are null or NaN (for Doubles); all other values are considered non-missing.
 
 - 
rowspublic int rows() - Returns:
- int
 
 - 
setpublic void set(int row, int column, Double value)Description copied from interface:ExpressionDataMatrixSet a value in the matrix, by index- Parameters:
- row- row
- column- col
- value- val
 
 - 
toProcessedDataVectorspublic Collection<ProcessedExpressionDataVector> toProcessedDataVectors() - Returns:
- Convert this to a collection of vectors.
 
 - 
toRawDataVectorspublic Collection<RawExpressionDataVector> toRawDataVectors() Same as toProcessedDataVectors but uses RawExpressionDataVector- Returns:
- Convert this to a collection of vectors.
 
 - 
getMatrixpublic DoubleMatrix<CompositeSequence,BioMaterial> getMatrix() 
 - 
getRankspublic Map<CompositeSequence,Double> getRanks() - Returns:
- The expression level ranks (based on mean signal intensity in the vectors); this will be empty if the vectors used to construct the matrix were not ProcessedExpressionDataVectors.
 
 - 
getRawRowpublic double[] getRawRow(Integer index) 
 - 
getRowNamespublic List<CompositeSequence> getRowNames() 
 - 
setpublic void set(CompositeSequence designElement, BioAssay bioAssay, Double value) 
 - 
setRowpublic void setRow(int rowIndex, Double[] data)Sets the row of matrix to the input data.- Parameters:
- rowIndex- The row index of the data in the matrix to be replaced.
- data- The input data.
 
 - 
vectorsToMatrixprotected void vectorsToMatrix(Collection<? extends DesignElementDataVector> vectors) ConvertDesignElementDataVectors into Double matrix.- Specified by:
- vectorsToMatrixin class- BaseExpressionDataMatrix<Double>
 
 
- 
 
-