使用 BioPython 运行 BLAST 查询

发布于 2024-08-10 02:17:23 字数 136 浏览 6 评论 0原文

我想对

  1. 几个序列进行 BLAST
  2. 从每个查询中检索前 100 个命中左右
  3. 池化下载的序列
  4. 删除重复项

我如何在 BioPython 中执行此操作?

I would like to

  1. BLAST several sequences
  2. Retrieve the top 100 hits or so from each query
  3. Pool the downloaded sequences
  4. Remove duplicates

How I can do this in BioPython?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我不是你的备胎 2024-08-17 02:17:23
 from Bio.Blast import NCBIWWW
    fasta_string = open("myfasta").read()
    result_handle = NCBIWWW.qblast("blastn", "nt", fasta_string)
    print result_handle.read()

上面的 myfasta 是您的自定义 seq 文件,它是为 internet BLAST 提供的,

您稍后可以根据需要使用 NCBIXML 来处理 result_handle(即获得前 100 个,删除重复项)

 from Bio.Blast import NCBIWWW
    fasta_string = open("myfasta").read()
    result_handle = NCBIWWW.qblast("blastn", "nt", fasta_string)
    print result_handle.read()

Above myfasta is your custom seq file which is provided for internet BLAST

you can later play with result_handle using NCBIXML as you wish to (ie to get top 100,remove duplicates)

仅此而已 2024-08-17 02:17:23

当然可以 - 教程解释了如何在本地和使用 NCBI 运行 BLAST以及如何解析结果。我将把实际的实现留给您作为练习!

Sure can - the tutorial explains how to run BLAST locally and with the NCBI and how to parse the results. I'll leave the actual implementation as an exercise for you!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文