Class: Bio::SQL::Location

Inherits:
DummyBase show all
Defined in:
lib/bio/io/biosql/ar-biosql.rb

Instance Method Summary collapse

Instance Method Details

#sequenceObject



117
118
119
120
121
122
123
124
# 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_sObject



108
109
110
111
112
113
114
115
# 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