# #——testdata呼应= TRUE,消息= FALSE --------------------------------------- 库(scTGIF)图书馆(SingleCellExperiment)库(GSEABase)库(“msigdbr”)的数据(“DistalLungEpithelium”)的数据(“pca.DistalLungEpithelium”)的数据(“label.DistalLungEpithelium ") ## ---- 回声= TRUE, testdata2 fig.width = 7, fig.height = 7 -------------------------- (问= FALSE)情节(pca相媲美。DistalLungEpithelium坳=标签。主要DistalLungEpithelium pch = 16日=“远端肺上皮数据集”,xlab =“PCA1 ylab =“PCA2”,电池=“n”)文本(0.1,0.05,“AT1坳= " # FF7F00 " cex = 2)文本(0.07,-0.15,“at₂坳= " # E41A1C " cex = 2)文本(0.13,-0.04,“英国石油公司”,上校= " # A65628 ", cex = 2)文本(0.125,-0.15,“克拉拉”,上校= " # 377 eb8 " cex = 2)文本(0.09,-0.2,“Cilliated坳= " # 4 daf4a " cex = 2) # #日格林尼治时间——回声= TRUE ----------------------------------------------------------- m_df = msigdbr(物种=“亩骶”类别=“H”),c(“gs_name”,"entrez_gene")] hallmark = unique(m_df$gs_name) gsc <- lapply(hallmark, function(h){target = which(m_df$gs_name == h) geneIds = unique(as.character(m_df$entrez_gene[target])) GeneSet(setName=h, geneIds)}) gmt = GeneSetCollection(gsc) gmt = gmt[1:10] #减少这个演示## ----设置,回声= TRUE ------------------------------------------------------- 南加州爱迪生公司< - SingleCellExperiment(化验=列表(数量= DistalLungEpithelium)) reducedDims (sce) <——SimpleList (PCA = pca.DistalLungEpithelium) # #——setting2回声= TRUE ------------------------------------------------------ cpm < -功能(输入){libsize < - colSums(输入)中位数(libsize) * t (t(输入)/ libsize)} normcounts (sce) <——log10 (cpm(计数(sce)) + 1) # #——setting3,回声= TRUE ------------------------------------------------------ settingTGIF(格林尼治时间,reducedDimNames =“PCA assayNames = " normcounts ") ## ---- calc,回声= TRUE ---------------------------------------------------------- calcTGIF (sce ndim = 3 ) ## ---- 报告,回声= TRUE ------------------------------------------------------- reportTGIF (sce、html。打开= FALSE, title =“DistalLungEpithelium scTGIF报告数据集”,作者露崎= "引人入胜 ") ## ---- sessionInfo,回声= FALSE -------------------------------------------------- sessionInfo ()