class Bio::PAML::Codeml::PositiveSites
List for the positive selection sites. PAML returns:
Naive Empirical Bayes (NEB) analysis Positively selected sites (*: P>95%; **: P>99%) (amino acids refer to 1st sequence: PITG_23265T0)
Pr(w>1) post mean +- SE for w 17 I 0.988* 3.293 18 H 1.000** 17.975 23 F 0.991** 6.283
(…)
131 V 1.000** 22.797 132 R 1.000** 10.800
(newline)
these can be accessed using normal iterators. Also special methods are available for presenting this data
Attributes
descr[R]
Public Class Methods
new(search, buf, num_codons)
click to toggle source
# File lib/bio/appl/paml/codeml/report.rb, line 537 def initialize search, buf, num_codons @num_codons = num_codons if buf.index(search)==nil raise ReportError,"No NB sites found for #{search}" end # Set description of this class @descr = search lines = buf.split("\n") # find location of 'search' start = 0 lines.each_with_index do | line, i | if line.index(search) != nil start = i break end end raise ReportError,"Out of bound error for <#{buf}>" if lines[start+6]==nil lines[start+6..-1].each do | line | break if line.strip == "" fields = line.split push PositiveSite.new(fields) end num = size() @buf = lines[start..start+num+7].join("\n") end
Public Instance Methods
graph()
click to toggle source
Generate a graph - which is a simple string pointing out the positions showing evidence of positive selection pressure.
>> c.sites.graph[0..32] => " ** * * *"
# File lib/bio/appl/paml/codeml/report.rb, line 569 def graph graph_to_s(lambda { |site| "*" }) end
graph_omega()
click to toggle source
Generate a graph - which is a simple string pointing out the positions showing evidence of positive selection pressure, with dN/dS values (high values are an asterisk *)
>> c.sites.graph_omega[0..32] => " 24 3 3 2"
# File lib/bio/appl/paml/codeml/report.rb, line 580 def graph_omega graph_to_s(lambda { |site| symbol = "*" symbol = site.omega.to_i.to_s if site.omega.abs <= 10.0 symbol }) end
graph_seq()
click to toggle source
Graph of amino acids of first sequence at locations
# File lib/bio/appl/paml/codeml/report.rb, line 589 def graph_seq graph_to_s(lambda { |site | symbol = site.aaref }) end
to_s()
click to toggle source
Return the positive selection information as a String
# File lib/bio/appl/paml/codeml/report.rb, line 596 def to_s @buf end