class Bio::PAML::Codeml::Rates

Description

A simple class for parsing the codeml rates file.

WARNING: The order of the parsed data should be correct, however will not necessarily correspond to the position in the alignment. For instance codeml ignores columns that contains gaps, and therefore there will not be any estimated rate data.

Usage

site_rates = ::new(File.open(@tmp_dir + “/rates”).read) site_rate.first # => Number of times that column appears site_rate.[:rate] # => Estimated rate of evolution site_rate.last # => The content of the column, as a string

# This class delegates to an array, so will respond to all array methods site_rates.max {|x,y| x <=> y } # => Fastest evolving column site_rates.detect {|x| x > 1 } # => Columns appearing more than once

Public Class Methods

new(rates) click to toggle source
Calls superclass method
# File lib/bio/appl/paml/codeml/rates.rb, line 44
def initialize(rates)
  super(parse_rates(rates))
end