Sunday, July 18, 2010

Interim Report

All of the tests for BioRuby classes in bio/, bio/db/ and bio/lib/ are executed correctly, Covering about 90% of total lines.
Although Ruby 1.8.7 outputs some warning, They pass all the tests.
I have skipped other classes in bio/appl/ and bio/io, because of dependency on external library or web services.
I haven't worked on the tests for the classes in bio/shell/, since I don't understand how they are composed.

A test in bio/, bio/db/ and bio/sequence/ with Ruby 1.9.2 says that BioRuby has some errors about Compatibility of Float, String and methods.
However, almost the classes pass the tests.

Saturday, June 26, 2010


There is a unit test for Bio::MEDLINE.
I replaced it into new one.
New Bio::TestMEDLINE tests all of the methods in Bio::MEDLINE and use the same sample file.
It has 100% coverage to Bio::MEDLINE.

Sunday, June 20, 2010


There are 5 files witch don't have the files for unit test.

I skipped Bio::KEGG::Brite, It probably has the same methods as KEGGDB.

Bio::TestBioKEGGEXPRESSION outputs the following result now.
12 tests, 7 assertions, 6 failures, 5 errors
I checked the following error of them.
4) Error:
Errno::EDOM: Numerical argument out of domain - log10
    ./lib/bio/db/kegg/expression.rb:128:in `log10'
    ./lib/bio/db/kegg/expression.rb:128:in `logy_minus_logx'
    ./lib/bio/db/kegg/expression.rb:127:in `each'
    ./lib/bio/db/kegg/expression.rb:127:in `logy_minus_logx'
    ./lib/bio/db/kegg/expression.rb:99:in `down_regulated'
    test/unit/bio/db/kegg/test_expression.rb:77:in `test_down_regulated'
The reason is that test_down_regulated gives a negative value to Math.log10.

I skipped Bio::KEGG::KGML because it is just a wrapper class of REXML.

I haven't written Bio::KEGG::Common, Bio::KEGG::KEGGTAB and Bio::KEGG::Taxonomy (the latter two classes may not be so important.).


Bio::TestGo class tests almost all code in Bio::GO, Bio::GO::GeneAssociation and Bio::GO::External2GO.
It doesn't cover part of dag_edit_format_parser(str).
In addition, It outputs an error in "to_str" method of Bio::GO::GeneAssociation class, because the method doesn't assume empty value in each instance variable.


I made fake class witch has only a simple output method to test FormatterBase. The unit test class has the test for output method with the fake class.

It has a clss for a data source class connected by the adapter and a class witch is the interface. In addition, it has adapter class witch extends an adapter module. It tests Bio::Sequence::Adapter through the interface class.


It has two kinds of unit test.
TestBiosqlIO class in ts_biosql.rb connects and accesses MySQL, so It can tests a execution environment to test whether Bio::SQL works.
tc_biosql.rb has only a require statement of 'tc_biosql', I'm not understand how to use it.
Does it need to test only the logics of the methods in Bio::SQL with the fake class of the database.?


It is tested in Bio::NCBIDB::TestCommon. Bio::NCBIDBCommon class includes Bio::NCBIDB::Common. Instead of Bio::NCBIDB::Common, It is used in the unit test. This class has low coverage, because a sample entry used in it lacks a lot of fields. There are all the methods except for "locus" method,which is override in the child class.

its unit test tests the methods in Bio::GenBank, including the methods returning Bio::GenBank::Locus and Bio::Feature objects Should the sample file be simpler than now?

The coverage of this class is 100% It tests only the methods descripbed in the soruce class.(It dosen't test the inherited met hods from NCBIDB)

I didn't write the unit test, since it has the same methods as Bio::GenBank.
I didn't write the unit test, since it has the same methods as Bio::GenBank.