Class SingleCellSparsityMetrics

java.lang.Object
ubic.gemma.core.analysis.singleCell.SingleCellSparsityMetrics

public class SingleCellSparsityMetrics extends Object
Compute sparsity metrics for single-cell data.
Author:
poirigui
  • Constructor Details

    • SingleCellSparsityMetrics

      public SingleCellSparsityMetrics()
  • Method Details

    • isSupported

      public static boolean isSupported(SingleCellExpressionDataVector vector)
      Check if sparsity metrics can be computed for a given collection of vectors.
    • getNumberOfCells

      public static int getNumberOfCells(Collection<SingleCellExpressionDataVector> vectors, int sampleIndex, @Nullable CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, @Nullable boolean[] mask)
      Calculate the number of cells with at least one gene expressed.
      Parameters:
      characteristicIndex - only cell with the given characteristic index will be considered
    • addExpressedCells

      public static void addExpressedCells(SingleCellExpressionDataVector vector, int sampleIndex, @Nullable CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, @Nullable boolean[] mask, boolean[] isExpressed)
      Populate a boolean vector that indicates if a cell has at least one expressed gene.
    • getNumberOfDesignElements

      public static int getNumberOfDesignElements(Collection<SingleCellExpressionDataVector> vectors, int sampleIndex, @Nullable CellLevelCharacteristics characteristic, int characteristicIndex, @Nullable boolean[] mask)
      Calculate the number of genes expressed in at least one cell.
    • getNumberOfDesignElements

      public static int getNumberOfDesignElements(SingleCellExpressionDataVector vector, int sampleIndex, @Nullable CellLevelCharacteristics characteristic, int characteristicIndex, @Nullable boolean[] mask)
    • getNumberOfCellsByDesignElements

      public static int getNumberOfCellsByDesignElements(Collection<SingleCellExpressionDataVector> vectors, int sampleIndex, @Nullable CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, @Nullable boolean[] mask)
      Calculate the number of expressed cell by gene pairs.
    • getNumberOfCellsByDesignElements

      public static int getNumberOfCellsByDesignElements(SingleCellExpressionDataVector vector, int sampleIndex, @Nullable CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, @Nullable boolean[] mask)
    • isExpressed

      public static boolean isExpressed(double value, ScaleType scaleType)
      Check if a value is expressed on a given scale.