Class SingleCellSparsityMetrics
java.lang.Object
ubic.gemma.core.analysis.singleCell.SingleCellSparsityMetrics
Compute sparsity metrics for single-cell data.
- Author:
- poirigui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddExpressedCells(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, boolean[] mask, boolean[] isExpressed) Populate a boolean vector that indicates if a cell has at least one expressed gene.static intgetNumberOfCells(Collection<SingleCellExpressionDataVector> vectors, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, boolean[] mask) Calculate the number of cells with at least one gene expressed.static intgetNumberOfCellsByDesignElements(Collection<SingleCellExpressionDataVector> vectors, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, boolean[] mask) Calculate the number of expressed cell by gene pairs.static intgetNumberOfCellsByDesignElements(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int characteristicIndex, boolean[] mask) static intgetNumberOfDesignElements(Collection<SingleCellExpressionDataVector> vectors, int sampleIndex, CellLevelCharacteristics characteristic, int characteristicIndex, boolean[] mask) Calculate the number of genes expressed in at least one cell.static intgetNumberOfDesignElements(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics characteristic, int characteristicIndex, boolean[] mask) static booleanisExpressed(double value, ScaleType scaleType) Check if a value is expressed on a given scale.static booleanCheck if sparsity metrics can be computed for a given collection of vectors.
-
Constructor Details
-
SingleCellSparsityMetrics
public SingleCellSparsityMetrics()
-
-
Method Details
-
isSupported
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
Check if a value is expressed on a given scale.
-