Hello, I need to build a Gene-Metabolite (Compund) and Metabolite - Pathway network for Streptomyces coelicolor from KEGG. I tried KEGGREST package for R but I only can download Gene - Pathway network. Anyone knows how can I download this network with KEGGREST or any other packages?
in Kegg there's no direct gene to compound mapping, however you can have that mapping (indirectly) by running `keggLink` twice one to get gene-EC map, and another one to get EC-compound map, then merge by col to get gene-compound mapping.
If you want to build a gene-compound network you can use the package MetaboSignal. See below an script:
library(MetaboSignal)
paths_sco = MS_getPathIds(organism_code = "sco") # See all pathways for S.coelicolor
metabo_paths_sco = paths_sco[paths_sco[, "Path_type"] == "metabolic", 1] # Get metabo pathway IDs
network = MS_keggNetwork(metabo_paths = metabo_paths_sco, expand_genes = TRUE) # If you want the genes to be clustered into orthologs use expand_genes = FALSE
The network is formatted as a 3-column matrix. The first two columns are the edge list and the third one corresponds to the direction of the reaction (i.e. reversible or irreversible)
This is a bit weird because I just tried myself and it's working for me.... Are you sure you have installed and loaded the package? Make sure you haven't missed any of the following steps:
help(MS_getPathIds) ## This should should you the documentation of the function
## Then you can get the pathway ids of your organism of interest, which in this case seems to be S.coelicolor, so organism_code = "sco". Based on this do:
paths_sco = MS_getPathIds(organism_code = "sco") ## This should show you all the KEGG pathways available for your organism of interest. You can then use all (or some) of these pathways to build the gene-compound network. Is this what you are trying to do? If yes, just do:
network = MS_keggNetwork(metabo_paths = metabo_paths_sco, expand_genes = TRUE) # If you want the genes to be clustered into orthologs use expand_genes = FALSE
in what format/structure you expect the output to be?
the API you're looking for is `keggLink`; but KEGG doesn't "link" genes with compounds directly.
what you can do is "link" pathways to compounds, and also link genes to pathways. From these two links you can derive the third gene-compounds link.
Is that what you want or you just want 2 data frames: gene->compund, and compund-> pathway?
Yes these are the data frames I want.
Actually format is not really important but mostly it should be a table which includes a column for gene and a column with associated compound.
Thank you for your answer.