Class Bio::RestrictionEnzyme::Range::HorizontalCutRange
In: lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb
Parent: CutRange

Methods

include?   new  

Attributes

c_cut_left  [R] 
c_cut_right  [R] 
hcuts  [R] 
max  [R] 
min  [R] 
p_cut_left  [R] 
p_cut_right  [R] 

Public Class methods

[Source]

    # File lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb, line 22
22:   def initialize( left, right=left )
23:     raise "left > right" if left > right
24: 
25:     # The 'range' here is actually off by one on the left
26:     # side in relation to a normal CutRange, so using the normal
27:     # variables from CutRange would result in bad behavior.
28:     #
29:     # See below - the first horizontal cut is the primary cut plus one.
30:     #
31:     #    1 2 3 4 5 6 7
32:     #    G A|T T A C A
33:     #       +-----+
34:     #    C T A A T|G T
35:     #    1 2 3 4 5 6 7
36:     # 
37:     # Primary cut = 2
38:     # Complement cut = 5
39:     # Horizontal cuts = 3, 4, 5
40: 
41:     @p_cut_left = nil
42:     @p_cut_right = nil
43:     @c_cut_left = nil
44:     @c_cut_right = nil
45:     @min = left  # NOTE this used to be 'nil', make sure all tests work
46:     @max = right # NOTE this used to be 'nil', make sure all tests work
47:     @range = (@min..@max) unless @min == nil or @max == nil # NOTE this used to be 'nil', make sure all tests work
48:     
49: 
50:     @hcuts = (left..right)
51:   end

Public Instance methods

Check if a location falls within the minimum or maximum values of this range.


Arguments

  • i: Location to check if it is included in the range
Returns:true or false

[Source]

    # File lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb, line 60
60:   def include?(i)
61:     @range.include?(i)
62:   end

[Validate]