tfidf | R Documentation |
Run TF-IDF on binary cell x peak matrix. Returns normalized TF-IDF values in the residuals slot. Code adapted from Andrew Hill (http://andrewjohnhill.com/blog/2019/05/06/dimensionality-reduction-for-scatac-data/).
tfidf(
obj,
frequencies = T,
log_scale_tf = T,
scale_factor = 10000,
doL2 = F,
slotName = "residuals"
)
obj |
list object containing dgCMatrix in 'counts' slot. |
frequencies |
logical, whether to scale matrix by barcode peak sums. Defaults to TRUE. |
log_scale_tf |
logical, whether to log1p transform the term frequency (TF). Defaults to TRUE. |
scale_factor |
numeric, |
doL2 |
logical, whether or not to L2 normalize TFIDF values (per cell). Defaults to FALSE. |
slotName |
character, specify the slot name for saving residuals. Useful for saving multiple normalization steps. Note, make sure to update the slotName argument for downstream functions. Defaults to "residuals". |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.