inverse average expression using standard deviation (SD)
iae_sd(expr, features = NULL, log = FALSE, thres = 0)
Arguments
- expr
a matrix, features in row and cells in column
- features
vector, feature names or indexes to compute
- log
logical, if to do log-transformation
- thres
numeric, cell only counts when expr > threshold, default 0
Value
a vector of inverse average expression score for each feature
Details
$$\mathbf{IAE} = log(1+sd(tf_{i})*\frac{n}{\sum_{j=1}^{n}max(0,N_{i,j})+1})$$
where \(tf_i\) is the term frequency of feature \(i\), see details in
tf(), \(n\) is the total number of cells and \(N_{i,j}\) is the counts
of feature \(i\) in cell \(j\).
Examples
data <- matrix(rpois(100, 2), 10, dimnames = list(1:10))
smartid:::iae_sd(data)
#> 1 2 3 4 5 6 7
#> 0.02518648 0.03584682 0.02861827 0.03743241 0.03492224 0.02682666 0.02968308
#> 8 9 10
#> 0.02215661 0.02032861 0.03843872