Class ExpressionDataBooleanMatrix
- java.lang.Object
-
- ubic.gemma.core.datastructure.matrix.BaseExpressionDataMatrix<Boolean>
-
- ubic.gemma.core.datastructure.matrix.ExpressionDataBooleanMatrix
-
- All Implemented Interfaces:
Serializable
,ExpressionDataMatrix<Boolean>
public class ExpressionDataBooleanMatrix extends BaseExpressionDataMatrix<Boolean>
Matrix of booleans mapped from an ExpressionExperiment.- Author:
- pavlidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExpressionDataBooleanMatrix(Collection<? extends DesignElementDataVector> vectors)
ExpressionDataBooleanMatrix(Collection<? extends DesignElementDataVector> vectors, List<QuantitationType> qtypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
columns()
Total number of columns.Boolean
get(int row, int column)
Access a single value of the matrix.Boolean[][]
get(List<CompositeSequence> designElements, List<BioAssay> bioAssays)
Access a submatrixBoolean
get(CompositeSequence designElement, BioAssay bioAssay)
Access a single value of the matrix.Boolean[]
getColumn(Integer index)
Access a single column of the matrix.Boolean[]
getColumn(BioAssay bioAssay)
Access a single column of the matrix.Boolean[][]
getColumns(List<BioAssay> bioAssays)
Access a submatrix slice by columnsBoolean[][]
getRawMatrix()
Access the entire matrix.Boolean[]
getRow(Integer index)
Access a single row of the matrix, by index.Boolean[]
getRow(CompositeSequence designElement)
Return a row that 'came from' the given design element.Boolean[][]
getRows(List<CompositeSequence> designElements)
Access a submatrixboolean
hasMissingValues()
int
rows()
void
set(int row, int column, Boolean value)
Set a value in the matrix, by indexprotected void
vectorsToMatrix(Collection<? extends DesignElementDataVector> vectors)
-
Methods inherited from class ubic.gemma.core.datastructure.matrix.BaseExpressionDataMatrix
columns, getBestBioAssayDimension, getBioAssayDimension, getBioAssaysForColumn, getBioMaterialForColumn, getColumnIndex, getDesignElementForRow, getDesignElements, getExpressionExperiment, getQuantitationTypes, getRowElement, getRowElements, getRowIndex
-
-
-
-
Constructor Detail
-
ExpressionDataBooleanMatrix
public ExpressionDataBooleanMatrix(Collection<? extends DesignElementDataVector> vectors)
-
ExpressionDataBooleanMatrix
public ExpressionDataBooleanMatrix(Collection<? extends DesignElementDataVector> vectors, List<QuantitationType> qtypes)
-
-
Method Detail
-
columns
public int columns()
Description copied from interface:ExpressionDataMatrix
Total number of columns.- Returns:
- int
-
get
public Boolean get(CompositeSequence designElement, BioAssay bioAssay)
Description copied from interface:ExpressionDataMatrix
Access 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
- debioAssay
- ba- Returns:
- T t
-
get
public Boolean get(int row, int column)
Description copied from interface:ExpressionDataMatrix
Access a single value of the matrix. This is generally the easiest way to do it.- Parameters:
row
- rowcolumn
- col- Returns:
- t
-
get
public Boolean[][] get(List<CompositeSequence> designElements, List<BioAssay> bioAssays)
Description copied from interface:ExpressionDataMatrix
Access a submatrix- Parameters:
designElements
- debioAssays
- bas- Returns:
- T[][]
-
getColumn
public Boolean[] getColumn(BioAssay bioAssay)
Description copied from interface:ExpressionDataMatrix
Access a single column of the matrix.- Parameters:
bioAssay
- i- Returns:
- T[]
-
getColumn
public Boolean[] getColumn(Integer index)
Description copied from interface:ExpressionDataMatrix
Access a single column of the matrix.- Parameters:
index
- index- Returns:
- T[]
-
getColumns
public Boolean[][] getColumns(List<BioAssay> bioAssays)
Description copied from interface:ExpressionDataMatrix
Access a submatrix slice by columns- Parameters:
bioAssays
- ba- Returns:
- t[][]
-
getRawMatrix
public Boolean[][] getRawMatrix()
Description copied from interface:ExpressionDataMatrix
Access the entire matrix.- Returns:
- T[][]
-
getRow
public Boolean[] getRow(CompositeSequence designElement)
Description copied from interface:ExpressionDataMatrix
Return a row that 'came from' the given design element.- Parameters:
designElement
- de- Returns:
- t
-
getRow
public Boolean[] getRow(Integer index)
Description copied from interface:ExpressionDataMatrix
Access a single row of the matrix, by index. A complete row is returned.- Parameters:
index
- i- Returns:
- t[]
-
getRows
public Boolean[][] getRows(List<CompositeSequence> designElements)
Description copied from interface:ExpressionDataMatrix
Access a submatrix- Parameters:
designElements
- de- Returns:
- T[][]
-
hasMissingValues
public boolean hasMissingValues()
- Returns:
- true if any values are null or NaN (for Doubles); all other values are considered non-missing.
-
rows
public int rows()
- Returns:
- int
-
set
public void set(int row, int column, Boolean value)
Description copied from interface:ExpressionDataMatrix
Set a value in the matrix, by index- Parameters:
row
- rowcolumn
- colvalue
- val
-
vectorsToMatrix
protected void vectorsToMatrix(Collection<? extends DesignElementDataVector> vectors)
- Specified by:
vectorsToMatrix
in classBaseExpressionDataMatrix<Boolean>
-
-