famat

Introduction

The aim of famat is to allow users to determine functional links between metabolites and genes. These metabolites and genes lists may be related to a specific experiment/study, but famat only needs a gene symbols list and a Kegg Compound ids list. Using these lists, famat performs pathway enrichment analysis, direct interactions between elements inside pathways extraction, GO terms enrichment analysis, calculation of user’s elements centrality (number of direct interactions between an element and others inside a pathway) and extraction of information related to user’s elements.

Functions available are:
  • path_enrich : pathways enrichment analysis
  • interactions : direct interactions and centrality
  • compl_data : GO terms enrichment analysis and user’s elements data extraction
  • rshiny : use of previous function’s data in a shiny interface

Installation

Run this command line to install famat.

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("famat")

Then, load famat using library.

library(famat)
library(mgcv)

path_enrich

This function uses the metabolite list and the gene list provided by user to perform pathway enrichment analysis. Metabolites ids need to be Kegg compound ids, and genes ids need to be gene symbols. Three pathway databases are available: Kegg (“KEGG”), Wikipathways (“WP”) and Reactome (“REAC”).

data(genes)
data(meta)

listr=path_enrich("REAC", meta, genes)
## your input componentList have 2 components in background
## your input componentList have 2 components in network

Results are then stored into a list. This list must be used in “interactions” function. Pathways enrichment analysis is performed on genes using gprofiler2 and on metabolites using MPINet.

interactions

“Interactions” find all direct interactions between genes and metabolites of user’s lists in pathways obtained through pathways enrichment analysis, performed on KEGG, Reactome and Wikipathways pathways. So, this function needs results of “path_enrich” function performed on all these databases. Using direct interactions, centrality of a user’s element inside a pathway is calculated.

data(listk)
data(listr)
data(listw)

interactions_result = interactions(listk, listr, listw)

Results are then stored into a list. This list must be used in “compl_data” function. Direct interactions were collected from BioPax, KGML and GPML files parsed with PaxtoolsR, graphite and author’s parsers. “Interactions” just get interactions of enriched pathways from this direct interactions list.

compl_data

This function complete information about elements and pathway obtained with “path_enrich” and “interactions”. A GO term enrichment analysis is performed on genes, pathways obtained through pathways enrichment analysis are filtered (they must contain at least 1/5 elements in user’s lists or a direct interaction between user’s elements) and a hierarchy parent-child is built with pathways and enriched GO terms. GO terms enrichment analysis is performed using clusterProfiler. Then, dataframes containing information about elements, interactions and GO terms are created, with an heatmap showing which user’s elements are in which pathways.

data(interactions_result)

compl_data_result <- compl_data(interactions_result)

Results are then stored into a list. This list must be used in “rshiny” function.

rshiny

All results obtained with the three previous functions can be visualized using “rshiny” function. shiny is a R package allowing to create interfaces.

data(compl_data_result)

rshiny(compl_data_result)

After using this command line, the shiny interface appear.

test Interface’s tabs are:
  • Elements : Genes, metabolites, interactions, and information related to these elements. Also, filters can be applied to get pathways/enriched GO terms containing (or not) only certain elements.
  • Pathways : Heatmap showing pathways hierarchies and user’s elements in these pathways. Filters can be applied to get pathways corresponding to certain pathways or interactions types, or to filter genes by their type or enriched GO terms. Also, the heatmap can be colored using interactions types or centrality. Finally, click on a heatmap’s cell makes a pop up appear, with information about the pathway selected.
  • GO Molecular Function : Enriched GO MF terms hierarchies with information about them. Click on a GO term makes a pop up appear with data about the GO term selected.
  • GO Biological Process : Enriched GO BP terms hierarchies with information about them. Click on a GO term makes a pop up appear with data about the GO term selected.
  • History : Every time a filter is applied, new results are saved in history. So, user can go back if a mistake was done.
  • Elements not in pathways : some user’s elements may not be in pathways obtained by pathways enrichment analysis and filtered by compl_data function. So, they are printed in this tab to show they were taken into account.

Finally, a “Reset” button was made to go back to the initial results.

Conclusion: how to use famat

To conclude, famat has four important functions which have to be used one after another:

data(genes)
data(meta)

listk <- path_enrich("KEGG", meta, genes)
listr <- path_enrich("REAC", meta, genes)
listw <- path_enrich("WP", meta, genes)

interactions_result <- interactions(listk, listr, listw)

compl_data_result <- compl_data(interactions_result)

rshiny(compl_data_result)

References

  • Yanjun Xu, Chunquan Li and Xia Li (2013). MPINet: The package can implement the network-based metabolite pathway identification of pathways.. R package version 1.0. https://CRAN.R-project.org/package=MPINet
  • Liis Kolberg and Uku Raudvere (2020). gprofiler2: Interface to the ‘g:Profiler’ Toolset. R package version 0.2.0. https://CRAN.R-project.org/package=gprofiler2
  • Luna, A., Babur, O., Aksoy, A. B, Demir, E., Sander, C. (2015). “PaxtoolsR: Pathway Analysis in R Using Pathway Commons.” Bioinformatics.
  • Sales G, Calura E, Cavalieri D, Romualdi C (2012). “graphite - a Bioconductor package to convert pathway topology to gene network.” BMC Bioinformatics. https://bmcbioinformatics.biomedcentral.com/articles/10 . 1186/1471-2105-13-20.
  • Guangchuang Yu, Li-Gen Wang, Yanyan Han and Qing-Yu He.clusterProfiler: an R package for comparing biological themes among gene clusters. OMICS: A Journal of Integrative Biology 2012, 16(5):284-287

Session Info

sessionInfo()
## R version 4.4.2 (2024-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Etc/UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] mgcv_1.9-1       nlme_3.1-166     famat_1.17.0     BiocStyle_2.35.0
## 
## loaded via a namespace (and not attached):
##   [1] DBI_1.2.3               bitops_1.0-9            gson_0.1.0             
##   [4] rlang_1.1.4             magrittr_2.0.3          DOSE_4.1.0             
##   [7] compiler_4.4.2          RSQLite_2.3.8           png_0.1-8              
##  [10] vctrs_0.6.5             gprofiler2_0.2.3        reshape2_1.4.4         
##  [13] reactome.db_1.89.0      stringr_1.5.1           pkgconfig_2.0.3        
##  [16] crayon_1.5.3            fastmap_1.2.0           XVector_0.47.0         
##  [19] utf8_1.2.4              rmarkdown_2.29          enrichplot_1.27.1      
##  [22] UCSC.utils_1.3.0        purrr_1.0.2             bit_4.5.0              
##  [25] xfun_0.49               zlibbioc_1.52.0         cachem_1.1.0           
##  [28] aplot_0.2.3             GenomeInfoDb_1.43.1     jsonlite_1.8.9         
##  [31] blob_1.2.4              BiocParallel_1.41.0     parallel_4.4.2         
##  [34] R6_2.5.1                RColorBrewer_1.1-3      bslib_0.8.0            
##  [37] stringi_1.8.4           jquerylib_0.1.4         GOSemSim_2.33.0        
##  [40] Rcpp_1.0.13-1           knitr_1.49              ggtangle_0.0.4         
##  [43] R.utils_2.12.3          IRanges_2.41.1          igraph_2.1.1           
##  [46] Matrix_1.7-1            splines_4.4.2           tidyselect_1.2.1       
##  [49] qvalue_2.39.0           yaml_2.3.10             codetools_0.2-20       
##  [52] curl_6.0.1              lattice_0.22-6          tibble_3.2.1           
##  [55] plyr_1.8.9              treeio_1.31.0           Biobase_2.67.0         
##  [58] withr_3.0.2             KEGGREST_1.47.0         evaluate_1.0.1         
##  [61] ontologyIndex_2.12      gridGraphics_0.5-1      Biostrings_2.75.1      
##  [64] ggtree_3.15.0           pillar_1.9.0            BiocManager_1.30.25    
##  [67] stats4_4.4.2            clusterProfiler_4.15.0  ggfun_0.1.7            
##  [70] plotly_4.10.4           generics_0.1.3          RCurl_1.98-1.16        
##  [73] S4Vectors_0.45.2        ggplot2_3.5.1           tidytree_0.4.6         
##  [76] munsell_0.5.1           scales_1.3.0            glue_1.8.0             
##  [79] lazyeval_0.2.2          maketools_1.3.1         tools_4.4.2            
##  [82] sys_3.4.3               data.table_1.16.2       fgsea_1.33.0           
##  [85] buildtools_1.0.0        fs_1.6.5                fastmatch_1.1-4        
##  [88] cowplot_1.1.3           grid_4.4.2              ape_5.8                
##  [91] tidyr_1.3.1             AnnotationDbi_1.69.0    colorspace_2.1-1       
##  [94] patchwork_1.3.0         GenomeInfoDbData_1.2.13 cli_3.6.3              
##  [97] fansi_1.0.6             viridisLite_0.4.2       dplyr_1.1.4            
## [100] gtable_0.3.6            R.methodsS3_1.8.2       yulab.utils_0.1.8      
## [103] sass_0.4.9              digest_0.6.37           BiocGenerics_0.53.3    
## [106] ggrepel_0.9.6           ggplotify_0.1.2         farver_2.1.2           
## [109] org.Hs.eg.db_3.20.0     htmlwidgets_1.6.4       memoise_2.0.1          
## [112] htmltools_0.5.8.1       R.oo_1.27.0             lifecycle_1.0.4        
## [115] httr_1.4.7              GO.db_3.20.0            bit64_4.5.2