第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

Python從零開始第五章生物信息學(xué)③kegg查詢

標(biāo)簽:
Python

正文

  • 导入必须的python包

from bioservices.kegg import KEGG
s = KEGG()

KEGG拥有许多数据库。 该列表可以在属性bioservices.kegg.KEGG.databases中找到。 可以使用bioservices.kegg.KEGG.list()方法查询每个数据库:

  • 数据库列表

s.list("organism")

通常,方法需要访问在线KEGG数据库,因此需要时间。 例如,上面的命令需要几秒钟。 但是,有些是缓冲的,所以下次调用它时会更快。另一个有用的别名是检索所有通路ID的通道ID。 但是,必须首先指定您感兴趣的生物体。从上面的命令我们知道hsa(人类)是有效的生物体ID,所以让我们设置它然后获取路径列表:

s.organism = "hsa"s.pathwayIds

webp


根据上图可以看出,共计统计三百三十个人类的kegg通路

KEGG API提供的另一个功能是bioservices.kegg.KEGG.get()查询特定条目。 在这里,我们对人类基因感兴趣,代码为7535:

b = s.get("hsa:7535")    #hsa:7535 is also known as ZAP70

webp

上图与我们从kegg官网得到的结果类似。

  • bioservices.kegg.KEGG.find()方法可以非常方便地搜索不同数据库中的条目。 例如,如果您想知道人体组织中名为ZAP70的基因条目的代码,请键入:

s.find("hsa", "zap70")
Out[6]: 'hsa:7535\tZAP70, ADMIO2, IMD48, SRK, STCD, STD, TZK, ZAP-70; zeta chain of T cell receptor associated protein kinase 70\n'
  • 搜索同一基因在不同物种的keggID注释

s.lookfor_organism("droso")
Out[8]: 
['T00030 dme Drosophila melanogaster (fruit fly) Eukaryotes;Animals;Arthropods;Insects', 'T01032 dpo Drosophila pseudoobscura pseudoobscura Eukaryotes;Animals;Arthropods;Insects', 'T01059 dan Drosophila ananassae Eukaryotes;Animals;Arthropods;Insects', 'T01060 der Drosophila erecta Eukaryotes;Animals;Arthropods;Insects', 'T01063 dpe Drosophila persimilis Eukaryotes;Animals;Arthropods;Insects', 'T01064 dse Drosophila sechellia Eukaryotes;Animals;Arthropods;Insects', 'T01065 dsi Drosophila simulans Eukaryotes;Animals;Arthropods;Insects', 'T01067 dwi Drosophila willistoni Eukaryotes;Animals;Arthropods;Insects'.....]

寻找途径非常相似。 您可以使用上面的find方法:

print(s.find("pathway", "T+cell"))path:map04110   Cell cyclepath:map04111   Cell cycle - yeastpath:map04658   Th1 and Th2 cell differentiationpath:map04659   Th17 cell differentiationpath:map04660   T cell receptor signaling pathwaypath:map04662   B cell receptor signaling pathway

可以通过这种搜索方式搜索包含T 以及 cell的kegg通路

  • 请注意,如果没有+号,将获得包含T或CELL的所有路径。

print(s.find("pathway", "T cell"))path:map04110   Cell cyclepath:map04111   Cell cycle - yeastpath:map04112   Cell cycle - Caulobacterpath:map04218   Cellular senescencepath:map04514   Cell adhesion molecules (CAMs)path:map04550   Signaling pathways regulating pluripotency of stem cellspath:map04640   Hematopoietic cell lineagepath:map04650   Natural killer cell mediated cytotoxicitypath:map04658   Th1 and Th2 cell differentiationpath:map04659   Th17 cell differentiation
  • 更精确的搜索

s.lookfor_pathway("B cell")Out[13]: ['path:map04662 B cell receptor signaling pathway']
  • 通过基因名搜索kegg通路

s.find("hsa", "zap70")
Out[14]: 'hsa:7535\tZAP70, ADMIO2, IMD48, SRK, STCD, STD, TZK, ZAP-70; zeta chain of T cell receptor associated protein kinase 70\n'
  • 通过基因的keggID或者基因名搜索kegg通路

res = s.get_pathway_by_gene("7535", "hsa")
res
Out[16]: 
{'hsa04014': 'Ras signaling pathway', 'hsa04064': 'NF-kappa B signaling pathway', 'hsa04650': 'Natural killer cell mediated cytotoxicity', 'hsa04658': 'Th1 and Th2 cell differentiation', 'hsa04659': 'Th17 cell differentiation', 'hsa04660': 'T cell receptor signaling pathway', 'hsa05340': 'Primary immunodeficiency'}
s.get_pathway_by_gene("zap70", "hsa")
Out[17]: 
{'hsa04014': 'Ras signaling pathway', 'hsa04064': 'NF-kappa B signaling pathway', 'hsa04650': 'Natural killer cell mediated cytotoxicity', 'hsa04658': 'Th1 and Th2 cell differentiation', 'hsa04659': 'Th17 cell differentiation', 'hsa04660': 'T cell receptor signaling pathway', 'hsa05340': 'Primary immunodeficiency'}



作者:夜神moon
链接:https://www.jianshu.com/p/90d8767383bf


點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評論
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機(jī)會得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

舉報

0/150
提交
取消