我有一个包含125个蛋白质序列的多重FASTA文件。我需要对远程nr数据库执行BLASTP搜索。我尝试使用NcbiblastpCommandline,但问题是它只接受文件作为输入。由于我的文件有大量的序列,我得到了这个错误
ERROR: An error has occurred on the server, [blastsrv4.REAL]:Error: CPU usage limit was exceeded, resulting in SIGXCPU (24).
一次将多个FASTA文件中的每个序列存储到一个单独的文件中是可行的,但是BLAST搜索变得非常慢(平均约10分钟/查询,而在NCBI站点上约1分钟/查询)
blastp_results = []
from Bio.Blast.Applications import NcbiblastpCommandline
from Bio import SeqIO
record_iterator = SeqIO.parse("AmpB_DEPs.fasta", "fasta")
for record in record_iterator:
entry = str(">" + i.description + "\n" + i.seq)
f1 = open("test.txt", "w")
f1.write(entry)
f1.close()
f2 = open("test.txt", "r")
blastp_cline = NcbiblastpCommandline(query = 'test.txt', db = 'nr -remote', evalue = 0.05, outfmt = '7 sseqid evalue qcovs pident')
res = blastp_cline()
blastp_results.append(res)
f2.close()
我还尝试使用NCBIWWW.qblast,但它似乎没有在输出中提供查询覆盖率信息,这对我的研究很重要
有人能提出一种方法来处理这个问题,而不牺牲搜索空间或BLAST的默认参数吗?对于在其他语言(如PERL、R等)中实现BLAST的建议也将不胜感激
目前没有回答
相关问题 更多 >
编程相关推荐