【发布时间】:2020-07-24 16:13:28
【问题描述】:
晚上好 StackOverflow Pham,
我正在尝试使用 Biopython 的 NCBIWWW 功能来快速找到
import Bio
from Bio import Seq
from Bio.Blast import NCBIWWW
import tkinter as tk
from tkinter import filedialog
# Use filedialog to locate txt file for query
protein_file = filedialog.askopenfilename()
print(protein_file)
# Parse the txt file, opening and read to VERIFY grab
protein_file = open(protein_file)
protein_read = protein_file.read()
print(protein_read)
# Take query and run to determine homologous alignments of like proteins
result_handle = NCBIWWW.qblast("blastp", "nt", protein_read)
result_handle = result_handle.open('r')
print(result_handle)
一旦我运行程序(Ctrl + Shift + F10),第一次它工作了!但现在,它只挂了几个小时。为了解决这个问题,我开始阅读 Biopython Cookbook 以找出我的代码不起作用的原因。这是我尝试过的。
- 验证语法
- 重写代码
我附上了一张截图,希望能提供更多的背景信息……但我真的迷路了。
有什么建议吗?
感谢 SO 团队!
~D
【问题讨论】:
-
你知道它挂在哪里吗?
-
是的,它似乎在 NCBIWWW 命令期间的初始查询期间挂起。当同一个确切的查询提取结果时,它只是在那里坐了几个小时。
-
"nt" 是一个核苷酸数据库,你应该使用像“nr”这样的蛋白质数据库
-
@Chris_Rands,这似乎奏效了。我能够在大约 2-3 分钟内得到我拥有的最大蛋白质的结果(卷尺)。非常感谢您的指导。下次发问题之前,我一定会检查一下小语法。
标签: python bioinformatics freeze biopython ncbi