title: "Demonstration 2" output: html_document: toc: true html_notebook: default
library(igraph) library(pagoda2) library(ggplot2) #library(magrittr) library(pbapply) theme_set(theme_bw()) set.seed(2018)
path_floder <- DataPath("GSE109447_13055_cm.rds") load_matrix <- readRDS(path_floder) load_matrix <- load_matrix[!duplicated(rownames(load_matrix)),]
p2 <- pagoda2::basicP2proc(load_matrix, n.cores=10)
p2up <- UpdatePagoda(primary.data = load_matrix, pagoda.obj = p2, clustering.type = 'multilevel', k = c(30), n.cores = 25, embeding.type = 'largeVis')
p2up$getKnnClusters(method = igraph::infomap.community, type = "PCA", name = "infomap")
conos::embeddingPlot(p2$embeddings$PCA$tSNE, groups=p2$clusters$PCA$multilevel) conos::embeddingPlot(p2$embeddings$PCA$tSNE, groups=p2$clusters$PCA$infomap) conos::embeddingPlot(p2$embeddings$PCA$tSNE, groups=p2up$clusters$PCA$infomap)
conos::embeddingPlot(p2$embeddings$PCA$largeVis, groups=p2$clusters$PCA$infomap) conos::embeddingPlot(p2up$embeddings$PCA$largeVis, groups=p2$clusters$PCA$infomap) conos::embeddingPlot(p2$embeddings$PCA$largeVis, groups=p2up$clusters$PCA$infomap) conos::embeddingPlot(p2up$embeddings$PCA$largeVis, groups=p2up$clusters$PCA$infomap)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.