Sha256: ea17961d3fbb4f595a6dc56fefbfc90f38e0b21e12c104e5b8535f520bb7b124
Contents?: true
Size: 1.43 KB
Versions: 3
Compression:
Stored size: 1.43 KB
Contents
require 'test_helper' class FindThresholdTest < Test::Unit::TestCase def test_process_several_pvalues pvalues = [] IO.popen(Helpers.exec_cmd('find_threshold', 'test/data/KLF4_f2.pat -p 0.001 0.0005'), &:read).lines.each{|line| pvalue, threshold, real_pvalue = line.strip.split("\t") pvalues << pvalue assert_equal Helpers.obtain_pvalue_by_threshold("test/data/KLF4_f2.pat #{threshold}"), real_pvalue } assert_equal pvalues, ['0.0005', '0.001'] end def test_process_one_pvalue pvalue, threshold, real_pvalue = IO.popen(Helpers.exec_cmd('find_threshold', 'test/data/KLF4_f2.pat -p 0.001'), &:read).strip.split("\t") assert_equal '0.001', pvalue assert_equal Helpers.obtain_pvalue_by_threshold("test/data/KLF4_f2.pat #{threshold}"), real_pvalue end def test_process_default_pvalue pvalue, threshold, real_pvalue = IO.popen(Helpers.exec_cmd('find_threshold','test/data/KLF4_f2.pat'), &:read).strip.split("\t") assert_equal '0.0005', pvalue assert_equal Helpers.obtain_pvalue_by_threshold("test/data/KLF4_f2.pat #{threshold}"), real_pvalue end def test_custom_discretization pvalue, threshold, real_pvalue = IO.popen(Helpers.exec_cmd('find_threshold','test/data/KLF4_f2.pat -d 100'), &:read).strip.split("\t") assert_equal '0.0005', pvalue assert_equal Helpers.obtain_pvalue_by_threshold("test/data/KLF4_f2.pat #{threshold} -d 100"), real_pvalue end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
macroape-3.3.2 | test/find_threshold_test.rb |
macroape-3.3.1 | test/find_threshold_test.rb |
macroape-3.3.0 | test/find_threshold_test.rb |