[Biojava-l] persistence for org.biojava.bio.seq and org.biojava.bio.symbol

Tom Oinn tmo@ebi.ac.uk
Thu, 27 Apr 2000 10:10:10 +0100


Gerald Loeffler wrote:
> 
> Hi!
> 
> Are there any opinions/experiences/implementations out there regarding
> the persistence of objects from the org.biojava.bio.seq and
> org.biojava.bio.symbol packages, most notably Sequence?!
> 
> E.g. imagine that a tool allows users to (interactively) create Sequence
> objects, complete with SymbolList, Features and Annotations.
> Additionally, Alignment objects might be constructed that make use of
> these Sequence objects. How are we to make the so created (highly
> complex) graph of objects persistent, such that all objects will be
> available in later invocations of the tool?

Surely the best way to store your data structure for later use by the
same tool (or other biojava based code) would be to serialize the
sequence object (either to disk or as a blob in oracle etc.). This is
trivial, platform independent (subject to use of biojava on that
platform) and pretty robust.

I would advise against storing any complex inter linked data structure
in a flat file if you can possibly avoid it. If you do want to store to
file in a way that isn't java specific, I'd suggest some non flat format
such as xml with xlink. That way you can easily retrieve your complex
data afterwards.

Hope this is of some help.

Tom

--
Using new ram-scoop infusion techniques, Undead Boars are twice as 
undead as, say, Windows NT or IRIX. I find Undead Boars to be an 
invaluable asset whether I'm hunting fierce animals or managing a 
massive heterogeneous network.