[Biojava-dev] Phred symbol deserialization

Eric Haugen ehaugen at u.washington.edu
Thu May 6 00:33:04 EDT 2004


There is still a case in which Phred symbol serialization is failing.
I'm getting a NullPointerException in the AlphabetManager function:
  private static Set expandMatches(Alphabet parent, List symList, List built) {
when deserializing Phred ambiguity symbols.  The Alphabet "parent" is null and gets dereferenced.

Reading symbol: [org.biojava.bio.symbol.AlphabetManager$WellKnownBasisSymbol at 1749757, org.biojava.bio.symbol.IntegerAlphabet$IntegerSymbol at 275] -> null
java.lang.NullPointerException
    at org.biojava.bio.symbol.AlphabetManager.expandMatches(AlphabetManager.java:861)
    at org.biojava.bio.symbol.AlphabetManager.expandMatches(AlphabetManager.java:848)
    at org.biojava.bio.symbol.AlphabetManager.expandMatches(AlphabetManager.java:855)
    at org.biojava.bio.symbol.AlphabetManager.createSymbol(AlphabetManager.java:482)
    at org.biojava.bio.symbol.SimpleBasisSymbol$SBSH.readResolve(SimpleBasisSymbol.java:64)

The names and classes of the two symList elements are:
[guanine adenine thymine cytosine]  org.biojava.bio.symbol.AlphabetManager$WellKnownBasisSymbol
0  org.biojava.bio.symbol.IntegerAlphabet$IntegerSymbol

which I think corresponds to the Phred ambiguity symbol:
PhredTools.getPhredSymbol( DNATools.n(), IntegerAlphabet.getInstance().getSymbol(0) );
I can deserialize such a symbol successfully only if one has already been initialized.

I have a kludgy workaround for my purposes but I don't understand the AlphabetManager system well enough yet to figure out a general solution.

Cheers,

Eric

-- 
Eric Haugen
University of Washington Genome Center



More information about the biojava-dev mailing list