功能注释
最后发布时间 : 2023-04-06 16:17:47
浏览量 :
获取kegg信号通路的基因
suppressMessages(library(KEGG.db))
suppressMessages(library(clusterProfiler))
suppressMessages(library(org.Mm.eg.db))
ls("package:KEGG.db")
frame = toTable(KEGGPATHID2EXTID)
x <- as.list(KEGG.db::KEGGPATHID2EXTID)
x["mmu04020"][[1]] |> length()
annotations_foldchanges <- AnnotationDbi::select(org.Mm.eg.db,
keys = x["mmu04020"][[1]] ,
columns = c("ENTREZID","SYMBOL"),
keytype = "ENTREZID") |>
na.omit()
annotations_foldchanges$SYMBOL |> length()
mcherry_PKH_mcherry_deg <-readRDS("workspace/results/rds/deg/group/mcherry_PKH-mcherry_deg.rds")
deg <- mcherry_PKH_mcherry_deg@degs$DESeq2@diff |>
filter(pvalue<0.05 & abs(log2FoldChange) >0.1)
intersect(rownames(deg),annotations_foldchanges$SYMBOL)
png(
file = "workspace/results/mcherry_PKH_mcherry_deg/venn.png",
width = 20, height = 15, units = "cm", bg = "white", res = 300
)
ggvenn(
list("Calcium-signaling-pathway" = annotations_foldchanges$SYMBOL ,"mcherry-PKH vs mcherry deg" = rownames(deg) ),
stroke_size = 0.6, set_name_size = 2.8, text_size = 5,show_percentage=F
)
dev.off()
差异基因进行GO二级注释
注:横坐标为GO分类,纵坐标左边为基因数目所占百分比,右边为基因数目。此图展示的是在差异表达基因背景和全部基因背景下GO各二级功能的基因富集情况,体现两个背景下各二级功能的地位,具有明显比例差异的二级功能说明差异表达基因与全部基因的富集趋势不同,可以重点分析此功能是否与差异相关。
https://www.frontiersin.org/articles/10.3389/fmars.2021.697813/full
Gene ontology (GO) analysis of all genes and differentially expressed genes (DEGs).