[Biojava-l] implementing writeSequence for EMBL/Genbank

Emig, Robin Robin.Emig@maxygen.com
Wed, 21 Feb 2001 11:55:40 -0800

As EmblLikeFormat is generic how is writeSequence to know whether (and
how) to write EMBL or SwissProt etc? The writeSequence method is not
parameterized to accept a formatting object. If this were done at the
constructor it would impinge on sequence reading, which does just fine
without help from other classes. Anyway, a formatting object for a
format object doesn't seem very elegant.

Matt has suggested splitting the SequenceFormat interface into two;
one for reading, one for writing. I don't know enough about design to
judge the merits of this in the long term. As a naive user of BioJava
I quite like the one-stop SequenceFormat which knows all about
reading/writing its own data; "it does exactly what it says on the
tin". But maybe I'm wrong...

--- I think we should have one interface for reading and writing the same
format. If you read the format, you should be able to write the format right
back. Most likley the reader author is going to be the writer author as
 If there are two "variants" to the sequence format, we should have two
classes that read/write the two different variants. I think this may
simplify the problem later on when you come up against the "Derwent" EMBL
like format or the "Monsanto" internal EMBL like format.