[BioRuby-cvs] bioruby/lib/bio/appl/blast format0.rb, 1.21, 1.22 wublast.rb, 1.10, 1.11

Naohisa Goto ngoto at dev.open-bio.org
Sat Apr 21 08:58:19 UTC 2007


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

Modified Files:
	format0.rb wublast.rb 
Log Message:
* Incompatible changes: Hit#bit_score, and HSP#bit_score are changed to return
  a Float object or nil instead of a String object or nil.
* Incompatible changes: Following methods are changed to return an
  integer value or nil instead of a String object or nil:
  score, percent_identity, percent_positive, percent_gaps.


Index: wublast.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/blast/wublast.rb,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** wublast.rb	21 Apr 2007 08:25:13 -0000	1.10
--- wublast.rb	21 Apr 2007 08:58:17 -0000	1.11
***************
*** 253,257 ****
                    end
                    z.pop if flag_tblast #ignore Reading Frame
!                   scr = z.pop.to_s
                    pval = z.pop.to_s
                    pval = '1' + pval if pval[0] == ?e
--- 253,258 ----
                    end
                    z.pop if flag_tblast #ignore Reading Frame
!                   scr = z.pop
!                   scr = (scr ? scr.to_i : nil)
                    pval = z.pop.to_s
                    pval = '1' + pval if pval[0] == ?e

Index: format0.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/blast/format0.rb,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** format0.rb	21 Apr 2007 08:25:13 -0000	1.21
--- format0.rb	21 Apr 2007 08:58:17 -0000	1.22
***************
*** 660,663 ****
--- 660,665 ----
                      h = Hit.new([ z.pop.to_s.sub(/\.+\z/, '') ])
                      bs = z.pop.to_s
+                     bs = '1' + bs if bs[0] == ?e
+                     bs = (bs.empty? ? nil : bs.to_f)
                      ev = z.pop.to_s
                      ev = '1' + ev if ev[0] == ?e
***************
*** 957,962 ****
                    @evalue = ev.to_f
                  elsif sc.skip(/Score *\= *([e\-\.\d]+) *bits *\( *([e\-\.\d]+) *\)/) then
!                   @bit_score = sc[1]
!                   @score = sc[2]
                  elsif sc.skip(/(Identities|Positives|Gaps) *\= (\d+) *\/ *(\d+) *\(([\.\d]+) *\% *\)/) then
                    alen = sc[3].to_i
--- 959,966 ----
                    @evalue = ev.to_f
                  elsif sc.skip(/Score *\= *([e\-\.\d]+) *bits *\( *([e\-\.\d]+) *\)/) then
!                   bs = sc[1]
!                   bs = '1' + bs if bs[0] == ?e
!                   @bit_score = bs.to_f
!                   @score = sc[2].to_i
                  elsif sc.skip(/(Identities|Positives|Gaps) *\= (\d+) *\/ *(\d+) *\(([\.\d]+) *\% *\)/) then
                    alen = sc[3].to_i
***************
*** 966,976 ****
                    when 'Identities'
                      @identity = sc[2].to_i
!                     @percent_identity = sc[4]
                    when 'Positives'
                      @positive = sc[2].to_i
!                     @percent_positive = sc[4]
                    when 'Gaps'
                      @gaps = sc[2].to_i
!                     @percent_gaps = sc[4]
                    else
                      raise ScanError
--- 970,980 ----
                    when 'Identities'
                      @identity = sc[2].to_i
!                     @percent_identity = sc[4].to_i
                    when 'Positives'
                      @positive = sc[2].to_i
!                     @percent_positive = sc[4].to_i
                    when 'Gaps'
                      @gaps = sc[2].to_i
!                     @percent_gaps = sc[4].to_i
                    else
                      raise ScanError
***************
*** 1000,1005 ****
                  elsif sc.skip(/Score *\= *([e\-\.\d]+) +\(([e\-\.\d]+) *bits *\)/) then
                    #WU-BLAST
!                   @score = sc[1]
!                   @bit_score = sc[2]
                  elsif sc.skip(/P *\= * ([e\-\.\d]+)/) then
                    #WU-BLAST
--- 1004,1011 ----
                  elsif sc.skip(/Score *\= *([e\-\.\d]+) +\(([e\-\.\d]+) *bits *\)/) then
                    #WU-BLAST
!                   @score = sc[1].to_i
!                   bs = sc[2]
!                   bs = '1' + bs if bs[0] == ?e
!                   @bit_score = bs.to_f
                  elsif sc.skip(/P *\= * ([e\-\.\d]+)/) then
                    #WU-BLAST




More information about the bioruby-cvs mailing list