使用的是来自eggNog的注释信息
    目前没有相关的可公开的数据,欢迎有这种数据的小伙伴联系我。
    image.png

    1. ## 安装
    2. devtools::install_github("xiayh17/RNAseqStat2")
    3. ## 载入
    4. library(RNAseqStat2)
    5. ## 读取count矩阵
    6. row_counts <- read.delim("count_data.txt", row.names=1)
    7. ## 分组信息
    8. group_list <- c("C","C","C","I","I","I")
    9. ## 读取注释数据
    10. anno_data <- data.table::fread("out.emapper.annotations",skip = 4,fill = T)
    11. ## GO
    12. GO_anno <- eggnogG2T(anno_data,"#query","GOs")
    13. ## 获取GO Term的描述信息
    14. GO_description <- clusterProfiler::go2term(GO_anno$Term)
    15. ## KEGG
    16. KEGG_anno <- eggnogG2T(anno_data,"#query","KEGG_Pathway")
    17. KEGG_anno <- KEGG_anno %>%
    18. filter(stringr::str_detect(Term, 'ko'))
    19. ## 获取KEGG的描述信息
    20. KEGG_description <- clusterProfiler::ko2name(KEGG_anno$Term)
    21. data_i <- Create_DEGContainer(expMatrix = row_counts,
    22. groupInfo = group_list,
    23. caseGroup = "C",
    24. idType = "SYMBOL",
    25. species = "unknow",
    26. GOTERM2GENE = GO_anno,
    27. GOTERM2NAME = GO_description,
    28. KEGGTERM2GENE = KEGG_anno,
    29. KEGGTERM2NAME = KEGG_description)
    30. ## 一键全部
    31. data_o <- runALL(object = data_i,dir = "output_test",GO = TRUE,KEGG = TRUE)
    32. ## 分步运行
    33. runCheck(data_i,"test_check")
    34. data_g <- runDEG(obj = data_i, parallel = T,dir = "test_deg")#
    35. data_h <- runHyper(obj = data_g,dir = "test_hyper",GO = TRUE,KEGG = TRUE)
    36. data_gse <- runGSEA(obj = data_h,dir = "test_gse",GO = TRUE,KEGG=TRUE)