Class: Bio::PAML::Yn00

Inherits:
Common show all
Defined in:
lib/bio/appl/paml/yn00.rb,
lib/bio/appl/paml/yn00/report.rb

Overview

Description

Bio::PAML::Yn00 is a wrapper for running PAML yn00 program.

Because most of the methods in this class are inherited from Bio::PAML::Common, see documents of Bio::PAML::Common for details.

Examples

Example 1:

require 'bio'
# Reads multi-fasta formatted file and gets a Bio::Alignment object.
alignment = Bio::FlatFile.open(Bio::Alignment::MultiFastaFormat,
                               'example.fst').alignment
# Creates a Yn00 object
baseml = Bio::PAML::Yn00.new
# Sets parameters
baseml.parameters[:verbose] = 1
baseml.parameters[:icode] = 0
# You can also set many parameters at a time.
baseml.parameters.update({ :weighting => 0, :commonf3x4 => 0 })
# Executes yn00 with the alignment
report = yn00.query(alignment)

Defined Under Namespace

Classes: Report

Constant Summary collapse

DEFAULT_PROGRAM =

Default program name

'yn00'.freeze
DEFAULT_PARAMETERS =

Default parameters when running baseml.

The parameters whose values are different from the baseml defalut value (described in pamlDOC.pdf) in PAML 4.1 are:

seqfile, outfile, treefile, ndata, noisy, verbose
{
  # Essential argumemts
  :seqfile     => nil,
  :outfile     => nil,
  # Optional arguments
  :verbose     => 1,
  :icode       => 0,
  :weighting   => 0,
  :commonf3x4  => 0
}

Constants inherited from Common

Common::DEFAULT_PARAMETERS_ORDER

Instance Attribute Summary

Attributes inherited from Common

#command, #data_stdout, #exit_status, #output, #parameters, #report, #supplemental_outputs

Instance Method Summary collapse

Methods inherited from Common

#dump_parameters, #initialize, #load_parameters, #run, #set_default_parameters

Constructor Details

This class inherits a constructor from Bio::PAML::Common

Instance Method Details

#query(alignment) ⇒ Object

Runs the program on the internal parameters with the specified sequence alignment. Note that parameters and parameters are always modified.

For other important information, see the document of Bio::PAML::Common#query.


Arguments:

  • (required) alignment: Bio::Alignment object or similar object

Returns

Report object



83
84
85
# File 'lib/bio/appl/paml/yn00.rb', line 83

def query(alignment)
  super(alignment)
end

#query_by_string(alignment = nil) ⇒ Object

Runs the program on the internal parameters with the specified sequence alignment as a String object.

For other important information, see the document of query and Bio::PAML::Common#query_by_string methods.


Arguments:

  • (required) alignment: Bio::Alignment object or similar object

Returns

Report object



97
98
99
# File 'lib/bio/appl/paml/yn00.rb', line 97

def query_by_string(alignment = nil)
  super(alignment)
end