[Biojava-l] Phred Sequence

David Waring dwaring at u.washington.edu
Fri Mar 7 11:47:25 EST 2003


I was using biojava 1.2. There seems to be a partial fix in biojava-live. I
just updated and rebuilt my biojava-live and when I use it I get a different
error. When I try to call getDNAAt(1) or getDNA() I get the following error
when there are ns

Exception in thread "main" java.lang.ClassCastException:
org.biojava.bio.symbol.
AlphabetManager$WellKnownBasisSymbol
        at
org.biojava.bio.program.phred.PhredTools.dnaSymbolFromPhred(PhredTool
s.java:89)
        at
org.biojava.bio.program.phred.PhredSequence.getDNAAt(PhredSequence.ja
va:107)
        at readPhred.main(readPhred.java:51)
{dwaring}sydney:%>

Looking at the PhredTools code the problem seems obvious. It is trying to
return an Atomic Symbol.

  public static final AtomicSymbol dnaSymbolFromPhred(Symbol phredSym)



> -----Original Message-----
> From: Schreiber, Mark [mailto:mark.schreiber at agresearch.co.nz]
> Sent: Wednesday, March 05, 2003 7:45 PM
> To: David Waring; biojava
> Subject: RE: [Biojava-l] Phred Sequence
>
>
> Hi -
>
> I was trying to replicate this error to fix it but I can't (has someone
> kindly fixed it for me??). The following code seems to work fine
>
>     System.out.println("Testing n symbol");
>     Symbol ambig = PhredTools.getPhredSymbol(DNATools.n(),
> IntegerAlphabet.getInstance().getSymbol(12));
>     System.out.println("Successfuly constructed "+ambig.getName());
>
> Producing
>
> Testing n symbol
> Successfuly constructed ([cytosine adenine thymine guanine] 12)
>
> Are you still having problems with this? Are you using BioJava live?
>
> - Mark
>
>
> > -----Original Message-----
> > From: David Waring [mailto:dwaring at u.washington.edu]
> > Sent: Thursday, 20 February 2003 4:20 p.m.
> > To: biojava
> > Subject: [Biojava-l] Phred Sequence
> >
> >
> > I am writing code to parse a .phd file and create a
> > PhredSequence. It is failing with an IllegalSymbolException
> > when I have an 'n' in the sequence. Do CrossProductAlphabets
> > only take AtomicSymbols?
> >
> > David
> >
> >
> > Exception in thread "main"
> > org.biojava.bio.symbol.IllegalSymbolException:
> > Token
> > `([cytosine adenine guanine thymine] 2)' does not appear as a
> > named symbol in al phabet `PHRED'
> >         at
> > org.biojava.bio.seq.io.NameTokenization.parseToken(NameTokenization.j
> > ava:105)
> >         at
> > org.biojava.bio.program.phred.PhredTools.getPhredSymbol(PhredTools.ja
> > va:162)
> > rethrown as org.biojava.utils.NestedError
> >         at
> > org.biojava.bio.program.phred.PhredTools.getPhredSymbol(PhredTools.ja
> > va:164)
> >         at
> > org.biojava.bio.program.phred.PhredTools.createPhred(PhredTools.java:
> > 142)
> >         at
> > edu.washington.genome.seqio.phd.PhredBuilder.makeSequence(PhredBuilde
> > r.java:238)
> >         at
> > org.biojava.bio.seq.io.StreamReader.nextSequence(StreamReader.java:10
> > 1)
> >         at readPhd.main(readPhd.java:45)
> >
> > _______________________________________________
> > Biojava-l mailing list  -  Biojava-l at biojava.org
> > http://biojava.org/mailman/listinfo/biojava-l
> >
> =======================================================================
> 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-l mailing list