class Bio::Big::FrameCodonHelpers::FrameCodonSequence
Attributes
codons[R]
pos[R]
Public Class Methods
new(seq, pos=0)
click to toggle source
# File lib/bigbio/db/emitters/orf_emitter.rb, line 76 def initialize seq, pos=0 if seq.kind_of?(String) @codons = seq.upcase.scan(/(\w\w\w)/).flatten else @codons = seq end @pos = pos end
Public Instance Methods
[](index)
click to toggle source
# File lib/bigbio/db/emitters/orf_emitter.rb, line 90 def [] index @codons[index] end
each() { |c| ... }
click to toggle source
# File lib/bigbio/db/emitters/orf_emitter.rb, line 101 def each @codons.each { | c| yield c } end
rpos()
click to toggle source
# File lib/bigbio/db/emitters/orf_emitter.rb, line 87 def rpos pos + size end
shift()
click to toggle source
# File lib/bigbio/db/emitters/orf_emitter.rb, line 93 def shift list = @codons list.shift FrameCodonSequence.new(list,@pos+1) end
size()
click to toggle source
# File lib/bigbio/db/emitters/orf_emitter.rb, line 84 def size @codons.size end
to_seq()
click to toggle source
# File lib/bigbio/db/emitters/orf_emitter.rb, line 98 def to_seq @codons.join end