class Bio::SQL::Location

Public Instance Methods

sequence() click to toggle source
# File lib/bio/io/biosql/ar-biosql.rb, line 117
def sequence
  seq=""
  unless self.seqfeature.bioentry.biosequence.seq.nil?
    seq=Bio::Sequence::NA.new(self.seqfeature.bioentry.biosequence.seq[start_pos-1..end_pos-1])
    seq.reverse_complement! if strand==-1
  end
  return seq        
end
to_s() click to toggle source
# File lib/bio/io/biosql/ar-biosql.rb, line 108
def to_s
  if strand==-1
    str="complement("+start_pos.to_s+".."+end_pos.to_s+")"
  else
    str=start_pos.to_s+".."+end_pos.to_s
  end
  return str    
end