View source: R/sample_filtering.R
simple_FNR_params | R Documentation |
Fits a logistic regression model of false negative observations as a function of expression level, using a set of positive control (ubiquitously expressed) genes
simple_FNR_params(expr, pos_controls, fn_tresh = 0.01)
expr |
matrix A matrix of transcript-proportional units (genes in rows, cells in columns). |
pos_controls |
A logical, numeric, or character vector indicating control genes that will be used to compute false-negative rate characteristics. User must provide at least 2 control genes. |
fn_tresh |
Inclusive threshold for negative detection. Default 0.01. fn_tresh must be non-negative. |
logit(Probability of False Negative) ~ a + b*(median log-expr)
A matrix of logistic regression coefficients corresponding to glm fits in each sample (a and b in columns 1 and 2 respectively). If the a & b fit does not converge, b is set to zero and only a is estimated.
mat <- matrix(rpois(1000, lambda = 3), ncol=10)
mat = mat * matrix(1-rbinom(1000, size = 1, prob = .01), ncol=10)
fnr_out = simple_FNR_params(mat,pos_controls = 1:10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.