nn_clust | R Documentation |
performs nearest neighbor clustering on tsne coordinates.
nn_clust( tsne_res, nsamp = Inf, nn = 100, tall_var = "tall_var", id_var = "id", show_plot = FALSE, return_plot = FALSE )
tsne_res |
data.table with tsne results. (needs tx, ty, tall_var, id) |
nsamp |
Downsample profile values down to this value. Default of Inf skips downsampling. |
nn |
Number of neighbors to use for clustering. Default of 100. |
show_plot |
If TRUE, print plot to graphics device. Default is FALSE. |
return_plot |
If TRUE, return plot in list with cluster results. Default is FALSE. |
data.table mapping id_var entries to clusters ("cluster_id")
data("profile_dt") data("tsne_dt") setalloccol(tsne_dt) setalloccol(profile_dt) clust_res = chiptsne:::nn_clust(tsne_dt, nn = 5, return_plot = TRUE) clust_res$plot clust_res$data #just data by default chiptsne:::nn_clust(tsne_dt, nn = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.