[BioRuby] Made a change in format10.rb

Fredrik Johansson fredjoha at bioreg.kyushu-u.ac.jp
Mon Mar 9 06:19:22 UTC 2009


I found that Bioruby can't handle large amounts of output from Fasta. So 
I made this change to 
/usr/lib/ruby/gems/1.8/gems/bio-1.3.0/lib/bio/appl/fasta/format10.rb :

6,7c6,8
<       data.sub!(/(.*)\n\n>>>/m, '')
<       @list = "The best scores are" + $1
---
 >       border = data.index("\n\n>>>")
 >       @list = "The best scores are" + data[0...border]
 >       data = data[border+5..-1]


The old code reported an error when the output was huge:
RegexpError: Stack overflow in regexp matcher: /(.*)\n\n>>>/m

So I thought that maybe these lines of code should be changed in Bioruby.

Regards,
Fredrik Johansson




More information about the BioRuby mailing list