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

new( left, right=left )

[Source]

        # 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

### Public Instance methods

include?(i)

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 61
    61:   def include?(i)
    62:     @range.include?(i)
    63:   end

[Validate]