Sha256: f8bb60220a884750ca9458e138ad3408f34827b9818eb1a1a1130a4b691c1535

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require 'test_helper'

puts "\n\neval_similarity test:"
class TestEvalSimilarity < Test::Unit::TestCase
  def test_process_pair_of_pwms
    IO.popen(Helpers.exec_cmd('eval_similarity','test/data/KLF4_f2.pat test/data/SP1_f1.pat')){|f|
      assert_equal "0.2420758234928527\n779.0\t11\n.>>>>>>>>>>\n>>>>>>>>>>>\n-1\tdirect\n", f.read
    }
  end
  def test_process_another_pair_of_pwms
    IO.popen(Helpers.exec_cmd('eval_similarity','test/data/SP1_f1.pat test/data/AHR_si.pat')){|f|
      assert_equal "0.0037332005973120955\n15.0\t11\n>>>>>>>>>>>\n.>>>>>>>>>.\n1\tdirect\n", f.read
    }
  end
  
  def test_recognize_orientation_of_alignment
    IO.popen(Helpers.exec_cmd('eval_similarity','test/data/SP1_f1_revcomp.pat test/data/SP1_f1.pat')){|f|
      assert_equal "1.0\n2033.0\t11\n>>>>>>>>>>>\n<<<<<<<<<<<\n0\trevcomp\n", f.read
    }
  end

  def test_process_custom_discretization
    IO.popen(Helpers.exec_cmd('eval_similarity','test/data/SP1_f1.pat test/data/KLF4_f2.pat -d 1')){|f|
      assert_equal "0.22754919499105544\n636.0\t11\n>>>>>>>>>>>\n.>>>>>>>>>>\n1\tdirect\n", f.read
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
macroape-3.3.3 test/eval_similarity_test.rb