Contents

1 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:

2 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)

3 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.

4 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.

5 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.

6 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:

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

7 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)

8 References

Appendix

A Session Info

sessionInfo()
## R version 4.3.0 RC (2023-04-13 r84269)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.2 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.17-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              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: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] mgcv_1.8-42      nlme_3.1-162     famat_1.10.0     BiocStyle_2.28.0
## 
## loaded via a namespace (and not attached):
##   [1] DBI_1.1.3               bitops_1.0-7            gson_0.1.0             
##   [4] shadowtext_0.1.2        gridExtra_2.3           rlang_1.1.0            
##   [7] magrittr_2.0.3          DOSE_3.26.0             compiler_4.3.0         
##  [10] RSQLite_2.3.1           png_0.1-8               vctrs_0.6.2            
##  [13] gprofiler2_0.2.1        reshape2_1.4.4          reactome.db_1.84.0     
##  [16] stringr_1.5.0           pkgconfig_2.0.3         crayon_1.5.2           
##  [19] fastmap_1.1.1           XVector_0.40.0          ggraph_2.1.0           
##  [22] utf8_1.2.3              HDO.db_0.99.1           rmarkdown_2.21         
##  [25] enrichplot_1.20.0       purrr_1.0.1             bit_4.0.5              
##  [28] xfun_0.39               zlibbioc_1.46.0         cachem_1.0.7           
##  [31] aplot_0.1.10            GenomeInfoDb_1.36.0     jsonlite_1.8.4         
##  [34] blob_1.2.4              tweenr_2.0.2            BiocParallel_1.34.0    
##  [37] parallel_4.3.0          R6_2.5.1                RColorBrewer_1.1-3     
##  [40] bslib_0.4.2             stringi_1.7.12          jquerylib_0.1.4        
##  [43] GOSemSim_2.26.0         Rcpp_1.0.10             bookdown_0.33          
##  [46] knitr_1.42              downloader_0.4          IRanges_2.34.0         
##  [49] Matrix_1.5-4            splines_4.3.0           igraph_1.4.2           
##  [52] tidyselect_1.2.0        viridis_0.6.2           qvalue_2.32.0          
##  [55] yaml_2.3.7              codetools_0.2-19        curl_5.0.0             
##  [58] lattice_0.21-8          tibble_3.2.1            plyr_1.8.8             
##  [61] treeio_1.24.0           Biobase_2.60.0          withr_2.5.0            
##  [64] KEGGREST_1.40.0         evaluate_0.20           ontologyIndex_2.10     
##  [67] gridGraphics_0.5-1      scatterpie_0.1.9        polyclip_1.10-4        
##  [70] Biostrings_2.68.0       ggtree_3.8.0            pillar_1.9.0           
##  [73] BiocManager_1.30.20     stats4_4.3.0            clusterProfiler_4.8.0  
##  [76] ggfun_0.0.9             plotly_4.10.1           generics_0.1.3         
##  [79] RCurl_1.98-1.12         S4Vectors_0.38.0        ggplot2_3.4.2          
##  [82] tidytree_0.4.2          munsell_0.5.0           scales_1.2.1           
##  [85] glue_1.6.2              lazyeval_0.2.2          tools_4.3.0            
##  [88] data.table_1.14.8       fgsea_1.26.0            graphlayouts_0.8.4     
##  [91] fastmatch_1.1-3         tidygraph_1.2.3         cowplot_1.1.1          
##  [94] grid_4.3.0              ape_5.7-1               tidyr_1.3.0            
##  [97] AnnotationDbi_1.62.0    colorspace_2.1-0        patchwork_1.1.2        
## [100] GenomeInfoDbData_1.2.10 ggforce_0.4.1           cli_3.6.1              
## [103] fansi_1.0.4             viridisLite_0.4.1       dplyr_1.1.2            
## [106] gtable_0.3.3            yulab.utils_0.0.6       sass_0.4.5             
## [109] digest_0.6.31           BiocGenerics_0.46.0     ggplotify_0.1.0        
## [112] ggrepel_0.9.3           farver_2.1.1            org.Hs.eg.db_3.17.0    
## [115] htmlwidgets_1.6.2       memoise_2.0.1           htmltools_0.5.5        
## [118] lifecycle_1.0.3         httr_1.4.5              GO.db_3.17.0           
## [121] bit64_4.0.5             MASS_7.3-59