Class: Bio::PAML::Codeml::PositiveSite
- Defined in:
- lib/bio/appl/paml/codeml/report.rb
Overview
A record of codon sites, across the sequences in the alignment, showing evidence of positive selection.
This class is used for storing both codeml’s full Bayesian and naive Bayesian analysis
Instance Attribute Summary collapse
-
#aaref ⇒ Object
readonly
Returns the value of attribute aaref.
-
#omega ⇒ Object
readonly
Returns the value of attribute omega.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#probability ⇒ Object
(also: #p)
readonly
Returns the value of attribute probability.
Instance Method Summary collapse
-
#dN_dS ⇒ Object
(also: #w)
Return dN/dS (or omega) for this codon.
-
#initialize(fields) ⇒ PositiveSite
constructor
A new instance of PositiveSite.
-
#to_a ⇒ Object
Return contents as Array - useful for printing.
Constructor Details
#initialize(fields) ⇒ PositiveSite
Returns a new instance of PositiveSite.
492 493 494 495 496 497 |
# File 'lib/bio/appl/paml/codeml/report.rb', line 492 def initialize fields @position = fields[0].to_i @aaref = fields[1].to_s @probability = fields[2].to_f @omega = fields[3].to_f end |
Instance Attribute Details
#aaref ⇒ Object (readonly)
Returns the value of attribute aaref.
488 489 490 |
# File 'lib/bio/appl/paml/codeml/report.rb', line 488 def aaref @aaref end |
#omega ⇒ Object (readonly)
Returns the value of attribute omega.
490 491 492 |
# File 'lib/bio/appl/paml/codeml/report.rb', line 490 def omega @omega end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
487 488 489 |
# File 'lib/bio/appl/paml/codeml/report.rb', line 487 def position @position end |
#probability ⇒ Object (readonly) Also known as: p
Returns the value of attribute probability.
489 490 491 |
# File 'lib/bio/appl/paml/codeml/report.rb', line 489 def probability @probability end |
Instance Method Details
#dN_dS ⇒ Object Also known as: w
Return dN/dS (or omega) for this codon
500 501 502 |
# File 'lib/bio/appl/paml/codeml/report.rb', line 500 def dN_dS omega end |
#to_a ⇒ Object
Return contents as Array - useful for printing
509 510 511 |
# File 'lib/bio/appl/paml/codeml/report.rb', line 509 def to_a [ @position, @aaref, @probability, @omega ] end |