[Biojava-l] problem with accessing the fasta format files written using biojava

Sarath sarath@decodon.com
Wed, 20 Jun 2001 15:52:08 +0200 (MEST)


hi
  has anybody encountered a problem while accessing files written in fasta
format using biojava .. following is a piece a code which i used
in a program to redirect a sequence to a text file and then when i try to
use the file it gives exceptions
while (stream.hasNext()) {
       
	    Sequence seq = stream.nextSequence();
        SequenceFormat seqFormat=new FastaFormat();
        PrintStream str = new PrintStream(System.out);
        seqFormat.writeSequence(seq, str);
        str.println(seq);
 }


when i get the output to the console i get an extra line  at the end of
the output like the one below
>htrA
MDNYRDENRTKGNENEVFLTKENDQSASYSARNVIHDQEKKKRGFGWFRPLLGGVIGGSL
ALGIYTFTPLGNHDSQDTAKQSSSQQQTQSVTATSTSSESKKSSSSSSAFKSEDSSKISD
MVEDLSPAIVGITNLQAQSNSSLFGSSSSDSSEDTESGSGSGVIFKKENGKAYIITNNHV
VEGASSLKVSLYDGTEVTAKLVGSDSLTDLAVLQISDDHVTKVANFGDSSDLRTGETVIA
IGDPLGKDLSRTVTQGIVSGVDRTVSMSTSAGETSINVIQTDAAINPGNSGGPLLNTDGK
IVGINSMKISEDDVEGIGFAIPSNDVKPIAEELLSKGQIERPYIGVSMLDLEQVPQNYQE
GTLGLFGSQLNKGVYIREVASGSPAEKAGLKAEDIIIGLKGKEIDTGSELRNILYKDAKI
GDTVEVKILRNGKEMTKKIKLDQKEEKTS
org.biojava.bio.seq.impl.SimpleSequence@2697a1
     

  well can anybody tell me why is this extra line coming and i guess it is
due to this the file isnt being read by a program normally accepts fasta
files.