[Biojava-dev] Bug in PhredFormat??

Schreiber, Mark mark.schreiber at agresearch.co.nz
Thu Nov 27 15:18:08 EST 2003


Hi Frans -

I might be responsible for this. I haven't used the PhredFormat for a
while so this may have gone unoticed. I will fix it up as soon as I get
back to my main machine (after the weekend). Alternatively if you want
to post a fix to the list I'm sure someone can add it to CVS for you.

Thanks

Mark


-----Original Message-----
From: VERHOEF Frans [mailto:verhoeff2 at gis.a-star.edu.sg] 
Sent: Thursday, 27 November 2003 6:39 p.m.
To: biojava-dev at biojava.org
Subject: [Biojava-dev] Bug in PhredFormat??


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
=======================================================================
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