• 一句话代码富集分析gost ghost


    1. 1.5 ##富集分析----------
    2. #BiocManager::install("gprofiler2")
    3. library(gprofiler2)
    4. ## We can perform an enrichment analyses with the genes in the complex
    5. EnrichmentResults <- gprofiler2::gost(genes_complex, significant = TRUE,
    6. user_threshold = 0.001, correction_method = c("fdr"),
    7. sources=c("GO:BP","GO:CC","GO:MF"))

     

    1. #1 complex------------
    2. ## We check the different complexes databases
    3. get_complex_resources()
    4. ## We query and store complexes from some sources into a dataframe.
    5. 1.2
    6. complexes <- import_omnipath_complexes(resources=c("CORUM", "hu.MAP"))
    7. complexes_all <- import_omnipath_complexes(resources=get_complex_resources())
    8. ## We check all the molecular complexes where a set of genes participate
    9. query_genes <- c("WRN","PARP1")
    10. 1.3
    11. ## Complexes where any of the input genes participate
    12. complexes_query_genes_any <- unique(get_complex_genes(complexes,query_genes,
    13. total_match=FALSE))
    14. head(complexes_query_genes_any)
    15. 1.4
    16. ## Complexes where all the input genes participate jointly
    17. complexes_query_genes_join <- unique(get_complex_genes(complexes,query_genes,
    18. total_match=TRUE))
    19. ## We print the components of the different selected components
    20. complexes_query_genes_join$components_genesymbols
    21. genes_complex <-
    22. unlist(strsplit(complexes_query_genes_join$components_genesymbols, "_"))
    23. 1.5 ##富集分析----------
    24. #BiocManager::install("gprofiler2")
    25. library(gprofiler2)
    26. ## We can perform an enrichment analyses with the genes in the complex
    27. EnrichmentResults <- gprofiler2::gost(genes_complex, significant = TRUE,
    28. user_threshold = 0.001, correction_method = c("fdr"),
    29. sources=c("GO:BP","GO:CC","GO:MF"))
    30. ## We show the most significant results
    31. EnrichmentResults$result %>%
    32. dplyr::select(term_id, source, term_name,p_value) %>%
    33. dplyr::top_n(5,-p_value)

  • 相关阅读:
    11、视频分类建议
    定期清理执行垃圾回收代码
    基于Java的家政公司服务平台设计与实现(源码+lw+部署文档+讲解等)
    软件测试要学哪些东西?
    I2S/PCM接口及音频codec
    JSTL标签库
    放下宝宝就醒,告诉你是因为什么
    Docker熟悉基本命令进行资源及网络管理
    Windows CSC提权漏洞复现(CVE-2024-26229)
    深度学习之基于Python+OpenCV(DNN)性别和年龄识别系统
  • 原文地址:https://blog.csdn.net/qq_52813185/article/details/133782979