Class SingleCellDescriptive
- java.lang.Object
-
- ubic.gemma.core.analysis.singleCell.SingleCellDescriptive
-
public class SingleCellDescriptive extends Object
Descriptive statistics for single cell data.The utilities here extend
DataVectorDescriptive
by providing per-assay statistics.- Author:
- poirigui
- See Also:
DataVectorDescriptive
-
-
Constructor Summary
Constructors Constructor Description SingleCellDescriptive()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int[]
count(SingleCellExpressionDataVector vector)
Count the number of values in each assay.static int[]
countAboveThreshold(SingleCellExpressionDataVector vector, double threshold)
Compute the number of cells expressed strictly above the given threshold.static int[]
countFast(SingleCellExpressionDataVector vector)
Quickly count the non-zeroes for each assay.static int
countFast(SingleCellExpressionDataVector vector, int sampleIndex)
static int
countFast(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
static double[]
max(SingleCellExpressionDataVector vector)
static double
max(SingleCellExpressionDataVector vector, int sampleIndex)
static double
max(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
static double[][]
max(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics)
static double[]
mean(SingleCellExpressionDataVector vector)
Calculate the mean of each assay for a given vector.static double
mean(SingleCellExpressionDataVector vector, int sampleIndex)
static double
mean(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
static double
mean(SingleCellExpressionDataVector vector, BioAssay sample)
Calculate the mean of a given assay.static double[]
median(SingleCellExpressionDataVector vector)
Calculate the median of each assay for a given vector.static double
median(SingleCellExpressionDataVector vector, int column)
static double
median(SingleCellExpressionDataVector vector, int column, CellLevelCharacteristics cellLevelCharacteristics, int row)
static double[]
min(SingleCellExpressionDataVector vector)
static double
min(SingleCellExpressionDataVector vector, int sampleIndex)
static double
min(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
static double[][]
min(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics)
static double[]
quantile(SingleCellExpressionDataVector vector, double q)
static double
quantile(SingleCellExpressionDataVector vector, int sampleIndex, double v)
static double
quantile(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row, double q)
static double[]
quantile(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics, int row, double q)
static double[]
sampleStandardDeviation(SingleCellExpressionDataVector vector)
static double
sampleStandardDeviation(SingleCellExpressionDataVector vector, BioAssay sample)
static double[]
sampleVariance(SingleCellExpressionDataVector vector)
static double
sampleVariance(SingleCellExpressionDataVector vector, BioAssay sample)
Calculate the variance of a given assay.static double[]
sum(SingleCellExpressionDataVector vector)
static double[][]
sum(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics)
static double[]
sumUnscaled(SingleCellExpressionDataVector vector)
-
-
-
Method Detail
-
max
public static double[] max(SingleCellExpressionDataVector vector)
-
max
public static double max(SingleCellExpressionDataVector vector, int sampleIndex)
-
max
public static double[][] max(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics)
-
max
public static double max(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
-
min
public static double[] min(SingleCellExpressionDataVector vector)
-
min
public static double min(SingleCellExpressionDataVector vector, int sampleIndex)
-
min
public static double[][] min(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics)
-
min
public static double min(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
-
count
public static int[] count(SingleCellExpressionDataVector vector)
Count the number of values in each assay.Missing values are not counted.
-
countFast
public static int[] countFast(SingleCellExpressionDataVector vector)
Quickly count the non-zeroes for each assay.Note: this is not accurate if the single-cell vector contains
NaN
s or actual zeroes or missing values as perDataVectorDescriptive.getMissingCountValue(QuantitationType)
}.
-
countFast
public static int countFast(SingleCellExpressionDataVector vector, int sampleIndex)
-
countFast
public static int countFast(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
-
countAboveThreshold
public static int[] countAboveThreshold(SingleCellExpressionDataVector vector, double threshold)
Compute the number of cells expressed strictly above the given threshold.- Parameters:
threshold
- a threshold value, assumed to be in theScaleType
of the vector
-
sum
public static double[] sum(SingleCellExpressionDataVector vector)
-
sum
public static double[][] sum(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics)
-
sumUnscaled
public static double[] sumUnscaled(SingleCellExpressionDataVector vector)
-
mean
public static double[] mean(SingleCellExpressionDataVector vector)
Calculate the mean of each assay for a given vector.
-
mean
public static double mean(SingleCellExpressionDataVector vector, BioAssay sample)
Calculate the mean of a given assay.
-
mean
public static double mean(SingleCellExpressionDataVector vector, int sampleIndex)
-
mean
public static double mean(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row)
-
median
public static double[] median(SingleCellExpressionDataVector vector)
Calculate the median of each assay for a given vector.
-
median
public static double median(SingleCellExpressionDataVector vector, int column)
-
median
public static double median(SingleCellExpressionDataVector vector, int column, CellLevelCharacteristics cellLevelCharacteristics, int row)
-
quantile
public static double[] quantile(SingleCellExpressionDataVector vector, double q)
-
quantile
public static double quantile(SingleCellExpressionDataVector vector, int sampleIndex, double v)
-
quantile
public static double[] quantile(SingleCellExpressionDataVector vector, CellLevelCharacteristics cellLevelCharacteristics, int row, double q)
-
quantile
public static double quantile(SingleCellExpressionDataVector vector, int sampleIndex, CellLevelCharacteristics cellLevelCharacteristics, int row, double q)
-
sampleStandardDeviation
public static double[] sampleStandardDeviation(SingleCellExpressionDataVector vector)
-
sampleStandardDeviation
public static double sampleStandardDeviation(SingleCellExpressionDataVector vector, BioAssay sample)
-
sampleVariance
public static double[] sampleVariance(SingleCellExpressionDataVector vector)
-
sampleVariance
public static double sampleVariance(SingleCellExpressionDataVector vector, BioAssay sample)
Calculate the variance of a given assay.
-
-