Class | Bio::PAML::Codeml::Rates
In: | lib/bio/appl/paml/codeml/rates.rb
Parent: | DelegateClass(Array)

## 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 = Bio::PAML::Codeml::Rates.new(File.open(@tmp_dir + "/rates").read) site_rate.first[:freq] # => Number of times that column appears site_rate.[5][:rate] # => Estimated rate of evolution site_rate.last[:data] # => 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[:rate] <=> y[:rate] } # => Fastest evolving column site_rates.detect {|x| x[:freq] > 1 } # => Columns appearing more than once

### Methods

new

### Public Class methods

new(rates)

[Source]

        # File lib/bio/appl/paml/codeml/rates.rb, line 44
    44:       def initialize(rates)
    45:         super(parse_rates(rates))
    46:       end

[Validate]