Class: Bio::SQL::Location
- Defined in:
- lib/bio/io/biosql/location.rb
Instance Method Summary collapse
Instance Method Details
#sequence ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/bio/io/biosql/location.rb', line 19 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 ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/bio/io/biosql/location.rb', line 10 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 |