首页 > 解决方案 > Python NCBIWWW(悬挂负载)

问题描述

晚上好 StackOverflow Pham,

我正在尝试使用 Biopython 的 NCBIWWW 功能来查找快速 <750 的蛋白质-肽比对。启动程序时,我遇到的问题似乎是一个悬而未决的负载。请参阅下面的代码:

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. 重写代码

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

我的 Pycharm 在无限 HANG 上的截图

有什么建议么?

谢谢SO团队!

〜D

标签: pythonbioinformaticsfreezebiopythonncbi

解决方案


从@Chris_Rands 找到答案

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

关闭请求!


推荐阅读