[Biojava-l] problems with the profilehmm demo

Mark Schreiber markjschreiber at gmail.com
Thu Aug 30 09:58:56 UTC 2007


Hi -

I have put the ChangeListeners back in and commited to CVS. Some quick tests
show everything seems to work (even Serialization!!). I will commit some
formal unit tests shortly. I will leave the bugzilla bug open until I have
some unit tests in place to make sure it doesn't happen again.

Thanks for your work in solving this bug.

Best regards,

- Mark

On 8/30/07, daniel.rohrbach at web.de <daniel.rohrbach at web.de> wrote:
>
>
> thanks a lot for the support. I had changed the code, if I'd have got
> access to the CVS.  When you changed the code, I will be very grateful if
> you can inform me . I need it for a work on a project for the university.
>
> Daniel
>
> > -----Ursprüngliche Nachricht-----
> > Von: "Mark Schreiber" <markjschreiber at gmail.com>
> > Gesendet: 29.08.07 16:36:38
> > An: "daniel.rohrbach at web.de" <daniel.rohrbach at web.de>
> > CC: biojava-l at lists.open-bio.org
> > Betreff: Re: [Biojava-l] problems with the profilehmm demo
>
>
> >
> > Just looked at the CVS on line. You are very likely correct.
> >
> > There used to be a listener for changes in the Alphabet but this was
> > mistakenly removed as it was thought to be redundant. A diff view is
> > here (
> http://code.open-bio.org/cgi/viewcvs.cgi/biojava-live/src/org/biojava/bio/symbol/LinearAlphabetIndex.java.diff?r1=1.12&r2=1.13&cvsroot=biojava
> )
> >
> > I will check it back in tomorrow unless some one beats me to it. A
> > JUnit test is also required to make sure this works.
> >
> > - Mark
> >
> > On 8/29/07, daniel.rohrbach at web.de <daniel.rohrbach at web.de> wrote:
> > > Hi all, hi Mark
> > >
> > > thanks for the fast Answer.
> > >
> > > I looked at the code and perhaps solved the problem.
> > >
> > > During initialisation of the ProfileHMM ( bevore method connectModel()
> is called ) the transWeights are set with SimpleDistributions sd. These sd
> again are initialized with an empty Alphabet (no symbol). (*)
> > >
> > > These Distributions keeps an indexer Object which is used during the
> training process where the exception occurs.
> > >
> > > because of (*) the number of indexed symbols is 0 (
> indexer.symbols.length == 0) and the
> (FiniteAlphabet)indexer.alphaRef.get() has length 0 too.
> > > (Indexer is of type LinearAlphabetIndex)
> > >
> > > When connectModel() is called the Alphabets ( which are the same as
> indexer.alphaRef ) are filled with some symbols (EmissionState, DotState
> ...) (**) BUT the indexer.symbols.length will not be changed (***).
> > >
> > > This causes the following exception:
> > > In SimpleDistribution.Trainer.trainImpl is a method called
> getWeights(). This will return a double list of length indexer.getAlphabet()
> which is the same of indexer.alphaRef. Because of (**) this will have a
> length n>0. So that the for loop in this piece of code runs from 0 to n.
> Here the exception occurs. indexer.symbolForIndex(i) (0<=i<n) cause the
> error because of (***) indexer.symbols are empty.
> > >
> > > I think it must be changed the symbols of the indexer Object in the
> connectModel() method too. But I'm not really sure because I didn't worked
> with biojava so long.
> > >
> > > I'm sorry for my bad English but I hope that I could help a little.
> > > Many greetings
> > > Daniel
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: "Mark Schreiber" <markjschreiber at gmail.com>
> > > > Gesendet: 28.08.07 16:28:23
> > > > An: "Daniel Rohrbach" <daniel.rohrbach at web.de>
> > > > CC: biojava-l at lists.open-bio.org
> > > > Betreff: Re: [Biojava-l] problems with the profilehmm demo
> > >
> > >
> > > >
> > > > Hi -
> > > >
> > > > This is a bug that has been submitted to bugzilla. Strangely it was
> > > > not an issue in the pre-releases of biojava.  I was kind of hoping
> > > > someone else would fix it but I guess I will have to find time to
> take
> > > > a look.
> > > >
> > > > - Mark
> > > >
> > > > On 8/28/07, Daniel Rohrbach <daniel.rohrbach at web.de> wrote:
> > > > > Hi all,
> > > > >
> > > > > i'm trying to run the  "How do I make a ProfileHMM" example but it
> doesn't want to work.  I copied the code to my program and when I start it I
> get the following exceptions:
> > > > >
> > > > > Exception in thread "main" java.lang.IndexOutOfBoundsException:
> Can't find symbol for index 0
> > > > >         at
> org.biojava.bio.symbol.LinearAlphabetIndex.symbolForIndex(
> LinearAlphabetIndex.java:106)
> > > > >         at
> org.biojava.bio.dist.SimpleDistribution$Trainer.trainImpl(
> SimpleDistribution.java:332)
> > > > >         at org.biojava.bio.dist.SimpleDistribution$Trainer.train(
> SimpleDistribution.java:306)
> > > > >         at
> org.biojava.bio.dist.SimpleDistributionTrainerContext.train(
> SimpleDistributionTrainerContext.java:126)
> > > > >         at biojavatests.HMMTest.main(HMMTest.java:71)
> > > > >
> > > > > The error occurs at mt.train(). It seems that there was no, wrong
> or empty alphabet set for the trainer that shall be used.
> > > > >
> > > > > here the link to the examplepage:
> http://biojava.org/wiki/BioJava:CookBook:DP:HMM
> > > > > any help on this topic?
> > > > >
> > > > > Thanks in advance
> > > > >
> __________________________________________________________________________
> > > > > Erweitern Sie FreeMail zu einem noch leistungsstärkeren
> E-Mail-Postfach!
> > > > > Mehr Infos unter http://produkte.web.de/club/?mc=021131
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> > > > > http://lists.open-bio.org/mailman/listinfo/biojava-l
> > > > >
> > > >
> > >
> > >
> > >
> _______________________________________________________________________
> > > Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate
> > > kostenlos testen.
> http://www.pc-sicherheit.web.de/startseite/?mc=022220
> > >
> > >
> > > _______________________________________________
> > > Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> > > http://lists.open-bio.org/mailman/listinfo/biojava-l
> > >
> >
>
>
> _____________________________________________________________________
> Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
>
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>




More information about the Biojava-l mailing list