[Biojava-dev] Bug in SeqIOTools

Schreiber, Mark mark.schreiber at agresearch.co.nz
Tue Mar 4 14:32:39 EST 2003


Hi -

The new way of getting an int to identify your file type in SeqIOTools
is somewhat buggy. The problem seems to stem from the use of the method
SeqIOTools.identifyFormat(String formatName, String alphabetName) this
method returns an int by doing some bitwise operations that should equal
one of the constants in SeqIOConstants.

There seems to be a problem however with formats like Genbank. If you
supply the formatName "genbank" then the DNA alphabet is implied however
you have to give a alphabetName as an argument. If you give the name DNA
then the returned in no longer mathces the SeqIOConstants value for
GenBank so you can't use fileToBioJava() type methods ie it doesn't
recognize the genbank | dna operation. If you use an empty string for
the alphabetName if defaults to "Unknown" which again won't work. If you
put null as the secong argument you get a null pointer exception.

To be really robust we should probably have an overloaded
identifyFormat() method that takes either, just the format name and
complains if it really needs an alphabet (like for Fasta) and one that
takes two and complains if your combination makes no sense eg GenBank
and RNA or something. We need to at least get it working before 1.3

Any thoughts?

- Mark


Mark Schreiber PhD
Bioinformatics
AgResearch Invermay
PO Box 50034
Mosgiel
New Zealand
 
PH:   +64 3 489 9175
FAX:  +64 3 489 3739

=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================



More information about the biojava-dev mailing list