Class: Bio::PAML::Codeml::Report

Inherits:
Bio::PAML::Common::Report show all
Defined in:
lib/bio/appl/paml/codeml/report.rb

Overview

Description

A simple class for parsing codeml output.

WARNING: This data is parsed using a regex from the output file, and so will take the first result found. If using multiple tree’s, your milage may vary. See the source for the regular expressions.

require ‘bio’

report = Bio::PAML::Codeml::Report.new(File.open(codeml_output_file).read) report.gene_rate # => Rate of gene evolution as defined be alpha report.tree_lengh # => Estimated phylogetic tree length

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(codeml_report) ⇒ Report

Returns a new instance of Report.



39
40
41
42
43
44
# File 'lib/bio/appl/paml/codeml/report.rb', line 39

def initialize(codeml_report)
  @tree_log_likelihood = pull_tree_log_likelihood(codeml_report)
  @tree_length = pull_tree_length(codeml_report)
  @alpha = pull_alpha(codeml_report)
  @tree = pull_tree(codeml_report)
end

Instance Attribute Details

#alphaObject (readonly)

Returns the value of attribute alpha.



37
38
39
# File 'lib/bio/appl/paml/codeml/report.rb', line 37

def alpha
  @alpha
end

#treeObject (readonly)

Returns the value of attribute tree.



37
38
39
# File 'lib/bio/appl/paml/codeml/report.rb', line 37

def tree
  @tree
end

#tree_lengthObject (readonly)

Returns the value of attribute tree_length.



37
38
39
# File 'lib/bio/appl/paml/codeml/report.rb', line 37

def tree_length
  @tree_length
end

#tree_log_likelihoodObject (readonly)

Returns the value of attribute tree_log_likelihood.



37
38
39
# File 'lib/bio/appl/paml/codeml/report.rb', line 37

def tree_log_likelihood
  @tree_log_likelihood
end