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 KEGGAPIUsage
To use KEGGAPI.jl, simply import the package:
And use the interfaces to query the KEGG API. For example, to list all organisms (genomes) in KEGG:
result = KEGGAPI.kegg_list("genome");KEGGAPI.KeggTupleList("https://rest.kegg.jp/list/genome/", Union{Missing, String}["ID", missing], Any[["T01001", "hsa; Homo sapiens (human)"], ["T01005", "ptr; Pan troglodytes (chimpanzee)"], ["T02283", "pps; Pan paniscus (bonobo)"], ["T02442", "ggo; Gorilla gorilla gorilla (western lowland gorilla)"], ["T01416", "pon; Pongo abelii (Sumatran orangutan)"], ["T10128", "ppyg; Pongo pygmaeus (Bornean orangutan)"], ["T03265", "nle; Nomascus leucogenys (northern white-cheeked gibbon)"], ["T08803", "hmh; Hylobates moloch (silvery gibbon)"], ["T10134", "ssyn; Symphalangus syndactylus (siamang)"], ["T01028", "mcc; Macaca mulatta (rhesus monkey)"] … ["T07315", "ncon; Candidatus Nanohalobium constans"], ["T10160", "nocc; Candidatus Nanohalococcus occultus"], ["T10381", "nhf; Candidatus Nanohalovita haloferacivicina"], ["T10191", "war; Candidatus Woesearchaeota archaeon NC_groundwater_85_Ag_S-0.1um_31_13"], ["T04015", "loki; Candidatus Lokiarchaeum sp. GC14_75"], ["T09593", "lob; Candidatus Lokiarchaeum ossiferum"], ["T06555", "psyt; Promethearchaeum syntrophicum"], ["T09928", "oyw; Candidatus Odinarchaeum yellowstonii"], ["T03835", "agw; Archaeon GW2011_AR10"], ["T03843", "arg; Archaeon GW2011_AR20"]])This returns a KeggTupleList 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/genome/"result.colnames2-element Vector{Union{Missing, String}}:
"ID"
missingresult.data11980-element Vector{Any}:
["T01001", "hsa; Homo sapiens (human)"]
["T01005", "ptr; Pan troglodytes (chimpanzee)"]
["T02283", "pps; Pan paniscus (bonobo)"]
["T02442", "ggo; Gorilla gorilla gorilla (western lowland gorilla)"]
["T01416", "pon; Pongo abelii (Sumatran orangutan)"]
["T10128", "ppyg; Pongo pygmaeus (Bornean orangutan)"]
["T03265", "nle; Nomascus leucogenys (northern white-cheeked gibbon)"]
["T08803", "hmh; Hylobates moloch (silvery gibbon)"]
["T10134", "ssyn; Symphalangus syndactylus (siamang)"]
["T01028", "mcc; Macaca mulatta (rhesus monkey)"]
⋮
["T10160", "nocc; Candidatus Nanohalococcus occultus"]
["T10381", "nhf; Candidatus Nanohalovita haloferacivicina"]
["T10191", "war; Candidatus Woesearchaeota archaeon NC_groundwater_85_Ag_S-0.1um_31_13"]
["T04015", "loki; Candidatus Lokiarchaeum sp. GC14_75"]
["T09593", "lob; Candidatus Lokiarchaeum ossiferum"]
["T06555", "psyt; Promethearchaeum syntrophicum"]
["T09928", "oyw; Candidatus Odinarchaeum yellowstonii"]
["T03835", "agw; Archaeon GW2011_AR10"]
["T03843", "arg; Archaeon GW2011_AR20"]For more example usage, refer to the examples page and the API reference.