class Bio::RestrictionEnzyme::DoubleStranded::CutLocations

Contains an Array of CutLocationPair objects.

Public Class Methods

new(*args) click to toggle source

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

  • args: Any number of CutLocationPair objects

Returns

nothing

Calls superclass method
   # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
33 def initialize(*args)
34   validate_args(args)
35   super(args)
36 end

Public Instance Methods

complement() click to toggle source

Returns an Array of locations of cuts on the complementary strand


Arguments

  • none

Returns

Array of locations of cuts on the complementary strand

   # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
54 def complement
55   self.collect {|a| a[1]}
56 end
primary() click to toggle source

Returns an Array of locations of cuts on the primary strand


Arguments

  • none

Returns

Array of locations of cuts on the primary strand

   # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
44 def primary
45   self.collect {|a| a[0]}
46 end

Protected Instance Methods

validate_args(args) click to toggle source
   # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
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