DrawCluster: Drawing the cluster graph with "tsne" or "umap".

View source: R/scLearn.R

DrawClusterR Documentation

Drawing the cluster graph with "tsne" or "umap".

Usage

DrawCluster(data, label = NULL, point_size = 1, method = c("tsne", "umap"), draw_cluster_text = TRUE, calculated = TRUE, pca = TRUE, perplexity = 100, plot = TRUE, seed = 1)

Arguments

data

A matrix with column is sample, row is feature.

label

A vector showing the sample label corresponding the colnames of the matrix "data".

point_size

The size of point. Default is 1.

method

The method to plot which should be one of "tsne" and "umap". Default is "tsne".

draw_cluster_text

TRUE by default. If TRUE, the cluster label will be drawed in the corresponding place in the graph.

calculated

TRUE by default. If FALSE, "tsne" or "umap" will not be performed, the graph will be draw with data offered directly.

pca

TRUE by default. If FALSE, pca will not be performed.

perplexity

Default is 100.

plot

FALSE by default. If TRUE, plot the graph.

seed

Default is 1.

Value

p

The ggplot object for plotting.

x

A matrix showing coordinates calculated by "tsne" or "umap".

cell_group

A vector showing the cell label.

Author(s)

Bin Duan


bm2-lab/scLearn documentation built on Dec. 17, 2024, 8:18 p.m.