[Biojava-l] Creating a dp object for a profile HMM (2)

Matthew Pocock matthew_pocock at yahoo.co.uk
Fri Jul 11 18:38:15 EDT 2003


If you go to transitionsTo(), aprox line 666, you will see the text:

workingSet.add(i);

This should read

workingSet.add(i.next());

This removes your infinite loop.

There is an efficiency problem somewhere - stateList is being called 
once per itteration, which is slow for complex models. I will see if 
there is an easy way to get rid of this.

Matthew

Matthew Pocock wrote:
> Mmm. That's the topological sort of the states. It makes sure that when 
> the DP recursion does a foreach(state), it loops over them in an order 
> whereby all info is calculated that a state needs before it is reached. 
> I am fairly sure that the body of the stateList() method can't infinite 
> loop - all loops are bounded - iterators over finite lengthed lists.
> 
> Hang on - transtionsTo() could be the culprit. This could be getting 
> stuck in an infinite loop in some condition we didn't think of. If you 
> put some debug System.err.println statements in there, what happens?
> 
> Matthew



More information about the Biojava-l mailing list