Class | Bio::RestrictionEnzyme::DoubleStranded::CutLocations |
In: |
lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
|
Parent: | Array |
Contains an Array of CutLocationPair objects.
CutLocations constructor.
Contains an Array of CutLocationPair objects.
Example:
clp1 = CutLocationPair.new(3,2) clp2 = CutLocationPair.new(7,9) pairs = CutLocations.new(clp1, clp2)
Arguments
Returns: | nothing |
# File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 34 34: def initialize(*args) 35: validate_args(args) 36: super(args) 37: end
Returns an Array of locations of cuts on the complementary strand
Arguments
Returns: | Array of locations of cuts on the complementary strand |
# File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 55 55: def complement 56: self.collect {|a| a[1]} 57: end
# File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 63 63: def validate_args(args) 64: args.each do |a| 65: unless a.class == Bio::RestrictionEnzyme::DoubleStranded::CutLocationPair 66: err = "Not a CutLocationPair\n" 67: err += "class: #{a.class}\n" 68: err += "inspect: #{a.inspect}" 69: raise ArgumentError, err 70: end 71: end 72: end