eggnog 数据为例
library(dplyr)
## 读取注释数据
anno_data <- data.table::fread("out.emapper.annotations",skip = 4,fill = T)
GO_anno <- eggnogG2T(anno_data,"#query","GOs")
## 获取GO Term的描述信息
GO_description <- clusterProfiler::go2term(GO_anno$Term)
KEGG_anno <- eggnogG2T(anno_data,"#query","KEGG_Pathway")
## 获取KEGG的描述信息
KEGG_anno <- KEGG_anno %>%
filter(stringr::str_detect(Term, 'ko'))
KEGG_description <- clusterProfiler::ko2name(KEGG_anno_1$Term)