[Biojava-dev] SeqIOTools problems
Keith James
kdj at sanger.ac.uk
Tue Apr 8 17:43:39 EDT 2003
>>>>> "Kalle" == Kalle Näslund <kalle.naslund at genpat.uu.se> writes:
Kalle> Hi/Hello/Hej/Hola! Seems i have some problems with
Kalle> SeqIOTools. After my last CVS uppdate ( havent done one in
Kalle> quite a while i must admit ) i am having problems using
Kalle> SeqIOTools, i get exceptions thrown when using what have
Kalle> previously been working code. The problems seems to be
Kalle> related to some larger changes in the class. and
Kalle> deprecation of some parts of the api.( but as i understand
Kalle> the general convetion, deprecated methods should still work
Kalle> )
Yep. If it's deprecated and not working, that's a bug.
Kalle> So, the problems i get are when i use the following two
Kalle> methods togheter.
Kalle> int guessFileType(java.io.File seqFile ) java.lang.Object
Kalle> fileToBiojava(int fileType, java.io.BufferedReader br)
Kalle> What happens is that the first method, tries to guess the
Kalle> fileformat of the file, it then returns an integer
Kalle> representing the fileformat it think it is ( currently only
Kalle> based on filename ending ). But, this method isnt aware of
Kalle> the changes to the fileformat numbering scheme, so the
Kalle> number returned cant be used in the fileToBiojava( int
Kalle> fileType, java.io.BufferedReader br ) method call.
I assume the files which were failing were EMBL and/or Genbank? There
were a couple of cases where it was returning just the sequence format
bytes as you say. This was an oversight on my part. I have just fixed
them to return SeqIOConstants.EMBL_DNA or SeqIOConstants.GENBANK_DNA
(which are equal to SeqIOConstants.EMBL | SeqIOConstants.DNA and
SeqIOConstants.GENBANK | SeqIOConstants.DNA). There shouldn't be any
cases where the guessing code returns a value without the alphabet
bytes set.
Please let me know if there are further problems.
Keith
--
- Keith James <kdj at sanger.ac.uk> bioinformatics programming support -
- Pathogen Sequencing Unit, The Wellcome Trust Sanger Institute, UK -
More information about the biojava-dev
mailing list