For some reason, I am having trouble adding an AtomicSymbol as an  indexed
member of a SimpleAlphabet (i.e I can add it as a member of the alphabet,
but the method I use to add it doesn't create an indice for it).

e.g. I use 

        SimpleAlphabet() alph = new SimpleAlphabet();
        alph.setName("Protein Domains);
        ....
        //iterate over alphabet names ...
        AtomicSymbol symb = AlphabetManager.createSymbol(token, name, ann);
        alph.addSymbol(symb);
        
which works fine, however, when I try for some symbol symb1 added to  the
alphabet in the step above:
        
        AlphabetIndex alphindex =
                        AlphabetManager.getAlphabetIndex(alph);
System.out.println(alphindex.indexForSymbol(AtomicSymbol) symb1);

Then at run-time I am told that:
        org.biojava.bio.BioError: Assertion Failure: Symbol 110
was not an indexed member of the alphabet Protein Domains despite being in
the alphabet.



As an aside I'm not sure if I would be better of using IntegerAlphabet, as
the names of the members of the alphabet are integers (representing Pfam
protein domains, indexed from 1 to 3600).  However, as far as I could
tell, IntegerAlphabet does not have a addSymbol() method, which meant that
I could not use it to construct a new alphabet.

Thanks in advance for any ideas.


Lachlan

_______________________________________________
Biojava-l mailing list  -  [EMAIL PROTECTED]
http://biojava.org/mailman/listinfo/biojava-l

Reply via email to