Class: Orf
- Inherits:
-
Object
- Object
- Orf
- Defined in:
- lib/full_lengther_next/classes/orf.rb
Instance Attribute Summary collapse
-
#frame ⇒ Object
Returns the value of attribute frame.
-
#more_than_one_frame ⇒ Object
Returns the value of attribute more_than_one_frame.
-
#score ⇒ Object
Returns the value of attribute score.
-
#seq ⇒ Object
Returns the value of attribute seq.
-
#status ⇒ Object
Returns the value of attribute status.
-
#stop_codon ⇒ Object
Returns the value of attribute stop_codon.
-
#t_end ⇒ Object
Returns the value of attribute t_end.
-
#t_start ⇒ Object
Returns the value of attribute t_start.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(orf_seq, t_start, t_end, frame, stop_codon, type) ⇒ Orf
constructor
A new instance of Orf.
- #overlaps?(other_orf) ⇒ Boolean
Constructor Details
#initialize(orf_seq, t_start, t_end, frame, stop_codon, type) ⇒ Orf
Returns a new instance of Orf.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/full_lengther_next/classes/orf.rb', line 6 def initialize(orf_seq, t_start, t_end, frame, stop_codon, type) @seq=orf_seq @t_start=t_start @t_end=t_end @frame=frame @stop_codon=stop_codon @type=type # :N_terminus,:C_terminus,:Complete,:Internal,:Putative_Complete,:Putative_N_terminus @status = :unknown # :unknown,:putative_coding,:coding @score = 0 @more_than_one_frame = false end |
Instance Attribute Details
#frame ⇒ Object
Returns the value of attribute frame.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def frame @frame end |
#more_than_one_frame ⇒ Object
Returns the value of attribute more_than_one_frame.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def more_than_one_frame @more_than_one_frame end |
#score ⇒ Object
Returns the value of attribute score.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def score @score end |
#seq ⇒ Object
Returns the value of attribute seq.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def seq @seq end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def status @status end |
#stop_codon ⇒ Object
Returns the value of attribute stop_codon.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def stop_codon @stop_codon end |
#t_end ⇒ Object
Returns the value of attribute t_end.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def t_end @t_end end |
#t_start ⇒ Object
Returns the value of attribute t_start.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def t_start @t_start end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/full_lengther_next/classes/orf.rb', line 4 def type @type end |
Instance Method Details
#overlaps?(other_orf) ⇒ Boolean
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/full_lengther_next/classes/orf.rb', line 18 def overlaps?(other_orf) overlap_status = false i1 = self.t_start i2 = other_orf.t_start e1 = self.t_end e2 = other_orf.t_end if (e1 > i2) && (e1 < e2) overlap_status = true end return overlap_status end |