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 537 def initialize search, buf, num_codons 538 @num_codons = num_codons 539 if buf.index(search)==nil 540 raise ReportError,"No NB sites found for #{search}" 541 end 542 # Set description of this class 543 @descr = search 544 lines = buf.split("\n") 545 # find location of 'search' 546 start = 0 547 lines.each_with_index do | line, i | 548 if line.index(search) != nil 549 start = i 550 break 551 end 552 end 553 raise ReportError,"Out of bound error for <#{buf}>" if lines[start+6]==nil 554 lines[start+6..-1].each do | line | 555 break if line.strip == "" 556 fields = line.split 557 push PositiveSite.new(fields) 558 end 559 num = size() 560 @buf = lines[start..start+num+7].join("\n") 561 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 569 def graph 570 graph_to_s(lambda { |site| "*" }) 571 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 580 def graph_omega 581 graph_to_s(lambda { |site| 582 symbol = "*" 583 symbol = site.omega.to_i.to_s if site.omega.abs <= 10.0 584 symbol 585 }) 586 end
graph_seq()
click to toggle source
Graph of amino acids of first sequence at locations
# File lib/bio/appl/paml/codeml/report.rb 589 def graph_seq 590 graph_to_s(lambda { |site | 591 symbol = site.aaref 592 symbol 593 }) 594 end
to_s()
click to toggle source
Return the positive selection information as a String
# File lib/bio/appl/paml/codeml/report.rb 597 def to_s 598 @buf 599 end