Getting started with KEGGAPI.jl
Installation
From the Julia REPL, type ] to enter the Pkg REPL and install KEGGAPI.jl:
pkg> add KEGGAPIUsage
Load KEGGAPI.jl with using:
Each wrapper is named after its KEGG operation. This call lists all organisms in KEGG:
result = KEGGAPI.kegg_list("genome")
@assert result isa KEGGAPI.KeggTupleListThe result contains the request URL, column names, and data:
result.url"https://rest.kegg.jp/list/genome"result.colnames2-element Vector{Union{Missing, String}}:
"ID"
missingresult.data11951-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"]Error handling
KEGGAPI lets HTTP.jl exceptions propagate. An unsuccessful HTTP response throws HTTP.Exceptions.StatusError. Connection, request, and timeout failures throw HTTP.Exceptions.ConnectError, HTTP.Exceptions.RequestError, and HTTP.Exceptions.TimeoutError, respectively. See KEGGAPI.request for the low-level request contract.
See Examples for more calls and API reference for the full interface.