Class: Bio::RestrictionEnzyme::Range::SequenceRange::Bin

Inherits:
Struct
  • Object
show all
Defined in:
lib/bio/util/restriction_enzyme/range/sequence_range.rb

Overview

A Bio::RestrictionEnzyme::Range::SequenceRange::Bin holds an Array of indexes for the primary and complement strands (p and c accessors).

Example hash with Bin values:

{0=>#<struct Bio::RestrictionEnzyme::Range::SequenceRange::Bin c=[0, 1], p=[0]>,
 2=>#<struct Bio::RestrictionEnzyme::Range::SequenceRange::Bin c=[], p=[1, 2]>,
 3=>#<struct Bio::RestrictionEnzyme::Range::SequenceRange::Bin c=[2, 3], p=[]>,
 4=>#<struct Bio::RestrictionEnzyme::Range::SequenceRange::Bin c=[4, 5], p=[3, 4, 5]>}

Note that the bin cannot be easily stored as a range since there may be nucleotides excised in the middle of a range.

TODO: Perhaps store the bins as one-or-many ranges since missing nucleotides due to enzyme cutting is a special case.

Instance Attribute Summary collapse

Instance Attribute Details

#cObject

Returns the value of attribute c

Returns:

  • (Object)

    the current value of c



127
128
129
# File 'lib/bio/util/restriction_enzyme/range/sequence_range.rb', line 127

def c
  @c
end

#pObject

Returns the value of attribute p

Returns:

  • (Object)

    the current value of p



127
128
129
# File 'lib/bio/util/restriction_enzyme/range/sequence_range.rb', line 127

def p
  @p
end