Class: Bio::Big::ShortReversedFrameState

Inherits:
ShortFrameState show all
Defined in:
lib/bigbio/db/emitters/orf_emitter.rb

Overview

This is the reversed version, which is rather the same as the forward, though the tracked ntseq_pos should be seen from the end of the sequence, as we are emmiting sequences from the end(!) Also we need to make sure the sequence is always in frame (from the left).

Constant Summary

Constants included from FrameCodonHelpers

FrameCodonHelpers::START_CODONS, FrameCodonHelpers::STOP_CODONS

Instance Attribute Summary collapse

Attributes inherited from ShortFrameState

#codons, #min_size_codons, #ntseq_pos, #seq

Instance Method Summary collapse

Methods inherited from ShortFrameState

#get_codon_orfs1, #get_codon_orfs2, #get_startstop_orfs, #get_stopstop_orfs, #split

Constructor Details

#initialize(seq, ntseq_pos, ntmin_size) ⇒ ShortReversedFrameState

Returns a new instance of ShortReversedFrameState.



198
199
200
201
202
203
# File 'lib/bigbio/db/emitters/orf_emitter.rb', line 198

def initialize seq, ntseq_pos, ntmin_size
  @reversed = true
  chop = seq.size % 3 # align on codons
  super seq[chop..-1],ntseq_pos,ntmin_size
  @seq = seq # but record full seq
end

Instance Attribute Details

#reversedObject

Returns the value of attribute reversed.



196
197
198
# File 'lib/bigbio/db/emitters/orf_emitter.rb', line 196

def reversed
  @reversed
end