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