Class: Bio::RestrictionEnzyme::DoubleStranded::CutLocations
- Inherits:
-
Array
- Object
- Array
- Bio::RestrictionEnzyme::DoubleStranded::CutLocations
- Defined in:
- lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb
Overview
Contains an Array
of CutLocationPair objects.
Direct Known Subclasses
Instance Method Summary collapse
-
#complement ⇒ Object
Returns an
Array
of locations of cuts on the complementary strand. -
#initialize(*args) ⇒ CutLocations
constructor
CutLocations constructor.
-
#primary ⇒ Object
Returns an
Array
of locations of cuts on the primary strand.
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 ofCutLocationPair
objects
- Returns
-
nothing
26 27 28 29 |
# File 'lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb', line 26 def initialize(*args) validate_args(args) super(args) end |
Instance Method Details
#complement ⇒ Object
Returns an Array
of locations of cuts on the complementary strand
Arguments
-
none
- Returns
-
Array
of locations of cuts on the complementary strand
47 48 49 |
# File 'lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb', line 47 def complement self.collect {|a| a[1]} end |
#primary ⇒ Object
Returns an Array
of locations of cuts on the primary strand
Arguments
-
none
- Returns
-
Array
of locations of cuts on the primary strand
37 38 39 |
# File 'lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb', line 37 def primary self.collect {|a| a[0]} end |