Sha256: 522e69f3d174bb472787f26f421040291ca592198f22272e4312b749270982cd

Contents?: true

Size: 1.32 KB

Versions: 4

Compression:

Stored size: 1.32 KB

Contents

$: << File.expand_path(File.dirname(__FILE__) + '/../lib')
$: << File.expand_path('.')
path= File.expand_path(File.dirname(__FILE__) + '/../lib/bioruby-polyploid-tools.rb')

#puts path
require path
require "test/unit"

class TestPolyploidTools < Test::Unit::TestCase

  #Set up the paths
  def setup
    
  end
  
  def teardown
    
  end
  
  
  def test_default
 #   puts $LOAD_PATH
    assert(true, "Unit test test")
  end
  
  def test_snp_sequence
    snp = Bio::PolyploidTools::SNPSequence.parse("BS00068396_51,2A,CGAAGCGATCCTACTACATTGCGTTCCTTTCCCACTCCCAGGTCCCCCTA[T/C]ATGCAGGATCTTGATTAGTCGTGTGAACAACTGAAATTTGAGCGCCACAA")
    assert(snp.gene == "BS00068396_51" )
    assert(snp.chromosome == "2A")
   
    assert(snp.sequence_original == "CGAAGCGATCCTACTACATTGCGTTCCTTTCCCACTCCCAGGTCCCCCTA[T/C]ATGCAGGATCTTGATTAGTCGTGTGAACAACTGAAATTTGAGCGCCACAA")
    
    assert_equal(snp.position ,  51, "Position isnt parsed #{snp.position}")
    assert_equal(snp.original , "T", "ORiginal base not parsed, is #{snp.original}")
    assert_equal(snp.snp , "C")
    assert(snp.template_sequence == "CGAAGCGATCCTACTACATTGCGTTCCTTTCCCACTCCCAGGTCCCCCTAYATGCAGGATCTTGATTAGTCGTGTGAACAACTGAAATTTGAGCGCCACAA", "#{snp.template_sequence}!=CGAAGCGATCCTACTACATTGCGTTCCTTTCCCACTCCCAGGTCCCCCTAYATGCAGGATCTTGATTAGTCGTGTGAACAACTGAAATTTGAGCGCCACAA")
    #true
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bio-polyploid-tools-0.3.3 test/test_snp_parsing.rb
bio-polyploid-tools-0.3.1 test/test_snp_parsing.rb
bio-polyploid-tools-0.2.3 test/test_snp_parsing.rb
bio-polyploid-tools-0.1.0 test/test_snp_parsing.rb