[Biojava-l] BioError from AlphabetManager

Keith James kdj@sanger.ac.uk
06 Jul 2001 15:01:45 +0100


Sorry to trouble the list with a big stacktrace, but I can't figure
this out (and it's not happened before):

I'm getting a BioError when translating an RNA sequence whose length
is not divisible by 3. As this is an error and I'm trying to catch the
expected Exception and warn the user that there is something wrong
with their CDS coordinates, but the BioError ploughs through the
defenses (as it should):

org.biojava.bio.symbol.IllegalSymbolException: Can't find symbol for [org.biojava.bio.symbol.AlphabetManager$WellKnownSymbol: thymine, org.biojava.bio.symbol.AlphabetManager$WellKnownSymbol: adenine, org.biojava.bio.symbol.AlphabetManager$WellKnownSymbol: uracyl]
        at org.biojava.bio.symbol.SimpleCrossProductAlphabet.getSymbolImpl (SimpleCrossProductAlphabet.java:182) (pc 39)
        at org.biojava.bio.symbol.AbstractAlphabet.getSymbol (AbstractAlphabet.java:134) (pc 174)
        at org.biojava.bio.symbol.AlphabetManager.expandMatches (AlphabetManager.java:541) (pc 140)
rethrown as org.biojava.bio.BioError: Assertion Failure: Couldn't create symbol.
        at org.biojava.bio.symbol.AlphabetManager.expandMatches (AlphabetManager.java:552) (pc 234)
        at org.biojava.bio.symbol.AlphabetManager.expandMatches (AlphabetManager.java:528) (pc 49)
        at org.biojava.bio.symbol.AlphabetManager.expandMatches (AlphabetManager.java:528) (pc 49)
        at org.biojava.bio.symbol.AlphabetManager.expandMatches (AlphabetManager.java:535) (pc 116)
        at org.biojava.bio.symbol.AlphabetManager.createSymbol(char,org.biojava.bio.Annotation,java.util.List,org.biojava.bio.symbol.Alphabet) (AlphabetManager.java:237) (pc 114)
        at org.biojava.bio.symbol.AbstractAlphabet.getSymbol (AbstractAlphabet.java:136) (pc 185)
        at org.biojava.bio.symbol.WindowedSymbolList.symbolAt (WindowedSymbolList.java:103) (pc 90)
        at org.biojava.bio.symbol.TranslatedSymbolList.symbolAt (TranslatedSymbolList.java:95) (pc 9)
        at org.biojava.bio.symbol.AbstractSymbolList.subStr (AbstractSymbolList.java:84) (pc 18)
        at org.biojava.bio.symbol.AbstractSymbolList$SubList.subStr (AbstractSymbolList.java:216) (pc 59)
        at org.biojava.bio.symbol.AbstractSymbolList$SubList.seqString (AbstractSymbolList.java:206) (pc 6)
        at uk.ac.sanger.psu.tigrwrite.TigrXMLDocBuilder.makeProteinCoding (TigrXMLDocBuilder.java:516) (pc 551)
        at uk.ac.sanger.psu.tigrwrite.TigrXMLDocBuilder.makeGeneList (TigrXMLDocBuilder.java:303) (pc 13)
        at uk.ac.sanger.psu.tigrwrite.TigrXMLDocBuilder.makeDocument (TigrXMLDocBuilder.java:168) (pc 284)
        at uk.ac.sanger.psu.tigrwrite.TigrWrite.write (TigrWrite.java:93) (pc 66)
        at uk.ac.sanger.psu.tigrwrite.TigrWrite.main (TigrWrite.java:60) (pc 42)

Any thoughts? I'm not familiar with a lot of the symbol code.

-- 

-= Keith James - kdj@sanger.ac.uk - http://www.sanger.ac.uk/Users/kdj =-
The Sanger Centre, Wellcome Trust Genome Campus, Hinxton, Cambs CB10 1SA