[Bioperl-l] arbitrary hashes, blast, statistics, parameters, and java interoperability

Chad Matsalla chad at dieselwurks.com
Fri May 14 00:52:05 EDT 2004


Greetings all,

I am writing a web service that provides Bio::Search::Result objects to
a Java client. Yes, this does work and yes, it is very kewl.

I created UML models for all of the components required to produce a
Bio::Search::Result (Bio::Seq, Bio::HitI, etc) and used a code
generation system to create Java classes that match. Would you like me
to contribute this UML model (XMI format) to the project? I notice that
the UML for Bioperl is a bit... dated.

Anyway...

I tell a Java client to ask for a Bio::Search::Result from a SOAP::Lite
service. This works, until...

The _statistics and _parameters attributes of a Bio::Search::Result
object are hashes.  Although Java has a corresponding Hashtable class,
it is not smart enough to deserialize a perl hash in an efficient,
hack-free manner.

I propose creating a SearchStatistics module that would hold these
statistics and a SearchParameters object that would hold the parameters.

I understand that hashes are used when you need an arbitrary data
structure. At least in the case of Blast we know what the keys in a
statistics and parameters hashtable are going to be so why not have
objects?

At this time, I really only care about Blast results. Does anybody see
why I should not change those two parameters to refer to objects rather
then hashes in the Blast parts of the SearchIO subsystem?

In the case that I create, for example, a SearchStatistics object I
think that code based on the fact that _statistics is a hash would not
break because _statistics is still a hash- it is just an object hash.

Can anybody suggest what package these modules should belong to?

I'm very eager to do this so unless there are reasonable objections I
will do it this weekend. If it suddenly breaks tests or something I can
undo it.

I have invested significant time in Java<->BioPerl interoperability over
web services and if anybody is interested in my work just give me a
shout (ISMB/BOSC?).

Thanks!

Chad Matsalla



More information about the Bioperl-l mailing list