retrieve gene IDs from GO.db GO
Entering edit mode
decppced • 0
Last seen 6 weeks ago
United States

I performed gene enrichment analysis using GO.db. It gave me back some GOs with up and down genes but it doesn't say what those genes are. Any idea how to do that? I didn't have any problem with the code, I just don't know what to do after that. This is what I have done so far

qlf<- glmQLFTest(fit, contrast = contr.matrix[,10])
go <- goana(qlf, species = "Mm")
topGO_2000 <- topGO(go, n=2000, truncate=2000)
topGO_2000 <-topGO_2000 %>%
  filter( P.Up < 0.001 | P.Down < 0.001)

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
 [1] grid      stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] Rgraphviz_2.34.0     topGO_2.42.0         SparseM_1.81         graph_1.68.0 
 [6] GO.db_3.12.1         AnnotationDbi_1.52.0 IRanges_2.24.1       S4Vectors_0.28.1     biomaRt_2.46.3      
[11] forcats_0.5.1        stringr_1.4.0        dplyr_1.0.5          purrr_0.3.4          readr_1.4.0         
[16] tidyr_1.1.3          tibble_3.1.1         ggplot2_3.3.3        tidyverse_1.3.1      RColorBrewer_1.1-2  
[21] RTN_2.15.2           edgeR_3.32.1         limma_3.46.0         Biobase_2.50.0       BiocGenerics_0.36.1 

loaded via a namespace (and not attached):
 [1] colorspace_2.0-0            ellipsis_0.3.1              class_7.3-17                rio_0.5.26                 
 [5] XVector_0.30.0              GenomicRanges_1.42.0        fs_1.5.0                    rstudioapi_0.13            
 [9] proxy_0.4-25                bit64_4.0.5                 fansi_0.4.2                 lubridate_1.7.10           
[13] xml2_1.3.2                  splines_4.0.2               cachem_1.0.4                jsonlite_1.7.2             
[17] broom_0.7.6                 kernlab_0.9-29              dbplyr_2.1.1                pheatmap_1.0.12            
[21] compiler_4.0.2              httr_1.4.2                  backports_1.2.1             assertthat_0.2.1           
[25] Matrix_1.2-18               fastmap_1.1.0               cli_2.5.0                   prettyunits_1.1.1          
[29] tools_4.0.2                 igraph_1.2.6                gtable_0.3.0                glue_1.4.2                 
[33] GenomeInfoDbData_1.2.4      rappdirs_0.3.3              tinytex_0.31                Rcpp_1.0.6                 
[37] carData_3.0-4               cellranger_1.1.0            vctrs_0.3.7                 xfun_0.22                  
[41] openxlsx_4.2.3              rvest_1.0.0                 lifecycle_1.0.0             statmod_1.4.35             
[45] XML_3.99-0.6                zlibbioc_1.36.0             MASS_7.3-51.6               scales_1.1.1               
[49] minet_3.48.0                hms_1.0.0                   MatrixGenerics_1.2.1        SummarizedExperiment_1.20.0
[53] pwr_1.3-0                   curl_4.3                    memoise_2.0.0               viper_1.24.0               
[57] segmented_1.3-4             stringi_1.5.3               RSQLite_2.2.7               e1071_1.7-6                
[61] zip_2.1.1                   GenomeInfoDb_1.26.7         rlang_0.4.10                pkgconfig_2.0.3            
[65] matrixStats_0.58.0          bitops_1.0-7                lattice_0.20-41             bit_4.0.4                  
[69] tidyselect_1.1.0            magrittr_2.0.1              R6_2.5.0                    snow_0.4-3                 
[73] generics_0.1.0              DelayedArray_0.16.3         DBI_1.1.1                   pillar_1.6.0               
[77] haven_2.4.1                 foreign_0.8-80              withr_2.4.2                 mixtools_1.2.0             
[81] survival_3.1-12             abind_1.4-5                 RCurl_1.98-1.3              RedeR_1.38.0               
[85] modelr_0.1.8                crayon_1.4.1                car_3.0-10                  KernSmooth_2.23-17         
[89] utf8_1.2.1                  BiocFileCache_1.14.0        progress_1.2.2              locfit_1.5-9.4             
[93] readxl_1.3.1                data.table_1.14.0           blob_1.2.1                  reprex_2.0.0               
[97] openssl_1.4.3               munsell_0.5.0               askpass_1.1
GO GO.db • 116 views
Entering edit mode
Guido Hooiveld ★ 3.0k
Last seen 6 hours ago
Wageningen University, Wageningen, the …

A very similar question has been recently asked and answered (!) on Biostars: Please post here if it worked for you as well (or not).

Entering edit mode

It does work, thanks. It is a bit tricky because the code is for one GO at the time but I made a loop so no big issues. Thanks


Login before adding your answer.

Traffic: 388 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6