[Biojava-l] Unexpected IllegalSymbolException

Ashwin Hajarnavis ah3 at sanger.ac.uk
Wed Sep 15 17:20:10 EDT 2004


I have the code below, where dinucs is a Symbol[] containing symbols from
a DNA x DNA alphabet.



...

System.out.println("only see this when there's an N");
System.out.println(seq.getAlphabet().getName());
int r = rand.nextInt(16);
Edit e = new Edit(i,seq.getAlphabet(), dinucs[r]);
seq.edit(e);
index[i] = r;

...


The code returns

[untrusted21:~/Java_src/ah3/apps] ashwin% java PAjHMMA --model
~/Projects/jHMM/C.elegans_PolyA.D --file ~/Projects/jHMM/TESTING/N.dna
>Y119D3B.4

only see this when there's an N

(DNA x DNA)
Exception in thread "main" org.biojava.bio.symbol.IllegalSymbolException:
Symbol (guanine cytosine) not found in alphabet (DNA x DNA)
        at
org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278)
        at
org.biojava.bio.symbol.SimpleSymbolList.<init>(SimpleSymbolList.java:140)
        at org.biojava.bio.symbol.Edit.<init>(Edit.java:66)
        at ah3.DP.SequenceUtils.Dnumerify(SequenceUtils.java:90)
        at PAjHMMA.main(PAjHMMA.java:55)




I am confused by this, as the symbol stated in the exception DOES appear
to be part of the DNA x DNA alphabet.

Any ideas?

Thanks
Ashwin


---
Ashwin Hajarnavis,
Informatics Research Group,
Sanger Institute,
Cambridgeshire,
CB10 1SA

+44 (0) 1223 494820

ah3 at sanger.ac.uk


More information about the Biojava-l mailing list