Sha256: 33e2f7b746315e46468e66a0e59bf83f323eca9cc935a4c85a146f00a3d4b0b3

Contents?: true

Size: 1.15 KB

Versions: 15

Compression:

Stored size: 1.15 KB

Contents

#
# test/unit/bio/appl/meme/test_mast.rb - Unit test for Bio::Meme::Mast::Report
#
# Copyright::  Copyright (C) 2008 Adam Kraut <adamnkraut@gmail.com>
# 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/meme/mast/report'

module Bio
module TestMastReportData
  
  TEST_DATA = Pathname.new(File.join(BioRubyTestDataPath, 'meme')).cleanpath.to_s
  
  def self.example_mast_output
    File.join TEST_DATA, 'mast.out'
  end
  
end
class TestMastReport < Test::Unit::TestCase
  
  TEST_DATA = TestMastReportData::TEST_DATA
  
  def setup
    @report = Meme::Mast::Report.new(File.read(TestMastReportData.example_mast_output))
  end
  
  def test_report_has_motifs
    obj = @report.motifs.first
    assert_kind_of(Meme::Motif, obj)
  end
  
  def test_parse_hit_list_with_bad_data
    data = "#heres\n2 bad data lines\n"
    assert_raises(RuntimeError) { Meme::Mast::Report.new(data) }
  end
  
end # TestMastReport
end # Bio

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bio-2.0.5 test/unit/bio/appl/meme/mast/test_report.rb
bio-2.0.4 test/unit/bio/appl/meme/mast/test_report.rb
bio-2.0.3 test/unit/bio/appl/meme/mast/test_report.rb
bio-2.0.2 test/unit/bio/appl/meme/mast/test_report.rb
bio-2.0.1 test/unit/bio/appl/meme/mast/test_report.rb
bio-2.0.0 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.6.0.pre.20181210 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.5.2 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.5.1 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.5.0 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.4.3.0001 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.4.3 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.4.2 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.4.1 test/unit/bio/appl/meme/mast/test_report.rb
bio-1.4.0 test/unit/bio/appl/meme/mast/test_report.rb