Class: Bio::RestrictionEnzyme::DoubleStranded::CutLocations

Inherits:
Array
  • Object
show all
Defined in:
lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb

Overview

Contains an Array of CutLocationPair objects.

Direct Known Subclasses

CutLocationsInEnzymeNotation

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CutLocations

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



34
35
36
37
# File 'lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb', line 34

def initialize(*args)
  validate_args(args)
  super(args)
end

Instance Method Details

#complementObject

Returns an Array of locations of cuts on the complementary strand


Arguments

  • none

Returns

Array of locations of cuts on the complementary strand



55
56
57
# File 'lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb', line 55

def complement
  self.collect {|a| a[1]}
end

#primaryObject

Returns an Array of locations of cuts on the primary strand


Arguments

  • none

Returns

Array of locations of cuts on the primary strand



45
46
47
# File 'lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb', line 45

def primary
  self.collect {|a| a[0]}
end