An adaptive threshold is calculated from the conditional mean of expression, based on 10 bins of the genes with similar expression levels. Thresholds are chosen by estimating cutpoints in the bimodal density estimates of the binned data.
thresholdSCRNACountMatrix(data_all, conditions = NULL, cutbins = NULL,
nbins = 10, bin_by = "median", qt = 0.975, min_per_bin = 50,
absolute_min = 0, return_log = TRUE)
matrix
of counts. Rows are cells and columns are genes.
Bins are be determined per gene and per condition. Typically contrasts of interest should be specified.
vector
of cut points.
integer
number of bins when cutbins is not specified.
character
"median", "proportion", "mean"
when bin_by
is "quantile", what quantile should be used to form the bins
minimum number of genes within a bin
numeric
giving a hard threshold below which everything is assumed to be noise
return the logged expression matrix or not. By default, returned expression matrix will be logged ( base 2 ).
list
of thresholded counts (on natural scale), thresholds, bins, densities estimated on each bin, and the original data