Hello again,
I have attempted to move up from the ProfileHMM class to the HMMER
classes (FullHmmerProfileHMM and HmmerProfileHMM). However, I
immediately get an error when attempting to create the DP matrix passing
in the FullHmmerProfileHMM object.
java.lang.ClassCastException: org.biojava.bio.dp.SimpleDotState
at org.biojava.bio.dp.FlatModel.<init>(FlatModel.java:185)
at org.biojava.bio.dp.DP.flatView(DP.java:169)
at
org.biojava.bio.dp.DPFactory$DefaultFactory.createDP(DPFactory.java:52)
at BioJavaHMM.trainHmm(BioJavaHMM.java:840)
Here is the code from FlatModel.java in the ModelInState section:
if(t instanceof DotState) {
DotStateWrapper dsw = new DotStateWrapper(t);
addAState(dsw);
inModel.put(t, flatM);
toM.put(t, dsw);
toM.put(((Wrapper) t).getWrapped(), dsw);
<-------------line 185!!!!!!!!!
//System.out.println("Added wrapped dot state " +
dsw.getName());
} else if(t instanceof EmissionState) {
This code is a bit confusing, but t appears to be of type
SimpleDotState, which I do not believe can be cast to type Wrapper.
Also, should both lines 184 and 185 be executed?
Also, I found this in the source code as well:
//
// FIXME -- Matthew broked this... <--------line 243!!!!!!!!!
//
Does this mean that some functionality of FlatModel.java is broken?
Should the ModelInState (and thus the Hmmer classes) be avoided?
Any help would be greatly appreciated,
Todd
_______________________________________________
Biojava-l mailing list - Biojava-l@biojava.org
http://biojava.org/mailman/listinfo/biojava-l