我想以fasta格式下载NCBI蛋白质数据库中的所有肽序列(即>和肽名称,后接肽序列),我看到有一个MESH术语描述了什么是肽here,但是我不知道如何将其合并。
我写了这个:
import Bio
from Bio import Entrez
Entrez.email = '[email protected]'
handle = Entrez.esearch(db="protein", term="peptide")
record = handle.read()
out_handle = open('myfasta.fasta', 'w')
out_handle.write(record.rstrip('\n'))
但是它只打印出995个ID,没有要提交的序列,我想知道是否有人可以证明我要去哪里。
请注意,a search for the term peptide in the NCBI protein database returns 8187908 hits,因此请确保您确实要将所有这些匹配的肽序列下载到一个大的fasta文件中。