[BioRuby] Bio::GO::GeneAssociation issue/fix and new unit test file

Ben Woodcroft donttrustben at gmail.com
Thu Apr 8 12:14:42 UTC 2010


Hi,

I had some problems parsing gene association files using Bio::Flatfile,
caused because the parser was attempting to use the split method on a nil.
The offending line was

@db_reference      = tmp[5].split(/\|/)  #

That seemed easy enough to fix, but then I noticed there wasn't any test
cases to test my changes against, so I made a new file
test/unit/db/test_go.rb, including a simulation of one that was giving me
problems. I've collected these changes in a new branch, and you can see the
difference using the new github compare interface at

http://github.com/wwood/bioruby/compare/36041377db...gene_association

Is there any reason that the variables that correspond to arrays in
GeneAssociation (@db_reference, @with, @db_object_synonym) are singular
names, and not plural? It would be simple to add a alias_method
db_references -> db_reference right?

I also don't agree that the 'GO:' part of the identifier be chopped off by
default by the goid method - gene association files are not necessarily
concerned with GO - there are other ontologies out there as well. I
personally never look at GO identifiers without the 'GO:' bit, so I was
surprised when I saw that.

Sound OK?
Thanks,
ben



More information about the BioRuby mailing list