Case 4: Target molecule information at KEGG

Starting from a target molecule name, this walkthrough finds the encoding gene and then explores its orthology group, pathways and associated drugs.

1. Find the gene for a target molecule

kegg_find with the genes database searches gene names and descriptions. A popular target such as CD19 matches many organisms, so we show only the first few hits:

genes = KEGGAPI.kegg_find("genes", "CD19")
first(DataFrame(genes.data, genes.colnames), 5)
5×2 DataFrame
RowIDDetails
StringString
1hsa:1233CCR4, CC-CKR-4, CD194, CKR4, CMKBR4, ChemR13, HGCN:14099, K5-5; C-C chemokine receptor type 4
2hsa:1230CCR1, CD191, CKR-1, CKR1, CMKBR1, HM145, MIP1aR, SCYAR1; C-C chemokine receptor type 1
3hsa:1232CCR3, C C CKR3, CC-CKR-3, CD193, CKR 3, CKR3, CMKBR3; C-C chemokine receptor type 3 isoform 1
4hsa:729230CCR2, CC-CKR-2, CCR-2, CCR2A, CCR2B, CD192, CKR2, CKR2A, CKR2B, CMKBR2, MCP-1-R, PCLUD; C-C chemokine receptor type 2 isoform A
5hsa:1234CCR5, CC-CKR-5, CCCKR5, CCR-5, CD195, CKR-5, CKR5, CMKBR5, IDDM22; C-C chemokine receptor type 5

2. Gene entry and orthology group

Retrieve the full entry for the human gene with kegg_get:

gene = KEGGAPI.kegg_get("hsa:930")
println(join(first(split(gene.data, "\n"), 8), "\n"))
ENTRY       930               CDS       T01001
SYMBOL      CD19, B4, CVID3
NAME        (RefSeq) B-lymphocyte antigen CD19 isoform 2 precursor
ORTHOLOGY   K06465  B-lymphocyte antigen CD19
ORGANISM    hsa  Homo sapiens (human)
PATHWAY     hsa04151  PI3K-Akt signaling pathway
            hsa04640  Hematopoietic cell lineage
            hsa04662  B cell receptor signaling pathway

Its orthology (KO) group via kegg_link:

ko = KEGGAPI.kegg_link("ko", "hsa:930")
DataFrame(ko.data, ko.colnames)
1×2 DataFrame
RowTarget IDSource ID
StringString
1hsa:930ko:K06465

3. Pathways involving the molecule

paths = KEGGAPI.kegg_link("pathway", "hsa:930")
DataFrame(paths.data, paths.colnames)
5×2 DataFrame
RowTarget IDSource ID
StringString
1hsa:930path:hsa04151
2hsa:930path:hsa04640
3hsa:930path:hsa04662
4hsa:930path:hsa05169
5hsa:930path:hsa05340

4. Drugs associated with the molecule

drugs = KEGGAPI.kegg_link("drug", "hsa:930")
DataFrame(drugs.data, drugs.colnames)
15×2 DataFrame
RowTarget IDSource ID
StringString
1hsa:930dr:D09325
2hsa:930dr:D11144
3hsa:930dr:D11231
4hsa:930dr:D11232
5hsa:930dr:D11333
6hsa:930dr:D11338
7hsa:930dr:D11372
8hsa:930dr:D11386
9hsa:930dr:D11496
10hsa:930dr:D11601
11hsa:930dr:D11757
12hsa:930dr:D11880
13hsa:930dr:D11990
14hsa:930dr:D13022
15hsa:930dr:D13301

Retrieve information on the associated drugs by passing their identifiers (the second column of drugs.data) to kegg_get:

drug_info = KEGGAPI.kegg_get(drugs.data[2])
println(join(first(split(drug_info.data[1], "\n"), 6), "\n"))
ENTRY       D09325                      Drug
NAME        Blinatumomab (USAN/INN);
            Blinatumomab (genetical recombination) (JAN);
            Blincyto (TN)
PRODUCT     BLINCYTO (Amgen)
FORMULA     C2367H3577N649O772S19

5. Download a pathway map

img = KEGGAPI.kegg_get("hsa04151", :image)
open("hsa04151.png", "w") do io
    write(io, img.data)
end