do_lsi: do_lsi

View source: R/do_lsi.R

do_lsiR Documentation

do_lsi

Description

Get a LSI matrix (cell-by-LSI) from TF-IDF matrix from single cell profiles

Usage

do_lsi(mat, dims = 30)

Arguments

mat

(sparse matrix) A saparse matrix of TF-IDF matrix (LSI) used for SVD

dims

number of LSIs to calculate (default:30)

Value

a sparse matrix of LSI

Examples

SE_pbmc5k <- example_data(name="pbmc5k_SE.rda")
peak_by_cell_mat <- SummarizedExperiment::assay(SE_pbmc5k)
#### Downsample to speed up example ####
peak_by_cell_mat <- peak_by_cell_mat[seq_len(500), seq_len(100)]
tfidf_mat <- tfidf(bmat=peak_by_cell_mat)
lsi_mat <- do_lsi(mat=tfidf_mat, dims=30)

sankaranlab/SCAVENGE documentation built on March 2, 2023, 2:17 a.m.