## ----样式-Knitr,eval = true,echo = false,结果=“ asis” -------------------------------------------------------------------------------------------------------- BiocStyle :: lastx()## ---- inclage = false -------------------------------------------------------------------------------------------------------------------------------------------------------------库(Knitr)opts_chunk $ set(concordance = true,background =“#f3f3ff)”)## --------------------------------------------------------------------------------------------------------------------------------------------------库(SIMLR)数据(buettnerflorian)数据(Zeiselamit)## ---- igraph,结果='hide',消息= false -------------------------------------------------------------------------------------------------------------------------------------------------库(igraph)## ---- simlr_run,警告= false ----------------------------------------------------------------------------------------------------------------- set.seed(11111) example = SIMLR(X = BuettnerFlorian$in_X, c = BuettnerFlorian$n_clust, cores.比率= 0)## ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nmi_1 = compare(BuettnerFlorian$true_labs[,1], example$y$cluster, method="nmi") nmi_1## ----图像,图。show='hide',图。width = 5,图。示例$ ydata,col = c(topo.colORS(buettnerflorian $ n_clust))[buettnerflorian $ true_labs [,1]],xlab =“ simlr component 1”,ylab =“ simlr component 2”,pCH = 20,main =“ similr 2d similr 2d for buettnerrian for Buettnerrian for Buettnerflorian”--- simlr_feature_ranking_run,结果='hide'-------------------------------------------------------------种子(11111)等级= simlr_feature_ranking(a = buettnerflorian $ susticy $ s,x = buettnerflorian $ in_x)## ------------------------------------------------------------------------------------------------------------------头(排名$ PVAL)头(排名$ aggr)## ----------------------------------------------------------------------------------------------------------------- set.seed(11111) example_large_scale = SIMLR_Large_Scale(X = ZeiselAmit$in_X, c = ZeiselAmit$n_clust, kk = 10) ## ----nmi_performance_large_scale---------------------------------------------------- nmi_2 = compare(ZeiselAmit$true_labs[,1], example_large_scale$y$cluster, method="nmi") nmi_2 ## ----image_large_scale, fig.show='hide', fig.width=5, fig.height=5,results='hide'---- plot(example_large_scale$ydata, col = c(topo.colors(ZeiselAmit$n_clust))[ZeiselAmit$true_labs[,1]], xlab = "SIMLR component 1", ylab = "SIMLR component 2", pch = 20, main="SIMILR 2D visualization for ZeiselAmit") ## ----SIMLR_Number_Clusters_run, warning=FALSE--------------------------------------- set.seed(53900) NUMC = 2:5 res_example = SIMLR_Estimate_Number_of_Clusters(BuettnerFlorian$in_X, NUMC = NUMC, cores.ratio = 0) ## ----SIMLR_NC_output_k1------------------------------------------------------------- NUMC[which.min(res_example$K1)] ## ----SIMLR_NC_output_k2------------------------------------------------------------- NUMC[which.min(res_example$K2)] ## ----SIMLR_NC_output, warning=FALSE------------------------------------------------- res_example ## ----sessioninfo, results='asis', echo=FALSE---------------------------------------- toLatex(sessionInfo())