Sha256: caebb93e27cdeaf36acb631d993c47baf42604ce50beca92cc86ad09d1ff7587

Contents?: true

Size: 1.29 KB

Versions: 14

Compression:

Stored size: 1.29 KB

Contents

#
# test/unit/bio/appl/paml/codeml/test_report_single.rb - Unit test for Bio::PAML::Codeml::Report
#
# Copyright::  Copyright (C) 2008 Michael D. Barton <mail@michaelbarton.me.uk>
# License::    The Ruby License
#

# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5,
                            'bioruby_test_helper.rb')).cleanpath.to_s

# libraries needed for the tests
require 'test/unit'
require 'bio/appl/paml/codeml/report'

module Bio; module TestPAMLCodeml
class TestCodemlReport < Test::Unit::TestCase

  TEST_DATA = Pathname.new(File.join(BioRubyTestDataPath, 'paml', 'codeml')).cleanpath.to_s

  def setup
    str = File.read(File.join(TEST_DATA, 'output.txt'))
    @example_report = Bio::PAML::Codeml::Report.new(str)
  end

  def test_tree_log_likelihood
    assert_equal(-1817.465211, @example_report.tree_log_likelihood)
  end

  def test_tree_length
    assert_equal(0.77902, @example_report.tree_length)
  end

  def test_alpha
    assert_equal(0.58871, @example_report.alpha)
  end

  def test_tree
    tree = "(((rabbit: 0.082889, rat: 0.187866): 0.038008, human: 0.055050): 0.033639, goat-cow: 0.096992, marsupial: 0.284574);"
    assert_equal(tree, @example_report.tree)
  end

end

end; end #module TestPAMLCodeml; module Bio

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bio-2.0.5 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-2.0.4 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-2.0.3 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-2.0.2 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-2.0.1 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-2.0.0 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.6.0.pre.20181210 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.5.2 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.5.1 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.5.0 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.4.3.0001 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.4.3 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.4.2 test/unit/bio/appl/paml/codeml/test_report_single.rb
bio-1.4.1 test/unit/bio/appl/paml/codeml/test_report_single.rb