Interface MultiAssayBulkExpressionDataMatrix<T>
- Type Parameters:
T-
- All Superinterfaces:
BulkExpressionDataMatrix<T>,ExpressionDataMatrix<T>
- All Known Implementing Classes:
AbstractMultiAssayExpressionDataMatrix,EmptyExpressionMatrix,ExpressionDataBooleanMatrix,ExpressionDataDoubleMatrix,ExpressionDataIntegerMatrix,ExpressionDataStringMatrix
An interface for bulk matrices that supports multiple
BioAssay per BioMaterial.
This is usually achieved by stacking data matrices from multiple QuantitationType.
-
Method Summary
Modifier and TypeMethodDescriptionintNumber of columns that use the given design element.Obtain the largestBioAssayDimensionthat covers all the biomaterials in this matrix.Obtain the dimension for the columns of this matrix.getBioAssayDimension(CompositeSequence designElement) Produce a BioAssayDimension representing the matrix columns for a specific row.Obtain all theBioAssayDimensions that are used in this matrix.getBioAssaysForColumn(int index) getBioMaterialForColumn(int index) Obtain a biomaterial corresponding to a column.intgetColumnIndex(BioMaterial bioMaterial) static MultiAssayBulkExpressionDataMatrix<?> getMatrix(Collection<? extends BulkExpressionDataVector> vectors) Create a matrix using all the vectors, which are assumed to share the same representation.Obtain the quantitation type for this matrix.Return the quantitation types for this matrix.Methods inherited from interface ubic.gemma.core.datastructure.matrix.BulkExpressionDataMatrix
get, getBioAssayForColumn, getColumn, getColumnIndex, getRawMatrix, hasMissingValuesMethods inherited from interface ubic.gemma.core.datastructure.matrix.ExpressionDataMatrix
columns, get, getColumn, getDesignElementForRow, getDesignElements, getExpressionExperiment, getRow, getRow, getRowElement, getRowElements, getRowIndex, getRowIndices, rows, sliceRows
-
Method Details
-
getMatrix
static MultiAssayBulkExpressionDataMatrix<?> getMatrix(Collection<? extends BulkExpressionDataVector> vectors) Create a matrix using all the vectors, which are assumed to share the same representation.- Parameters:
vectors- raw vectors- Returns:
- matrix of appropriate type.
-
getQuantitationType
QuantitationType getQuantitationType()Obtain the quantitation type for this matrix.In the case of multi-assay matrices, more than one quantitation type may be present. When possible, those are merged with
QuantitationTypeUtils.mergeQuantitationTypes(Collection).- Specified by:
getQuantitationTypein interfaceExpressionDataMatrix<T>- Throws:
IllegalStateException- if the matrix has more than one quantitation type that cannot be combined
-
getQuantitationTypes
Collection<QuantitationType> getQuantitationTypes()Return the quantitation types for this matrix. Often (usually) there will be just one. -
getBioAssayDimensions
Collection<BioAssayDimension> getBioAssayDimensions()Obtain all theBioAssayDimensions that are used in this matrix. -
getBioAssayDimension
BioAssayDimension getBioAssayDimension()Obtain the dimension for the columns of this matrix.- Specified by:
getBioAssayDimensionin interfaceBulkExpressionDataMatrix<T>- Throws:
IllegalStateException- if noBioAssayDimensioncovers all the biomaterials in this matrix
-
getBestBioAssayDimension
Optional<BioAssayDimension> getBestBioAssayDimension()Obtain the largestBioAssayDimensionthat covers all the biomaterials in this matrix.- Returns:
- the best
BioAssayDimensionfor this matrix, orOptional.empty()if no such dimension exists
-
getBioAssayDimension
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'.- Parameters:
designElement- de- Returns:
- bad
-
columns
Number of columns that use the given design element. Useful if the matrix includes data from more than one array design.- Parameters:
el- el- Returns:
- int
-
getBioAssaysForColumn
- 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
Description copied from interface:BulkExpressionDataMatrixObtain a biomaterial corresponding to a column.- Specified by:
getBioMaterialForColumnin interfaceBulkExpressionDataMatrix<T>- Parameters:
index- i- Returns:
- BioMaterial. Note that if this represents a subsetted data set, the BioMaterial may be a lightweight 'fake'.
-
getColumnIndex
- Specified by:
getColumnIndexin interfaceBulkExpressionDataMatrix<T>- Parameters:
bioMaterial- bm- Returns:
- the index of the column for the data for the bioMaterial, or -1 if missing
-