class Bio::Assembly::Ace::Read::BaseSequence

Attributes

from[RW]
read_name[RW]
to[RW]

Public Class Methods

new(from, to, read_name) click to toggle source
# File lib/bio-assembly/ace.rb, line 226
def initialize(from, to, read_name)
   @from = from
   @to = to
   @read_name = read_name
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/bio-assembly/ace.rb, line 232
def <=>(other)
   unless other.kind_of?(Bio::Assembly::Ace::Read::BaseSequence)
      raise "[Error] markers are not comparable"
   end
   if self.from == other.from
      # sort by to if froms are identical
      return self.to.<=>(other.to)
   else
      return self.from.<=>(other.from)
   end
end