Getting started with KEGGAPI.jl

Installation

KEGGAPI.jl can be installed using the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run

pkg> add https://github.com/cvigilv/KEGGAPI.jl

Usage

To use KEGGAPI.jl, simply import the package:

And use the interfaces to query the KEGG API. For example, to list all organisms in KEGG:

result = KEGGAPI.list("organism");
KEGGAPI.KeggOrganismList("https://rest.kegg.jp/list/organism", ["T. number", "Organism", "Species", "Phylogeny"], Any[["T01001", "T01005", "T02283", "T02442", "T01416", "T10128", "T03265", "T08803", "T10134", "T01028"  …  "T07315", "T10160", "T10381", "T10191", "T04015", "T09593", "T06555", "T09928", "T03835", "T03843"], ["hsa", "ptr", "pps", "ggo", "pon", "ppyg", "nle", "hmh", "ssyn", "mcc"  …  "ncon", "nocc", "nhf", "war", "loki", "lob", "psyt", "oyw", "agw", "arg"], ["Homo sapiens (human)", "Pan troglodytes (chimpanzee)", "Pan paniscus (bonobo)", "Gorilla gorilla gorilla (western lowland gorilla)", "Pongo abelii (Sumatran orangutan)", "Pongo pygmaeus (Bornean orangutan)", "Nomascus leucogenys (northern white-cheeked gibbon)", "Hylobates moloch (silvery gibbon)", "Symphalangus syndactylus (siamang)", "Macaca mulatta (rhesus monkey)"  …  "Candidatus Nanohalobium constans", "Candidatus Nanohalococcus occultus", "Candidatus Nanohalovita haloferacivicina", "Candidatus Woesearchaeota archaeon NC_groundwater_85_Ag_S-0.1um_31_13", "Candidatus Lokiarchaeum sp. GC14_75", "Candidatus Lokiarchaeum ossiferum", "Promethearchaeum syntrophicum", "Candidatus Odinarchaeum yellowstonii", "Archaeon GW2011_AR10", "Archaeon GW2011_AR20"], ["Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates"  …  "Prokaryotes;Archaea;Nanohalarchaeota;Nanohalobium", "Prokaryotes;Archaea;Nanohalarchaeota;Nanohalococcus", "Prokaryotes;Archaea;Nanohalarchaeota;Nanohalovita", "Prokaryotes;Archaea;Woesearchaeota;unclassified Woesearchaeota", "Prokaryotes;Archaea;Promethearchaeota;Lokiarchaeum", "Prokaryotes;Archaea;Promethearchaeota;Lokiarchaeum", "Prokaryotes;Archaea;Promethearchaeota;Promethearchaeum", "Prokaryotes;Archaea;Odinarchaeota;Odinarchaeum", "Prokaryotes;Archaea;unclassified Archaea", "Prokaryotes;Archaea;unclassified Archaea"]])

This returns a KeggOrganismList object with the API call, column names and data. The data can accessed by indexing into the respective fields of the object:

result.url
"https://rest.kegg.jp/list/organism"
result.colnames
4-element Vector{String}:
 "T. number"
 "Organism"
 "Species"
 "Phylogeny"
result.data
4-element Vector{Any}:
 ["T01001", "T01005", "T02283", "T02442", "T01416", "T10128", "T03265", "T08803", "T10134", "T01028"  …  "T07315", "T10160", "T10381", "T10191", "T04015", "T09593", "T06555", "T09928", "T03835", "T03843"]
 ["hsa", "ptr", "pps", "ggo", "pon", "ppyg", "nle", "hmh", "ssyn", "mcc"  …  "ncon", "nocc", "nhf", "war", "loki", "lob", "psyt", "oyw", "agw", "arg"]
 ["Homo sapiens (human)", "Pan troglodytes (chimpanzee)", "Pan paniscus (bonobo)", "Gorilla gorilla gorilla (western lowland gorilla)", "Pongo abelii (Sumatran orangutan)", "Pongo pygmaeus (Bornean orangutan)", "Nomascus leucogenys (northern white-cheeked gibbon)", "Hylobates moloch (silvery gibbon)", "Symphalangus syndactylus (siamang)", "Macaca mulatta (rhesus monkey)"  …  "Candidatus Nanohalobium constans", "Candidatus Nanohalococcus occultus", "Candidatus Nanohalovita haloferacivicina", "Candidatus Woesearchaeota archaeon NC_groundwater_85_Ag_S-0.1um_31_13", "Candidatus Lokiarchaeum sp. GC14_75", "Candidatus Lokiarchaeum ossiferum", "Promethearchaeum syntrophicum", "Candidatus Odinarchaeum yellowstonii", "Archaeon GW2011_AR10", "Archaeon GW2011_AR20"]
 ["Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates", "Eukaryotes;Animals;Mammals;Primates"  …  "Prokaryotes;Archaea;Nanohalarchaeota;Nanohalobium", "Prokaryotes;Archaea;Nanohalarchaeota;Nanohalococcus", "Prokaryotes;Archaea;Nanohalarchaeota;Nanohalovita", "Prokaryotes;Archaea;Woesearchaeota;unclassified Woesearchaeota", "Prokaryotes;Archaea;Promethearchaeota;Lokiarchaeum", "Prokaryotes;Archaea;Promethearchaeota;Lokiarchaeum", "Prokaryotes;Archaea;Promethearchaeota;Promethearchaeum", "Prokaryotes;Archaea;Odinarchaeota;Odinarchaeum", "Prokaryotes;Archaea;unclassified Archaea", "Prokaryotes;Archaea;unclassified Archaea"]

For more example usage, refer to the examples page and the API reference.