在不创建序列文件的情况下运行BLAST(bl2seq) [英] running BLAST (bl2seq) without creating sequence files

查看:166
本文介绍了在不创建序列文件的情况下运行BLAST(bl2seq)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个执行BLAST查询(bl2seq)的脚本

I have a script that performs BLAST queries (bl2seq)

脚本的工作方式如下:

  1. 获取序列a,序列b
  2. 将序列a写入filea
  3. 将序列b写入文件b
  4. 运行命令'bl2seq -i filea -j fileb -n blastn'
  5. 从STDOUT获取输出,进行解析
  6. 重复2000万次
  1. Get sequence a, sequence b
  2. write sequence a to filea
  3. write sequence b to fileb
  4. run command 'bl2seq -i filea -j fileb -n blastn'
  5. get output from STDOUT, parse
  6. repeat 20 million times

程序bl2seq不支持管道. 有什么方法可以避免写入/读取硬盘驱动器吗?

The program bl2seq does not support piping. Is there any way to do this and avoid writing/reading to the harddrive?

我正在使用Python BTW.

I'm using Python BTW.

推荐答案

您怎么知道bl2seq不支持管道传输?顺便说一句,管道是OS功能,而不是程序.如果bl2seq程序向STDOUT或文件输出了某些内容,则应该能够解析该输出.检查bl2seq的帮助文件中是否有输出到文件的选项,例如-o选项.然后,您可以解析文件.

How do you know bl2seq does not support piping.? By the way, pipes is an OS feature, not the program. If your bl2seq program outputs something, whether to STDOUT or to a file, you should be able to parse the output. Check the help file of bl2seq for options to output to file as well, eg -o option. Then you can parse the file.

另外,由于您正在使用Python,因此可以使用的替代方法是 BioPython 模块.

Also, since you are using Python, an alternative you can use is BioPython module.

这篇关于在不创建序列文件的情况下运行BLAST(bl2seq)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆