[BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/double_stranded cut_location_pair.rb, 1.6, 1.7 cut_location_pair_in_enzyme_notation.rb, 1.4, 1.5 cut_locations_in_enzyme_notation.rb, 1.4, 1.5

Trevor Wennblom trevor at dev.open-bio.org
Wed Apr 4 20:05:08 UTC 2007


Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded
In directory dev.open-bio.org:/tmp/cvs-serv13881/lib/bio/util/restriction_enzyme/double_stranded

Modified Files:
	cut_location_pair.rb cut_location_pair_in_enzyme_notation.rb 
	cut_locations_in_enzyme_notation.rb 
Log Message:
Removed "negative?" Integer extension

Index: cut_location_pair.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** cut_location_pair.rb	4 Apr 2007 18:07:44 -0000	1.6
--- cut_location_pair.rb	4 Apr 2007 20:05:06 -0000	1.7
***************
*** 10,14 ****
  
  require 'bio/util/restriction_enzyme/cut_symbol'
- require 'bio/util/restriction_enzyme/integer'
  
  module Bio; end
--- 10,13 ----
***************
*** 98,102 ****
  
    def validate_2( a, b )
!     if (a != nil and a.negative?) or (b != nil and b.negative?)
        raise ArgumentError, "0-based index notation only.  Negative values are illegal."
      end
--- 97,101 ----
  
    def validate_2( a, b )
!     if (a != nil and a < 0) or (b != nil and b < 0)
        raise ArgumentError, "0-based index notation only.  Negative values are illegal."
      end

Index: cut_locations_in_enzyme_notation.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** cut_locations_in_enzyme_notation.rb	4 Apr 2007 18:07:44 -0000	1.4
--- cut_locations_in_enzyme_notation.rb	4 Apr 2007 20:05:06 -0000	1.5
***************
*** 82,89 ****
      return [] if minimum == nil  # no elements
  
!     if minimum.negative?
        calc = lambda do |n|
          unless n == nil
!           n -= 1 unless n.negative?
            n += minimum.abs
          end
--- 82,89 ----
      return [] if minimum == nil  # no elements
  
!     if minimum < 0
        calc = lambda do |n|
          unless n == nil
!           n -= 1 unless n < 0
            n += minimum.abs
          end

Index: cut_location_pair_in_enzyme_notation.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** cut_location_pair_in_enzyme_notation.rb	4 Apr 2007 18:07:44 -0000	1.4
--- cut_location_pair_in_enzyme_notation.rb	4 Apr 2007 20:05:06 -0000	1.5
***************
*** 10,14 ****
  
  require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair'
- require 'bio/util/restriction_enzyme/integer'
  
  module Bio; end
--- 10,13 ----




More information about the bioruby-cvs mailing list