[BioRuby] Problem running HMMER from bioruby

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Fri Jul 18 03:15:45 UTC 2008


Hi,

On Thu, 17 Jul 2008 20:10:11 +0300
"George Githinji" <georgkam at gmail.com> wrote:

> Hi!
> What could possibly be wrong with this code for running a hmm search the
> bioruby way?
> 
> hmmfile = "/home/george/NetBeansProjects/pfvsa/public/hmms/pfVSAs.hmm"
> 
>    #the bioruby way
> seq_to_search ="/home/george/sequences/sequences.fasta"
>   factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search)
>   report = factory.query
>   puts report.class
> 
> I am getting this error
> 
> /usr/lib/ruby/1.8/shellwords.rb:30:in `shellwords': Argument must be a
> string (ArgumentError)
>         from
> /usr/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/hmmer.rb:70:in
> `initialize'

This is caused by a bug in bioruby.

For a workaround, set option as a string. e.g.

  factory = Bio::HMMER.new('hmmpfam',hmmfile,seq_to_search, '')

To fix the bug, a patch is available.
====================================================
--- a/lib/bio/appl/hmmer.rb
+++ b/lib/bio/appl/hmmer.rb
@@ -64,7 +64,7 @@ class HMMER
     @output  = ''

     begin
-      @options = opt.to_ary
+      @options = options.to_ary
     rescue NameError #NoMethodError
       # backward compatibility
       @options = Shellwords.shellwords(options)
====================================================

-- 
Naohisa Goto
ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org



More information about the BioRuby mailing list