class Bio::Assembly::Read

Attributes

clear_range_from[RW]
clear_range_to[RW]
from[RW]
name[RW]
orientation[RW]
seq[RW]
to[RW]

Public Class Methods

new(str="") click to toggle source
# File lib/bio-assembly/read.rb, line 9
def initialize(str="")
 @seq = Bio::Sequence::NA.new(str)
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/bio-assembly/read.rb, line 41
def <=>(other)
  unless other.kind_of?(Bio::Assembly::Read)
    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
==(other_read) click to toggle source
# File lib/bio-assembly/read.rb, line 13
def ==(other_read)
   name == other_read.name
end
clear_range_from=(new_clear_range_from) click to toggle source
# File lib/bio-assembly/read.rb, line 33
def clear_range_from=(new_clear_range_from)
  @clear_range_from = new_clear_range_from.to_i
end
clear_range_to=(new_clear_range_to) click to toggle source
# File lib/bio-assembly/read.rb, line 37
def clear_range_to=(new_clear_range_to)
  @clear_range_to = new_clear_range_to.to_i
end
from=(new_from) click to toggle source
# File lib/bio-assembly/read.rb, line 21
def from=(new_from)
  @from = new_from.to_i
end
num_bases() click to toggle source
# File lib/bio-assembly/read.rb, line 17
def num_bases
  seq.length
end
seq=(str) click to toggle source
# File lib/bio-assembly/read.rb, line 29
def seq=(str)
  @seq = Bio::Sequence::NA.new(str)
end
to=(new_to) click to toggle source
# File lib/bio-assembly/read.rb, line 25
def to=(new_to)
  @to = new_to.to_i
end