[BioRuby-cvs] bioruby/test/unit/bio/appl/iprscan test_report.rb, 1.3, 1.4

Mitsuteru C. Nakao nakao at dev.open-bio.org
Thu Feb 22 10:15:03 UTC 2007


Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan
In directory dev.open-bio.org:/tmp/cvs-serv15976/test/unit/bio/appl/iprscan

Modified Files:
	test_report.rb 
Log Message:
* Added list_of_interpro method.


Index: test_report.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan/test_report.rb,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_report.rb	22 Feb 2007 08:44:34 -0000	1.3
--- test_report.rb	22 Feb 2007 10:15:01 -0000	1.4
***************
*** 141,144 ****
--- 141,152 ----
      end
  
+     def test_match_status
+       assert_equal('T', @obj.matches.first.status)
+     end
+ 
+     def test_match_date
+       assert_equal(nil, @obj.matches.first.date)
+     end
+ 
      def test_match_match_start
        assert_equal(6, @obj.matches.first.match_start)
***************
*** 159,162 ****
--- 167,193 ----
  
  
+   class TestIprscanTxtEntryList < Test::Unit::TestCase
+     def setup
+       test_txt = Bio::TestIprscanData.txt_format.read.split(/\n\nSequence/)[0]
+       @obj = Bio::Iprscan::Report.parse_in_txt(test_txt)
+     end 
+     
+     def test_list_of_interpro
+       hsh = {"IPR008994"=>[12, 13, 14], 
+              "IPR000110"=>[0, 1, 2], 
+              "IPR003029"=>[3, 4, 5, 6, 7, 8, 9, 10, 11], 
+              "NULL"=>[15]}
+       assert_equal(hsh, @obj.list_of_interpro)
+     end
+ 
+     def test_list_of_interpro_match?
+       @obj.list_of_interpro.each do |ipr_id, indexes|
+         indexes.each do |index|
+           assert_equal(ipr_id, @obj.matches[index].ipr_id)
+         end
+       end
+     end
+   end # TestIprscanTxtEntryList
+ 
  
    class TestIprscanTxtReport < Test::Unit::TestCase
***************
*** 266,268 ****
--- 297,312 ----
  
    end
+ 
+   class TestIprscanReport < Test::Unit::TestCase
+     def setup
+       test_txt = Bio::TestIprscanData.txt_format.read.split(/\n\nSequence/)[0]
+       @obj = Bio::Iprscan::Report.parse_in_txt(test_txt)
+     end 
+ 
+     def test_to_raw
+ #      puts @obj.to_raw
+     end
+ 
+   end # TestIprscanReport
+ 
  end




More information about the bioruby-cvs mailing list