Interface MultiAssayBulkExpressionDataMatrix<T>

All Superinterfaces:
BulkExpressionDataMatrix<T>, ExpressionDataMatrix<T>
All Known Implementing Classes:
AbstractMultiAssayExpressionDataMatrix, EmptyExpressionMatrix, ExpressionDataBooleanMatrix, ExpressionDataDoubleMatrix, ExpressionDataIntegerMatrix, ExpressionDataStringMatrix

public interface MultiAssayBulkExpressionDataMatrix<T> extends BulkExpressionDataMatrix<T>
An interface for bulk matrices that supports multiple BioAssay per BioMaterial.

This is usually achieved by stacking data matrices from multiple QuantitationType. Thus, this interface allows you to keep track of QuantitationType and BioAssayDimension at row-level. Data held in the matrix is always reordered to match the sample ordering from BulkExpressionDataMatrix.getBioMaterials().

Author:
paul, poirigui
  • Method Details

    • getMatrix

      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:
      getQuantitationType in interface ExpressionDataMatrix<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.
    • getQuantitationType

      @Nullable QuantitationType getQuantitationType(CompositeSequence designElement)
      Return the quantitation type used for data from the given design element.
      Returns:
      the quantitation type applicable for the row or null if the design element is not present in the matrix
    • getBioAssayDimensions

      Collection<BioAssayDimension> getBioAssayDimensions()
      Obtain all the BioAssayDimensions that are used in this matrix.
    • getBioAssayDimension

      BioAssayDimension getBioAssayDimension()
      Obtain the dimension for the columns of this matrix.
      Specified by:
      getBioAssayDimension in interface BulkExpressionDataMatrix<T>
      Throws:
      IllegalStateException - if no BioAssayDimension covers all the biomaterials in this matrix
    • getBestBioAssayDimension

      Optional<BioAssayDimension> getBestBioAssayDimension()
      Obtain the largest BioAssayDimension that covers all the biomaterials in this matrix.
      Returns:
      the best BioAssayDimension for this matrix, or Optional.empty() if no such dimension exists
    • getBioAssayDimension

      @Nullable BioAssayDimension getBioAssayDimension(CompositeSequence designElement)
      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:
      the dimension applicable to the design element or null if the design element is not present in the matrix
    • columns

      int columns(CompositeSequence el)
      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

      Collection<BioAssay> getBioAssaysForColumn(int index)
      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

      BioMaterial getBioMaterialForColumn(int index)
      Description copied from interface: BulkExpressionDataMatrix
      Obtain a biomaterial corresponding to a column.
      Specified by:
      getBioMaterialForColumn in interface BulkExpressionDataMatrix<T>
      Parameters:
      index - i
      Returns:
      BioMaterial. Note that if this represents a subsetted data set, the BioMaterial may be a lightweight 'fake'.
    • getColumnIndex

      int getColumnIndex(BioMaterial bioMaterial)
      Specified by:
      getColumnIndex in interface BulkExpressionDataMatrix<T>
      Parameters:
      bioMaterial - bm
      Returns:
      the index of the column for the data for the bioMaterial, or -1 if missing