clusterProfiler_代码积累 - TreetoForest/LearningNotes GitHub Wiki
compareCluster --组间差异基因功能分析
示例1 https://mp.weixin.qq.com/s/1_Jp8YwrNzok5nzc_EkuEg
library(clusterProfiler) load('data1.Rdata') library(org.Hs.eg.db) en_sym<-select(org.Hs.eg.db,keys = keys(org.Hs.eg.db),columns = c('ENSEMBL','SYMBOL','ENTREZID')) data1[,11:13]<- en_sym[match(rownames(data1),en_sym$ENSEMBL),] BC_LP<- data1$ENTREZID[!data1$BCvsLP==''] BS_LC<- data1$ENTREZID[!data1$BCvsLC==''] LC_LP<- data1$ENTREZID[!data1$LCvsLP==''] gc<- list(all=union(union(BC_LP,BS_LC),LC_LP),BC_LP=BC_LP,BS_LC=BS_LC,LC_LP=LC_LP) xx <- compareCluster(gc, fun="enrichGO", OrgDb="org.Hs.eg.db", ont= "BP") dotplot(xx, showCategory=5, includeAll=FALSE)