[Biojava-dev] Bug in PhredFormat??

VERHOEF Frans verhoeff2 at gis.a-star.edu.sg
Thu Nov 27 00:39:17 EST 2003


Hi, 

I think I might have discovered a little bug. I used the latest version
from CVS.

 

This is what I tried to do:

 

StreamReader qualityIter = PhredTools.readPhredQuality( new
BufferedReader( new FileReader( qualityFile ) ) );

 

Where qualityFile is a File object pointing to an existing phred
quality-score fasta file. It compiles fine, but when I run it I get the
following Exception:

 

Exception

java.lang.ClassCastException

        at
org.biojava.bio.seq.io.StreamReader.<init>(StreamReader.java:130)

        at
org.biojava.bio.program.phred.PhredTools.readPhredQuality(PhredTools.jav
a:234)

        at
org.gis.server.pipeline.apps.SequenceInfoParser.parseResults(SequenceInf
oParser.java:67)

        at
org.gis.server.pipeline.apps.SequenceInfoParser.start(SequenceInfoParser
.java:52)

        at
org.gis.server.pipeline.apps.SequenceInfoParser.main(SequenceInfoParser.
java:133)

 

When checking the line 130 in StreamReader I find the following line:

 

 
((org.biojava.utils.ParseErrorSource)(this.format).addParseErrorListener
(this);

 

Where format is a PhredFormat class.

When checking out PhredFormat, I did find out that PhredFormat is not
implementing the ParseErrorSource. 

So I assume implementing the ParseErrorSource for PhredFormat would
solve the problem. If you want I can do it myself, though I do not have
a cvs account.

 

Kind regards,

 

Frans Verhoef

Bioinformatics Specialist

Genome Institute of Singapore

Genome, #02-01, 60 Biopolis Street, Singapore 138672

Tel: +65 6478 8000

DID: +65 6478 8060

HP: +65 9848 4325

Email: verhoeff2 at gis.a-star.edu.sg

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://portal.open-bio.org/pipermail/biojava-dev/attachments/20031127/c2b3885c/attachment.htm


More information about the biojava-dev mailing list