打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
KEGG API 用法详解下篇

本篇接着介绍下列 4种 api 的用法:

  1. get

  2. conv

  3. link

  4. 4.ddi

get

根据提供的kegg 标识符,返回特定的记录,多个标识符之间用+ 连接,一次最多允许10个标识符,格式如下

http://rest.kegg.jp/get/dbentries[/option]
dbentries = KEGG database entries of the following database
database = pathway | brite | module | ko | genome | org | vg | ag | compound |
glycan | reaction | rclass | enzyme | network | variant | disease | drug | dgroup | environ | disease_ja | drug_ja | dgroup_ja | environ_ja | compound_ja
option = aaseq | ntseq | mol | kcf | image | conf | kgml | json

共有两种用法

第一种用法,不带任何的option, 返回的结果和网页版的结果类似

示例:返回hsa:10458基因的信息

http://rest.kegg.jp/get/hsa:10458

ENTRY       10458             CDS       T01001NAME        BAIAP2, BAP2, FLAF3, IRSP53DEFINITION  (RefSeq) BAI1 associated protein 2ORTHOLOGY   K05627  BAI1-associated protein 2ORGANISM    hsa  Homo sapiens (human)PATHWAY     hsa04520  Adherens junction            hsa04810  Regulation of actin cytoskeletonBRITE       KEGG Orthology (KO) [BR:hsa00001]             Cellular Processes              Cellular community - eukaryotes               04520 Adherens junction                10458 (BAIAP2)              Cell motility               04810 Regulation of actin cytoskeleton                10458 (BAIAP2)            Membrane trafficking [BR:hsa04131]             Endocytosis              Bin/Amphiphysin/Rvs (BAR) family proteins               I-BAR proteins                10458 (BAIAP2)POSITION    17q25.3...

第二种用法,后面加上options 操作,需要注意的是,特定的数据库有特定的option。

对于gene 数据库而言,支持 aaseq 和 ntseq, 返回基因的序列
示例:返回基因的核酸序列

http://rest.kegg.jp/get/hsa:10458/ntseq

>hsa:10458 K05627 BAI1-associated protein 2 | (RefSeq) BAIAP2, BAP2, FLAF3, IRSP53; BAI1 associated protein 2 (N)atgtctctgtctcgctcagaggagatgcaccggctcacggaaaatgtctataagaccatcatggagcagttcaaccctagcctccggaacttcatcgccatggggaagaattacgagaaggcactggcaggtgtgacgtatgcagccaaaggctactttgacgccctggtgaagatgggggagctggccagcgagagccagggctccaaagaactcggagacgttctcttccagatggctgaagtccacaggcagatccagaatcagctggaagaaatgctgaagtcttttcacaacgagctgcttacgcagctggagcagaaggtggagctgga

对于pathway 数据库而言,支持 image , conf, kgml  ,但是一次只允许查询1条记录
示例: 返回hsa05130的通路图

http://rest.kegg.jp/get/hsa05130/image

对于 compound, glycan, drus 数据库,支持 images ,  mcol,  kcf 操作,对于images , 一次只允许返回一条记录

示例 : 返回 C00002的结构示意图

http://rest.kegg.jp/get/C00002/image

conv

转换kegg 的ID 和其他数据库的ID
第一种格式,所有记录之间的转换

http://rest.kegg.jp/conv/target_db/source_db
(target_db source_db) = (kegg_db outside_db) | (outside_db kegg_db)
For gene identifiers:
kegg_d> = org
org = KEGG organism code or T number
outside_d> = ncbi-geneid | ncbi-proteinid | uniprot
For chemical substance identifiers:
kegg_db = compound | glycan | drug
outside_db = pubchem | chebi

示例: human的ncbi entrez ID 和 kegg 的ID 进行转换

http://rest.kegg.jp/conv/hsa/ncbi-geneid

ncbi-geneid:1    hsa:1ncbi-geneid:10    hsa:10ncbi-geneid:100    hsa:100ncbi-geneid:1000    hsa:1000ncbi-geneid:100008587    hsa:100008587ncbi-geneid:100008588    hsa:100008588ncbi-geneid:100008589    hsa:100008589ncbi-geneid:100009667    hsa:100009667ncbi-geneid:100009676    hsa:100009676

第二种格式, 某几条记录之间的转换,格式和第一种相同,只不过每次返回几条记录之间的对应关系,多条记录用+ 连接,1次最多允许10条记录

示例,查询hsa:10458ece:Z5100 两个基因对应的 ncbi protein id

http://rest.kegg.jp/conv/ncbi-proteinid/hsa:10458+ece:Z5100

hsa:10458    ncbi-proteinid:NP_059345ece:Z5100    ncbi-proteinid:AAG58814

link

检索两个数据库之间的关联,共有两种用法

第一种,两个数据库之间的关联

http://rest.kegg.jp/link/target_db/source_db
target_db = database
source_db = database
database = pathway | brite | module | ko | genome | org | vg | ag | compound |
glycan | reaction | rclass | enzyme | network | variant | disease | drug | dgroup | environ | atc | jtc | ndc | yj | pubmed

示例:human 基因和pathway 之间的对应关系

http://rest.kegg.jp/link/pathway/hsa

hsa:10327    path:hsa00010hsa:124    path:hsa00010hsa:125    path:hsa00010hsa:126    path:hsa00010hsa:127    path:hsa00010hsa:128    path:hsa00010hsa:130    path:hsa00010

第二种,查询某几条记录在两个数据库之间的关联

示例:查询hsa:10458和ece:Z5100 两个基因对应的pathway 信息

http://rest.kegg.jp/link/pathway/hsa:10458+ece:Z5100

hsa:10458 path:hsa04520hsa:10458 path:hsa04810ece:Z5100 path:ece05130

ddi

查找药物之间的相互作用关系 , URL 格式如下

http://rest.kegg.jp/ddi/dbentry
dbentry = Single entry of the following database
database = drug | ndc | yj
可以提供1个药物的ID, 也可以一次提供多个,多个ID 用 + 连接

示例 : 查询和D005664 这种药物存在相互作用的记录

http://rest.kegg.jp/ddi/D00564

dr:D00564    cpd:C00304    P    unclassifieddr:D00564    cpd:C01946    P    unclassifieddr:D00564    cpd:C04931    P    unclassifieddr:D00564    cpd:C05849    P    unclassified

总结:

kegg API 允许我们方便的获取各种资源,最大的好处是我们可以通过程序批量下载,比如批量下载一个物种所有的pathway通路图或者kgml 文件。API的用法也很简单,关键是我们要理解返回的数据有什么意义,比如 kgml 文件中记录了哪些信息,conf 文件中的数字代表了什么,后续我会详细介绍这些东西,通过kgml ,conf , 可以实现很多有意思的功能。

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
[重磅]KEGG API, 你会用吗
利用KEGG的API获取基因对应的pathway 信息
听说你的KEGG分析有大量的基因没注释
【技术帖】一篇带你玩转KEGG数据库注释
KEGG数据库倒闭了吗
利用KEGG数据库进行ID转换
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服