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 33 33: def initialize(*args) 34: validate_args(args) 35: super(args) 36: 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 54 54: def complement 55: self.collect {|a| a[1]} 56: end
# File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 62 62: def validate_args(args) 63: args.each do |a| 64: unless a.class == Bio::RestrictionEnzyme::DoubleStranded::CutLocationPair 65: err = "Not a CutLocationPair\n" 66: err += "class: #{a.class}\n" 67: err += "inspect: #{a.inspect}" 68: raise ArgumentError, err 69: end 70: end 71: end