使用 query_id 检索 BLAST 请求

问题描述 投票:0回答:1
  1. 有没有办法检索使用 Biopython 发出的 BLAST 请求 使用请求的 query_id 的库?
  2. 或者,是否可以在blast结果完成之前检索query_id,以及 稍后查看吗?

我正在编写一个处理 BLAST 结果的脚本,每次都必须重新请求搜索,这在时间上相当麻烦,因为我仍在学习该库。 目前我正在使用:

blastResult = NCBIWWW.qblast("blastp", "swissprot", AAsequence) 

python biopython blast
1个回答
0
投票
from Bio.Blast import NCBIWWW
from Bio.Blast import NCBIXML

# Perform the BLAST search
result_handle = NCBIWWW.qblast("blastp", "swissprot", "KAF8065798.1")

# Parse the BLAST result and retrieve the query_id
blast_record = NCBIXML.read(result_handle)
query_id = blast_record.query

# You can use the query_id to retrieve the BLAST request later
# For example, you can use the query_id to check the status of the BLAST request

# Close the result handle
result_handle.close()

# Example query_id
print(query_id)
# Output: "Query_1"
Lipase [Scenedesmus sp. PABB004]
© www.soinside.com 2019 - 2024. All rights reserved.