Class Bio::RestrictionEnzyme::DoubleStranded::CutLocations
In: lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
Parent: Array

Contains an Array of CutLocationPair objects.

Methods

Public Class methods

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

[Source]

    # 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

Public Instance methods

Returns an Array of locations of cuts on the complementary strand


Arguments

  • none
Returns:Array of locations of cuts on the complementary strand

[Source]

    # File lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb, line 55
55:   def complement
56:     self.collect {|a| a[1]}
57:   end

Returns an Array of locations of cuts on the primary strand


Arguments

  • none
Returns:Array of locations of cuts on the primary strand

[Source]

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

Protected Instance methods

[Source]

    # 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

[Validate]