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

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)
#> [info] binarize matrix
#> [info] calculate tf
#> [info] calculate idf
#> [info] fast log tf-idf
lsi_mat <- do_lsi(mat=tfidf_mat, dims=30)
#> SVD analysis of TF-IDF matrix