Class ExpressionDataDoubleMatrix
java.lang.Object
ubic.gemma.core.datastructure.matrix.AbstractExpressionDataMatrix<Double>
ubic.gemma.core.datastructure.matrix.AbstractMultiAssayExpressionDataMatrix<Double>
ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix
- All Implemented Interfaces:
BulkExpressionDataMatrix<Double>,BulkExpressionDataPrimitiveDoubleMatrix,ExpressionDataMatrix<Double>,ExpressionDataPrimitiveDoubleMatrix,MultiAssayBulkExpressionDataMatrix<Double>
public class ExpressionDataDoubleMatrix
extends AbstractMultiAssayExpressionDataMatrix<Double>
implements BulkExpressionDataPrimitiveDoubleMatrix
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
-
Field Summary
Fields inherited from class ubic.gemma.core.datastructure.matrix.AbstractMultiAssayExpressionDataMatrix
bioAssayDimensions, columnAssayMap, columnBioAssayMapByInteger, columnBioMaterialMap, columnBioMaterialMapByInteger, expressionExperiment, quantitationTypes, rowDesignElementMapByInteger, rowElementMap -
Constructor Summary
ConstructorsConstructorDescriptionTo comply with bean specifications.ExpressionDataDoubleMatrix(Collection<? extends BulkExpressionDataVector> vectors) ExpressionDataDoubleMatrix(Collection<? extends BulkExpressionDataVector> dataVectors, Collection<QuantitationType> quantitationTypes) ExpressionDataDoubleMatrix(Collection<? extends BulkExpressionDataVector> dataVectors, QuantitationType quantitationType) ExpressionDataDoubleMatrix(ExpressionDataDoubleMatrix sourceMatrix, List<BioMaterial> columnsToUse, BioAssayDimension reorderedDim) Create a matrix based on another one's selected columns.ExpressionDataDoubleMatrix(ExpressionDataDoubleMatrix dmatrix, DoubleMatrix<CompositeSequence, BioMaterial> copiedMatrix) ExpressionDataDoubleMatrix(ExpressionDataDoubleMatrix sourceMatrix, DoubleMatrix<CompositeSequence, BioMaterial> dataMatrix, Collection<QuantitationType> quantitationTypes) Create a data matrix like sourceMatrix but use the values and quantitations from dataMatrix.ExpressionDataDoubleMatrix(ExpressionExperiment ee, Collection<? extends BulkExpressionDataVector> vectors) ExpressionDataDoubleMatrix(ExpressionExperiment ee, QuantitationType qt, DoubleMatrix<CompositeSequence, BioMaterial> matrix) Create a matrix given a 'raw' matrix that uses the same samples as the experiment. -
Method Summary
Modifier and TypeMethodDescriptionintcolumns()Obtain the total number of columns.protected Stringformat(int row, int column) Format the value at the provided indices of the matrix.get(int row, int column) Access a single value of the matrix by row and column.doublegetAsDouble(int row, int column) Retrieve the value at the given row and column without boxing.Double[]getColumn(int index) Access a single column of the matrix.double[]getColumnAsDoubles(int index) Retrieve the given column without boxing.double[]getColumnAsDoubles(BioAssay bioAssay) Retrieve the given column without boxing.getRanks()Double[][]Access the entire matrix.double[][]Obtain the raw matrix without boxing.Double[]getRow(int index) Access a single row of the matrix, by index.double[]getRowAsDoubles(int index) Retrieve a row without boxing.double[]getRowAsDoubles(CompositeSequence designElement) Retrieve the row for the given design element without boxing.booleanintrows()voidDeprecated.modifying the matrix directly is not recommended, make a copy instead.voidset(CompositeSequence designElement, BioAssay bioAssay, Double value) Deprecated.sliceRows(List<CompositeSequence> designElements) protected voidvectorsToMatrix(Collection<? extends BulkExpressionDataVector> vectors) Populate this matrix from a given collection ofBulkExpressionDataVectors.Methods inherited from class ubic.gemma.core.datastructure.matrix.AbstractMultiAssayExpressionDataMatrix
addToRowMaps, columns, formatRepresentation, get, getBestBioAssayDimension, getBioAssayDimension, getBioAssayDimension, getBioAssayDimensions, getBioAssayForColumn, getBioAssaysForColumn, getBioMaterialForColumn, getColumn, getColumnIndex, getColumnIndex, getColumnLabel, getDesignElementForRow, getDesignElements, getExpressionExperiment, getQuantitationType, getQuantitationTypes, getRow, getRowElement, getRowElements, getRowIndex, getRowIndices, getRowLabel, selectVectors, selectVectors, selectVectors, setMatBioAssayValues, setUpColumnElementsMethods inherited from class ubic.gemma.core.datastructure.matrix.AbstractExpressionDataMatrix
format, format, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ubic.gemma.core.datastructure.matrix.BulkExpressionDataMatrix
get, getBioAssayForColumn, getColumn, getColumnIndexMethods inherited from interface ubic.gemma.core.datastructure.matrix.ExpressionDataMatrix
getDesignElementForRow, getDesignElements, getExpressionExperiment, getRow, getRowElement, getRowElements, getRowIndex, getRowIndices
-
Constructor Details
-
ExpressionDataDoubleMatrix
public ExpressionDataDoubleMatrix()To comply with bean specifications. Not to be instantiated. -
ExpressionDataDoubleMatrix
-
ExpressionDataDoubleMatrix
public ExpressionDataDoubleMatrix(ExpressionExperiment ee, Collection<? extends BulkExpressionDataVector> vectors) -
ExpressionDataDoubleMatrix
public ExpressionDataDoubleMatrix(Collection<? extends BulkExpressionDataVector> dataVectors, Collection<QuantitationType> quantitationTypes) -
ExpressionDataDoubleMatrix
public ExpressionDataDoubleMatrix(Collection<? extends BulkExpressionDataVector> dataVectors, QuantitationType quantitationType) -
ExpressionDataDoubleMatrix
public 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 importeddataMatrix- data matrix to usequantitationTypes- quantitation types used by the dataMatrix
-
ExpressionDataDoubleMatrix
public ExpressionDataDoubleMatrix(ExpressionDataDoubleMatrix dmatrix, DoubleMatrix<CompositeSequence, BioMaterial> copiedMatrix) -
ExpressionDataDoubleMatrix
public 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 thisqt- to be associated with thismatrix- with valid row and column elements, and the data
-
ExpressionDataDoubleMatrix
public 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:
sourceMatrix- matrixcolumnsToUse- columnsreorderedDim- the reordered bioAssayDimension.
-
-
Method Details
-
columns
public int columns()Description copied from interface:ExpressionDataMatrixObtain the total number of columns.- Specified by:
columnsin interfaceExpressionDataMatrix<Double>
-
get
Description copied from interface:ExpressionDataMatrixAccess a single value of the matrix by row and column.- Specified by:
getin interfaceExpressionDataMatrix<Double>
-
getAsDouble
public double getAsDouble(int row, int column) Description copied from interface:ExpressionDataPrimitiveDoubleMatrixRetrieve the value at the given row and column without boxing.- Specified by:
getAsDoublein interfaceExpressionDataPrimitiveDoubleMatrix- See Also:
-
getColumnAsDoubles
Description copied from interface:BulkExpressionDataPrimitiveDoubleMatrixRetrieve the given column without boxing.- Specified by:
getColumnAsDoublesin interfaceBulkExpressionDataPrimitiveDoubleMatrix- See Also:
-
getColumn
Description copied from interface:ExpressionDataMatrixAccess a single column of the matrix.- Specified by:
getColumnin interfaceExpressionDataMatrix<Double>- Parameters:
index- index- Returns:
- T[]
-
getColumnAsDoubles
public double[] getColumnAsDoubles(int index) Description copied from interface:ExpressionDataPrimitiveDoubleMatrixRetrieve the given column without boxing.- Specified by:
getColumnAsDoublesin interfaceExpressionDataPrimitiveDoubleMatrix- See Also:
-
getRawMatrix
Description copied from interface:BulkExpressionDataMatrixAccess the entire matrix.- Specified by:
getRawMatrixin interfaceBulkExpressionDataMatrix<Double>- Returns:
- T[][]
-
getRawMatrixAsDoubles
public double[][] getRawMatrixAsDoubles()Obtain the raw matrix without boxing.- Specified by:
getRawMatrixAsDoublesin interfaceBulkExpressionDataPrimitiveDoubleMatrix- See Also:
-
getRowAsDoubles
Description copied from interface:ExpressionDataPrimitiveDoubleMatrixRetrieve the row for the given design element without boxing.- Specified by:
getRowAsDoublesin interfaceExpressionDataPrimitiveDoubleMatrix- See Also:
-
getRow
Description copied from interface:ExpressionDataMatrixAccess a single row of the matrix, by index. A complete row is returned.- Specified by:
getRowin interfaceExpressionDataMatrix<Double>- Parameters:
index- i- Returns:
- t[]
-
sliceRows
- Specified by:
sliceRowsin interfaceExpressionDataMatrix<Double>
-
getRowAsDoubles
public double[] getRowAsDoubles(int index) Description copied from interface:ExpressionDataPrimitiveDoubleMatrixRetrieve a row without boxing.- Specified by:
getRowAsDoublesin interfaceExpressionDataPrimitiveDoubleMatrix- See Also:
-
hasMissingValues
public boolean hasMissingValues()- Specified by:
hasMissingValuesin interfaceBulkExpressionDataMatrix<Double>- Returns:
- true if any values are null or NaN (for doubles and floats); any other value that is considered missing.
-
rows
public int rows()- Specified by:
rowsin interfaceExpressionDataMatrix<Double>- Returns:
- int
-
set
Deprecated.modifying the matrix directly is not recommended, make a copy instead. -
getMatrix
-
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.
-
getRowNames
-
set
Deprecated. -
format
Description copied from class:AbstractMultiAssayExpressionDataMatrixFormat the value at the provided indices of the matrix.- Specified by:
formatin classAbstractMultiAssayExpressionDataMatrix<Double>
-
vectorsToMatrix
Populate this matrix from a given collection ofBulkExpressionDataVectors.- Specified by:
vectorsToMatrixin classAbstractMultiAssayExpressionDataMatrix<Double>
-