[Biojava-l] Trouble writing Fasta

Alexander Churbanov achurbanov@yahoo.com
Wed, 5 Jun 2002 08:07:48 -0700 (PDT)


Hello,

   I hit some trouble writing sequence in a Fasta
format.
   The following method of FastaFormat class will
never satisfy its conditions:

    public void writeSequence(Sequence seq, String
format, PrintStream os)
	throws IOException
    {
	String requestedFormat = new String(format);
	boolean found = false;

	String [] formats = (String [])
getFormats().toArray(new String[0]);

	if (! found)
	    throw new IOException("Failed to write: an
invalid file format '"
				  + format
				  + "' was requested");

	writeSequence(seq, os);
    }

   I suppose here it needs to create Iterator of
allowed formats and scan through it.
   I am going to rewrite it and send to the list.

   Thanks,

   Alexander Churbanov




__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com