[BioRuby] Error running standalone blast
Kevin English
kenglish at gmail.com
Mon Mar 23 05:55:26 UTC 2009
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
More information about the BioRuby
mailing list