Function Repository Resource:

KEGGOrthology

Source Notebook

Get information about a KEGG orthology

Contributed by: Lina Marcela Ruiz Galvis and Keiko Hirayama

ResourceFunction["KEGGOrthology"]["OrthologyEntries"]

gives the Dataset with basic information for all KEGG orthologies.

ResourceFunction["KEGGOrthology"][keggcode,prop]

gives a property prop for a specific keggcode.

ResourceFunction["KEGGOrthology"][keyword,"Query"]

gives a Dataset for a specific keyword referring to an orthology.

Details

KEGG ORTHOLOGY (KO) Database is a database of molecular functions represented in terms of functional orthologs. A functional ortholog is manually defined in the context of KEGG molecular networks, namely, KEGG pathway maps, BRITE hierarchies and KEGG modules, and is given a KO identifier called K number.
Supported values of keggcode are those referring to KEGG orthologies. They can be strings or lists of at most ten elements.
prop supports the following values:
"Orthology"information for keggcode referring to KEGG orthology (i.e., K00001)
"Entry"ExternalIdentifier of the orthology KEGG code
"EntryType"the orthology type
"Symbol"the orthology name
"FullName"the orthology full name
"EntryInName"the enzyme specified in the orthology name
"Reaction"reactions involving the orthology
"PathwayExternalID"ExternalIdentifier of the pathways involving the orthology
"PathwayHyperlink"hyperlink of the pathways involving the orthology
"ModuleExternalID"ExternalIdentifier of the modules involving the orthology
"ModuleHyperlink"hyperlink of the modules involving the orthology
"Disease"diseases involving the orthology
"Brite"orthology classification
"OtherDBs"lists to other classification systems
"Genes"genes in KEGG organisms that belong to the orthology group
"Reference"reference information
The "Query" property performs a search operation to retrieve the module entry identifier associated with a given keyword.
keyword correspond to orthology names as found in the 'FullName' property of entries in KEGGOrthology["OrthologyEntries"].

Examples

Basic Examples (3) 

Get the list of all the orthology entries in the KEGG orthology database:

In[1]:=
ResourceFunction["KEGGOrthology"]["OrthologyEntries"]
Out[2]=

Get information from KEGG about a specific orthology:

In[3]:=
ResourceFunction["KEGGOrthology"][
 ExternalIdentifier["KEGGID", "K00003"]]
Out[3]=

Get information from KEGG about a list of orthology entries:

In[4]:=
ResourceFunction[
 "KEGGOrthology"][{ExternalIdentifier["KEGGID", "K00620"], ExternalIdentifier["KEGGID", "K00982"]}]
Out[4]=

Scope (2) 

Get the KEGG orthology codes for a specific query:

In[5]:=
ResourceFunction["KEGGOrthology"]["Citrate", "Query"]
Out[5]=

Keywords can have more than one part:

In[6]:=
ResourceFunction["KEGGOrthology"]["alcohol dehydrogenase", "Query"]
Out[6]=

Options (2) 

Get the dataset properties independently for each module:

In[7]:=
ResourceFunction["KEGGOrthology"][
 ExternalIdentifier["KEGGID", "K00620"], "PathwayExternalID"]
Out[7]=

Get the dataset properties independently for a list of modules:

In[8]:=
ResourceFunction[
 "KEGGOrthology"][{ExternalIdentifier["KEGGID", "K00620"], ExternalIdentifier["KEGGID", "K00982"]}, "PathwayExternalID"]
Out[8]=

Properties and Relations (2) 

Another way to get the information from KEGG about a specific orthology:

In[9]:=
ResourceFunction["KEGGOrthology"]["K00744", "Orthology"]
Out[9]=

Another way to get the information from KEGG about a specific list of orthology entries:

In[10]:=
ResourceFunction["KEGGOrthology"][{"K00744", "K00001"}, "Orthology"]
Out[10]=

Possible Issues (1) 

Only known keywords are supported:

In[11]:=
ResourceFunction["KEGGOrthology"]["oxigenu", "Query"]
Out[11]=

Neat Examples (6) 

Get the pathway and reactions associated with the K0003 orthology:

In[12]:=
pathway = ResourceFunction["KEGGOrthology"]["K00003", "PathwayExternalID"]
Out[12]=
In[13]:=
reaction = ResourceFunction["KEGGOrthology"]["K00003", "Reaction"]
Out[13]=

The next are the compounds involved in the previous reactions:

In[14]:=
firstRXN = {"C00263" \[DirectedEdge] "C00441", "C00263" \[DirectedEdge] "C00004", "C00263" \[DirectedEdge] "C00080", "C00003" \[DirectedEdge] "C00441", "C00003" \[DirectedEdge] "C00004", "C00003" \[DirectedEdge] "C00080"};
In[15]:=
secondRXN = {"C00263" \[DirectedEdge] "C00441", "C00263" \[DirectedEdge] "C00005", "C00263" \[DirectedEdge] "C00080", "C00006" \[DirectedEdge] "C00441", "C00006" \[DirectedEdge] "C00005", "C00006" \[DirectedEdge] "C00080"};

Select one species that contains the orthology K00003:

In[16]:=
genes = ResourceFunction["KEGGOrthology"]["K00003", "Genes"][[1, 1]]
Out[16]=

Get the list of edges for the biosynthesis of amino acids, one of the pathways associated with the K00003 orthology:

In[17]:=
vNamesRules = Normal[ResourceFunction[
ResourceObject[<|"Name" -> "KEGGPathway", "ShortName" -> "KEGGPathway", "UUID" -> "c26fb78f-9391-4e5b-8348-1b3a9bcb8293", "ResourceType" -> "Function", "Version" -> "1.2.1", "Description" -> "Get the graph and additional information of a KEGG pathway", "RepositoryLocation" -> URL[
         "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$cf8afda6cda14c308cd1e656f8629ece`KEGGPathway", "FunctionLocation" -> CloudObject[
         "https://www.wolframcloud.com/obj/81066f03-423e-4566-800b-da9d03968a36"]|>, {ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"}]]["mpha", "01230", "Entries"][
    All, #EntryID -> #EntryGraphName &]];
graph = ResourceFunction[
ResourceObject[<|"Name" -> "KEGGPathway", "ShortName" -> "KEGGPathway", "UUID" -> "c26fb78f-9391-4e5b-8348-1b3a9bcb8293", "ResourceType" -> "Function", "Version" -> "1.2.1", "Description" -> "Get the graph and additional information of a KEGG pathway", "RepositoryLocation" -> URL[
       "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$cf8afda6cda14c308cd1e656f8629ece`KEGGPathway", "FunctionLocation" -> CloudObject[
       "https://www.wolframcloud.com/obj/81066f03-423e-4566-800b-da9d03968a36"]|>, {ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"}]]["mpha", "01230", "Graph"];
In[18]:=
edNames = EdgeList[graph] /. vNamesRules
Out[18]=

Using the information about reactions and compounds, we get the list of edges and vertices to highlight the reaction in biosynthesis of amino acids pathway that is catalyzed by the K00003 orthology:

In[19]:=
edges = Thread[
  Intersection[edNames, Join[firstRXN, secondRXN]] -> Red]
Out[19]=
In[20]:=
vertx = Thread[{"C00263", "C00441"} -> Red]
Out[20]=

Highlighting in red (i.e., vertices and edges) the reaction catalyzed by the K00003 orthology:

In[21]:=
ResourceFunction[
ResourceObject[<|"Name" -> "KEGGPathway", "ShortName" -> "KEGGPathway", "UUID" -> "c26fb78f-9391-4e5b-8348-1b3a9bcb8293", "ResourceType" -> "Function", "Version" -> "1.2.1", "Description" -> "Get the graph and additional information of a KEGG pathway", "RepositoryLocation" -> URL[
     "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$cf8afda6cda14c308cd1e656f8629ece`KEGGPathway", "FunctionLocation" -> CloudObject[
     "https://www.wolframcloud.com/obj/81066f03-423e-4566-800b-da9d03968a36"]|>, {ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"}]]["mpha", "01230", "Graph",
 VertexSize -> Medium,
 VertexStyle -> vertx,
 EdgeStyle -> edges]
Out[21]=

Publisher

Lina Marcela

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 30 April 2025

Source Metadata

Related Resources

License Information