[BioRuby-cvs] bioruby/lib/bio/appl/blast format0.rb,1.28,1.29

Naohisa Goto ngoto at dev.open-bio.org
Wed May 14 13:30:15 UTC 2008


Update of /home/repository/bioruby/bioruby/lib/bio/appl/blast
In directory dev.open-bio.org:/tmp/cvs-serv11956/lib/bio/appl/blast

Modified Files:
	format0.rb 
Log Message:
Bug fix: For some PHI-BLAST (blastpgp) entries, possibly due to the changes
of output format, Bio::Blast::Default::Report::Iteration#eff_space (and
the shortcut method in the Report class) raises StringScanner::Error.
In addition, Iteration#pattern and #pattern_positions returns incorrect
values possibly due to the output format changes.


Index: format0.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/blast/format0.rb,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** format0.rb	12 May 2008 11:25:55 -0000	1.28
--- format0.rb	14 May 2008 13:30:12 -0000	1.29
***************
*** 535,539 ****
                    r = data.first
                    break unless r
!                   if /^Significant alignments for pattern/ =~ r
                      data.shift
                      r = data.first
--- 535,539 ----
                    r = data.first
                    break unless r
!                   while /^Significant alignments for pattern/ =~ r
                      data.shift
                      r = data.first
***************
*** 590,596 ****
                @f0message.each do |r|
                  sc = StringScanner.new(r)
!                 if sc.skip_until(/^ *pattern +(.+)$/) then
                    @pattern = sc[1] unless @pattern
!                   sc.skip_until(/^ at position +(\d+)/)
                    @pattern_positions << sc[1].to_i
                  end
--- 590,596 ----
                @f0message.each do |r|
                  sc = StringScanner.new(r)
!                 if sc.skip_until(/^ *pattern +([^\s]+)/) then
                    @pattern = sc[1] unless @pattern
!                   sc.skip_until(/(?:^ *| +)at position +(\d+) +of +query +sequence/)
                    @pattern_positions << sc[1].to_i
                  end




More information about the bioruby-cvs mailing list