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

Mitsuteru C. Nakao nakao at dev.open-bio.org
Mon Jul 16 19:21:35 UTC 2007


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

Modified Files:
	test_report.rb 
Log Message:
* Fixed go terms parsing in the raw format. (Thanks ngoto-san).


Index: test_report.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan/test_report.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_report.rb	22 Feb 2007 10:15:01 -0000	1.4
--- test_report.rb	16 Jul 2007 19:21:33 -0000	1.5
***************
*** 213,229 ****
        @obj = []
        while line = test_raw.gets
!         if entry != '' and entry.split("\t").first == line.split("\t").first
            entry << line
!         elsif entry != ''
            @obj << Bio::Iprscan::Report.parse_in_raw(entry)
!           entry = line
          else
            entry << line
          end
        end
      end
      
      def test_obj
!       assert_equal(2, @obj.size)
      end
      
--- 213,230 ----
        @obj = []
        while line = test_raw.gets
!         if entry.split("\t").first == line.split("\t").first
            entry << line
!         elsif entry != '' and entry.split("\t").first != line.split("\t").first
            @obj << Bio::Iprscan::Report.parse_in_raw(entry)
!           entry = ''
          else
            entry << line
          end
        end
+       @obj << Bio::Iprscan::Report.parse_in_raw(entry)
      end
      
      def test_obj
!       assert_equal(3, @obj.size)
      end
      
***************
*** 293,297 ****
  
      def test_match_go_terms
!       assert_equal(["Molecular Function:RNA binding (GO:0003723)"], @obj.first.matches.first.go_terms)
      end
  
--- 294,301 ----
  
      def test_match_go_terms
!       ary = ["Biological Process:phosphorylation (GO:0016310)", 
!              "Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772)"]
!       assert_equal(ary,
!                    @obj.last.matches.last.go_terms)
      end
  




More information about the bioruby-cvs mailing list