[Biojava-l] Re: Biojava-l digest, Vol 1 #776 - 5 msgs
Matthew Pocock
matthew_pocock@yahoo.co.uk
Tue, 8 Oct 2002 19:07:43 +0100 (BST)
Hi,
HMM serialization (or persistance) seems to be an
ongoing problem for people. We (OK - I) wrote this
code a long time ago, back in the dark ages when I
didn't know much about programming. Does anyone want
to fix this mess once and for all, and write a HMM
persistance API? It sounds like that would be a realy
helpfull thing to have.
Matthew
--- Lachlan Coin <lc1@sanger.ac.uk> wrote: > Hi
>
> Having made a mistake in serialising HMMs before -
> are you writing your
> serialised object at several points in the code?
> Unless you write all of
> the models at the same point, they will not work
> when you read them back
> in.
>
> Cheers,
>
> Lachlan
>
> >
> > Message: 1
> > Subject: RE: [Biojava-l] Create DP object from
> profileHMM class file
> > Date: Tue, 8 Oct 2002 08:53:41 +1300
> > From: "Schreiber, Mark"
> <mark.schreiber@agresearch.co.nz>
> > To: "Tisanai" <T.Krisanathamakul@dcs.shef.ac.uk>,
> <biojava-l@biojava.org>
> >
> > Hi -
> >
> > The error is coming from the 64th line of your
> program (at
> > T_Zscore.main(T_Zscore.java:64))
> >
> > I can see two places that the error might be
> coming from but I need to
> > know which line is the 64th line of the program.
> >
> > Is it: ProfileHMM model = (ProfileHMM)
> ois_md.readObject();
> >
> > Or is it: dp[i] =
> DPFactory.DEFAULT.createDP(model);
> >
> >
> >
> > > -----Original Message-----
> > > From: Tisanai
> [mailto:T.Krisanathamakul@dcs.shef.ac.uk]
> > > Sent: Tuesday, 8 October 2002 2:40 a.m.
> > > To: biojava-l@biojava.org
> > > Subject: [Biojava-l] Create DP object from
> profileHMM class file
> > >
> > >
> > > Hi
> > >
> > > By this code I would like to create DP object
> from several
> > > phmm file.
> > >
> > > for(int
> i=0;i<md_out_lst.align.length;i++){
> > > String model_out_name =
> md_out_lst.align[i];
> > > File md_file = new File(model_out_name);
> > >
> > > FileInputStream fis_md = new
> FileInputStream(md_file);
> > > ObjectInputStream ois_md = new
> ObjectInputStream(fis_md);
> > > ProfileHMM model = (ProfileHMM)
> ois_md.readObject();
> > > ois_md.close();
> > > dp[i] =
> DPFactory.DEFAULT.createDP(model);
> > > }
> > >
> > > I found that it always stuck at the second
> file (i=2). If
> > > there is only one file in my list this code will
> work fine.
> > > But if there is more than one file in the list
> when it try to
> > > create the second dp object (dp[1]). This kind
> of error will
> > > shown out:
> > >
> > > org.biojava.bio.BioError: State d-15
> is known in
> > > states but is not listed in the transFrom table
> > > at
> > >
>
org.biojava.bio.dp.SimpleMarkovModel.transitionsFrom(SimpleMar
> > > kovModel.java:227)
> > > at
> > >
>
org.biojava.bio.dp.DP$HMMOrderByTransition.transitionsTo(DP.java:599)
> > > at
> > >
>
org.biojava.bio.dp.DP$HMMOrderByTransition.compare(DP.java:586)
> > > at org.biojava.bio.dp.DP.stateList(DP.java:123)
> > > at org.biojava.bio.dp.DP.update(DP.java:353)
> > > at
>
org.biojava.bio.dp.onehead.SingleDP.update(SingleDP.java:49)
> > > at org.biojava.bio.dp.DP.<init>(DP.java:377)
> > > at
>
org.biojava.bio.dp.onehead.SingleDP.<init>(SingleDP.java:41)
> > > at
> > >
>
org.biojava.bio.dp.DPFactory$DefaultFactory.createDP(DPFactory
> > .java:53)
> > > at T_Zscore.main(T_Zscore.java:64)
> > >
> > > How can I fix my code?
> > >
> > > Thank
> > > Tisanai
> > >
> > > _______________________________________________
> > > Biojava-l mailing list - Biojava-l@biojava.org
> > > http://biojava.org/mailman/listinfo/biojava-l
> > >
> >
>
=======================================================================
> > Attention: The information contained in this
> message and/or attachments
> > from AgResearch Limited is intended only for the
> persons or entities
> > to which it is addressed and may contain
> confidential and/or privileged
> > material. Any review, retransmission,
> dissemination or other use of, or
> > taking of any action in reliance upon, this
> information by persons or
> > entities other than the intended recipients is
> prohibited by AgResearch
> > Limited. If you have received this message in
> error, please notify the
> > sender immediately.
> >
>
=======================================================================
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com