Returns the contents of the present CutLocationsInEnzymeNotation
object as a CutLocations object with the
contents converted from enzyme notation to 0-based array index notation.
Arguments
def to_array_index
unless self.primary_to_array_index.size == self.complement_to_array_index.size
err = "Primary and complement strand cut locations are not available in equal numbers.\n"
err += "primary: #{self.primary_to_array_index.inspect}\n"
err += "primary.size: #{self.primary_to_array_index.size}\n"
err += "complement: #{self.complement_to_array_index.inspect}\n"
err += "complement.size: #{self.complement_to_array_index.size}"
raise IndexError, err
end
a = self.primary_to_array_index.zip(self.complement_to_array_index)
CutLocations.new( *a.collect {|cl| CutLocationPair.new(cl)} )
end