[Biojava-l] Is FullHmmerProfileHMM (or FlatModel) Broken?

Todd Riley toddri at eden.rutgers.edu
Thu Feb 9 22:42:44 EST 2006


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



More information about the Biojava-l mailing list