## ----设置,包括= false -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) library(gridExtra) ## ---- message = FALSE--------------------------------------------------------- library(corral) library(SingleCellexperiment)库(GGPLOT2)库(DuoClustering2018)Zm4eq.sce <-sce_full_zhengmix4eq()---------------------------------------------------------------------------------------- ZM4EQ.SCE表(Coldata(ZM4EQ.SCE)$ facoid)## -------------------------------------------------------------------------------------------------------------------------------------------------------------------- zm4eq.sce在------------------------------------------------ plot_embedding_sce(sce = zm4eq.sce,whe_embedding ='Corral',plot_title ='corral on zhengmix4eq',color_attr ='fanttr ='fansoid',color_title ='cell type',saveplot = false)-------------------------------------------------------------------------------------------------------图书馆(Sconter)library(gridextra)#因此,我们可以并排排列ZM4EQ.SCE <-runumap(zm4eq.sce,dimred ='Corral',name ='Corral_umap')'Corral',name ='Corral_tsne')ggplot_umap <-plot_embedding_sce(sce = zm4eq.sce,what_embedding ='corral_umap',plot_title ='zhengengmix4eq corral with umap with umap'with umap'= true,showplot = false,saveplot = false)ggplot_tsne <-plot_embedding_sce(sce = zm4eq.sce,what_embedding ='corral_tsne',plot_title ='zhengmix4eq corral with with with with tsnereturngg = true,showplot = false,saveplot = false)乘数(ggplot_umap,ggplot_tsne,cols = 2)## -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- zm4eq.countmat <- assay(zm4eq.sce,'counts') zm4eq.countcorral <- corral(zm4eq.countmat) ## ----------------------------------------------------------------------------- zm4eq.countcorral ## ----------------------------------------------------------------------------- celltype_vec <- zm4eq.sce$phenoid plot_embedding(embedding = zm4eq.countcorral$v, plot_title = 'corral on Zhengmix4eq', color_vec = celltype_vec, color_title = 'cell type', saveplot = FALSE) ## ----------------------------------------------------------------------------- zm8eq.corral <- corral(zm8eq, fullout = TRUE) zm8eq.corralsmooth <- corral(zm8eq, fullout = TRUE, smooth = TRUE) ## ----------------------------------------------------------------------------- gene_names <- rowData(zm4eq.sce)$symbol biplot_corral(corral_obj = zm4eq.countcorral, color_vec = celltype_vec, text_vec = gene_names) ## ----------------------------------------------------------------------------- sessionInfo()