[BioRuby] Error running standalone blast

Naohisa GOTO ngoto at gen-info.osaka-u.ac.jp
Mon Mar 23 06:46:24 UTC 2009


Hi,

This is not a BioRuby's problem, but REXML DoS vulnerability
fix patch's bug.

See below for the deital of the REXML DoS fix's bug.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502535

The issue have already been reported in KNOWN_ISSUES.rdoc
bundled within BioRuby 1.3.0. See the section
"Problem with REXML DoS vulnerability patch before 09-Nov-2008" 

http://github.com/bioruby/bioruby/blob/51c3223e033b2992a7bd95da282f88164406ff92/KNOWN_ISSUES.rdoc

(quoted from KNOWN_ISSUES.rdoc)
> If you have applied a patch taken from
> www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
> before 09 Nov 2008 12:40 +0900, because of the bug in the patch,
> parsing of Blast XML results with REXML parser may fail. The bug
> is already fixed and new patch is available on the above URL.
> Note that some Linux distributions would have incorporated the
> patch in their manners, and may have the same problem. 

To solve the problem, install the new patch, or upgrade
to the newest Ruby 1.8.7.

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


On Sun, 22 Mar 2009 19:55:26 -1000
Kevin English <kenglish at gmail.com> wrote:

> Hello all,
>   New to bioRuby.
> Following the example I found here:
> http://biorelated.wordpress.com/2007/10/03/standalone-blast-with-ruby-part-1,
> I wrote the following program to run a standalone blast. I am getting an
> exception related to rexml... Does anyone know if there is a fix for this?
> 
> 
> #!/usr/bin/ruby
> 
> require 'rubygems'
> require 'bio'
> 
> factory = Bio::Blast.local('blastn', '/home/kenglish/Data/EST_B')
> ff = Bio::FlatFile.open(Bio::FastaFormat, '/home/kenglish/Data/EST_A.fasta')
> 
> ff.each do |entry|
>    puts "Searching..." + entry.definition
>    report = factory.query(entry)
>    report.each do |hit|
>      hit.each do |hsp|
>        puts hsp.query_from
>      end
>    end
> end
> 
> 
> /usr/lib/ruby/1.8/rexml/entity.rb:76:in `unnormalized': undefined method
> `record_entity_expansion' for nil:NilClass (NoMethodError)
>     from /usr/lib/ruby/1.8/rexml/doctype.rb:135:in `entity'
>     from /usr/lib/ruby/1.8/rexml/text.rb:325:in `unnormalize'
>     from /usr/lib/ruby/1.8/rexml/text.rb:323:in `each'
>     from /usr/lib/ruby/1.8/rexml/text.rb:323:in `unnormalize'
>     from /usr/lib/ruby/1.8/rexml/text.rb:174:in `value'
>     from /usr/lib/ruby/1.8/rexml/element.rb:452:in `text'
>     from /usr/lib/ruby/1.8/rexml/element.rb:433:in `has_text?'
>     from /usr/lib/ruby/1.8/rexml/element.rb:384:in `each_element_with_text'
>     from /usr/lib/ruby/1.8/rexml/element.rb:710:in `call'
>     from /usr/lib/ruby/1.8/rexml/element.rb:710:in `each_with_something'
>     from /usr/lib/ruby/1.8/rexml/element.rb:892:in `each'
>     from /usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each'
>     from /usr/lib/ruby/1.8/rexml/element.rb:892:in `each'
>     from /usr/lib/ruby/1.8/rexml/element.rb:709:in `each_with_something'
>     from /usr/lib/ruby/1.8/rexml/element.rb:388:in `each_element_with_text'
>     from
> /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/blast/rexml.rb:35:in
> `rexml_parse_program'
>     from
> /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/blast/rexml.rb:27:in
> `rexml_parse'
>     from
> /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/blast/report.rb:70:in
> `auto_parse'
>     from
> /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/blast/report.rb:96:in
> `initialize'
>     from /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/blast.rb:452:in
> `new'
>     from /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/blast.rb:452:in
> `parse_result'
>     from /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/blast.rb:370:in
> `query'
>     from blast1.rb:11
>     from /usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/io/flatfile.rb:336:in
> `each'
>     from blast1.rb:9
> 
> Thanks in advance for any help...
> 
> Kevin English
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby





More information about the BioRuby mailing list