【问题标题】:Python NCBIWWW (Hanging Load) [closed]Python NCBIWWW(悬挂负载)[关闭]
【发布时间】: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 以找出我的代码不起作用的原因。这是我尝试过的。

  1. 验证语法
  2. 重写代码

我附上了一张截图,希望能提供更多的背景信息……但我真的迷路了。

有什么建议吗?

感谢 SO 团队!

~D

【问题讨论】:

  • 你知道它挂在哪里吗?
  • 是的,它似乎在 NCBIWWW 命令期间的初始查询期间挂起。当同一个确切的查询提取结果时,它只是在那里坐了几个小时。
  • "nt" 是一个核苷酸数据库,你应该使用像“nr”这样的蛋白质数据库
  • @Chris_Rands,这似乎奏效了。我能够在大约 2-3 分钟内得到我拥有的最大蛋白质的结果(卷尺)。非常感谢您的指导。下次发问题之前,我一定会检查一下小语法。

标签: python bioinformatics freeze biopython ncbi


【解决方案1】:

从@Chris_Rands 找到答案

发现问题 - 调用“nt”的数据库应该是数据库“nr”

关闭请求!

【讨论】:

  • @Dharman 我认为这不是错字,而是实际上是概念上的误解,答案仍然有效。你了解生物信息学问答吗?
  • @chris 也许你是对的。但是,问题和答案的质量都很低,在重新打开之前需要认真编辑。
猜你喜欢
  • 2021-09-12
  • 1970-01-01
  • 2016-02-29
  • 1970-01-01
  • 2010-09-26
  • 1970-01-01
  • 1970-01-01
  • 2010-09-07
相关资源
最近更新 更多