visualize_clusters: Visualize clusters

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Use tSNE to generate two-dimensional map of coefficient matrix.

Usage

1
2
visualize_clusters(object, rank, verbose = FALSE, cex = 1,
  cex.names = 0.7, ...)

Arguments

object

scNMF object.

rank

Rank value to extract from object.

verbose

Print tSNE messages.

cex

Symbol size in tSNE plot

cex.names

Font size of labels in count barplot.

...

Other parameters to send to Rtsne.

Details

It retrieves a coefficient matrix H from an object and use its elements to assign each cell into clusters. t-Distributed Stochastic Neighbor Embedding (t-SNE; https://lvdmaaten.github.io/tsne/) is used to visualize the clustering in 2D. Also plotted is the distribution of cell counts for all clusters.

Value

NULL

Examples

1
2
3
4
5
6
7
set.seed(1)
x <- simulate_data(nfeatures=10,nsamples=c(20,20,60,40,30))
rownames(x) <- seq_len(10)
colnames(x) <- seq_len(170)
s <- scNMFSet(count=x,rowData=seq_len(10),colData=seq_len(170))
s <- vb_factorize(s,ranks=seq(2,5))
visualize_clusters(s,rank=5)

ccfindR documentation built on Nov. 8, 2020, 5:12 p.m.