>From the exception trace it looks as though Viterbi thinks you are using a DnaAlphabet when in fact you have a custom one. However without seeing your code it's hard to tell if this is a bug in BioJava, or a problem in the way Viterbi has been called.
Could you provide a sample method which shows (a) how you construct the alphabet, (b) creating the Hmm with it, (c) reading the alignment file, and (d) passing it to Viterbi. It doesn't have to be very complicated or intricate as long as it shows what you are doing and produces similar exceptions. cheers, Richard Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Fabian Schreiber > Sent: Thursday, May 19, 2005 12:17 AM > To: biojava-l@biojava.org > Subject: [Biojava-l] How to read in an aligment and then start viterbi > > > Hello! > I created a Hmm with an Alphabet, that > contains 9 different Proteins such as ALA, ARG, etc. > After i created this model, i want to read in an > aligment from a file and start Viterbi with the aligment as input. > When i do so, i always get the following error: > [code] > org.biojava.bio.symbol.IllegalSymbolException: Symbol ARG not > found in > alphabet DnaAlphabet > at > org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlpha > bet.java:278) > at > org.biojava.bio.symbol.LinearAlphabetIndex.indexForSymbol(Line > arAlphabetIndex.java:117) > at > org.biojava.bio.dist.SimpleDistribution.getWeightImpl(SimpleDi > stribution.java:131) > at > org.biojava.bio.dist.AbstractDistribution.getWeight(AbstractDi > stribution.java:197) > at > org.biojava.bio.dp.ScoreType$Probability.calculateScore(ScoreT > ype.java:54) > at > org.biojava.bio.dp.onehead.SingleDP.getEmission(SingleDP.java:100) > at > org.biojava.bio.dp.onehead.SingleDP.viterbi(SingleDP.java:553) > at > org.biojava.bio.dp.onehead.SingleDP.viterbi(SingleDP.java:488) > [/code] > > It looks as if the alphabets (one from the hmm and the other from the > alignment) differ, but i debugged it carefully and also checked > the indices of both alphabets, which are equal, but could not find > a problem. > Is it a bug? > Did anyone of you experienced a similiar problem? > > Can someone help me please? > > Its really important. > > Thanks a lot > > Greetings > > Fabian > > _______________________________________________ > Biojava-l mailing list - Biojava-l@biojava.org > http://biojava.org/mailman/listinfo/biojava-l > _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l