0

我想在 pubmed 数据库中的搜索中使用基因符号列表(下面命名为 t),以便(最终)检索相关基因的 DNA 序列。我只想将我的搜索限制在人类身上,但我当前的代码给了我人类以外的生物。

from Bio import Entrez
Entrez.email = '...'           #my email: always tell Entrez who you are

t = ['FOXO3']
for i in range(len(t)):
    search = 'human[orgn]'+t[i]
    handle = Entrez.esearch(db='gene',term=search)
    record = Entrez.read(handle)
    t = record[u'IdList']
    handle = Entrez.efetch('nucleotide',id=t[0],rettype='gb',retmode='text')
    print handle.read()

任何人都可以看到我要去哪里错了吗?

4

1 回答 1

0

You're messing the databases. In the esearch you use db=gene, but in the efetch you change it to db=nucleotide. They are different things:

于 2014-10-28T14:28:27.450 回答