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 Under development (unstable) (2024-10-21 r87258)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.21-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.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.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.5.0          RSQLite_2.3.7           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.28          enrichplot_1.27.0      
##  [22] UCSC.utils_1.3.0        purrr_1.0.2             bit_4.5.0              
##  [25] xfun_0.48               zlibbioc_1.53.0         cachem_1.1.0           
##  [28] aplot_0.2.3             GenomeInfoDb_1.43.0     jsonlite_1.8.9         
##  [31] blob_1.2.4              BiocParallel_1.41.0     parallel_4.5.0         
##  [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             bookdown_0.41           knitr_1.48             
##  [43] ggtangle_0.0.3          R.utils_2.12.3          IRanges_2.41.0         
##  [46] igraph_2.1.1            Matrix_1.7-1            splines_4.5.0          
##  [49] tidyselect_1.2.1        qvalue_2.39.0           yaml_2.3.10            
##  [52] codetools_0.2-20        curl_5.2.3              lattice_0.22-6         
##  [55] tibble_3.2.1            plyr_1.8.9              treeio_1.31.0          
##  [58] Biobase_2.67.0          withr_3.0.2             KEGGREST_1.47.0        
##  [61] evaluate_1.0.1          ontologyIndex_2.12      gridGraphics_0.5-1     
##  [64] Biostrings_2.75.0       ggtree_3.15.0           pillar_1.9.0           
##  [67] BiocManager_1.30.25     stats4_4.5.0            clusterProfiler_4.15.0 
##  [70] ggfun_0.1.7             plotly_4.10.4           generics_0.1.3         
##  [73] RCurl_1.98-1.16         S4Vectors_0.45.0        ggplot2_3.5.1          
##  [76] tidytree_0.4.6          munsell_0.5.1           scales_1.3.0           
##  [79] glue_1.8.0              lazyeval_0.2.2          tools_4.5.0            
##  [82] data.table_1.16.2       fgsea_1.33.0            fs_1.6.4               
##  [85] fastmatch_1.1-4         cowplot_1.1.3           grid_4.5.0             
##  [88] ape_5.8                 tidyr_1.3.1             AnnotationDbi_1.69.0   
##  [91] colorspace_2.1-1        patchwork_1.3.0         GenomeInfoDbData_1.2.13
##  [94] cli_3.6.3               fansi_1.0.6             viridisLite_0.4.2      
##  [97] dplyr_1.1.4             gtable_0.3.6            R.methodsS3_1.8.2      
## [100] yulab.utils_0.1.7       sass_0.4.9              digest_0.6.37          
## [103] BiocGenerics_0.53.0     ggrepel_0.9.6           ggplotify_0.1.2        
## [106] farver_2.1.2            org.Hs.eg.db_3.20.0     htmlwidgets_1.6.4      
## [109] memoise_2.0.1           htmltools_0.5.8.1       R.oo_1.26.0            
## [112] lifecycle_1.0.4         httr_1.4.7              GO.db_3.20.0           
## [115] bit64_4.5.2