[Biojava-l] Bug in SeqIOTools.writeSwissProt() method?

Len Trigg len at reeltwo.com
Thu Jul 10 19:46:21 EDT 2003


Hi guys,

SeqIOTools.writeSwissprot(OutputStream, SequenceIterator) goes like
this:

    SequenceFormat former = new EmblLikeFormat();
    PrintStream ps = new PrintStream(os);
    while (in.hasNext()) {
        former.writeSequence(in.nextSequence(), ps);
    }

and EmblLikeFormat.writeSequence(Sequence, PrintStream) does one of
these:

   writeSequence(seq, getDefaultFormat(), os);

but getDefaultFormat() returns "EMBL".

I'm not sure what the actual differences between these formats is, but
I would imagine that writeSwissprot should be explicitly setting the
format to "SWISSPROT".


A related note, I was hoping that if I annotated a sequence with a
Taxon keyed off OrganismParser.PROPERTY_ORGANISM, the Swissprot format
would magically convert this to OC and OS output lines, but nay. If I
want this to happen, is extending SwissprotFileFormer the right way to
go about it? Does anybody actually link Sequences with Taxons?


Cheers,
Len.


More information about the Biojava-l mailing list