Cluster spatial transcriptomics data
Arguments
- input
SummarizedExperiment object containing counts assay and row/col coordinates.
- lambda
positive numeric; penalization parameter.
- k
integer; indicates desired rank of singular value decomposition.
- n_clust
integer; number of clusters.
- epsilon
positive numeric; convergence criterion.
- maxiter
positive integer; maximum desired iterations
Examples
sce <- example_sce()
lambda <- 5
k <- 10
n_clust <- 5
epsilon <- 1e-3
maxiter <- 5
smooth_lrc(sce, lambda, k, n_clust, epsilon, maxiter)
#> [1] "Initializing components..."
#> [1] "Running smoothLRC..."
#> iteration: 1 | convergence: 0.100351 | 0.0337224 | 1
#> iteration: 2 | convergence: 0.0846095 | 0.0324173 | 0.00435998
#> iteration: 3 | convergence: 0.07633 | 0.0325976 | 0.00409897
#> iteration: 4 | convergence: 0.0713086 | 0.0329443 | 0.00396169
#> iteration: 5 | convergence: 0.0697088 | 0.0331661 | 0.00394547
#> [1] "Clustering right singular vectors..."
#> fitting ...
#>
|
| | 0%
|
|=================================== | 50%
|
|======================================================================| 100%
#> [1] "Done!"
#> class: SummarizedExperiment
#> dim: 1000 100
#> metadata(2): smooth_u smooth_v
#> assays(2): counts logcounts
#> rownames(1000): Feature 1 Feature 2 ... Feature 999 Feature 1000
#> rowData names(0):
#> colnames(100): Pixel 1 Pixel 2 ... Pixel 99 Pixel 100
#> colData names(3): row col smooth_cluster