[Biojava-l] Creating a dp object for a profile HMM (2)
hlr02 at doc.ic.ac.uk
hlr02 at doc.ic.ac.uk
Thu Jul 10 17:55:35 EDT 2003
Hi,
I have narrowed down the problem in creating a dp object for a profile HMM to a
possible bug in the code below from the DP class. I could really use some help
here..
Thanks,
Henry Romijn
public static State[] stateList(MarkovModel mm)
throws IllegalSymbolException, IllegalTransitionException,
BioException {
// .....code here works ok
for (Iterator addStates = alpha.iterator(); addStates.hasNext(); ) {
Object state = addStates.next();
if (state instanceof MagicalState) {
emissionStates.add(0, state);
}
else if (state instanceof EmissionState) {
emissionStates.add(state);
}
else {
ListIterator checkOld = dotStates.listIterator();
int insertPos = -1;
while (checkOld.hasNext() && insertPos == -1) {
Object oldState = checkOld.next();
if (comp.compare(state, oldState) == comp.LESS_THAN) {
insertPos = checkOld.nextIndex() - 1;
}
}
if (insertPos >= 0) {
dotStates.add(insertPos, state);
}
else {
dotStates.add(state);
}
}
}
//......
}
Quoting hlr02 at doc.ic.ac.uk:
> Hi,
>
> After I have successfully created and initialized a profile HMM, I try to
> register the model with a new DP object as follows:
>
> DP dp = DPFactory.DEFAULT.createDP(profile);
>
> This causes the program to hang. Any ideas why this may not work?
>
> Thanks,
>
> Henry Romijn
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l at biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
>
More information about the Biojava-l
mailing list