Metabolic pathways

Briefly describe idea behind metabolic pathways and related databases.

Prepare

graph <- ariadne()

KEGG

searchPath(graph, ec ~ kegg_path, include = "kegg_rxn", k = 3)
#> Path 1:
#> ec -(KEGG)-> kegg_rxn -(KEGG)-> kegg_path
#> 
#> Path 2:
#> ec -(KEGG)-> kegg_rxn -(KEGG)-> rclass -(KEGG)-> kegg_path
#> 
#> Path 3:
#> ec -(KEGG)-> kegg_glycan -(KEGG)-> kegg_rxn -(KEGG)-> kegg_path
ec2path <- weaveComplex(
    graph,
    ec ~ kegg_path,
    include = "kegg_rxn",
    threshold = 0.5
)
#> ec -(KEGG)-> kegg_rxn
#> kegg_rxn -(KEGG)-> kegg_path
#> Warning: names for 6 kegg_path ids not found.

head(ec2path)
#>           ec kegg_path       cov                              kegg_path.name
#> 1 1.14.11.21  map00331 0.5000000                Clavulanic acid biosynthesis
#> 2 1.14.11.21   rn00331 0.5000000                                        <NA>
#> 3    2.1.1.6  map00965 0.5000000                       Betalain biosynthesis
#> 4    2.1.1.6   rn00965 0.5000000                                        <NA>
#> 5  2.3.1.235  map01056 0.6666667 Biosynthesis of type II polyketide backbone
#> 6  2.3.1.235   rn01056 0.6666667                                        <NA>

MetaCyc

searchPath(graph, uniref90 ~ metacyc_path, k = 3)
#> Path 1:
#> uniref90 -(UniProt)-> ec -(WoL)-> metacyc_rxn -(WoL)-> metacyc_path
#> 
#> Path 2:
#> uniref90 -(WoL)-> go -(GO)-> metacyc_rxn -(WoL)-> metacyc_path
#> 
#> Path 3:
#> uniref90 -(ChocoPhlAn)-> go -(GO)-> metacyc_rxn -(WoL)-> metacyc_path
uniref2path <- weaveComplex(graph, ec ~ metacyc_path)
#> ec -(WoL)-> metacyc_rxn
#> metacyc_rxn -(WoL)-> metacyc_path

head(uniref2path)
#>             ec metacyc_path        cov
#> 1   |1.1.1.co|     PWY-5789 0.06666667
#> 2   |1.1.1.co|     PWY-6473 0.33333333
#> 3   |1.1.1.co|     PWY-7854 0.11111111
#> 4   |1.1.1.eb|     PWY-7882 0.33333333
#> 5   |1.1.1.et|     PWY-5516 1.00000000
#> 6 |1.14.14.eo|     PWY-5271 1.00000000
#>                                                     metacyc_path.name
#> 1                         3-hydroxypropanoate/4-hydroxybutanate cycle
#> 2                                     4-aminobutanoate degradation IV
#> 3 crotonyl-CoA/ethylmalonyl-CoA/hydroxybutyryl-CoA cycle (engineered)
#> 4                       IM-2 type &gamma;-butyrolactones biosynthesis
#> 5                                             D-xylose degradation II
#> 6                           abscisic acid degradation to phaseic acid

Reproducibility

R session information:

#> R version 4.6.0 (2026-04-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.4 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               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats4    stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#>  [1] miaViz_1.21.0                   ggraph_2.2.2                    ggplot2_4.0.3                  
#>  [4] mia_1.19.8                      TreeSummarizedExperiment_2.21.0 Biostrings_2.81.1              
#>  [7] XVector_0.53.0                  SingleCellExperiment_1.35.0     MultiAssayExperiment_1.39.0    
#> [10] SummarizedExperiment_1.43.0     Biobase_2.73.1                  GenomicRanges_1.65.0           
#> [13] Seqinfo_1.3.0                   IRanges_2.47.0                  S4Vectors_0.51.1               
#> [16] BiocGenerics_0.59.0             generics_0.1.4                  MatrixGenerics_1.25.0          
#> [19] matrixStats_1.5.0               ariadne_0.2.3                   BiocStyle_2.41.0               
#> 
#> loaded via a namespace (and not attached):
#>   [1] splines_4.6.0               MultiFactor_0.1.2           ggplotify_0.1.3             filelock_1.0.3             
#>   [5] tibble_3.3.1                polyclip_1.10-7             XML_3.99-0.23               DirichletMultinomial_1.55.0
#>   [9] lifecycle_1.0.5             httr2_1.2.2                 vroom_1.7.1                 lattice_0.22-9             
#>  [13] MASS_7.3-65                 SnowballC_0.7.1             magrittr_2.0.5              sass_0.4.10                
#>  [17] rmarkdown_2.31              jquerylib_0.1.4             yaml_2.3.12                 otel_0.2.0                 
#>  [21] DBI_1.3.0                   RColorBrewer_1.1-3          abind_1.4-8                 purrr_1.2.2                
#>  [25] yulab.utils_0.2.4           tweenr_2.0.3                rappdirs_0.3.4              gdtools_0.5.0              
#>  [29] ggrepel_0.9.8               tokenizers_0.3.0            irlba_2.3.7                 tidytree_0.4.7             
#>  [33] rentrez_1.2.4               vegan_2.7-3                 pkgdown_2.2.0               permute_0.9-10             
#>  [37] DelayedMatrixStats_1.35.0   codetools_0.2-20            DelayedArray_0.39.1         scuttle_1.23.0             
#>  [41] ggforce_0.5.0               tidyselect_1.2.1            aplot_0.2.9                 farver_2.1.2               
#>  [45] ScaledMatrix_1.21.0         viridis_0.6.5               BiocFileCache_3.3.0         jsonlite_2.0.0             
#>  [49] BiocNeighbors_2.7.2         decontam_1.33.0             tidygraph_1.3.1             scater_1.41.1              
#>  [53] systemfonts_1.3.2           tools_4.6.0                 ggnewscale_0.5.2            progress_1.2.3             
#>  [57] treeio_1.37.0               ragg_1.5.2                  Rcpp_1.1.1-1.1              glue_1.8.1                 
#>  [61] gridExtra_2.3               SparseArray_1.13.2          xfun_0.57                   mgcv_1.9-4                 
#>  [65] dplyr_1.2.1                 withr_3.0.2                 BiocManager_1.30.27         fastmap_1.2.0              
#>  [69] bluster_1.23.0              digest_0.6.39               rsvd_1.0.5                  R6_2.6.1                   
#>  [73] gridGraphics_0.5-1          textshaping_1.0.5           RSQLite_3.52.0              ecodive_2.2.6              
#>  [77] tidyr_1.3.2                 fontLiberation_0.1.0        data.table_1.18.4           DECIPHER_3.9.0             
#>  [81] prettyunits_1.2.0           graphlayouts_1.2.3          httr_1.4.8                  htmlwidgets_1.6.4          
#>  [85] S4Arrays_1.13.0             pkgconfig_2.0.3             gtable_0.3.6                blob_1.3.0                 
#>  [89] S7_0.2.2                    janeaustenr_1.0.0           htmltools_0.5.9             fontBitstreamVera_0.1.1    
#>  [93] bookdown_0.46               scales_1.4.0                png_0.1-9                   ggfun_0.2.0                
#>  [97] knitr_1.51                  tzdb_0.5.0                  reshape2_1.4.5              rncl_0.8.9                 
#> [101] nlme_3.1-169                curl_7.1.0                  cachem_1.1.0                stringr_1.6.0              
#> [105] parallel_4.6.0              vipor_0.4.7                 arrow_24.0.0                desc_1.4.3                 
#> [109] pillar_1.11.1               grid_4.6.0                  vctrs_0.7.3                 BiocSingular_1.29.0        
#> [113] dbplyr_2.5.2                beachmat_2.29.0             cluster_2.1.8.2             beeswarm_0.4.0             
#> [117] evaluate_1.0.5              readr_2.2.0                 cli_3.6.6                   compiler_4.6.0             
#> [121] rlang_1.2.0                 crayon_1.5.3                tidytext_0.4.3              forcats_1.0.1              
#> [125] plyr_1.8.9                  fs_2.1.0                    ggbeeswarm_0.7.3            ggiraph_0.9.6              
#> [129] stringi_1.8.7               viridisLite_0.4.3           BiocParallel_1.47.0         assertthat_0.2.1           
#> [133] lazyeval_0.2.3              fontquiver_0.2.1            Matrix_1.7-5                hms_1.1.4                  
#> [137] patchwork_1.3.2             sparseMatrixStats_1.25.0    bit64_4.8.0                 KEGGREST_1.53.0            
#> [141] igraph_2.3.1                memoise_2.0.1               bslib_0.10.0                rotl_3.1.1                 
#> [145] ggtree_4.3.0                bit_4.6.0                   ape_5.8-1