From mark.schreiber at agresearch.co.nz Wed Oct 1 01:54:22 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Wed Oct 1 01:52:24 2003 Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Message-ID: OK - I tracked it down to a bug in the EMBLFileFormer (which gets coopted for SwissProt writing). It assumed a DNA alphabet and therefore couldn't write protein in SwissProt format. I have checked it into CVS, I will port it back to the 1.3 branch of CVS shortly. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Wed 1/10/2003 1:25 a.m. To: Schreiber, Mark; biojava-l@biojava.org Cc: Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi Mark, I did also have an error with binary serialization. I was just trying to approach to problem from a different direction. B/c that also was a problem with finding / determining a protein symbol, i wondered if was coming from AlphabetManager rather than the Swissprot writing. I include below the code fragment along with the serialization error. Best regards, Mark. public static void main(String[] args) throws Exception{ File file = new File("c:\\temp\\sequence.ser"); String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( SeqIOConstants.SWISSPROT , new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); System.out.println("\nWriting Sequence object"); ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(file) ); out.writeObject( seq ); out.flush(); out.close(); System.out.println("\nReading Sequence object"); ObjectInputStream in = new ObjectInputStream( new FileInputStream(file) ); seq = (Sequence) in.readObject(); in.close(); } Writing Sequence object Reading Sequence object java.io.InvalidObjectException: Couldn't resolve symbol:ALA at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve(AlphabetManager.java:1480) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.test.SerializeTest.main(SerializeTest.java:38) Exception in thread "main" -----Original Message----- From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] Sent: Tuesday, September 30, 2003 6:28 AM To: msouthern@exsar.com; biojava-l@biojava.org Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi - I was a bit thrown off at first cause I thought you meant there was an error in binary serialization. There seems to be a problem with SwissProt writing. I've commited an addition to SeqIOToolsTest in biojava live that replicates the error but I haven't got time to track it down just yet. If some one else doesn't get it I'll probably find it tommorrow. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Tue 30/09/2003 10:45 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Appologies for following up on my own post. What follows is a simpler test than the serialization I attempted before. Consider the bit of code below and corresponding error message; For some reason, the protein sequence is being treated as a dna sequence. Is there something I am missing with respect to how AlphabetManager treats dna and protein alphabets? Any explainations would be most welcome. Thanks again, Mark. //------------------------------------------------------------------------ public static void main(String[] args) throws Exception{ String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava(SeqIOConstants.SWISSPROT ,new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, seq ); } org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in alphabet DNA at org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) at org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val idate(AlphabetManager.java:1423) at org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni zation.java:178) at org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz ation.java:191) at org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize Symbol(AlphabetManager.java:1276) at org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe nEmblFileFormer.java:337) at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not tokenizing at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:125) rethrown as org.biojava.bio.BioError: An internal error occurred processing symbols at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:137) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) at org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) at org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) at com.exsar.test.SerializeTest.main(SerializeTest.java:24) -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Monday, September 29, 2003 2:01 PM Cc: 'biojava-l@biojava.org' Subject: Sequence serialization exception I am getting the following exception when trying to serialize a protein sequence. I am using biojava 1.3. Can anyone please explain to me why? Many thanks, Mark. java.io.InvalidObjectException: Couldn't resolve symbol:SER at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve (AlphabetManager.java:1441) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.ViewSequence.readObject(ViewSequence.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:985) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:986) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.hdex.model.calc.Test.main(Test.java:104) _______________________________________________ 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. ======================================================================= ======================================================================= 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. ======================================================================= From Yudong.Sun at newcastle.ac.uk Thu Oct 2 14:31:58 2003 From: Yudong.Sun at newcastle.ac.uk (Y D Sun) Date: Thu Oct 2 14:29:47 2003 Subject: [Biojava-l] Annotation Serialization Message-ID: <3E0207605FF4864EBE508C1C634D698C37BB3B@bond.ncl.ac.uk> Hi, I want to send Annotation via Axis SOAP. Has biojave implemented any Annotation serializer, or is there any custom serializer for Annotation? Annotation has a method asMap() that returns a Map. AXIS can serializer Map. However, the Map of Annotation contains ArrayList objects that AXIS can't serialize. Here, the ArrayList is an array of String. Any simple solution for this problem? Thanks. George From mark.schreiber at agresearch.co.nz Thu Oct 2 22:12:41 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Thu Oct 2 22:10:40 2003 Subject: [Biojava-l] Annotation Serialization Message-ID: I'm pretty sure Annotation can Serialize to binary. Can AXIS cope with that? - Mark -----Original Message----- From: Y D Sun [mailto:Yudong.Sun@newcastle.ac.uk] Sent: Fri 3/10/2003 6:31 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] Annotation Serialization Hi, I want to send Annotation via Axis SOAP. Has biojave implemented any Annotation serializer, or is there any custom serializer for Annotation? Annotation has a method asMap() that returns a Map. AXIS can serializer Map. However, the Map of Annotation contains ArrayList objects that AXIS can't serialize. Here, the ArrayList is an array of String. Any simple solution for this problem? Thanks. George _______________________________________________ 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. ======================================================================= From Yudong.Sun at newcastle.ac.uk Fri Oct 3 07:50:02 2003 From: Yudong.Sun at newcastle.ac.uk (Y D Sun) Date: Fri Oct 3 07:48:01 2003 Subject: [Biojava-l] Annotation Serialization Message-ID: <3E0207605FF4864EBE508C1C634D698C37BB3E@bond.ncl.ac.uk> Mark, Great! You made the thing totally straightforward. Annotation can be directly serialized into byte stream and sent via Axis. Thanks! George > -----Original Message----- > From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] > Sent: 03 October 2003 03:13 > To: Y D Sun; biojava-l@biojava.org > Subject: RE: [Biojava-l] Annotation Serialization > > > I'm pretty sure Annotation can Serialize to binary. Can AXIS > cope with that? > > - Mark > > -----Original Message----- > From: Y D Sun [mailto:Yudong.Sun@newcastle.ac.uk] > Sent: Fri 3/10/2003 6:31 a.m. > To: biojava-l@biojava.org > Cc: > Subject: [Biojava-l] Annotation Serialization > > > > Hi, > > I want to send Annotation via Axis SOAP. Has biojave > implemented any > Annotation serializer, or is there any custom > serializer for Annotation? > Annotation has a method asMap() that returns a Map. > AXIS can serializer > Map. However, the Map of Annotation contains ArrayList > objects that AXIS > can't serialize. Here, the ArrayList is an array of String. > > Any simple solution for this problem? > > Thanks. > > George > > _______________________________________________ > 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. > ============================================================== > ========= > From matthew_pocock at yahoo.co.uk Fri Oct 3 08:23:13 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Fri Oct 3 08:25:44 2003 Subject: [Biojava-l] Annotation Serialization In-Reply-To: <3E0207605FF4864EBE508C1C634D698C37BB3E@bond.ncl.ac.uk> References: <3E0207605FF4864EBE508C1C634D698C37BB3E@bond.ncl.ac.uk> Message-ID: <3F7D6A31.6070906@yahoo.co.uk> Y D Sun wrote: >Mark, > >Great! You made the thing totally straightforward. Annotation can be >directly serialized into byte stream and sent via Axis. > >Thanks! > >George > > That completely defeats the interoperability of web services - if we just pass arround serialised objects, then we can only talk to servers/clients using compattible java objects. I think what you need to do is write an Axis serializer / deserializer that understands lists and add that to your soap service - it seems odd that Axis doesn't come with one bundled like it does for Map. > > >>-----Original Message----- >>From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] >>Sent: 03 October 2003 03:13 >>To: Y D Sun; biojava-l@biojava.org >>Subject: RE: [Biojava-l] Annotation Serialization >> >> >>I'm pretty sure Annotation can Serialize to binary. Can AXIS >>cope with that? >> >>- Mark >> >> -----Original Message----- >> From: Y D Sun [mailto:Yudong.Sun@newcastle.ac.uk] >> Sent: Fri 3/10/2003 6:31 a.m. >> To: biojava-l@biojava.org >> Cc: >> Subject: [Biojava-l] Annotation Serialization >> >> >> >> Hi, >> >> I want to send Annotation via Axis SOAP. Has biojave >>implemented any >> Annotation serializer, or is there any custom >>serializer for Annotation? >> Annotation has a method asMap() that returns a Map. >>AXIS can serializer >> Map. However, the Map of Annotation contains ArrayList >>objects that AXIS >> can't serialize. Here, the ArrayList is an array of String. >> >> Any simple solution for this problem? >> >> Thanks. >> >> George >> >> _______________________________________________ >> 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 > > > From tmo at ebi.ac.uk Fri Oct 3 09:00:44 2003 From: tmo at ebi.ac.uk (Tom Oinn) Date: Fri Oct 3 08:55:40 2003 Subject: [Biojava-l] Annotation Serialization References: <3E0207605FF4864EBE508C1C634D698C37BB3E@bond.ncl.ac.uk> <3F7D6A31.6070906@yahoo.co.uk> Message-ID: <3F7D72FC.3040802@ebi.ac.uk> Matthew Pocock wrote: > I think what you need to do is write an Axis serializer / deserializer > that understands lists and add that to your soap service - it seems odd > that Axis doesn't come with one bundled like it does for Map. Um, it does. Either that or my lists have been magically sent by teams of subtle and secretive gnomes intercepting the attempts to create soap packets, which I have to admit is a possibility.... to be fair I'm not sure that axis is actually serializing List objects, but it's certainly returning them from call invocations so I'm guessing it is. tom http://taverna.sf.net From Yudong.Sun at newcastle.ac.uk Fri Oct 3 09:15:15 2003 From: Yudong.Sun at newcastle.ac.uk (Y D Sun) Date: Fri Oct 3 09:13:06 2003 Subject: [Biojava-l] Annotation Serialization Message-ID: <3E0207605FF4864EBE508C1C634D698CE08D62@bond.ncl.ac.uk> Can you send/receive a Map (via Axis) whose inner objects are List? George > -----Original Message----- > From: Tom Oinn [mailto:tmo@ebi.ac.uk] > Sent: 03 October 2003 14:01 > To: Matthew Pocock > Cc: Y D Sun; biojava-l@biojava.org > Subject: Re: [Biojava-l] Annotation Serialization > > > > > Matthew Pocock wrote: > > > I think what you need to do is write an Axis serializer / > deserializer > > that understands lists and add that to your soap service - > it seems odd > > that Axis doesn't come with one bundled like it does for Map. > > Um, it does. Either that or my lists have been magically sent > by teams > of subtle and secretive gnomes intercepting the attempts to > create soap > packets, which I have to admit is a possibility.... to be > fair I'm not > sure that axis is actually serializing List objects, but it's > certainly > returning them from call invocations so I'm guessing it is. > > tom > http://taverna.sf.net From alkw_1998 at yahoo.com Fri Oct 3 22:00:55 2003 From: alkw_1998 at yahoo.com (allanlee) Date: Sat Oct 4 00:08:35 2003 Subject: [Biojava-l] Programming hang while trying to do Profile HMM Message-ID: <20031004020055.75671.qmail@web14207.mail.yahoo.com> Hi, Good day! I am trying to follow the exmaple given in http://www.biojava.org/docs/bj_in_anger/profileHMM.htm but when I tried to run it, it just hang there. It hang there when I call: DP dp = DPFactory.DEFAULT.createDP(hmm); ------------------------------------------------------------------------------------------------------------------------------- import org.biojava.bio.seq.*; import org.biojava.bio.seq.db.*; import org.biojava.bio.dist.*; import org.biojava.bio.dp.*; import org.biojava.bio.symbol.*; import org.biojava.bio.seq.Sequence; public class PHMM { public PHMM() { try { /* * Make a profile HMM over the DNA Alphabet with 12 'columns' and default * DistributionFactories to construct the transition and emmission * Distributions */ ProfileHMM hmm = new ProfileHMM(DNATools.getDNA(), 12, DistributionFactory.DEFAULT, DistributionFactory.DEFAULT, "my profilehmm"); //create the Dynamic Programming matrix for the model. DP dp = DPFactory.DEFAULT.createDP(hmm); //Database to hold the training set //SequenceDB db = new HashSequenceDB(); //Load the training set //System.out.println("name=["+db.getName()+"]"); }catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { PHMM phmm = new PHMM(); System.out.println("exit"); } } ------------------------------------------------------------------------------------------------------------------------------- FYI, I am using the follow libraries: a)biojava-1.30-jdk14.jar b)bytecode-0.92.jar c)xerces Btw, as I am new to profileHMM, do you have more complete sample that I can work around?? I appreciate your help very very much!! Thanks! best regards, @llan --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search From matthew_pocock at yahoo.co.uk Sat Oct 4 10:15:43 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Sat Oct 4 10:18:24 2003 Subject: [Biojava-l] Programming hang while trying to do Profile HMM In-Reply-To: <20031004020055.75671.qmail@web14207.mail.yahoo.com> References: <20031004020055.75671.qmail@web14207.mail.yahoo.com> Message-ID: <3F7ED60F.9050404@yahoo.co.uk> Hi @llan, There was a bug in the 1.3 release that made this code infinite-loop. It's fixed in the nightly builds. Has anybody ported the fixes to DP back to the 1.3 branch? Is it time to make a maintainance release? Matthew allanlee wrote: >Hi, Good day! > >I am trying to follow the exmaple given in http://www.biojava.org/docs/bj_in_anger/profileHMM.htm > >but when I tried to run it, it just hang there. It hang there when I call: > >DP dp = DPFactory.DEFAULT.createDP(hmm); > >------------------------------------------------------------------------------------------------------------------------------- >import org.biojava.bio.seq.*; >import org.biojava.bio.seq.db.*; >import org.biojava.bio.dist.*; >import org.biojava.bio.dp.*; >import org.biojava.bio.symbol.*; >import org.biojava.bio.seq.Sequence; >public class PHMM >{ > public PHMM() > { > try > { > /* > * Make a profile HMM over the DNA Alphabet with 12 'columns' and default > * DistributionFactories to construct the transition and emmission > * Distributions > */ > ProfileHMM hmm = new ProfileHMM(DNATools.getDNA(), > 12, > DistributionFactory.DEFAULT, > DistributionFactory.DEFAULT, > "my profilehmm"); > //create the Dynamic Programming matrix for the model. > DP dp = DPFactory.DEFAULT.createDP(hmm); > //Database to hold the training set > //SequenceDB db = new HashSequenceDB(); > //Load the training set > //System.out.println("name=["+db.getName()+"]"); > }catch (Exception e) > { > e.printStackTrace(); > } > } > public static void main(String[] args) > { > PHMM phmm = new PHMM(); > System.out.println("exit"); > } >} >------------------------------------------------------------------------------------------------------------------------------- >FYI, I am using the follow libraries: > >a)biojava-1.30-jdk14.jar >b)bytecode-0.92.jar >c)xerces > >Btw, as I am new to profileHMM, do you have more complete sample that I can work around?? > >I appreciate your help very very much!! Thanks! > > >best regards, >@llan > > > >--------------------------------- >Do you Yahoo!? >The New Yahoo! Shopping - with improved product search > > >------------------------------------------------------------------------ > >_______________________________________________ >Biojava-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > > From t.waldminghaus at gmx.de Mon Oct 6 06:51:11 2003 From: t.waldminghaus at gmx.de (Torsten Waldminghaus) Date: Mon Oct 6 06:49:38 2003 Subject: [Biojava-l] RNA Secondary Structure Message-ID: <200310061251.11156.t.waldminghaus@gmx.de> Hi all, I just started to use BioJava and I like it very much - so thank you to all Developers because it saves me a lot of work. The idea to use a list of objects instead of a string sounds logical to me although it needs a while to get used to it. Concerning that I have a question: I want so save the secondary structure prediction of RNA Sequences together with the sequence itself. For that I use an notation of parenthesis and periods like this: ((((.....)))) (stands for a hairpinloop) So every nucleotide is represented by one point or parenthesis. The question I have is if it is clever to declarate all those points and parenthesis as a single Feature at a point Location or if there is a better way maybe by connecting a SymbolList of that structure whith the sequence or something like that. I would be gratefull for any comments and wish to have a nice day, Torsten One more thing: What is the difference between the mailgroups biojava-I ans biojava-dev? From msouthern at exsar.com Mon Oct 6 10:50:51 2003 From: msouthern at exsar.com (Mark Southern) Date: Mon Oct 6 10:48:51 2003 Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Message-ID: <000601c38c19$3d73dbe0$3c00000a@carta.local> Hi Mark, I have downloaded and tested the latest EmblFileFormer.java (1.24.2.1) and it can now successfully write out a swissprot format file after first having written it in (Thank you). However, i am still seeing an exception attempting to read in a serialized sequence. Test code and exception below. Best regards, Mark. //------------------------------------------ public static void main(String[] args) throws Exception{ File file = new File("c:\\temp\\sequence.ser"); String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( SeqIOConstants.SWISSPROT, new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); // this now works //SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, seq ); ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(file) ); out.writeObject( seq ); out.flush(); out.close(); ObjectInputStream in = new ObjectInputStream( new FileInputStream(file) ); // still get an error deserializing seq = (Sequence) in.readObject(); in.close(); } //------------------------------------------ org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in alphabet DNA at org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) at org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val idate(AlphabetManager.java:1423) at org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni zation.java:178) at org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz ation.java:191) at org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize Symbol(AlphabetManager.java:1276) at org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe nEmblFileFormer.java:337) at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not tokenizing at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:125) rethrown as org.biojava.bio.BioError: An internal error occurred processing symbols at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:137) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) at org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) at org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) at com.exsar.test.SerializeTest.main(SerializeTest.java:36) -----Original Message----- From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] Sent: Wednesday, October 01, 2003 1:54 AM To: msouthern@exsar.com; biojava-l@biojava.org Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? OK - I tracked it down to a bug in the EMBLFileFormer (which gets coopted for SwissProt writing). It assumed a DNA alphabet and therefore couldn't write protein in SwissProt format. I have checked it into CVS, I will port it back to the 1.3 branch of CVS shortly. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Wed 1/10/2003 1:25 a.m. To: Schreiber, Mark; biojava-l@biojava.org Cc: Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi Mark, I did also have an error with binary serialization. I was just trying to approach to problem from a different direction. B/c that also was a problem with finding / determining a protein symbol, i wondered if was coming from AlphabetManager rather than the Swissprot writing. I include below the code fragment along with the serialization error. Best regards, Mark. public static void main(String[] args) throws Exception{ File file = new File("c:\\temp\\sequence.ser"); String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( SeqIOConstants.SWISSPROT , new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); System.out.println("\nWriting Sequence object"); ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(file) ); out.writeObject( seq ); out.flush(); out.close(); System.out.println("\nReading Sequence object"); ObjectInputStream in = new ObjectInputStream( new FileInputStream(file) ); seq = (Sequence) in.readObject(); in.close(); } Writing Sequence object Reading Sequence object java.io.InvalidObjectException: Couldn't resolve symbol:ALA at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve (AlphabetManager.java:1480) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.test.SerializeTest.main(SerializeTest.java:38) Exception in thread "main" -----Original Message----- From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] Sent: Tuesday, September 30, 2003 6:28 AM To: msouthern@exsar.com; biojava-l@biojava.org Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi - I was a bit thrown off at first cause I thought you meant there was an error in binary serialization. There seems to be a problem with SwissProt writing. I've commited an addition to SeqIOToolsTest in biojava live that replicates the error but I haven't got time to track it down just yet. If some one else doesn't get it I'll probably find it tommorrow. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Tue 30/09/2003 10:45 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Appologies for following up on my own post. What follows is a simpler test than the serialization I attempted before. Consider the bit of code below and corresponding error message; For some reason, the protein sequence is being treated as a dna sequence. Is there something I am missing with respect to how AlphabetManager treats dna and protein alphabets? Any explainations would be most welcome. Thanks again, Mark. //------------------------------------------------------------------------ public static void main(String[] args) throws Exception{ String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava(SeqIOConstants.SWISSPROT ,new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, seq ); } org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in alphabet DNA at org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) at org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val idate(AlphabetManager.java:1423) at org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni zation.java:178) at org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz ation.java:191) at org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize Symbol(AlphabetManager.java:1276) at org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe nEmblFileFormer.java:337) at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not tokenizing at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:125) rethrown as org.biojava.bio.BioError: An internal error occurred processing symbols at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:137) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) at org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) at org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) at com.exsar.test.SerializeTest.main(SerializeTest.java:24) -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Monday, September 29, 2003 2:01 PM Cc: 'biojava-l@biojava.org' Subject: Sequence serialization exception I am getting the following exception when trying to serialize a protein sequence. I am using biojava 1.3. Can anyone please explain to me why? Many thanks, Mark. java.io.InvalidObjectException: Couldn't resolve symbol:SER at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve (AlphabetManager.java:1441) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.ViewSequence.readObject(ViewSequence.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:985) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:986) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.hdex.model.calc.Test.main(Test.java:104) _______________________________________________ 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. ======================================================================= ======================================================================= 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. ======================================================================= From mark.schreiber at agresearch.co.nz Mon Oct 6 17:31:38 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Mon Oct 6 17:29:26 2003 Subject: [Biojava-l] RNA Secondary Structure Message-ID: Hi - One way would be to make a Alphabet for the structure based on Symbols for the ((((....)))) characters. You could then make a cross product of that Alphabet and the RNA alphabet and make SymbolLists over that cross product Alphabet. Each Symbol would then have an RNA component and a structure component. I used this approach for Phred quality data (see org.biojava.bio.program.phred package). I would'nt mind helping with this (although I'm away for the next few days), it would make a great few examples for the biojava in Anger site. - Mark -----Original Message----- From: Torsten Waldminghaus [mailto:t.waldminghaus@gmx.de] Sent: Mon 6/10/2003 11:51 p.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] RNA Secondary Structure Hi all, I just started to use BioJava and I like it very much - so thank you to all Developers because it saves me a lot of work. The idea to use a list of objects instead of a string sounds logical to me although it needs a while to get used to it. Concerning that I have a question: I want so save the secondary structure prediction of RNA Sequences together with the sequence itself. For that I use an notation of parenthesis and periods like this: ((((.....)))) (stands for a hairpinloop) So every nucleotide is represented by one point or parenthesis. The question I have is if it is clever to declarate all those points and parenthesis as a single Feature at a point Location or if there is a better way maybe by connecting a SymbolList of that structure whith the sequence or something like that. I would be gratefull for any comments and wish to have a nice day, Torsten One more thing: What is the difference between the mailgroups biojava-I ans biojava-dev? _______________________________________________ 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. ======================================================================= From mark.schreiber at agresearch.co.nz Mon Oct 6 17:33:08 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Mon Oct 6 17:30:54 2003 Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Message-ID: Hi - Looks like the same problem from the other side. I'll have a look at it this afternoon. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Tue 7/10/2003 3:50 a.m. To: Schreiber, Mark; biojava-l@biojava.org Cc: Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi Mark, I have downloaded and tested the latest EmblFileFormer.java (1.24.2.1) and it can now successfully write out a swissprot format file after first having written it in (Thank you). However, i am still seeing an exception attempting to read in a serialized sequence. Test code and exception below. Best regards, Mark. //------------------------------------------ public static void main(String[] args) throws Exception{ File file = new File("c:\\temp\\sequence.ser"); String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( SeqIOConstants.SWISSPROT, new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); // this now works //SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, seq ); ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(file) ); out.writeObject( seq ); out.flush(); out.close(); ObjectInputStream in = new ObjectInputStream( new FileInputStream(file) ); // still get an error deserializing seq = (Sequence) in.readObject(); in.close(); } //------------------------------------------ org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in alphabet DNA at org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) at org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val idate(AlphabetManager.java:1423) at org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni zation.java:178) at org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz ation.java:191) at org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize Symbol(AlphabetManager.java:1276) at org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe nEmblFileFormer.java:337) at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not tokenizing at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:125) rethrown as org.biojava.bio.BioError: An internal error occurred processing symbols at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:137) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) at org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) at org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) at com.exsar.test.SerializeTest.main(SerializeTest.java:36) -----Original Message----- From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] Sent: Wednesday, October 01, 2003 1:54 AM To: msouthern@exsar.com; biojava-l@biojava.org Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? OK - I tracked it down to a bug in the EMBLFileFormer (which gets coopted for SwissProt writing). It assumed a DNA alphabet and therefore couldn't write protein in SwissProt format. I have checked it into CVS, I will port it back to the 1.3 branch of CVS shortly. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Wed 1/10/2003 1:25 a.m. To: Schreiber, Mark; biojava-l@biojava.org Cc: Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi Mark, I did also have an error with binary serialization. I was just trying to approach to problem from a different direction. B/c that also was a problem with finding / determining a protein symbol, i wondered if was coming from AlphabetManager rather than the Swissprot writing. I include below the code fragment along with the serialization error. Best regards, Mark. public static void main(String[] args) throws Exception{ File file = new File("c:\\temp\\sequence.ser"); String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( SeqIOConstants.SWISSPROT , new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); System.out.println("\nWriting Sequence object"); ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(file) ); out.writeObject( seq ); out.flush(); out.close(); System.out.println("\nReading Sequence object"); ObjectInputStream in = new ObjectInputStream( new FileInputStream(file) ); seq = (Sequence) in.readObject(); in.close(); } Writing Sequence object Reading Sequence object java.io.InvalidObjectException: Couldn't resolve symbol:ALA at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve (AlphabetManager.java:1480) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.test.SerializeTest.main(SerializeTest.java:38) Exception in thread "main" -----Original Message----- From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] Sent: Tuesday, September 30, 2003 6:28 AM To: msouthern@exsar.com; biojava-l@biojava.org Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi - I was a bit thrown off at first cause I thought you meant there was an error in binary serialization. There seems to be a problem with SwissProt writing. I've commited an addition to SeqIOToolsTest in biojava live that replicates the error but I haven't got time to track it down just yet. If some one else doesn't get it I'll probably find it tommorrow. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Tue 30/09/2003 10:45 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Appologies for following up on my own post. What follows is a simpler test than the serialization I attempted before. Consider the bit of code below and corresponding error message; For some reason, the protein sequence is being treated as a dna sequence. Is there something I am missing with respect to how AlphabetManager treats dna and protein alphabets? Any explainations would be most welcome. Thanks again, Mark. //------------------------------------------------------------------------ public static void main(String[] args) throws Exception{ String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava(SeqIOConstants.SWISSPROT ,new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, seq ); } org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in alphabet DNA at org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) at org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val idate(AlphabetManager.java:1423) at org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni zation.java:178) at org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz ation.java:191) at org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize Symbol(AlphabetManager.java:1276) at org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe nEmblFileFormer.java:337) at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not tokenizing at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:125) rethrown as org.biojava.bio.BioError: An internal error occurred processing symbols at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:137) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) at org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) at org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) at com.exsar.test.SerializeTest.main(SerializeTest.java:24) -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Monday, September 29, 2003 2:01 PM Cc: 'biojava-l@biojava.org' Subject: Sequence serialization exception I am getting the following exception when trying to serialize a protein sequence. I am using biojava 1.3. Can anyone please explain to me why? Many thanks, Mark. java.io.InvalidObjectException: Couldn't resolve symbol:SER at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve (AlphabetManager.java:1441) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.ViewSequence.readObject(ViewSequence.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:985) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:986) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.hdex.model.calc.Test.main(Test.java:104) _______________________________________________ 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. ======================================================================= ======================================================================= 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. ======================================================================= ======================================================================= 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. ======================================================================= From mark.schreiber at agresearch.co.nz Mon Oct 6 20:01:14 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Mon Oct 6 19:59:06 2003 Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Message-ID: Hi - I am not getting the exception you have below (which looks like one from before we fixed the EmblFileFormer). I am however getting an InvalidObjectException which is comming from something odd in the AlphabetManager. I'll have a look into it. java.io.InvalidObjectException: Couldn't resolve symbol:MET at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve(AlphabetManager.java:1480) - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Tue 7/10/2003 3:50 a.m. To: Schreiber, Mark; biojava-l@biojava.org Cc: Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi Mark, I have downloaded and tested the latest EmblFileFormer.java (1.24.2.1) and it can now successfully write out a swissprot format file after first having written it in (Thank you). However, i am still seeing an exception attempting to read in a serialized sequence. Test code and exception below. Best regards, Mark. //------------------------------------------ public static void main(String[] args) throws Exception{ File file = new File("c:\\temp\\sequence.ser"); String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( SeqIOConstants.SWISSPROT, new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); // this now works //SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, seq ); ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(file) ); out.writeObject( seq ); out.flush(); out.close(); ObjectInputStream in = new ObjectInputStream( new FileInputStream(file) ); // still get an error deserializing seq = (Sequence) in.readObject(); in.close(); } //------------------------------------------ org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in alphabet DNA at org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) at org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val idate(AlphabetManager.java:1423) at org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni zation.java:178) at org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz ation.java:191) at org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize Symbol(AlphabetManager.java:1276) at org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe nEmblFileFormer.java:337) at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not tokenizing at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:125) rethrown as org.biojava.bio.BioError: An internal error occurred processing symbols at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:137) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) at org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) at org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) at com.exsar.test.SerializeTest.main(SerializeTest.java:36) -----Original Message----- From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] Sent: Wednesday, October 01, 2003 1:54 AM To: msouthern@exsar.com; biojava-l@biojava.org Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? OK - I tracked it down to a bug in the EMBLFileFormer (which gets coopted for SwissProt writing). It assumed a DNA alphabet and therefore couldn't write protein in SwissProt format. I have checked it into CVS, I will port it back to the 1.3 branch of CVS shortly. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Wed 1/10/2003 1:25 a.m. To: Schreiber, Mark; biojava-l@biojava.org Cc: Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi Mark, I did also have an error with binary serialization. I was just trying to approach to problem from a different direction. B/c that also was a problem with finding / determining a protein symbol, i wondered if was coming from AlphabetManager rather than the Swissprot writing. I include below the code fragment along with the serialization error. Best regards, Mark. public static void main(String[] args) throws Exception{ File file = new File("c:\\temp\\sequence.ser"); String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( SeqIOConstants.SWISSPROT , new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); System.out.println("\nWriting Sequence object"); ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(file) ); out.writeObject( seq ); out.flush(); out.close(); System.out.println("\nReading Sequence object"); ObjectInputStream in = new ObjectInputStream( new FileInputStream(file) ); seq = (Sequence) in.readObject(); in.close(); } Writing Sequence object Reading Sequence object java.io.InvalidObjectException: Couldn't resolve symbol:ALA at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve (AlphabetManager.java:1480) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.test.SerializeTest.main(SerializeTest.java:38) Exception in thread "main" -----Original Message----- From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] Sent: Tuesday, September 30, 2003 6:28 AM To: msouthern@exsar.com; biojava-l@biojava.org Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Hi - I was a bit thrown off at first cause I thought you meant there was an error in binary serialization. There seems to be a problem with SwissProt writing. I've commited an addition to SeqIOToolsTest in biojava live that replicates the error but I haven't got time to track it down just yet. If some one else doesn't get it I'll probably find it tommorrow. - Mark -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Tue 30/09/2003 10:45 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Appologies for following up on my own post. What follows is a simpler test than the serialization I attempted before. Consider the bit of code below and corresponding error message; For some reason, the protein sequence is being treated as a dna sequence. Is there something I am missing with respect to how AlphabetManager treats dna and protein alphabets? Any explainations would be most welcome. Thanks again, Mark. //------------------------------------------------------------------------ public static void main(String[] args) throws Exception{ String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava(SeqIOConstants.SWISSPROT ,new BufferedReader( new FileReader( seqFile ) ) ); Sequence seq = iter.nextSequence(); SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, seq ); } org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in alphabet DNA at org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) at org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val idate(AlphabetManager.java:1423) at org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni zation.java:178) at org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz ation.java:191) at org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize Symbol(AlphabetManager.java:1276) at org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe nEmblFileFormer.java:337) at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not tokenizing at org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:125) rethrown as org.biojava.bio.BioError: An internal error occurred processing symbols at org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja va:137) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) at org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) at org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) at org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) at com.exsar.test.SerializeTest.main(SerializeTest.java:24) -----Original Message----- From: Mark Southern [mailto:msouthern@exsar.com] Sent: Monday, September 29, 2003 2:01 PM Cc: 'biojava-l@biojava.org' Subject: Sequence serialization exception I am getting the following exception when trying to serialize a protein sequence. I am using biojava 1.3. Can anyone please explain to me why? Many thanks, Mark. java.io.InvalidObjectException: Couldn't resolve symbol:SER at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve (AlphabetManager.java:1441) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) at org.biojava.bio.seq.ViewSequence.readObject(ViewSequence.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:985) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:986) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at com.exsar.hdex.model.calc.Test.main(Test.java:104) _______________________________________________ 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. ======================================================================= ======================================================================= 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. ======================================================================= ======================================================================= 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. ======================================================================= From alkw_1998 at yahoo.com Mon Oct 6 20:05:34 2003 From: alkw_1998 at yahoo.com (allanlee) Date: Mon Oct 6 21:23:30 2003 Subject: [Biojava-l] NoClassDefException Message-ID: <20031007000534.64801.qmail@web14204.mail.yahoo.com> Hi, Good day! I got a "NoClassDefFound" exception when I call: db = SeqIOTools.readFasta(is,alpha); -----------------------------------------excert from my code-------------------------------------------------- import java.io.*; import java.util.*; import org.biojava.bio.*; import org.biojava.bio.seq.*; import org.biojava.bio.seq.io.*; import org.biojava.bio.seq.db.*; import org.biojava.bio.dist.*; import org.biojava.bio.dp.*; import org.biojava.bio.symbol.*; import org.biojava.bio.seq.Sequence; ..... //setup file path + name String fileName="..\\input.txt"; BufferedInputStream is = new BufferedInputStream(new FileInputStream(fileName)); //get the appropriate alphabet:DNA,RNA, or PROTEIN Alphabet alpha = AlphabetManager.alphabetForName("PROTEIN"); //get a sequenceDB of all sequences in the file db = SeqIOTools.readFasta(is,alpha); ..... -----------------------------------------error message--------------------------------------------------------------- java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException at BiologicalSequence.PHMM.(PHMM.java:47) at BiologicalSequence.PHMM.main(PHMM.java:116) My observation is the missing class is from xerces.jar. I appreciate your advice pls! thnks & regards, @llan --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search From mark.schreiber at agresearch.co.nz Mon Oct 6 21:39:09 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Mon Oct 6 21:36:54 2003 Subject: [Biojava-l] NoClassDefException Message-ID: Hi - The missing JAR file is the jakarta regular expression library (required in biojava1.3 not required in biojava-live). You can get it from the biojava download page. - Mark -----Original Message----- From: allanlee [mailto:alkw_1998@yahoo.com] Sent: Tue 7/10/2003 1:05 p.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] NoClassDefException Hi, Good day! I got a "NoClassDefFound" exception when I call: db = SeqIOTools.readFasta(is,alpha); -----------------------------------------excert from my code-------------------------------------------------- import java.io.*; import java.util.*; import org.biojava.bio.*; import org.biojava.bio.seq.*; import org.biojava.bio.seq.io.*; import org.biojava.bio.seq.db.*; import org.biojava.bio.dist.*; import org.biojava.bio.dp.*; import org.biojava.bio.symbol.*; import org.biojava.bio.seq.Sequence; ..... //setup file path + name String fileName="..\\input.txt"; BufferedInputStream is = new BufferedInputStream(new FileInputStream(fileName)); //get the appropriate alphabet:DNA,RNA, or PROTEIN Alphabet alpha = AlphabetManager.alphabetForName("PROTEIN"); //get a sequenceDB of all sequences in the file db = SeqIOTools.readFasta(is,alpha); ..... -----------------------------------------error message--------------------------------------------------------------- java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException at BiologicalSequence.PHMM.(PHMM.java:47) at BiologicalSequence.PHMM.main(PHMM.java:116) My observation is the missing class is from xerces.jar. I appreciate your advice pls! thnks & regards, @llan --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search ======================================================================= 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. ======================================================================= From symbian at satmeet.com Tue Oct 7 16:10:24 2003 From: symbian at satmeet.com (symbian) Date: Tue Oct 7 16:09:52 2003 Subject: [Biojava-l] mobile project required Message-ID: hi this is symbian . i am a student of bio-informatics at queens university canada . i have a solid background in java and other computer related technologies . i want to make the following project : biologist or bio-chemist using his PDA or mobile phone (palm, pockect PC or Symbian ) could enter some sort of info , which could be dealt with the backend server using any api or something .. could any one suggest what would be really cool to solve for this kind of current infrastructure thanks plus anything that might have good commercial sense to it . i have a really serious partner from biochemistry background and we have 3 months . also how could biojava be of any use for the same . pda is just an i/o device all the proccessing is at the backend server . i can furnish details if needed . thanks -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ From facemann at yahoo.com Tue Oct 7 21:46:33 2003 From: facemann at yahoo.com (Andy Hammer) Date: Tue Oct 7 21:44:10 2003 Subject: [Biojava-l] Build errors Message-ID: <20031008014633.10693.qmail@web13402.mail.yahoo.com> I have removed all biojava PATHs. Still generated errors. I then downloaded and successfully build biojava-1.3 After that success I tried to build biojava-live and failed with 100 errors. I placed the biojava-1.3 jars in my java ext folder but generated the same results. What now? Facemann __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From vc100 at doc.ic.ac.uk Wed Oct 8 07:56:19 2003 From: vc100 at doc.ic.ac.uk (Vasa Curcin) Date: Wed Oct 8 07:52:56 2003 Subject: [Biojava-l] Question about Swiss-Prot parsing Message-ID: <3F83FB63.9030505@doc.ic.ac.uk> Hello, I am parsing some Swiss-Prot files with Biojava 1.3 and need to put the contents into Sequence Collections. It does not crash but there are two problems: 1. Each annotation is shown as the tag, followed by a colon and then the content, so for example AC :Q9L867. Other parsers seem to be happy to convert the tags into meaningful description, is there some inherent problem with SWISS-PROT? 2. Features are not recognized in most cases. Has anyone found workarounds for these. Cheers, Vasa From Eric.Jain at isb-sib.ch Wed Oct 8 08:13:27 2003 From: Eric.Jain at isb-sib.ch (Eric Jain) Date: Wed Oct 8 08:10:59 2003 Subject: [Biojava-l] Re: Question about Swiss-Prot parsing References: <3F83FB63.9030505@doc.ic.ac.uk> Message-ID: <001001c38d95$94bc2e70$c300000a@caliente> > Has anyone found workarounds for these. There are several specialized (non-BioJava) parsers for Swiss-Prot if you need more detailed information than available through the BioJava model. Let me know if you are interested... -- Eric Jain From alkw_1998 at yahoo.com Wed Oct 8 13:58:03 2003 From: alkw_1998 at yahoo.com (allanlee) Date: Wed Oct 8 20:42:58 2003 Subject: [Biojava-l] missing API Message-ID: <20031008175803.78948.qmail@web14205.mail.yahoo.com> Hi, I was trying to access "ProteinTools.createProteinSequence(String))", as according to the javaDoc API, but the compiler claims this method createProteinSequence()" is not found. I am using "biojava-20020823.jar". I have to use this version, or else the DP will got hang. Thanks!! rgds, --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search From alkw_1998 at yahoo.com Wed Oct 8 20:10:12 2003 From: alkw_1998 at yahoo.com (allanlee) Date: Wed Oct 8 20:43:00 2003 Subject: [Biojava-l] model.xml & sequence.fa Message-ID: <20031009001012.89232.qmail@web14206.mail.yahoo.com> Hi! I was trying the example at biojava-1.10\demos\dp\ViterbiAlign.java. It requires 2 files (eg: model.cml & sequence.fa). Do you know where I can get these 2 sample files? is it the one called "fakepromoter.xml" and "fake.fa"? if yes, there is an error saying : java.net.MalformedURLException: unknown protocol: c at java.net.URL.(URL.java:586) at java.net.URL.(URL.java:476) at BiologicalSequence.ViterbiAlign.main(ViterbiAlign.java:84) Process exited with exit code 0. Pls help! Thanks! rgds, --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search From k at bioruby.org Fri Oct 10 03:37:23 2003 From: k at bioruby.org (KATAYAMA Toshiaki) Date: Fri Oct 10 03:35:19 2003 Subject: [Biojava-l] permission to use 'BioJava in Anger' for BioRuby? Message-ID: Dear BioJava friends, We really like your 'BioJava in Anger' tutorial and would like to write something similar for the BioRuby project. Can you give us permission to adapt it for our purposes - we will give reference to the original. For the BioRuby project, Toshiaki Katayama From vc100 at doc.ic.ac.uk Fri Oct 10 09:13:04 2003 From: vc100 at doc.ic.ac.uk (Vasa Curcin) Date: Fri Oct 10 09:09:37 2003 Subject: [Biojava-l] Connection to DAS servers Message-ID: <3F86B060.6030901@doc.ic.ac.uk> Hi, Trying to connect to this DAS server running dazzle, and it retrieves the sequences, but they seem to be malformed - there is some error regarding the 'stretch'. Has anyone experienced something similar with regards to DAS? Cheers, Vasa From gtkacik at Princeton.EDU Fri Oct 10 10:00:16 2003 From: gtkacik at Princeton.EDU (Gasper Tkacik) Date: Fri Oct 10 09:57:49 2003 Subject: [Biojava-l] EMBL full genome retrieval Message-ID: <3F86BB70.6040804@princeton.edu> Hi everybody! I am new to biojava, so this may be a trivial question from a beginner. Using the following code snippet: public static void main(String args[]) { try { Registry reg = SystemRegistry.instance(); SequenceDBLite sdb = reg.getDatabase("embl"); Sequence ecoli = sdb.getSequence("U00096"); SeqIOTools.writeEmbl(System.out, ecoli); } catch (Exception e) { System.out.println(e); } } I wanted to get the whole E.coli genome from EMBL database. However, it turns out that I get only the first out of 400 segments of the DNA. I tried to search the web foradvice but could find nothing useful. Any help or at least a reference to where I should look? Thank you all in advance, Gasper. From mark.schreiber at agresearch.co.nz Sun Oct 12 01:51:51 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Sun Oct 12 01:50:31 2003 Subject: [Biojava-l] permission to use 'BioJava in Anger' for BioRuby? Message-ID: Toshiaki - I would be more than happy if you wanted to modify BioJava in Anger for a BioRuby in Anger. There has been a lot of positive feedback and we have found it to be a pretty successful alternative to large scale documentation. Regards - Mark -----Original Message----- From: KATAYAMA Toshiaki [mailto:k@bioruby.org] Sent: Sat 11/10/2003 5:53 a.m. To: Schreiber, Mark Cc: smh1008@cus.cam.ac.uk Subject: Re: [Biojava-l] permission to use 'BioJava in Anger' for BioRuby? Hi Mark, Could you kindly give us a permission to modify your 'BioJava in Anger' to something like 'BioRuby in Anger'? David, thank you for pointing me to Mark. I asked on the list just because in the Introduction section of 'BioJava in Anger' (http://www.biojava.org/docs/bj_in_anger/) said that: | 'BioJava in Anger' is maintained by Mark Schreiber. If you have any | suggestions, questions or comments contact the biojava mailing | list. To subscribe to this list go here. Anyway, I'm very happy to have your response. :) Thanks, -- Toshiaki Katayama ktym@hgc.jp, k@bioruby.org tel://+81-3-5449-5614 Human Genome Center, Institute of Medical Science fax://+81-3-5449-5434 University of Tokyo http://bioruby.org/~k/ 4-6-1 Shirokanedai, Minato-ku, Tokyo 108-8639, Japan At Fri, 10 Oct 2003 15:33:13 +0100, David Huen wrote: > > On Friday 10 Oct 2003 8:37 am, KATAYAMA Toshiaki wrote: > > Dear BioJava friends, > > > > We really like your 'BioJava in Anger' tutorial and would like to > > write something similar for the BioRuby project. Can you give us > > permission to adapt it for our purposes - we will give reference to > > the original. > > > The person you should contact is Mark Schreiber who wrote it:- > (mark.schreiber@agresearch.co.nz). I think he will agree anyway. > > Regards, > David Huen ======================================================================= 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. ======================================================================= From mark.schreiber at agresearch.co.nz Sun Oct 12 01:55:24 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Sun Oct 12 01:52:54 2003 Subject: [Biojava-l] missing API Message-ID: Hi - i am away from my machine right now so I can't check this but I'm pretty sure there should be two string arguments. One is the amino acid sequence (from memory I think that is the first one). The other is the name of the Sequence. - Mark -----Original Message----- From: allanlee [mailto:alkw_1998@yahoo.com] Sent: Thu 9/10/2003 6:58 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] missing API Hi, I was trying to access "ProteinTools.createProteinSequence(String))", as according to the javaDoc API, but the compiler claims this method createProteinSequence()" is not found. I am using "biojava-20020823.jar". I have to use this version, or else the DP will got hang. Thanks!! rgds, --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search ======================================================================= 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. ======================================================================= From mark.schreiber at agresearch.co.nz Sun Oct 12 02:01:07 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Sun Oct 12 01:58:39 2003 Subject: [Biojava-l] Question about Swiss-Prot parsing Message-ID: Hi - I think we could do a much better job on SwissProt parsing. Esp with some of the facilities in Biojava-live. Any volunteers with a spare hour or two up there sleaves? - Mark -----Original Message----- From: Vasa Curcin [mailto:vc100@doc.ic.ac.uk] Sent: Thu 9/10/2003 12:56 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] Question about Swiss-Prot parsing Hello, I am parsing some Swiss-Prot files with Biojava 1.3 and need to put the contents into Sequence Collections. It does not crash but there are two problems: 1. Each annotation is shown as the tag, followed by a colon and then the content, so for example AC :Q9L867. Other parsers seem to be happy to convert the tags into meaningful description, is there some inherent problem with SWISS-PROT? 2. Features are not recognized in most cases. Has anyone found workarounds for these. Cheers, Vasa _______________________________________________ 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. ======================================================================= From sherpa at coresoft.be Mon Oct 13 07:30:07 2003 From: sherpa at coresoft.be (Frederik Decouttere) Date: Mon Oct 13 07:27:40 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceDB Message-ID: <000001c3917d$5ade3f40$707ba8c0@blast> Hi, Anybody knows why I'm getting this exception: *** Importing a core ontology -- hope this is okay org.biojava.bio.BioError: Unexpected ontology duplication error at org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:215) at org.biojava.bio.seq.db.biosql.OntologySQL.(OntologySQL.java:337) at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.(BioSQLSequenceDB.java: 176) Caused by: org.biojava.ontology.AlreadyExistsException: Ontology __core_ontology already contains instance_of(and, predicate) at org.biojava.ontology.Ontology$Impl.addTerm(Ontology.java:333) at org.biojava.ontology.Ontology$Impl.createTriple(Ontology.java:483) at org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:198) ... 4 more the code: Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", "my_dna_1") ; BioSQLSequenceDB db = new BioSQLSequenceDB(url, user, pass, biodatabase, false); db.addSequence(seq) ; the database: I'm using hsqldb 1.7.1 with the schema found in biosqldb-hsqldb.sql (biojava-live Main branch from cvs) Thanx Frederik From matthew_pocock at yahoo.co.uk Mon Oct 13 11:19:31 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Mon Oct 13 11:24:40 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceDB In-Reply-To: <000001c3917d$5ade3f40$707ba8c0@blast> References: <000001c3917d$5ade3f40$707ba8c0@blast> Message-ID: <3F8AC283.7000401@yahoo.co.uk> Hi, I'm having the same problem. Investigating now. This seems to work for me on the 1.3 releases, but not on the devel release. Matthew Frederik Decouttere wrote: >Hi, > >Anybody knows why I'm getting this exception: > >*** Importing a core ontology -- hope this is okay >org.biojava.bio.BioError: Unexpected ontology duplication error > at >org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:215) > at >org.biojava.bio.seq.db.biosql.OntologySQL.(OntologySQL.java:337) > at >org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.(BioSQLSequenceDB.java: >176) >Caused by: org.biojava.ontology.AlreadyExistsException: Ontology >__core_ontology already contains instance_of(and, predicate) > at org.biojava.ontology.Ontology$Impl.addTerm(Ontology.java:333) > at >org.biojava.ontology.Ontology$Impl.createTriple(Ontology.java:483) > at >org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:198) > ... 4 more > > >the code: > >Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", "my_dna_1") ; >BioSQLSequenceDB db = new BioSQLSequenceDB(url, user, pass, biodatabase, >false); >db.addSequence(seq) ; > >the database: >I'm using hsqldb 1.7.1 with the schema found in biosqldb-hsqldb.sql >(biojava-live Main branch from cvs) > > >Thanx >Frederik > > >_______________________________________________ >Biojava-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > > > From k at bioruby.org Mon Oct 13 20:44:46 2003 From: k at bioruby.org (KATAYAMA Toshiaki) Date: Mon Oct 13 20:42:42 2003 Subject: [Biojava-l] permission to use 'BioJava in Anger' for BioRuby? In-Reply-To: References: Message-ID: Mark, Thank you allowing us to modify your document. BioRuby in Anger will be gradually witten by the BioRuby community at http://wiki.bioruby.org/ Regards, Toshiaki Katayama At Sun, 12 Oct 2003 18:51:51 +1300, Schreiber, Mark wrote: > > Toshiaki - > > I would be more than happy if you wanted to modify BioJava in Anger for a BioRuby in Anger. There has been a lot of positive feedback and we have found it to be a pretty successful alternative to large scale documentation. > > Regards > > - Mark > > > -----Original Message----- > From: KATAYAMA Toshiaki [mailto:k@bioruby.org] > Sent: Sat 11/10/2003 5:53 a.m. > To: Schreiber, Mark > Cc: smh1008@cus.cam.ac.uk > Subject: Re: [Biojava-l] permission to use 'BioJava in Anger' for BioRuby? > > > > Hi Mark, > > Could you kindly give us a permission to modify your 'BioJava in Anger' > to something like 'BioRuby in Anger'? > > > David, thank you for pointing me to Mark. > > I asked on the list just because in the Introduction section of > 'BioJava in Anger' (http://www.biojava.org/docs/bj_in_anger/) said that: > > | 'BioJava in Anger' is maintained by Mark Schreiber. If you have any > | suggestions, questions or comments contact the biojava mailing > | list. To subscribe to this list go here. > > Anyway, I'm very happy to have your response. :) > > Thanks, > -- > Toshiaki Katayama ktym@hgc.jp, k@bioruby.org > tel://+81-3-5449-5614 Human Genome Center, Institute of Medical Science > fax://+81-3-5449-5434 University of Tokyo > http://bioruby.org/~k/ 4-6-1 Shirokanedai, Minato-ku, Tokyo 108-8639, Japan > > > At Fri, 10 Oct 2003 15:33:13 +0100, > David Huen wrote: > > > > On Friday 10 Oct 2003 8:37 am, KATAYAMA Toshiaki wrote: > > > Dear BioJava friends, > > > > > > We really like your 'BioJava in Anger' tutorial and would like to > > > write something similar for the BioRuby project. Can you give us > > > permission to adapt it for our purposes - we will give reference to > > > the original. > > > > > The person you should contact is Mark Schreiber who wrote it:- > > (mark.schreiber@agresearch.co.nz). I think he will agree anyway. > > > > Regards, > > David Huen > > > > ======================================================================= > 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. > ======================================================================= From belirxz at yahoo.com Mon Oct 13 20:24:27 2003 From: belirxz at yahoo.com (erw wer) Date: Mon Oct 13 21:43:39 2003 Subject: [Biojava-l] Need help in my code Message-ID: <20031014002427.4806.qmail@web13703.mail.yahoo.com> Hi, I am a beginner in biojava as well bioinformatics. I hope you can advice on the obstacles I am facing now. I am trying to follow your example about the profile HMM at http://www.biojava.org/docs/bj_in_anger/profileHMM.htm, and I try to fill in those missing codes that are required. And finally I got it running. The code has no problem running until BaumWelchTrainer. But there is an exception when I try to score the sequence and outputting the state path. I am not sure if the way I code the test sequence initialization is correct: ------------------------------------------------------ StatePath obs_rolls = dp.generate(18); SymbolList roll_sequence = obs_rolls.symbolListForLabel(StatePath.SEQUENCE); SymbolList[] sla = {roll_sequence}; ------------------------------------------------------ The exception says "Symbol d-1 not found in alphabet Transitions from d-1", which is at dp.generate(18). I appreciate if you can help me look into it. The source code & the input file is attached for your ref. And, what is dp.generate(int) means? If I have a number of variable length sequences, should I take the longest length of those sequences? or I am wrong totally about what it means? THANKS!! __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -------------- next part -------------- >SEQ0 FPHFDLSHGSAQ >SEQ1 FESFGDLSTPDAVMGNPK >SEQ2 FDRFKHLKTEAEMKASED >SEQ3 FTQFAGKDLESIKGTAP >SEQ4 FPKFKGLTTADQLKKSAD >SEQ5 FSFLKGTSEVPQNNPE >SEQ6 FGFSGASDPG -------------- next part -------------- A non-text attachment was scrubbed... Name: PHMM.java Type: application/octet-stream Size: 4297 bytes Desc: PHMM.java Url : http://portal.open-bio.org/pipermail/biojava-l/attachments/20031013/a365e0ef/PHMM.obj From matthew_pocock at yahoo.co.uk Tue Oct 14 08:51:11 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Tue Oct 14 08:56:55 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceDB In-Reply-To: <000001c3917d$5ade3f40$707ba8c0@blast> References: <000001c3917d$5ade3f40$707ba8c0@blast> Message-ID: <3F8BF13F.1060407@yahoo.co.uk> Hi Frederik, Well, I'm still plugging away at this error. Yours is gone, but my old error is back. I have modified java.utils.JDBCConnectionPool to test existing connections using SELECT 1, which as removed the exceptions about roll-backs. However, now it appears that postgresql does not maintain the value of currval(sequence) between sessions (and sometimes even when you just call preparedStatement.close() ). More news when I have it. Frederik Decouttere wrote: >Hi, > >Anybody knows why I'm getting this exception: > >*** Importing a core ontology -- hope this is okay >org.biojava.bio.BioError: Unexpected ontology duplication error > at >org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:215) > at >org.biojava.bio.seq.db.biosql.OntologySQL.(OntologySQL.java:337) > at >org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.(BioSQLSequenceDB.java: >176) >Caused by: org.biojava.ontology.AlreadyExistsException: Ontology >__core_ontology already contains instance_of(and, predicate) > at org.biojava.ontology.Ontology$Impl.addTerm(Ontology.java:333) > at >org.biojava.ontology.Ontology$Impl.createTriple(Ontology.java:483) > at >org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:198) > ... 4 more > > >the code: > >Sequence seq = DNATools.createDNASequence("atgctgatgatgatg", "my_dna_1") ; >BioSQLSequenceDB db = new BioSQLSequenceDB(url, user, pass, biodatabase, >false); >db.addSequence(seq) ; > >the database: >I'm using hsqldb 1.7.1 with the schema found in biosqldb-hsqldb.sql >(biojava-live Main branch from cvs) > > >Thanx >Frederik > > >_______________________________________________ >Biojava-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > > > From belirxz at yahoo.com Tue Oct 14 14:54:31 2003 From: belirxz at yahoo.com (erw wer) Date: Tue Oct 14 14:51:55 2003 Subject: [Biojava-l] How to code? : "code here to initialize the test sequence" Message-ID: <20031014185431.68446.qmail@web13708.mail.yahoo.com> Hi: I am stuck in the exmaple of PHMM at http://www.biojava.org/docs/bj_in_anger/profileHMM.htm Could somebody tells me how to code to initialize the test sequence, as told in the exmaple? I would very much appreciate your kind help. Thanks & best regards!! __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From matthew_pocock at yahoo.co.uk Tue Oct 14 13:03:23 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Tue Oct 14 16:12:17 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceDB In-Reply-To: <3F8BF13F.1060407@yahoo.co.uk> References: <000001c3917d$5ade3f40$707ba8c0@blast> <3F8BF13F.1060407@yahoo.co.uk> Message-ID: <3F8C2C5B.5070303@yahoo.co.uk> Matthew Pocock wrote: > More news when I have it. I have more news :) The version in CVS works for me. I had to do some work to the OntologySQL class, and modify the biosql schema (which I've attached). In the end, I removed the symptom by dissabling connection re-use in JDBCConnectionPool. Could we either a) make JDBCConnectionPool work with rollback gracefully or b) switch to a standard connection pool API? My vote is for option 2, but then some of the things I read via google indicated that we may have the same problems. BioSQL People - could you check the single table I've added (term_relationship_term) and see if it's sane for folding back into the trunk of biosql development? Matthew -------------- next part -------------- -- $Id: biosqldb-pg.sql,v 1.2 2003/10/14 09:59:34 nmrp3 Exp $ -- -- conventions: -- _id is primary internal id (usually autogenerated) -- Authors: Ewan Birney, Elia Stupka -- Contributors: Hilmar Lapp, Aaron Mackey, Matthew Pocock -- -- Copyright Ewan Birney. You may use, modify, and distribute this code under -- the same terms as Perl. See the Perl Artistic License. -- -- comments to biosql - biosql-l@open-bio.org -- -- Migration of the MySQL schema to InnoDB by Hilmar Lapp -- Post-Cape Town changes by Hilmar Lapp. -- Singapore changes by Hilmar Lapp and Aaron Mackey. -- -- database have bioentries. That is about it. -- we do not store different versions of a database as different dbids -- (there is no concept of versions of database). There is a concept of -- versions of entries. Versions of databases deserve their own table and -- join to bioentry table for tracking with versions of entries CREATE SEQUENCE biodatabase_pk_seq; CREATE TABLE biodatabase ( biodatabase_id INTEGER DEFAULT nextval ( 'biodatabase_pk_seq' ) NOT NULL , name VARCHAR ( 128 ) NOT NULL , authority VARCHAR ( 128 ) , description TEXT , PRIMARY KEY ( biodatabase_id ) , UNIQUE ( name ) ) ; CREATE INDEX db_auth on biodatabase ( authority ); -- we could insist that taxa are NCBI taxon id, but on reflection I made this -- an optional extra line, as many flat file formats do not have the NCBI id -- -- no organelle/sub species -- corresponds to the node table of the NCBI taxonomy databaase CREATE SEQUENCE taxon_pk_seq; CREATE TABLE taxon ( taxon_id INTEGER DEFAULT nextval ( 'taxon_pk_seq' ) NOT NULL , ncbi_taxon_id INTEGER , parent_taxon_id INTEGER , node_rank VARCHAR ( 32 ) , genetic_code SMALLINT , mito_genetic_code SMALLINT , left_value INTEGER , right_value INTEGER , PRIMARY KEY ( taxon_id ) , CONSTRAINT XAKtaxon_ncbi_taxon_id UNIQUE ( ncbi_taxon_id ) , CONSTRAINT XAKtaxon_left_value UNIQUE ( left_value ) , CONSTRAINT XAKtaxon_right_value UNIQUE ( right_value ) ) ; CREATE INDEX taxparent ON taxon ( parent_taxon_id ); -- corresponds to the names table of the NCBI taxonomy databaase CREATE TABLE taxon_name ( taxon_id INTEGER NOT NULL , name VARCHAR ( 255 ) NOT NULL , name_class VARCHAR ( 32 ) NOT NULL , UNIQUE ( name , name_class, taxon_id ) ) ; CREATE INDEX taxnametaxonid ON taxon_name ( taxon_id ); CREATE INDEX taxnamename ON taxon_name ( name ); -- this is the namespace (controlled vocabulary) ontology terms live in -- we chose to have a separate table for this instead of reusing biodatabase CREATE SEQUENCE ontology_pk_seq; CREATE TABLE ontology ( ontology_id INTEGER DEFAULT nextval ( 'ontology_pk_seq' ) NOT NULL , name VARCHAR ( 32 ) NOT NULL , definition TEXT , PRIMARY KEY ( ontology_id ) , UNIQUE ( name ) ) ; -- any controlled vocab term, everything from full ontology -- terms eg GO IDs to the various keys allowed as qualifiers CREATE SEQUENCE term_pk_seq; CREATE TABLE term ( term_id INTEGER DEFAULT nextval ( 'term_pk_seq' ) NOT NULL , name VARCHAR ( 255 ) NOT NULL , definition TEXT , identifier VARCHAR ( 40 ) , is_obsolete CHAR ( 1 ) , ontology_id INTEGER NOT NULL , PRIMARY KEY ( term_id ) , UNIQUE ( name , ontology_id ) , UNIQUE ( identifier ) ) ; CREATE INDEX term_ont ON term ( ontology_id ); -- ontology terms have synonyms, here is how to store them CREATE TABLE term_synonym ( synonym VARCHAR(255) NOT NULL, term_id INTEGER NOT NULL, PRIMARY KEY ( term_id , synonym ) ) ; -- ontology terms to dbxref association: ontology terms have dbxrefs CREATE TABLE term_dbxref ( term_id INTEGER NOT NULL , dbxref_id INTEGER NOT NULL , rank INTEGER , PRIMARY KEY ( term_id , dbxref_id ) ) ; CREATE INDEX trmdbxref_dbxrefid ON term_dbxref ( dbxref_id ); -- relationship between controlled vocabulary / ontology term -- we use subject/predicate/object but this could also -- be thought of as child/relationship-type/parent. -- the subject/predicate/object naming is better as we -- can think of the graph as composed of statements. -- -- we also treat the relationshiptypes / predicates as -- controlled terms in themselves; this is quite useful -- as a lot of systems (eg GO) will soon require -- ontologies of relationship types (eg subtle differences -- in the partOf relationship) -- -- this table probably won't be filled for a while, the core -- will just treat ontologies as flat lists of terms CREATE SEQUENCE term_relationship_pk_seq; CREATE TABLE term_relationship ( term_relationship_id INTEGER DEFAULT nextval ( 'term_relationship_pk_seq' ) NOT NULL , subject_term_id INTEGER NOT NULL , predicate_term_id INTEGER NOT NULL , object_term_id INTEGER NOT NULL , ontology_id INTEGER NOT NULL , PRIMARY KEY ( term_relationship_id ) , UNIQUE ( subject_term_id , predicate_term_id , object_term_id , ontology_id ) ) ; CREATE INDEX trmrel_predicateid ON term_relationship ( predicate_term_id ); CREATE INDEX trmrel_objectid ON term_relationship ( object_term_id ); CREATE INDEX trmrel_ontid ON term_relationship ( ontology_id ); -- you may want to add this for mysql because MySQL often is broken with -- respect to using the composite index for the initial keys --CREATE INDEX trmrel_subjectid ON term_relationship(subject_term_id); -- Link a triple to a term, giving it a unique identifier. This allows -- arbitrary expressions to be built up by then using the linked-to term -- in another triple. -- -- e.g. implies(isa(x, y), hasa(x, z)) CREATE TABLE term_relationship_term ( term_relationship_id INTEGER NOT NULL, term_id INTEGER NOT NULL, PRIMARY KEY ( term_relationship_id, term_id ), UNIQUE ( term_relationship_id ), UNIQUE ( term_id ) ); -- the infamous transitive closure table on ontology term relationships -- this is a warehouse approach - you will need to update this regularly -- -- the triple of (subject, predicate, object) is the same as for ontology -- relationships, with the exception of predicate being the greatest common -- denominator of the relationships types visited in the path (i.e., if -- relationship type A is-a relationship type B, the greatest common -- denominator for path containing both types A and B is B) -- -- See the GO database or Chado schema for other (and possibly better -- documented) implementations of the transitive closure table approach. CREATE SEQUENCE term_path_pk_seq; CREATE TABLE term_path ( term_path_id INTEGER DEFAULT nextval ( 'term_path_pk_seq' ) NOT NULL , subject_term_id INTEGER NOT NULL , predicate_term_id INTEGER NOT NULL , object_term_id INTEGER NOT NULL , ontology_id INTEGER NOT NULL , distance INTEGER , PRIMARY KEY (term_path_id), UNIQUE ( subject_term_id , predicate_term_id , object_term_id , ontology_id , distance ) ) ; CREATE INDEX trmpath_predicateid ON term_path ( predicate_term_id ); CREATE INDEX trmpath_objectid ON term_path ( object_term_id ); CREATE INDEX trmpath_ontid ON term_path ( ontology_id ); -- you may want to add this for mysql because MySQL often is broken with -- respect to using the composite index for the initial keys --CREATE INDEX trmpath_subjectid ON term_path(subject_term_id); -- we can be a bioentry without a biosequence, but not visa-versa -- most things are going to be keyed off bioentry_id -- -- accession is the stable id, display_id is a potentially volatile, -- human readable name. -- -- Version may be unknown, may be undefined, or may not exist for a certain -- accession or database (namespace). We require it here to avoid RDBMS- -- dependend enforcement variants (version is in a compound alternative key), -- and to simplify query construction for UK look-ups. If there is no version -- the convention is to put 0 (zero) here. Likewise, a record with a version -- of zero means the version is to be interpreted as NULL. -- -- not all entries have a taxon, but many do. -- -- one bioentry only has one taxon! (weirdo chimerias are not handled. tough) -- -- Name maps to display_id in bioperl. We have a different column name -- here to avoid confusion with the naming convention for foreign keys. CREATE SEQUENCE bioentry_pk_seq; CREATE TABLE bioentry ( bioentry_id INTEGER DEFAULT nextval ( 'bioentry_pk_seq' ) NOT NULL , biodatabase_id INTEGER NOT NULL , taxon_id INTEGER , name VARCHAR ( 40 ) NOT NULL , accession VARCHAR ( 40 ) NOT NULL , identifier VARCHAR ( 40 ) , division VARCHAR ( 6 ) , description TEXT , version INTEGER NOT NULL , PRIMARY KEY ( bioentry_id ) , UNIQUE ( accession , biodatabase_id , version ) , UNIQUE ( identifier ) ) ; CREATE INDEX bioentry_name ON bioentry ( name ); CREATE INDEX bioentry_db ON bioentry ( biodatabase_id ); CREATE INDEX bioentry_tax ON bioentry ( taxon_id ); -- -- bioentry-bioentry relationships: these are typed -- CREATE SEQUENCE bioentry_relationship_pk_seq; CREATE TABLE bioentry_relationship ( bioentry_relationship_id INTEGER DEFAULT nextval ( 'bioentry_relationship_pk_seq' ) NOT NULL , object_bioentry_id INTEGER NOT NULL , subject_bioentry_id INTEGER NOT NULL , term_id INTEGER NOT NULL , rank INTEGER , PRIMARY KEY ( bioentry_relationship_id ) , UNIQUE ( object_bioentry_id , subject_bioentry_id , term_id ) ) ; CREATE INDEX bioentryrel_trm ON bioentry_relationship ( term_id ); CREATE INDEX bioentryrel_child ON bioentry_relationship ( subject_bioentry_id ); -- you may want to add this for mysql because MySQL often is broken with -- respect to using the composite index for the initial keys --CREATE INDEX bioentryrel_parent ON bioentry_relationship(object_bioentry_id); -- for deep (depth > 1) bioentry relationship trees we need a transitive -- closure table too CREATE TABLE bioentry_path ( object_bioentry_id INTEGER NOT NULL , subject_bioentry_id INTEGER NOT NULL , term_id INTEGER NOT NULL , distance INTEGER, UNIQUE ( object_bioentry_id , subject_bioentry_id , term_id , distance ) ) ; CREATE INDEX bioentrypath_trm ON bioentry_path ( term_id ); CREATE INDEX bioentrypath_child ON bioentry_path ( subject_bioentry_id ); -- you may want to add this for mysql because MySQL often is broken with -- respect to using the composite index for the initial keys --CREATE INDEX bioentrypath_parent ON bioentry_path(object_bioentry_id); -- some bioentries will have a sequence -- biosequence because sequence is sometimes a reserved word CREATE TABLE biosequence ( bioentry_id INTEGER NOT NULL , version INTEGER , length INTEGER , alphabet VARCHAR ( 10 ) , seq TEXT , PRIMARY KEY ( bioentry_id ) ) ; -- add these only if you want them: -- ALTER TABLE biosequence ADD COLUMN ( isoelec_pt NUMERIC(4,2) ); -- ALTER TABLE biosequence ADD COLUMN ( mol_wgt DOUBLE PRECISION ); -- ALTER TABLE biosequence ADD COLUMN ( perc_gc DOUBLE PRECISION ); -- database cross-references (e.g., GenBank:AC123456.1) -- -- Version may be unknown, may be undefined, or may not exist for a certain -- accession or database (namespace). We require it here to avoid RDBMS- -- dependend enforcement variants (version is in a compound alternative key), -- and to simplify query construction for UK look-ups. If there is no version -- the convention is to put 0 (zero) here. Likewise, a record with a version -- of zero means the version is to be interpreted as NULL. -- CREATE SEQUENCE dbxref_pk_seq; CREATE TABLE dbxref ( dbxref_id INTEGER DEFAULT nextval ( 'dbxref_pk_seq' ) NOT NULL , dbname VARCHAR ( 40 ) NOT NULL , accession VARCHAR ( 40 ) NOT NULL , version INTEGER NOT NULL , PRIMARY KEY ( dbxref_id ) , UNIQUE ( accession , dbname , version ) ) ; CREATE INDEX dbxref_db ON dbxref ( dbname ); -- for roundtripping embl/genbank, we need to have the "optional ID" -- for the dbxref. -- -- another use of this table could be for storing -- descriptive text for a dbxref. for example, we may want to -- know stuff about the interpro accessions we store (without -- importing all of interpro), so we can attach the text -- description as a synonym CREATE TABLE dbxref_qualifier_value ( dbxref_id INTEGER NOT NULL , term_id INTEGER NOT NULL , rank INTEGER NOT NULL DEFAULT 0 , value TEXT , PRIMARY KEY ( dbxref_id , term_id , rank ) ) ; CREATE INDEX dbxrefqual_dbx ON dbxref_qualifier_value ( dbxref_id ); CREATE INDEX dbxrefqual_trm ON dbxref_qualifier_value ( term_id ); -- Direct dblinks. It is tempting to do this -- from bioentry_id to bioentry_id. But that wont work -- during updates of one database - we will have to edit -- this table each time. Better to do the join through accession -- and db each time. Should be almost as cheap CREATE TABLE bioentry_dbxref ( bioentry_id INTEGER NOT NULL , dbxref_id INTEGER NOT NULL , rank INTEGER , PRIMARY KEY ( bioentry_id , dbxref_id ) ) ; CREATE INDEX dblink_dbx ON bioentry_dbxref ( dbxref_id ); -- We can have multiple references per bioentry, but one reference -- can also be used for the same bioentry. -- -- No two references can reference the same reference database entry -- (dbxref_id). This is where the MEDLINE id goes: PUBMED:123456. CREATE SEQUENCE reference_pk_seq; CREATE TABLE reference ( reference_id INTEGER DEFAULT nextval ( 'reference_pk_seq' ) NOT NULL , dbxref_id INTEGER , location TEXT NOT NULL , title TEXT , authors TEXT NOT NULL , crc VARCHAR ( 32 ) , PRIMARY KEY ( reference_id ) , UNIQUE ( dbxref_id ) , UNIQUE ( crc ) ) ; -- bioentry to reference associations CREATE TABLE bioentry_reference ( bioentry_id INTEGER NOT NULL , reference_id INTEGER NOT NULL , start_pos INTEGER , end_pos INTEGER , rank INTEGER NOT NULL DEFAULT 0 , PRIMARY KEY ( bioentry_id , reference_id , rank ) ) ; CREATE INDEX bioentryref_ref ON bioentry_reference ( reference_id ); -- We can have multiple comments per seqentry, and -- comments can have embedded '\n' characters CREATE SEQUENCE comment_pk_seq; CREATE TABLE comment ( comment_id INTEGER DEFAULT nextval ( 'comment_pk_seq' ) NOT NULL , bioentry_id INTEGER NOT NULL , comment_text TEXT NOT NULL , rank INTEGER NOT NULL DEFAULT 0 , PRIMARY KEY ( comment_id ) , UNIQUE ( bioentry_id , rank ) ) ; -- tag/value and ontology term annotation for bioentries goes here CREATE TABLE bioentry_qualifier_value ( bioentry_id INTEGER NOT NULL , term_id INTEGER NOT NULL , value TEXT , rank INTEGER NOT NULL DEFAULT 0 , UNIQUE ( bioentry_id , term_id , rank ) ) ; CREATE INDEX bioentryqual_trm ON bioentry_qualifier_value ( term_id ); -- feature table. We cleanly handle -- - simple locations -- - split locations -- - split locations on remote sequences CREATE SEQUENCE seqfeature_pk_seq; CREATE TABLE seqfeature ( seqfeature_id INTEGER DEFAULT nextval ( 'seqfeature_pk_seq' ) NOT NULL , bioentry_id INTEGER NOT NULL , type_term_id INTEGER NOT NULL , source_term_id INTEGER NOT NULL , display_name VARCHAR ( 64 ) , rank INTEGER NOT NULL DEFAULT 0 , PRIMARY KEY ( seqfeature_id ) , UNIQUE ( bioentry_id , type_term_id , source_term_id , rank ) ) ; CREATE INDEX seqfeature_trm ON seqfeature ( type_term_id ); CREATE INDEX seqfeature_fsrc ON seqfeature ( source_term_id ); -- you may want to add this for mysql because MySQL often is broken with -- respect to using the composite index for the initial keys --CREATE INDEX seqfeature_bioentryid ON seqfeature(bioentry_id); -- seqfeatures can be arranged in containment hierarchies. -- one can imagine storing other relationships between features, -- in this case the term_id can be used to type the relationship CREATE SEQUENCE seqfeature_relationship_pk_seq; CREATE TABLE seqfeature_relationship ( seqfeature_relationship_id INTEGER DEFAULT nextval ( 'seqfeature_relationship_pk_seq' ) NOT NULL , object_seqfeature_id INTEGER NOT NULL , subject_seqfeature_id INTEGER NOT NULL , term_id INTEGER NOT NULL , rank INTEGER , PRIMARY KEY ( seqfeature_relationship_id ) , UNIQUE ( object_seqfeature_id , subject_seqfeature_id , term_id ) ) ; CREATE INDEX seqfeaturerel_trm ON seqfeature_relationship ( term_id ); CREATE INDEX seqfeaturerel_child ON seqfeature_relationship ( subject_seqfeature_id ); -- you may want to add this for mysql because MySQL often is broken with -- respect to using the composite index for the initial keys --CREATE INDEX seqfeaturerel_parent ON seqfeature_relationship(object_seqfeature_id); -- for deep (depth > 1) seqfeature relationship trees we need a transitive -- closure table too CREATE TABLE seqfeature_path ( object_seqfeature_id INTEGER NOT NULL , subject_seqfeature_id INTEGER NOT NULL , term_id INTEGER NOT NULL , distance INTEGER, UNIQUE ( object_seqfeature_id , subject_seqfeature_id , term_id , distance ) ) ; CREATE INDEX seqfeaturepath_trm ON seqfeature_path ( term_id ); CREATE INDEX seqfeaturepath_child ON seqfeature_path ( subject_seqfeature_id ); -- you may want to add this for mysql because MySQL often is broken with -- respect to using the composite index for the initial keys --CREATE INDEX seqfeaturerel_parent ON seqfeature_path(object_seqfeature_id); -- tag/value associations - or ontology annotations CREATE TABLE seqfeature_qualifier_value ( seqfeature_id INTEGER NOT NULL , term_id INTEGER NOT NULL , rank INTEGER NOT NULL DEFAULT 0 , value TEXT NOT NULL , PRIMARY KEY ( seqfeature_id , term_id , rank ) ) ; CREATE INDEX seqfeaturequal_trm ON seqfeature_qualifier_value ( term_id ); -- DBXrefs for features. This is necessary for genome oriented viewpoints, -- where you have a few have long sequences (contigs, or chromosomes) with many -- features on them. In that case the features are the semantic scope for -- their annotation bundles, not the bioentry they are attached to. CREATE TABLE seqfeature_dbxref ( seqfeature_id INTEGER NOT NULL , dbxref_id INTEGER NOT NULL , rank INTEGER , PRIMARY KEY ( seqfeature_id , dbxref_id ) ) ; CREATE INDEX feadblink_dbx ON seqfeature_dbxref ( dbxref_id ); -- basically we model everything as potentially having -- any number of locations, ie, a split location. SimpleLocations -- just have one location. We need to have a location id for the qualifier -- associations of fuzzy locations. -- -- please do not try to model complex assemblies with this thing. It wont -- work. Check out the ensembl schema for this. -- -- we allow nulls for start/end - this is useful for fuzzies as -- standard range queries will not be included -- -- for remote locations, the join to make is to DBXref -- -- the FK to term is a possibility to store the type of the -- location for determining in one hit whether it's a fuzzy or not CREATE SEQUENCE location_pk_seq; CREATE TABLE location ( location_id INTEGER DEFAULT nextval ( 'location_pk_seq' ) NOT NULL , seqfeature_id INTEGER NOT NULL , dbxref_id INTEGER , term_id INTEGER , start_pos INTEGER , end_pos INTEGER , strand INTEGER , rank INTEGER NOT NULL DEFAULT 0 , PRIMARY KEY ( location_id ) , UNIQUE ( seqfeature_id , rank ) ) ; CREATE INDEX seqfeatureloc_start ON location ( start_pos, end_pos ); CREATE INDEX seqfeatureloc_dbx ON location ( dbxref_id ); CREATE INDEX seqfeatureloc_trm ON location ( term_id ); -- location qualifiers - mainly intended for fuzzies but anything -- can go in here -- some controlled vocab terms have slots; -- fuzzies could be modeled as min_start(5), max_start(5) -- -- there is no restriction on extending the fuzzy ontology -- for your own nefarious aims, although the bio* apis will -- most likely ignore these CREATE TABLE location_qualifier_value ( location_id INTEGER NOT NULL , term_id INTEGER NOT NULL , value VARCHAR ( 255 ) NOT NULL , int_value INTEGER , PRIMARY KEY ( location_id , term_id ) ) ; CREATE INDEX locationqual_trm ON location_qualifier_value ( term_id ); -- -- Create the foreign key constraints -- -- ontology term ALTER TABLE term ADD CONSTRAINT FKont_term FOREIGN KEY ( ontology_id ) REFERENCES ontology ( ontology_id ) ON DELETE CASCADE ; -- term synonyms ALTER TABLE term_synonym ADD CONSTRAINT FKterm_syn FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; -- term_dbxref ALTER TABLE term_dbxref ADD CONSTRAINT FKdbxref_trmdbxref FOREIGN KEY ( dbxref_id ) REFERENCES dbxref ( dbxref_id ) ON DELETE CASCADE ; ALTER TABLE term_dbxref ADD CONSTRAINT FKterm_trmdbxref FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; -- term_relationship ALTER TABLE term_relationship ADD CONSTRAINT FKtrmsubject_trmrel FOREIGN KEY ( subject_term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; ALTER TABLE term_relationship ADD CONSTRAINT FKtrmpredicate_trmrel FOREIGN KEY ( predicate_term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; ALTER TABLE term_relationship ADD CONSTRAINT FKtrmobject_trmrel FOREIGN KEY ( object_term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; ALTER TABLE term_relationship ADD CONSTRAINT FKontology_trmrel FOREIGN KEY ( ontology_id ) REFERENCES ontology ( ontology_id ) ON DELETE CASCADE ; -- term_path ALTER TABLE term_path ADD CONSTRAINT FKtrmsubject_trmpath FOREIGN KEY ( subject_term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; ALTER TABLE term_path ADD CONSTRAINT FKtrmpredicate_trmpath FOREIGN KEY ( predicate_term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; ALTER TABLE term_path ADD CONSTRAINT FKtrmobject_trmpath FOREIGN KEY ( object_term_id ) REFERENCES term ( term_id ) ON DELETE CASCADE ; ALTER TABLE term_path ADD CONSTRAINT FKontology_trmpath FOREIGN KEY ( ontology_id ) REFERENCES ontology ( ontology_id ) ON DELETE CASCADE ; -- taxon, taxon_name -- unfortunately, we can't constrain parent_taxon_id as it is violated -- occasionally by the downloads available from NCBI -- ALTER TABLE taxon ADD CONSTRAINT FKtaxon_taxon -- FOREIGN KEY ( parent_taxon_id ) REFERENCES taxon ( taxon_id ) -- DEFERRABLE; ALTER TABLE taxon_name ADD CONSTRAINT FKtaxon_taxonname FOREIGN KEY ( taxon_id ) REFERENCES taxon ( taxon_id ) ON DELETE CASCADE ; -- bioentry ALTER TABLE bioentry ADD CONSTRAINT FKtaxon_bioentry FOREIGN KEY ( taxon_id ) REFERENCES taxon ( taxon_id ) ; ALTER TABLE bioentry ADD CONSTRAINT FKbiodatabase_bioentry FOREIGN KEY ( biodatabase_id ) REFERENCES biodatabase ( biodatabase_id ) ; -- bioentry_relationship ALTER TABLE bioentry_relationship ADD CONSTRAINT FKterm_bioentryrel FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; ALTER TABLE bioentry_relationship ADD CONSTRAINT FKparentent_bioentryrel FOREIGN KEY ( object_bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; ALTER TABLE bioentry_relationship ADD CONSTRAINT FKchildent_bioentryrel FOREIGN KEY ( subject_bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; -- bioentry_path ALTER TABLE bioentry_path ADD CONSTRAINT FKterm_bioentrypath FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; ALTER TABLE bioentry_path ADD CONSTRAINT FKparentent_bioentrypath FOREIGN KEY ( object_bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; ALTER TABLE bioentry_path ADD CONSTRAINT FKchildent_bioentrypath FOREIGN KEY ( subject_bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; -- biosequence ALTER TABLE biosequence ADD CONSTRAINT FKbioentry_bioseq FOREIGN KEY ( bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; -- comment ALTER TABLE comment ADD CONSTRAINT FKbioentry_comment FOREIGN KEY ( bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; -- bioentry_dbxref ALTER TABLE bioentry_dbxref ADD CONSTRAINT FKbioentry_dblink FOREIGN KEY ( bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; ALTER TABLE bioentry_dbxref ADD CONSTRAINT FKdbxref_dblink FOREIGN KEY ( dbxref_id ) REFERENCES dbxref ( dbxref_id ) ON DELETE CASCADE ; -- dbxref_qualifier_value ALTER TABLE dbxref_qualifier_value ADD CONSTRAINT FKtrm_dbxrefqual FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; ALTER TABLE dbxref_qualifier_value ADD CONSTRAINT FKdbxref_dbxrefqual FOREIGN KEY ( dbxref_id ) REFERENCES dbxref ( dbxref_id ) ON DELETE CASCADE ; -- bioentry_reference ALTER TABLE bioentry_reference ADD CONSTRAINT FKbioentry_entryref FOREIGN KEY ( bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; ALTER TABLE bioentry_reference ADD CONSTRAINT FKreference_entryref FOREIGN KEY ( reference_id ) REFERENCES reference ( reference_id ) ON DELETE CASCADE ; -- reference ALTER TABLE reference ADD CONSTRAINT FKdbxref_reference FOREIGN KEY ( dbxref_id ) REFERENCES dbxref ( dbxref_id ) ; -- bioentry_qualifier_value ALTER TABLE bioentry_qualifier_value ADD CONSTRAINT FKbioentry_entqual FOREIGN KEY ( bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; ALTER TABLE bioentry_qualifier_value ADD CONSTRAINT FKterm_entqual FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; -- seqfeature ALTER TABLE seqfeature ADD CONSTRAINT FKterm_seqfeature FOREIGN KEY ( type_term_id ) REFERENCES term ( term_id ) ; ALTER TABLE seqfeature ADD CONSTRAINT FKsourceterm_seqfeature FOREIGN KEY ( source_term_id ) REFERENCES term ( term_id ) ; ALTER TABLE seqfeature ADD CONSTRAINT FKbioentry_seqfeature FOREIGN KEY ( bioentry_id ) REFERENCES bioentry ( bioentry_id ) ON DELETE CASCADE ; -- seqfeature_relationship ALTER TABLE seqfeature_relationship ADD CONSTRAINT FKterm_seqfeatrel FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; ALTER TABLE seqfeature_relationship ADD CONSTRAINT FKparentfeat_seqfeatrel FOREIGN KEY ( object_seqfeature_id ) REFERENCES seqfeature ( seqfeature_id ) ON DELETE CASCADE ; ALTER TABLE seqfeature_relationship ADD CONSTRAINT FKchildfeat_seqfeatrel FOREIGN KEY ( subject_seqfeature_id ) REFERENCES seqfeature ( seqfeature_id ) ON DELETE CASCADE ; -- seqfeature_path ALTER TABLE seqfeature_path ADD CONSTRAINT FKterm_seqfeatpath FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; ALTER TABLE seqfeature_path ADD CONSTRAINT FKparentfeat_seqfeatpath FOREIGN KEY ( object_seqfeature_id ) REFERENCES seqfeature ( seqfeature_id ) ON DELETE CASCADE ; ALTER TABLE seqfeature_path ADD CONSTRAINT FKchildfeat_seqfeatpath FOREIGN KEY ( subject_seqfeature_id ) REFERENCES seqfeature ( seqfeature_id ) ON DELETE CASCADE ; -- seqfeature_qualifier_value ALTER TABLE seqfeature_qualifier_value ADD CONSTRAINT FKterm_featqual FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; ALTER TABLE seqfeature_qualifier_value ADD CONSTRAINT FKseqfeature_featqual FOREIGN KEY ( seqfeature_id ) REFERENCES seqfeature ( seqfeature_id ) ON DELETE CASCADE ; -- seqfeature_dbxref ALTER TABLE seqfeature_dbxref ADD CONSTRAINT FKseqfeature_feadblink FOREIGN KEY ( seqfeature_id ) REFERENCES seqfeature ( seqfeature_id ) ON DELETE CASCADE ; ALTER TABLE seqfeature_dbxref ADD CONSTRAINT FKdbxref_feadblink FOREIGN KEY ( dbxref_id ) REFERENCES dbxref ( dbxref_id ) ON DELETE CASCADE ; -- location ALTER TABLE location ADD CONSTRAINT FKseqfeature_location FOREIGN KEY ( seqfeature_id ) REFERENCES seqfeature ( seqfeature_id ) ON DELETE CASCADE ; ALTER TABLE location ADD CONSTRAINT FKdbxref_location FOREIGN KEY ( dbxref_id ) REFERENCES dbxref ( dbxref_id ) ; ALTER TABLE location ADD CONSTRAINT FKterm_featloc FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; -- location_qualifier_value ALTER TABLE location_qualifier_value ADD CONSTRAINT FKfeatloc_locqual FOREIGN KEY ( location_id ) REFERENCES location ( location_id ) ON DELETE CASCADE ; ALTER TABLE location_qualifier_value ADD CONSTRAINT FKterm_locqual FOREIGN KEY ( term_id ) REFERENCES term ( term_id ) ; -- -- This is to solve a problem arising from how transactions are implemented -- in Postgres as opposed to, e.g., Oracle and InnoDB (MySQL). In short, the -- difference is that in the latter RDBMSs' implementation, if a particular -- statement within a transaction fails, the preceding (and possibly -- subsequent) statements are still valid. On commit, all succeeded statements -- are committed. In Postgres, the failure of a statement invalidates all -- preceding statements within the same transaction as well as all subsequent, -- if any. -- -- This leads to a problem if you program SQL insert and update statements -- such that presence of the record you attempt to insert is indicated by -- failure of the statement due to a unique key constraint violation. Even -- if your code is prepared to handle the failure by e.g. looking up the -- record, in the case of Postgres this approach cannot work unless you -- commit every single statement. -- -- The bioperl-db adaptor code uses the aforementioned approach and is -- currently dependent on the following support code. If you are not going -- to use bioperl-db to populate the database, you may comment out all -- rules, as then they might add another look-up to one already done on the -- code that you use and hence add unnecessary overhead. -- CREATE RULE rule_bioentry_i1 AS ON INSERT TO bioentry WHERE (SELECT oid FROM bioentry WHERE identifier = new.identifier) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_bioentry_i2 AS ON INSERT TO bioentry WHERE ( SELECT oid FROM bioentry WHERE accession = new.accession AND biodatabase_id = new.biodatabase_id AND version = new.version ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_biodatabase_i AS ON INSERT TO biodatabase WHERE (SELECT oid FROM biodatabase WHERE name = new.name) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_bioentry_dbxref_i AS ON INSERT TO bioentry_dbxref WHERE ( SELECT oid FROM bioentry_dbxref WHERE bioentry_id = new.bioentry_id AND dbxref_id = new.dbxref_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_bioentry_path_i AS ON INSERT TO bioentry_path WHERE ( SELECT oid FROM bioentry_relationship WHERE object_bioentry_id = new.object_bioentry_id AND subject_bioentry_id= new.subject_bioentry_id AND term_id = new.term_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_bioentry_qualifier_value_i AS ON INSERT TO bioentry_qualifier_value WHERE ( SELECT oid FROM bioentry_qualifier_value WHERE bioentry_id = new.bioentry_id AND term_id = new.term_id AND rank = new.rank ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_bioentry_reference_i AS ON INSERT TO bioentry_reference WHERE ( SELECT oid FROM bioentry_reference WHERE bioentry_id = new.bioentry_id AND reference_id = new.reference_id AND rank = new.rank ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_bioentry_relationship_i AS ON INSERT TO bioentry_relationship WHERE ( SELECT oid FROM bioentry_relationship WHERE object_bioentry_id = new.object_bioentry_id AND subject_bioentry_id= new.subject_bioentry_id AND term_id = new.term_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_biosequence_i AS ON INSERT TO biosequence WHERE (SELECT oid FROM biosequence WHERE bioentry_id = new.bioentry_id) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_comment_i AS ON INSERT TO comment WHERE ( SELECT oid FROM comment WHERE bioentry_id = new.bioentry_id AND rank = new.rank ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_dbxref_i AS ON INSERT TO dbxref WHERE ( SELECT oid FROM dbxref WHERE accession = new.accession AND dbname = new.dbname AND version = new.version ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_dbxref_qualifier_value_i AS ON INSERT TO dbxref_qualifier_value WHERE ( SELECT oid FROM dbxref_qualifier_value WHERE dbxref_id = new.dbxref_id AND term_id = new.term_id AND rank = new.rank ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_location_i AS ON INSERT TO location WHERE ( SELECT oid FROM location WHERE seqfeature_id = new.seqfeature_id AND rank = new.rank ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_location_qualifier_value_i AS ON INSERT TO location_qualifier_value WHERE ( SELECT oid FROM location_qualifier_value WHERE location_id = new.location_id AND term_id = new.term_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_ontology_i AS ON INSERT TO ontology WHERE (SELECT oid FROM ontology WHERE name = new.name) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_reference_i1 AS ON INSERT TO reference WHERE (SELECT oid FROM reference WHERE crc = new.crc) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_reference_i2 AS ON INSERT TO reference WHERE (SELECT oid FROM reference WHERE dbxref_id = new.dbxref_id) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_seqfeature_i AS ON INSERT TO seqfeature WHERE ( SELECT oid FROM seqfeature WHERE bioentry_id = new.bioentry_id AND type_term_id = new.type_term_id AND source_term_id = new.source_term_id AND rank = new.rank ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_seqfeature_dbxref_i AS ON INSERT TO seqfeature_dbxref WHERE ( SELECT oid FROM seqfeature_dbxref WHERE seqfeature_id = new.seqfeature_id AND dbxref_id = new.dbxref_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_seqfeature_path_i AS ON INSERT TO seqfeature_path WHERE ( SELECT oid FROM seqfeature_path WHERE object_seqfeature_id = new.object_seqfeature_id AND subject_seqfeature_id= new.subject_seqfeature_id AND term_id = new.term_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_seqfeature_qualifier_value_i AS ON INSERT TO seqfeature_qualifier_value WHERE ( SELECT oid FROM seqfeature_qualifier_value WHERE seqfeature_id = new.seqfeature_id AND term_id = new.term_id AND rank = new.rank ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_seqfeature_relationship_i AS ON INSERT TO seqfeature_relationship WHERE ( SELECT oid FROM seqfeature_relationship WHERE object_seqfeature_id = new.object_seqfeature_id AND subject_seqfeature_id= new.subject_seqfeature_id AND term_id = new.term_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_taxon_i AS ON INSERT TO taxon WHERE (SELECT oid FROM taxon WHERE ncbi_taxon_id = new.ncbi_taxon_id) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_taxon_name_i AS ON INSERT TO taxon_name WHERE ( SELECT oid FROM taxon_name WHERE taxon_id = new.taxon_id AND name = new.name AND name_class = new.name_class ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_term_i1 AS ON INSERT TO term WHERE (SELECT oid FROM term WHERE identifier = new.identifier) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_term_i2 AS ON INSERT TO term WHERE ( SELECT oid FROM term WHERE name = new.name AND ontology_id = new.ontology_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_term_dbxref_i AS ON INSERT TO term_dbxref WHERE ( SELECT oid FROM term_dbxref WHERE dbxref_id = new.dbxref_id AND term_id = new.term_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_term_path_i AS ON INSERT TO term_path WHERE ( SELECT oid FROM term_path WHERE subject_term_id = new.subject_term_id AND predicate_term_id = new.predicate_term_id AND object_term_id = new.object_term_id AND ontology_id = new.ontology_id AND distance = new.distance ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_term_relationship_i AS ON INSERT TO term_relationship WHERE ( SELECT oid FROM term_relationship WHERE subject_term_id = new.subject_term_id AND predicate_term_id = new.predicate_term_id AND object_term_id = new.object_term_id AND ontology_id = new.ontology_id ) IS NOT NULL DO INSTEAD NOTHING ; CREATE RULE rule_term_synonym_i AS ON INSERT TO term_synonym WHERE ( SELECT oid FROM term_synonym WHERE synonym = new.synonym AND term_id = new.term_id ) IS NOT NULL DO INSTEAD NOTHING ; -- -- Functions that may be used as an API by applications, e.g. load scripts etc. -- -- this is used by load_ncbi_taxonomy.pl to speed up loading into the taxon -- table by 1 to 2 orders of magnitude CREATE OR REPLACE FUNCTION unconstrain_taxon () RETURNS INTEGER AS ' DROP RULE rule_taxon_i ON taxon; SELECT 1; ' LANGUAGE SQL VOLATILE STRICT SECURITY DEFINER ; -- this function re-establishes what unconstrain_taxon() removed temporarily CREATE OR REPLACE FUNCTION constrain_taxon () RETURNS INTEGER AS ' CREATE RULE rule_taxon_i AS ON INSERT TO taxon WHERE (SELECT oid FROM taxon WHERE ncbi_taxon_id = new.ncbi_taxon_id) IS NOT NULL DO INSTEAD NOTHING ; SELECT 1; ' LANGUAGE SQL VOLATILE STRICT SECURITY DEFINER ; From len at reeltwo.com Tue Oct 14 17:37:38 2003 From: len at reeltwo.com (Len Trigg) Date: Tue Oct 14 17:35:07 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceDB In-Reply-To: <3F8C2C5B.5070303@yahoo.co.uk> References: <000001c3917d$5ade3f40$707ba8c0@blast> <3F8BF13F.1060407@yahoo.co.uk> <3F8C2C5B.5070303@yahoo.co.uk> Message-ID: Matthew Pocock wrote: > The version in CVS works for me. I had to do some work to the > OntologySQL class, and modify the biosql schema (which I've attached). Can you include some tests for correct ontology persistence into the DB tests I wrote? > BioSQL People - could you check the single table I've added > (term_relationship_term) and see if it's sane for folding back into the > trunk of biosql development? I'm no expert, but it looks fine to me. Does Hilmar read this list? Is this code in any way optional? It looks to me like this will break compatibility with existing BioSQL databases. (I'd test it, but biojava cvs is broken at the moment). Cheers, Len. From len at reeltwo.com Tue Oct 14 18:22:04 2003 From: len at reeltwo.com (Len Trigg) Date: Tue Oct 14 18:19:28 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceDB In-Reply-To: References: Message-ID: Hilmar Lapp wrote: > On Tuesday, October 14, 2003, at 02:37 PM, Len Trigg wrote: > > >> BioSQL People - could you check the single table I've added > >> (term_relationship_term) and see if it's sane for folding back into > >> the > >> trunk of biosql development? > >> > > What's this table? -hilmar The full message should be in the biojava list archive, but the relevant snippet is: -- Link a triple to a term, giving it a unique identifier. This allows -- arbitrary expressions to be built up by then using the linked-to term -- in another triple. -- -- e.g. implies(isa(x, y), hasa(x, z)) CREATE TABLE term_relationship_term ( term_relationship_id INTEGER NOT NULL, term_id INTEGER NOT NULL, PRIMARY KEY ( term_relationship_id, term_id ), UNIQUE ( term_relationship_id ), UNIQUE ( term_id ) ); Cheers, Len. From facemann at yahoo.com Tue Oct 14 21:46:20 2003 From: facemann at yahoo.com (Andy Hammer) Date: Tue Oct 14 21:43:43 2003 Subject: [Biojava-l] Build errors Message-ID: <20031015014620.82943.qmail@web13405.mail.yahoo.com> As some have suggested, I checked the following: I have the bytecode.jar file as shown -rwxrwxr-x 1 ahammer ahammer 91K Jul 28 08:18 bytecode.jar My PATH has no old biojava.jar references PATH = .:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/ahammer/bin:/usr/java/bin:/usr/ant/bin Also the java/jre/lib/ext directory is devoid of any biojava.jars I get the errors: compile-biojava: [javac] Compiling 1099 source files to /home/ahammer/downloads/biojava-live/ant-build/classes/biojava [javac] depend attribute is not supported by the modern compiler [javac] /home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:9: package org.biojava.ontology.format.triples.lexer does not exist [javac] import org.biojava.ontology.format.triples.lexer.Lexer; [javac] ^ [javac] /home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:10: package org.biojava.ontology.format.triples.lexer does not exist [javac] import org.biojava.ontology.format.triples.lexer.LexerException; [javac] ^ [javac] /home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:11: package org.biojava.ontology.format.triples.parser does not exist [javac] import org.biojava.ontology.format.triples.parser.Parser; [javac] ^ [javac] /home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:12: package org.biojava.ontology.format.triples.parser does not exist . . . many more . . . ending with [javac] /home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:392: cannot resolve symbol [javac] symbol : class ACompoundFullName [javac] location: class org.biojava.ontology.io.TriplesParser.Processor [javac] ACompoundFullName fn = (ACompoundFullName) fullName; [javac] ^ [javac] /home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:392: cannot resolve symbol [javac] symbol : class ACompoundFullName [javac] location: class org.biojava.ontology.io.TriplesParser.Processor [javac] ACompoundFullName fn = (ACompoundFullName) fullName; [javac] ^ [javac] /home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:408: cannot resolve symbol [javac] symbol : class AIntegerLiteralValue [javac] location: class org.biojava.ontology.io.TriplesParser.Processor [javac] if(v instanceof AIntegerLiteralValue) { [javac] ^ [javac] 100 errors Any suggestions? Andy __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From matthew_pocock at yahoo.co.uk Wed Oct 15 05:03:26 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Wed Oct 15 05:04:16 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceDB In-Reply-To: <6235DCB4-FE97-11D7-92B3-000A959EB4C4@gnf.org> References: <6235DCB4-FE97-11D7-92B3-000A959EB4C4@gnf.org> Message-ID: <3F8D0D5E.1080405@yahoo.co.uk> >> -- Link a triple to a term, giving it a unique identifier. This allows >> -- arbitrary expressions to be built up by then using the linked-to term >> -- in another triple. >> -- >> -- e.g. implies(isa(x, y), hasa(x, z)) >> CREATE TABLE term_relationship_term ( >> term_relationship_id INTEGER NOT NULL, >> term_id INTEGER NOT NULL, >> PRIMARY KEY ( term_relationship_id, term_id ), >> UNIQUE ( term_relationship_id ), >> UNIQUE ( term_id ) ); >> > > I have 3 comments on this. > > 1) Given the unique foreign keys, this amounts to a 1-1 relationship > to both term and term_relationship, and therefore can be tacked on to > either of the two as a single foreign key. Yes. I didn't want to break the current schema, so added it this way. > > 2) It looks like you want to equate a triple to a term. Likewise, it > seems what you really want to have is a triple with subject and object > being triples themselves. Idealy, I want all triples to be terms themselves. Not all terms are triples though. The modified schema still supports 'anonymous' triples as well. > > 3) The example is poorly chosen and in fact I don't really understand > when you'd want all this. If x,y,z are arbitrary, then it can be > re-written as implies(isa,hasa), which is a 'normal' triple. This is different to your example because it's scoped by the type 'y'. Here is a more expressive rule - transitive closure (varables starting with '_' ): implies(and(isa(_t, transitive), and(_t(_x, _y), _t(_y, _z))), _t(_x, _z)) Your example of imples(isa, hasa) is relying (I think) on some semantic magic - isa and hasa are both atoms, which happen to be relations. As such, they are not truth values that could be applied to the predicate implies. They only evaluate to truth values when applied to subject and object, but you're not specifying these - what do they default to? Triples in expressions are not needed for pure data representation, but are needed (I think) for any encoding of rules (e.g. the hyperthetical rule: all EMBL feature types map to SO terms by looking up the SO term alias equal to the EMBL feature type). Chris, am I barking up the wrong tree? Matthew > > > So I guess I'm missing something and I'd be glad to learn what. > > Also, Chris do you have any thoughts on this? > > -hilmar > From matthew_pocock at yahoo.co.uk Wed Oct 15 05:03:39 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Wed Oct 15 05:04:19 2003 Subject: [Biojava-l] builds Message-ID: <3F8D0D6B.9000302@yahoo.co.uk> Hi, I think the grammar in the biojava cvs will barf if you use sablecc 3.beta.1 - you need 3.beta.2 to make it compile correctly. Sorry for any inconvenience caused. Matthew From matthew_pocock at yahoo.co.uk Wed Oct 15 07:08:45 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Wed Oct 15 07:09:33 2003 Subject: [Biojava-l] Build errors In-Reply-To: <20031015014620.82943.qmail@web13405.mail.yahoo.com> References: <20031015014620.82943.qmail@web13405.mail.yahoo.com> Message-ID: <3F8D2ABD.3090402@yahoo.co.uk> Make sure you have sablecc.jar added to your ant/lib directory - grab from sourceforge. Version 3.beta.2 seems to work, 3.beta.1 doesn't. Matthew Andy Hammer wrote: >As some have suggested, I checked the following: >I have the bytecode.jar file as shown >-rwxrwxr-x 1 ahammer ahammer 91K Jul 28 >08:18 bytecode.jar > >My PATH has no old biojava.jar references >PATH = >.:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/ahammer/bin:/usr/java/bin:/usr/ant/bin >Also the java/jre/lib/ext directory is devoid of any >biojava.jars > >I get the errors: >compile-biojava: > [javac] Compiling 1099 source files to >/home/ahammer/downloads/biojava-live/ant-build/classes/biojava > [javac] depend attribute is not supported by the >modern compiler > [javac] >/home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:9: >package org.biojava.ontology.format.triples.lexer does >not exist > [javac] import >org.biojava.ontology.format.triples.lexer.Lexer; > [javac] > ^ > [javac] >/home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:10: >package org.biojava.ontology.format.triples.lexer does >not exist > [javac] import >org.biojava.ontology.format.triples.lexer.LexerException; > [javac] > ^ > [javac] >/home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:11: >package org.biojava.ontology.format.triples.parser >does not exist > [javac] import >org.biojava.ontology.format.triples.parser.Parser; > [javac] > ^ > [javac] >/home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:12: >package org.biojava.ontology.format.triples.parser >does not exist > >. . . >many more >. . . >ending with > [javac] >/home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:392: >cannot resolve symbol > [javac] symbol : class ACompoundFullName > [javac] location: class >org.biojava.ontology.io.TriplesParser.Processor > [javac] ACompoundFullName fn = >(ACompoundFullName) fullName; > [javac] ^ > [javac] >/home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:392: >cannot resolve symbol > [javac] symbol : class ACompoundFullName > [javac] location: class >org.biojava.ontology.io.TriplesParser.Processor > [javac] ACompoundFullName fn = >(ACompoundFullName) fullName; > [javac] ^ > [javac] >/home/ahammer/downloads/biojava-live/ant-build/src/biojava/org/biojava/ontology/io/TriplesParser.java:408: >cannot resolve symbol > [javac] symbol : class AIntegerLiteralValue > [javac] location: class >org.biojava.ontology.io.TriplesParser.Processor > [javac] if(v instanceof >AIntegerLiteralValue) { > [javac] ^ > [javac] 100 errors > >Any suggestions? > >Andy > > >__________________________________ >Do you Yahoo!? >The New Yahoo! Shopping - with improved product search >http://shopping.yahoo.com >_______________________________________________ >Biojava-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > > > From matthew_pocock at yahoo.co.uk Wed Oct 15 08:15:32 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Wed Oct 15 08:16:30 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceD B In-Reply-To: <200310151135.HAA17952@nrcbsa.bio.nrc.ca> References: <200310151135.HAA17952@nrcbsa.bio.nrc.ca> Message-ID: <3F8D3A64.7050005@yahoo.co.uk> This sounds ideal. I look forward to seeing it in CVS. When you commit, could you make sure that the jakarta jar files are in CVS as well (-kb as binary)? Matthew S. Foote wrote: >Hi Guys, > >I have a modified version of the BioSQL classes that uses the standard >Jakarta connection pool apis and has been working flawlessly in production >for the last 4 months. I have been meaning to check it into the cvs, but >hadn't got around to it. > >If there's no objections I'll update my developer cvs version with the >latest changes and merge those with my modified connection pool version >and then check it in. > >Cheers, >Simon Foote > > According to Matthew Pocock: > > >>Matthew Pocock wrote: >> >> >> >>>More news when I have it. >>> >>> >>I have more news :) >> >>The version in CVS works for me. I had to do some work to the >>OntologySQL class, and modify the biosql schema (which I've attached). >>In the end, I removed the symptom by dissabling connection re-use in >>JDBCConnectionPool. Could we either a) make JDBCConnectionPool work with >>rollback gracefully or b) switch to a standard connection pool API? My >>vote is for option 2, but then some of the things I read via google >>indicated that we may have the same problems. >> >>BioSQL People - could you check the single table I've added >>(term_relationship_term) and see if it's sane for folding back into the >>trunk of biosql development? >> >>Matthew >> >> >> >> > >[Attachment, skipping...] > >[Attachment, skipping...] > > > From facemann at yahoo.com Wed Oct 15 12:54:09 2003 From: facemann at yahoo.com (Andy Hammer) Date: Wed Oct 15 12:51:32 2003 Subject: [Biojava-l] Build errors Message-ID: <20031015165409.55169.qmail@web13405.mail.yahoo.com> That did the trick! Thanks Matthew __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com From len at reeltwo.com Thu Oct 16 14:45:17 2003 From: len at reeltwo.com (Len Trigg) Date: Thu Oct 16 14:42:48 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceD B In-Reply-To: <3F8E8519.4070605@nrc-cnrc.gc.ca> References: <3F8E8519.4070605@nrc-cnrc.gc.ca> Message-ID: <3F8EE73D.2030701@reeltwo.com> Simon Foote wrote: > The new code does indeed break existing BioSQL databases. As far as I > can tell it relates to the changes in the core_ontology. > To test this, I found that within my existing databases, the > core_ontology terms are never used, so I removed all the core_ontology > terms from the database. I then re-ran one of my DB programs, so the > core ontology would be re-built, but it fails with this error. So, is this the recommended upgrade method? (I'll have to check whether or not the core_ontology terms are used in my db's, but I don't think they are) Cheers, Len. From matthew_pocock at yahoo.co.uk Fri Oct 17 07:08:08 2003 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Fri Oct 17 07:10:06 2003 Subject: [Biojava-l] ontology exception, addSequence & BioSQLSequenceD B In-Reply-To: <3F8EE73D.2030701@reeltwo.com> References: <3F8E8519.4070605@nrc-cnrc.gc.ca> <3F8EE73D.2030701@reeltwo.com> Message-ID: <3F8FCD98.7000408@yahoo.co.uk> I think this is safe. The core_ontology terms would be used if you commited any interpretation logic (e.g. rules saying what feature types are allowed or not allowed). However, we aren't doing that sort of thing yet. The workaround for the last bug is apparently to mark the name field on term as BINARY - this ensures that it does a case-sensetive indexing. Postgresql does case-sensetive indexing automatically, but MySQL doesn't. Best, Matthew Len Trigg wrote: > Simon Foote wrote: > >> The new code does indeed break existing BioSQL databases. As far as >> I can tell it relates to the changes in the core_ontology. >> To test this, I found that within my existing databases, the >> core_ontology terms are never used, so I removed all the >> core_ontology terms from the database. I then re-ran one of my DB >> programs, so the core ontology would be re-built, but it fails with >> this error. > > > So, is this the recommended upgrade method? (I'll have to check > whether or not the core_ontology terms are used in my db's, but I > don't think they are) > > > Cheers, > Len. > > _______________________________________________ > Biojava-l mailing list - Biojava-l@biojava.org > http://biojava.org/mailman/listinfo/biojava-l > From kiviet at science.uva.nl Fri Oct 17 11:21:28 2003 From: kiviet at science.uva.nl (Daniel Kiviet) Date: Fri Oct 17 11:18:45 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into a single Sequence object? Message-ID: <63479.150.203.2.85.1066404088.squirrel@webmail.science.uva.nl> Hello, I'm trying to create a genome viewer by importing EMBL files using the SeqIOTools.readEmbl function. This gives me an iterator over the sequences in the embl file. The embl files I am using are split up in several sections within the embl file ('section 1 of 109 of the complete genome' etc). Does anyone know how to combine multiple Sequence objects into a single Sequence object? Thanks & best regards, Daniel Kiviet -------------------- Daniel Kiviet ANU, Canberra ACT , Australia From mark.schreiber at agresearch.co.nz Sat Oct 18 00:14:40 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Sat Oct 18 00:12:03 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into a singleSequence object? Message-ID: Hi - We get asked this a lot. Unfortunately there isn't an easy solution. If you have access to all of the files referenced in the main EMBL file then you could write a simple program to retrieve and open them all and then use something like Edit functions to join them together. - Mark -----Original Message----- From: Daniel Kiviet [mailto:kiviet@science.uva.nl] Sent: Sat 18/10/2003 4:21 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] How to combine multiple Sequence objects into a singleSequence object? Hello, I'm trying to create a genome viewer by importing EMBL files using the SeqIOTools.readEmbl function. This gives me an iterator over the sequences in the embl file. The embl files I am using are split up in several sections within the embl file ('section 1 of 109 of the complete genome' etc). Does anyone know how to combine multiple Sequence objects into a single Sequence object? Thanks & best regards, Daniel Kiviet -------------------- Daniel Kiviet ANU, Canberra ACT , Australia _______________________________________________ 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. ======================================================================= From kiviet at science.uva.nl Sat Oct 18 02:13:56 2003 From: kiviet at science.uva.nl (Daniel Kiviet) Date: Sat Oct 18 02:11:22 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into a singleSequence object? Message-ID: <34090.150.203.2.60.1066457636.squirrel@webmail.science.uva.nl> Thanks for your quick respons Mark! I manage to get all the required sequences, but am having problems combining them (together with their features). Do you maybe know where I could find some example code of such 'joining' with the Edit functions? Cheers, Daniel > Hi - > > We get asked this a lot. Unfortunately there isn't an easy solution. > If you have access to all of the files referenced in the main EMBL > file then you could write a simple program to retrieve and open them > all and then use something like Edit functions to join them together. > > - Mark > > > -----Original Message----- > From: Daniel Kiviet [mailto:kiviet@science.uva.nl] > Sent: Sat 18/10/2003 4:21 a.m. > To: biojava-l@biojava.org > Cc: > Subject: [Biojava-l] How to combine multiple Sequence objects into a > singleSequence object? > > > Hello, > > I'm trying to create a genome viewer by importing EMBL files using > the > SeqIOTools.readEmbl function. This gives me an iterator over the > sequences in the embl file. The embl files I am using are split up in > several sections within the embl file ('section 1 of 109 of the > complete genome' etc). > > Does anyone know how to combine multiple Sequence objects into a > single Sequence object? > > Thanks & best regards, > Daniel Kiviet > > > > -------------------- > Daniel Kiviet > ANU, Canberra ACT , Australia > > > _______________________________________________ > 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. > ======================================================================= -------------------- Daniel Kiviet Fenner Hall, ANU GPO Box 10 Canberra ACT 2601 Australia tel. +61 2 612 59224 mob. +61 4 036 86302 From fpepin at cs.mcgill.ca Sat Oct 18 10:43:39 2003 From: fpepin at cs.mcgill.ca (Francois Pepin) Date: Sat Oct 18 10:40:37 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into asingleSequence object? In-Reply-To: Message-ID: <000101c39586$3b513580$e0abfea9@hermes> Yeah, but you'd still need to copy the annotations and features over as well. Maybe some method to append 2 sequences (maybe to split it in 2 as well) along with all their luggage would be a good idea. SequenceTools would probably be the best place for that. Fran?ois -----Original Message----- From: biojava-l-bounces@portal.open-bio.org [mailto:biojava-l-bounces@portal.open-bio.org] On Behalf Of Schreiber, Mark Sent: 18 octobre, 2003 00:15 To: kiviet@science.uva.nl; biojava-l@biojava.org Subject: RE: [Biojava-l] How to combine multiple Sequence objects into asingleSequence object? Hi - We get asked this a lot. Unfortunately there isn't an easy solution. If you have access to all of the files referenced in the main EMBL file then you could write a simple program to retrieve and open them all and then use something like Edit functions to join them together. - Mark -----Original Message----- From: Daniel Kiviet [mailto:kiviet@science.uva.nl] Sent: Sat 18/10/2003 4:21 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] How to combine multiple Sequence objects into a singleSequence object? Hello, I'm trying to create a genome viewer by importing EMBL files using the SeqIOTools.readEmbl function. This gives me an iterator over the sequences in the embl file. The embl files I am using are split up in several sections within the embl file ('section 1 of 109 of the complete genome' etc). Does anyone know how to combine multiple Sequence objects into a single Sequence object? Thanks & best regards, Daniel Kiviet -------------------- Daniel Kiviet ANU, Canberra ACT , Australia _______________________________________________ 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 From kdj at sanger.ac.uk Sun Oct 19 06:24:34 2003 From: kdj at sanger.ac.uk (Keith James) Date: Sun Oct 19 06:24:34 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into a singleSequence object? In-Reply-To: References: Message-ID: >>>>> "Mark" == Schreiber, Mark writes: Mark> Hi - We get asked this a lot. Unfortunately there isn't an Mark> easy solution. If you have access to all of the files Mark> referenced in the main EMBL file then you could write a Mark> simple program to retrieve and open them all and then use Mark> something like Edit functions to join them together. Is this the purpose of Assembly and ComponentFeature? I haven't used these, but it looks like you can create an aggregate sequence. I had a brief look at the code and it seems that a current limitation is that new features cannot be created on the component sequences. See NewSimpleAssemblyTest in tests which creates a SimpleAssembly (which isa Sequence) from 6 smaller Sequences. Keith -- - Keith James Microarray Facility, Team 65 - - The Wellcome Trust Sanger Institute, Hinxton, Cambridge, UK - From matthew_pocock at yahoo.co.uk Sun Oct 19 11:01:33 2003 From: matthew_pocock at yahoo.co.uk (=?iso-8859-1?q?Matthew=20Pocock?=) Date: Sun Oct 19 10:58:47 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into a singleSequence object? In-Reply-To: Message-ID: <20031019150133.14659.qmail@web86205.mail.ukl.yahoo.com> This is exactly the sort of thing that ComponentFeature is designed for. I don't know if we have a user instantiable sequence class that you can use out of the box - perhaps Assembly is it. I will take a look monday Matthew --- Keith James wrote: > >>>>> "Mark" == Schreiber, Mark > writes: > > Mark> Hi - We get asked this a lot. > Unfortunately there isn't an > Mark> easy solution. If you have access to all > of the files > Mark> referenced in the main EMBL file then you > could write a > Mark> simple program to retrieve and open them > all and then use > Mark> something like Edit functions to join them > together. > > Is this the purpose of Assembly and > ComponentFeature? I haven't used > these, but it looks like you can create an aggregate > sequence. I had a > brief look at the code and it seems that a current > limitation is that > new features cannot be created on the component > sequences. > > See NewSimpleAssemblyTest in tests which creates a > SimpleAssembly > (which isa Sequence) from 6 smaller Sequences. > > Keith > > -- > > - Keith James Microarray > Facility, Team 65 - > - The Wellcome Trust Sanger Institute, Hinxton, > Cambridge, UK - > _______________________________________________ > Biojava-l mailing list - Biojava-l@biojava.org > http://biojava.org/mailman/listinfo/biojava-l ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk From david.huen at ntlworld.com Sun Oct 19 12:43:33 2003 From: david.huen at ntlworld.com (David Huen) Date: Sun Oct 19 12:40:55 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into a singleSequence object? In-Reply-To: <20031019150133.14659.qmail@web86205.mail.ukl.yahoo.com> References: <20031019150133.14659.qmail@web86205.mail.ukl.yahoo.com> Message-ID: <200310191743.34416.david.huen@ntlworld.com> On Sunday 19 Oct 2003 4:01 pm, Matthew Pocock wrote: > This is exactly the sort of thing that > ComponentFeature is designed for. I don't know if we > have a user instantiable sequence class that you can > use out of the box - perhaps Assembly is it. I will > take a look monday > SimpleAssembly is your friend. From mark.schreiber at agresearch.co.nz Sun Oct 19 16:39:48 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Sun Oct 19 16:37:42 2003 Subject: [Biojava-l] How to combine multiple Sequence objects into asingleSequence object? Message-ID: Hi - If someone has an example of joining lots of EMBL sequences with SimpleAssembly and ComponentFeature (or something similar) could you send it to me so I can make an example for biojava in anger as a reference for solving this problem in the future? Thanks Mark -----Original Message----- From: David Huen [mailto:david.huen@ntlworld.com] Sent: Monday, 20 October 2003 5:44 a.m. To: Matthew Pocock; Keith James; biojava-l@biojava.org Subject: Re: [Biojava-l] How to combine multiple Sequence objects into asingleSequence object? On Sunday 19 Oct 2003 4:01 pm, Matthew Pocock wrote: > This is exactly the sort of thing that > ComponentFeature is designed for. I don't know if we > have a user instantiable sequence class that you can > use out of the box - perhaps Assembly is it. I will > take a look monday > SimpleAssembly is your friend. _______________________________________________ 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. ======================================================================= From jamest at cse.unsw.edu.au Mon Oct 20 08:35:51 2003 From: jamest at cse.unsw.edu.au (Hoai Sang James Truong) Date: Mon Oct 20 08:33:03 2003 Subject: [Biojava-l] (no subject) Message-ID: Hi, my name is James. I'm a 3rd year bioinformatics student studying at UNSW. I'm in a team of 3, and together we are researching biojava, it's history, current state and so forth. I'm finding though there is an absense of formal commentary on biojava. So I was wondering, how one might find out more about biojava. We are hoping to understand biojava from the inside. We also hope to make use of it, and ultimately, as naive as it may seem, contribute to the open source project if possible. Any comments or feed back is welcome, and would be greatly appreciated. kind regards, James From mark.schreiber at agresearch.co.nz Mon Oct 20 16:02:02 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Mon Oct 20 15:59:26 2003 Subject: [Biojava-l] (no subject) Message-ID: Hi - Biojava historians eh? I suppose the best place to look would be the biojava page. www.biojava.org. There is also a biojava in anger page that contains some tutorial material that might be of use. There is also some background and demos/ tutorials off the main biojava page. I think (someone correct me if I'm wrong here) it got up and running around 1998 with Matthew Pocock and Thomas Down at the Sanger Centre (now Sanger institute). It currently has about 5 core developers and ~50 peoples names appear in @author tags on the code. The last stable release was biojava 1.3 (although we should probably put out the accumulated bug fixes). The development version is biojava-live that has > 1000 classes and far too many lines of code to count! Feel free to post other questions to the list. - Mark -----Original Message----- From: Hoai Sang James Truong [mailto:jamest@cse.unsw.edu.au] Sent: Tue 21/10/2003 1:35 a.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] (no subject) Hi, my name is James. I'm a 3rd year bioinformatics student studying at UNSW. I'm in a team of 3, and together we are researching biojava, it's history, current state and so forth. I'm finding though there is an absense of formal commentary on biojava. So I was wondering, how one might find out more about biojava. We are hoping to understand biojava from the inside. We also hope to make use of it, and ultimately, as naive as it may seem, contribute to the open source project if possible. Any comments or feed back is welcome, and would be greatly appreciated. kind regards, James _______________________________________________ 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. ======================================================================= From vc100 at doc.ic.ac.uk Tue Oct 21 23:30:47 2003 From: vc100 at doc.ic.ac.uk (Vasa Curcin) Date: Tue Oct 21 23:27:06 2003 Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? References: Message-ID: <3F95F9E7.2010606@doc.ic.ac.uk> Having exactly the same problem here with serializing SimpleSequence objects containing proteins. It doesn't like MET... Was there a solution found? Vasa Schreiber, Mark wrote: >Hi - > >I am not getting the exception you have below (which looks like one from before we fixed the EmblFileFormer). I am however getting an InvalidObjectException which is comming from something odd in the AlphabetManager. I'll have a look into it. > >java.io.InvalidObjectException: Couldn't resolve symbol:MET > at org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve(AlphabetManager.java:1480) > >- Mark > > > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Tue 7/10/2003 3:50 a.m. > To: Schreiber, Mark; biojava-l@biojava.org > Cc: > Subject: RE: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? > > > > Hi Mark, > > I have downloaded and tested the latest EmblFileFormer.java (1.24.2.1) and > it can now successfully write out a swissprot format file after first having > written it in (Thank you). > However, i am still seeing an exception attempting to read in a serialized > sequence. Test code and exception below. > > Best regards, > > Mark. > > //------------------------------------------ > > public static void main(String[] args) throws Exception{ > File file = new File("c:\\temp\\sequence.ser"); > String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; > > SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( > SeqIOConstants.SWISSPROT, new BufferedReader( new FileReader( seqFile ) ) ); > > Sequence seq = iter.nextSequence(); > > // this now works > //SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, > seq ); > > ObjectOutputStream out = new ObjectOutputStream( new > FileOutputStream(file) ); > out.writeObject( seq ); > out.flush(); > out.close(); > > ObjectInputStream in = new ObjectInputStream( new > FileInputStream(file) ); > // still get an error deserializing > seq = (Sequence) in.readObject(); > in.close(); > } > > //------------------------------------------ > org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in > alphabet DNA > at > org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) > at > org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val > idate(AlphabetManager.java:1423) > at > org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni > zation.java:178) > at > org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz > ation.java:191) > at > org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize > Symbol(AlphabetManager.java:1276) > at > org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe > nEmblFileFormer.java:337) > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) > rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not > tokenizing > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:125) > rethrown as org.biojava.bio.BioError: An internal error occurred processing > symbols > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:137) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) > at > org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) > at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) > at > org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) > at com.exsar.test.SerializeTest.main(SerializeTest.java:36) > > > -----Original Message----- > From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] > Sent: Wednesday, October 01, 2003 1:54 AM > To: msouthern@exsar.com; biojava-l@biojava.org > Subject: RE: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > OK - > > I tracked it down to a bug in the EMBLFileFormer (which gets coopted for > SwissProt writing). It assumed a DNA alphabet and therefore couldn't write > protein in SwissProt format. > > I have checked it into CVS, I will port it back to the 1.3 branch of CVS > shortly. > > - Mark > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Wed 1/10/2003 1:25 a.m. > To: Schreiber, Mark; biojava-l@biojava.org > Cc: > Subject: RE: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > Hi Mark, > > I did also have an error with binary serialization. I was just trying to > approach to problem from a different direction. B/c that also was a problem > with finding / determining a protein symbol, i wondered if was coming from > AlphabetManager rather than the Swissprot writing. I include below the code > fragment along with the serialization error. > > Best regards, > > Mark. > > > public static void main(String[] args) throws Exception{ > File file = new File("c:\\temp\\sequence.ser"); > String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; > > SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( > SeqIOConstants.SWISSPROT > , > new BufferedReader( new FileReader( seqFile ) ) ); > > Sequence seq = iter.nextSequence(); > > System.out.println("\nWriting Sequence object"); > ObjectOutputStream out = new ObjectOutputStream( new > FileOutputStream(file) ); > out.writeObject( seq ); > out.flush(); > out.close(); > > System.out.println("\nReading Sequence object"); > ObjectInputStream in = new ObjectInputStream( new > FileInputStream(file) ); > seq = (Sequence) in.readObject(); > in.close(); > > } > > Writing Sequence object > Reading Sequence object > java.io.InvalidObjectException: Couldn't resolve symbol:ALA > at > org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve > (AlphabetManager.java:1480) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) > at > org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at com.exsar.test.SerializeTest.main(SerializeTest.java:38) > Exception in thread "main" > > > > -----Original Message----- > From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] > Sent: Tuesday, September 30, 2003 6:28 AM > To: msouthern@exsar.com; biojava-l@biojava.org > Subject: RE: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > Hi - > > I was a bit thrown off at first cause I thought you meant there was an error > in binary serialization. There seems to be a problem with SwissProt writing. > I've commited an addition to SeqIOToolsTest in biojava live that replicates > the error but I haven't got time to track it down just yet. If some one else > doesn't get it I'll probably find it tommorrow. > > - Mark > > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Tue 30/09/2003 10:45 a.m. > To: biojava-l@biojava.org > Cc: > Subject: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > Appologies for following up on my own post. What follows is a simpler test > than the serialization I attempted before. > > Consider the bit of code below and corresponding error message; > > For some reason, the protein sequence is being treated as a dna sequence. Is > there something I am missing with respect to how AlphabetManager treats dna > and protein alphabets? > > Any explainations would be most welcome. > > Thanks again, > > Mark. > > > //------------------------------------------------------------------------ > > public static void main(String[] args) throws Exception{ > String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; > SequenceIterator iter = (SequenceIterator) > SeqIOTools.fileToBiojava(SeqIOConstants.SWISSPROT > > ,new BufferedReader( new FileReader( seqFile ) ) ); > Sequence seq = iter.nextSequence(); > SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, > seq ); > } > > > org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in > alphabet DNA > at > org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) > at > org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val > idate(AlphabetManager.java:1423) > at > org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni > zation.java:178) > at > org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz > ation.java:191) > at > org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize > Symbol(AlphabetManager.java:1276) > at > org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe > nEmblFileFormer.java:337) > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) > rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not > tokenizing > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:125) > rethrown as org.biojava.bio.BioError: An internal error occurred processing > symbols > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:137) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) > at > org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) > at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) > at > org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) > at com.exsar.test.SerializeTest.main(SerializeTest.java:24) > > > > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Monday, September 29, 2003 2:01 PM > Cc: 'biojava-l@biojava.org' > Subject: Sequence serialization exception > > > I am getting the following exception when trying to serialize a protein > sequence. I am using biojava 1.3. Can anyone please explain to me why? > > Many thanks, > > Mark. > > > java.io.InvalidObjectException: Couldn't resolve symbol:SER > at > org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve > (AlphabetManager.java:1441) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) > at > org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) > at org.biojava.bio.seq.ViewSequence.readObject(ViewSequence.java:93) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at java.util.HashMap.readObject(HashMap.java:985) > at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at java.util.HashMap.readObject(HashMap.java:986) > at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at com.exsar.hdex.model.calc.Test.main(Test.java:104) > > > > > > _______________________________________________ > 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. > > ======================================================================= > > ======================================================================= > > 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. > > ======================================================================= > > > > > >======================================================================= >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 > > From mark.schreiber at agresearch.co.nz Wed Oct 22 18:19:43 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Wed Oct 22 18:17:41 2003 Subject: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Message-ID: Hi - Binary serialization of protein sequences is currently broken. I need to move to a pattern of using LSIDs to identify them uniquely. This should fix the problem. Just need to find time to do it - Mark -----Original Message----- From: Vasa Curcin [mailto:vc100@doc.ic.ac.uk] Sent: Wednesday, 22 October 2003 4:31 p.m. To: Schreiber, Mark Cc: msouthern@exsar.com; biojava-l@biojava.org Subject: Re: [Biojava-l] RE: Sequence serialization exception - AlphabetManagerproblem? Having exactly the same problem here with serializing SimpleSequence objects containing proteins. It doesn't like MET... Was there a solution found? Vasa Schreiber, Mark wrote: >Hi - > >I am not getting the exception you have below (which looks like one >from before we fixed the EmblFileFormer). I am however getting an InvalidObjectException which is comming from something odd in the AlphabetManager. I'll have a look into it. > >java.io.InvalidObjectException: Couldn't resolve symbol:MET > at >org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve(AlphabetManager.java:1480) > >- Mark > > > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Tue 7/10/2003 3:50 a.m. > To: Schreiber, Mark; biojava-l@biojava.org > Cc: > Subject: RE: [Biojava-l] RE: Sequence serialization exception - >AlphabetManagerproblem? > > > > Hi Mark, > > I have downloaded and tested the latest EmblFileFormer.java (1.24.2.1) and > it can now successfully write out a swissprot format file after first having > written it in (Thank you). > However, i am still seeing an exception attempting to read in a serialized > sequence. Test code and exception below. > > Best regards, > > Mark. > > //------------------------------------------ > > public static void main(String[] args) throws Exception{ > File file = new File("c:\\temp\\sequence.ser"); > String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; > > SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( > SeqIOConstants.SWISSPROT, new BufferedReader( new FileReader( seqFile >) ) ); > > Sequence seq = iter.nextSequence(); > > // this now works > //SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, > seq ); > > ObjectOutputStream out = new ObjectOutputStream( new > FileOutputStream(file) ); > out.writeObject( seq ); > out.flush(); > out.close(); > > ObjectInputStream in = new ObjectInputStream( new > FileInputStream(file) ); > // still get an error deserializing > seq = (Sequence) in.readObject(); > in.close(); > } > > //------------------------------------------ > org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in > alphabet DNA > at > org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) > at > org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val > idate(AlphabetManager.java:1423) > at > org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni > zation.java:178) > at > org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz > ation.java:191) > at > org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize > Symbol(AlphabetManager.java:1276) > at > org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe > nEmblFileFormer.java:337) > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) > rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not > tokenizing > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:125) > rethrown as org.biojava.bio.BioError: An internal error occurred processing > symbols > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:137) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) > at > org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) > at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) > at > org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) > at com.exsar.test.SerializeTest.main(SerializeTest.java:36) > > > -----Original Message----- > From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] > Sent: Wednesday, October 01, 2003 1:54 AM > To: msouthern@exsar.com; biojava-l@biojava.org > Subject: RE: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > OK - > > I tracked it down to a bug in the EMBLFileFormer (which gets coopted for > SwissProt writing). It assumed a DNA alphabet and therefore couldn't write > protein in SwissProt format. > > I have checked it into CVS, I will port it back to the 1.3 branch of CVS > shortly. > > - Mark > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Wed 1/10/2003 1:25 a.m. > To: Schreiber, Mark; biojava-l@biojava.org > Cc: > Subject: RE: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > Hi Mark, > > I did also have an error with binary serialization. I was just trying to > approach to problem from a different direction. B/c that also was a problem > with finding / determining a protein symbol, i wondered if was coming from > AlphabetManager rather than the Swissprot writing. I include below the code > fragment along with the serialization error. > > Best regards, > > Mark. > > > public static void main(String[] args) throws Exception{ > File file = new File("c:\\temp\\sequence.ser"); > String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; > > SequenceIterator iter = (SequenceIterator) SeqIOTools.fileToBiojava( > SeqIOConstants.SWISSPROT > , > new BufferedReader( new FileReader( seqFile ) ) ); > > Sequence seq = iter.nextSequence(); > > System.out.println("\nWriting Sequence object"); > ObjectOutputStream out = new ObjectOutputStream( new > FileOutputStream(file) ); > out.writeObject( seq ); > out.flush(); > out.close(); > > System.out.println("\nReading Sequence object"); > ObjectInputStream in = new ObjectInputStream( new > FileInputStream(file) ); > seq = (Sequence) in.readObject(); > in.close(); > > } > > Writing Sequence object > Reading Sequence object > java.io.InvalidObjectException: Couldn't resolve symbol:ALA > at > org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve > (AlphabetManager.java:1480) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) > at > org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at com.exsar.test.SerializeTest.main(SerializeTest.java:38) > Exception in thread "main" > > > > -----Original Message----- > From: Schreiber, Mark [mailto:mark.schreiber@agresearch.co.nz] > Sent: Tuesday, September 30, 2003 6:28 AM > To: msouthern@exsar.com; biojava-l@biojava.org > Subject: RE: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > Hi - > > I was a bit thrown off at first cause I thought you meant there was an error > in binary serialization. There seems to be a problem with SwissProt writing. > I've commited an addition to SeqIOToolsTest in biojava live that replicates > the error but I haven't got time to track it down just yet. If some one else > doesn't get it I'll probably find it tommorrow. > > - Mark > > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Tue 30/09/2003 10:45 a.m. > To: biojava-l@biojava.org > Cc: > Subject: [Biojava-l] RE: Sequence serialization exception - > AlphabetManagerproblem? > > > Appologies for following up on my own post. What follows is a simpler test > than the serialization I attempted before. > > Consider the bit of code below and corresponding error message; > > For some reason, the protein sequence is being treated as a dna sequence. Is > there something I am missing with respect to how AlphabetManager treats dna > and protein alphabets? > > Any explainations would be most welcome. > > Thanks again, > > Mark. > > > >//------------------------------------------------------------------------ > > public static void main(String[] args) throws Exception{ > String seqFile = "c:\\temp\\KAP0_BOVIN.swiss"; > SequenceIterator iter = (SequenceIterator) > SeqIOTools.fileToBiojava(SeqIOConstants.SWISSPROT > > ,new BufferedReader( new FileReader( seqFile ) ) ); > Sequence seq = iter.nextSequence(); > SeqIOTools.biojavaToFile( SeqIOConstants.SWISSPROT, System.out, > seq ); > } > > > org.biojava.bio.symbol.IllegalSymbolException: Symbol ALA not found in > alphabet DNA > at > org.biojava.bio.symbol.AbstractAlphabet.validate(AbstractAlphabet.java:278) > at > org.biojava.bio.symbol.AlphabetManager$ImmutableWellKnownAlphabetWrapper.val > idate(AlphabetManager.java:1423) > at > org.biojava.bio.seq.io.CharacterTokenization._tokenizeSymbol(CharacterTokeni > zation.java:178) > at > org.biojava.bio.seq.io.CharacterTokenization.tokenizeSymbol(CharacterTokeniz > ation.java:191) > at > org.biojava.bio.symbol.AlphabetManager$WellKnownTokenizationWrapper.tokenize > Symbol(AlphabetManager.java:1276) > at > org.biojava.bio.seq.io.AbstractGenEmblFileFormer.formatTokenBlock(AbstractGe > nEmblFileFormer.java:337) > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:211) > rethrown as org.biojava.bio.symbol.IllegalAlphabetException: DNA not > tokenizing > at > org.biojava.bio.seq.io.EmblFileFormer.addSymbols(EmblFileFormer.java:224) > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:125) > rethrown as org.biojava.bio.BioError: An internal error occurred processing > symbols > at > org.biojava.bio.seq.io.SeqIOEventEmitter.getSeqIOEvents(SeqIOEventEmitter.ja > va:137) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:289) > at > org.biojava.bio.seq.io.EmblLikeFormat.writeSequence(EmblLikeFormat.java:253) > at > org.biojava.bio.seq.io.SeqIOTools.writeSwissprot(SeqIOTools.java:316) > at org.biojava.bio.seq.io.SeqIOTools.seqToFile(SeqIOTools.java:1078) > at > org.biojava.bio.seq.io.SeqIOTools.biojavaToFile(SeqIOTools.java:870) > at com.exsar.test.SerializeTest.main(SerializeTest.java:24) > > > > -----Original Message----- > From: Mark Southern [mailto:msouthern@exsar.com] > Sent: Monday, September 29, 2003 2:01 PM > Cc: 'biojava-l@biojava.org' > Subject: Sequence serialization exception > > > I am getting the following exception when trying to serialize a protein > sequence. I am using biojava 1.3. Can anyone please explain to me why? > > Many thanks, > > Mark. > > > java.io.InvalidObjectException: Couldn't resolve symbol:SER > at > org.biojava.bio.symbol.AlphabetManager$WellKnownAtomicSymbol$OPH.readResolve > (AlphabetManager.java:1441) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:911) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1655) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) > at > org.biojava.bio.seq.impl.SimpleSequence.readObject(SimpleSequence.java:119) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:452) > at org.biojava.bio.seq.ViewSequence.readObject(ViewSequence.java:93) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at java.util.HashMap.readObject(HashMap.java:985) > at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at java.util.HashMap.readObject(HashMap.java:986) > at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) > at com.exsar.hdex.model.calc.Test.main(Test.java:104) > > > > > > _______________________________________________ > 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. > > >======================================================================= > > >======================================================================= > > 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. > > >======================================================================= > > > > > >======================================================================= >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 > > ======================================================================= 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. ======================================================================= From paolo at ist.unige.it Thu Oct 23 14:01:08 2003 From: paolo at ist.unige.it (Paolo Romano) Date: Thu Oct 23 12:51:00 2003 Subject: [Biojava-l] CFP: NETTAB 2003 Message-ID: <200310231801.UAA18466@ist.unige.it> This message is sent to many mailing lists. I apologize for duplications. Paolo Romano --- NETTAB 2003 Call for Papers Bioinformatics for the management, analysis and interpretation of microarray data November 27-28, 2003, Bologna, Italy http://www.nettab.org/2003/ NETTAB workshops are a series of workshops focused on the most promising and innovative ICT tools and to their usefulness in Bioinformatics. Participation is at an internation level, mainly European, and speakers are among the most known researchers in the field. NETTAB workshops: - Focus on a well defined, emerging, promising ICT technology (not on a specific biological research topic) - Introduce the basic knowledge related to the technology under analysis, in a non trivial way - Outline the promising features of the technology in bioinformatics - Show some valuable examples in bioinformatics or different domains - Allow for as much discussion as possible - Demonstrate "how it works" practically, through demos or tutorials Previous editions were devoted to: "CORBA and XML: towards a bioinformatics integrated network environment" (Genova, 17-19 May 2001) and "Agents in Bioinformatics" (Bologna, 12-14 July 2002). You are welcome to visit the workshops' web site at http://www.nettab.org/ . The NETTAB 2003 workshop will be focused on the "Bioinformatics for the management, analysis and interpretation of microarray data". See http://www.nettab.org/2003/ . This edition will be organized also with the help of the Hormone Responsive Breast Cancer (HRBC) Genomics Network (http://www.hrbc-genomics.net/) - about 100 researchers from about 15 different institutions, most of them will be at the NETTAB worskhop. The network has been funded by the Italian Ministry of Research (FIRB project) for a three-years research project on the breast cancer. The network makes large use of microarray technology, and it is going to select common platforms (both experimentals and bioinformatics) to generate comparable results in different labs. In the last years, biomedical research has evolved through the development of new technologies, as the microarray technology, able to assay gene expression for thousands of genes at a time. This "high-throughput" technology gives the researchers the opportunity to investigate with a new and powerful approach the underlying genetic causes of many human diseases, as well as physiological aspects of growth and development. After few years, during which the experimental platforms and protocols have been assessed, microarrays applications are now quickly growing up. In the meantime, bioinformatics is solicited to create the tools of analysis and interpretation to understand the biological phenomena under investigation. Analysis of massive gene expression data requires statistical methods, data mining approaches, and data base storage and searches tools, but most relevant is the standardization of experimental protocols, data format, information describing experimentals, and other experimental and analytical aspects, to be able to exploit data sets from different laboratories in large scale analysis of data. Workshop aims are: - to collect the latest ideas, achievements and proposals in the application of bioinformatics to the microarray data analysis and interpretation, - to strengthen the relationships within bioinformatics community, also in view of a wider sinergical effort towards common scientific aims, - to improve cooperation between bioinformatics and biomedical communities. The worshop is organized in sessions, where invited speakers present the state of art of the session's topic, and open discussions. Open discussions will also be based upon submitted issues and topics. Tutorials are also foreseen. A limited number of submissions will be admitted as oral communication A call for position papers, posters and oral communication is now open. Submitted contributions must address at least one of the following issues: standardization of experiments and data, including: - identification of information requirements, - use cases, - data models, - data structures, - data exchange formats, - submission formats, - comparison of platforms, - etc... analysis and management tools, including: - database management systems, - clustering tools, - etc... applications of bioinformatics to microarray experiments, including: - integrative data analysis, - gene expression analysis, - wide genome analysis, - toxicogenomics, - oncogenomics, - any-omics, - etc.... Authors are encouraged to submit: Position papers: submit a short abstract (max 1 A4 pages in length, size 12pt, in pdf or MS Word format) specifying research interests and issues to be discussed during the workshop. Authors submitting position papers do not engage themselves to present a poster. Instead, they will be invited to introduce the issues during the discussions. Abstracts will be printed in the abstracts book, but won't be inserted in the conference proceedings. Posters: submit an extended abstract (max 3 A4 pages, size 12pt, in pdf or MS Word format). Abstracts will be reviewed and acceptation will be communicated to authors. Posters will be inserted in the abstract book and, only if actually presented at the workshop, in the conference proceedings. Oral Communications: submit an extended abstract (max 5 A4 pages, size 12pt, in pdf or MS Word format) as for posters. Only a very limited number of abstracts will be selected as oral communications. All abstracts submitted as oral communication but not selected will automatically be considered as posters. Abstracts must be sent by email to: papers2003@nettab.org Deadlines: Abstracts due: November 10, 2003. Notification to authors: November 17, 2003. Early registration: November 17, 2003 On behalf of Organizing and Scientific Committees Paolo Romano --- Paolo Romano (paolo.romano@istge.it) National Cancer Research Institute Largo Rosanna Benzi, 10, I-16132, Genova, Italy Tel: +39-010-5737-288 Fax: +39-010-5737-295 From claude.pasquier at unice.fr Fri Oct 24 06:54:34 2003 From: claude.pasquier at unice.fr (Claude Pasquier) Date: Fri Oct 24 06:43:46 2003 Subject: [Biojava-l] problem parsing genbank files Message-ID: <200310241254.34742.claude.pasquier@unice.fr> Hello, I have a problem during the parsing of some genbank file concerning the handling of 'LOCUS' annotation. The line below, for example, found in the Caenorhabditis_briggsae.0.dat file (downloaded from ensembl site) is not correctly read by the parser : LOCUS ENS:cb25.fpc3857.1015654-1035120 19467 bp DNA HTG 24-MAR-2003 >anno.getProperty("LOCUS"); returns "ENS:cb25.f" It seems that the problem has something to do with the length of the line : - when I add a character, this raises an exception "line too short" ?! - if I delete a char, it's OK ! Thanks for your help, Claude Pasquier -- CNRS UMR 6543. Institute of Signaling, Developmental Biology and Cancer Centre de Biochimie, Facult? des Sciences, 06108 Nice cedex 2 Tel: +33 4 92 07 69 47 From jamest at cse.unsw.edu.au Mon Oct 27 03:15:27 2003 From: jamest at cse.unsw.edu.au (Hoai Sang James Truong) Date: Mon Oct 27 03:12:28 2003 Subject: [Biojava-l] Paper Message-ID: Hi Guys, I'm seeking out the paper below for which I don't have access to. I hope this doesn't seem unusual, but if someone has a copy of this paper would they consider forwarding it to me. I'm trying to compile a report on biojava as part of a bioinformatics task. in any case, kind regards James ps. think back to when you were a student... =) ------------------------------------------------------- Source ACM SIGBIO Newsletter archive Volume 20 , Issue 2 (August 2000) table of contents Pages: 10 - 12 Year of Publication: 2000 ISSN:0163-5697 Authors Matthew Pocock Thomas Down Tim Hubbard Publisher ACM Press New York, NY, USA ------------------------------------------------------- From vc100 at doc.ic.ac.uk Mon Oct 27 20:06:47 2003 From: vc100 at doc.ic.ac.uk (Vasa Curcin) Date: Mon Oct 27 20:02:51 2003 Subject: [Biojava-l] Serialization of SimpleSequences Message-ID: <3F9DC127.4060300@doc.ic.ac.uk> Hello, While transferring some sequences via serialization, I noticed that all my Features are getting lost. After some digging around, it seems as if Java doesn't serialize the FeatureHolder inside the sequence (I was working with SimpleSequence objects). Even though a NotSerializableException is not thrown, the FeatureHolder is missing. After making the FeatureHolder interface in Biojava extend Serializable, the problem disappeared. How much will this change affect the rest of the code - ie. is there a good reason why FeatureHolders are not serializable? Cheers, Vasa From mark.schreiber at agresearch.co.nz Mon Oct 27 21:40:56 2003 From: mark.schreiber at agresearch.co.nz (Schreiber, Mark) Date: Mon Oct 27 21:38:27 2003 Subject: [Biojava-l] Serialization of SimpleSequences Message-ID: Hi - I thought we had fixed that one although it turns out the unit test was a bit inadequate. Generally its not a good idea to make an interface implement serializable as there may be a perfectly valid implementation that can't implement serializable. Probably better to make as many of the implementations as possible serializable. I'll have a look at this. - Mark -----Original Message----- From: Vasa Curcin [mailto:vc100@doc.ic.ac.uk] Sent: Tue 28/10/2003 2:06 p.m. To: biojava-l@biojava.org Cc: Subject: [Biojava-l] Serialization of SimpleSequences Hello, While transferring some sequences via serialization, I noticed that all my Features are getting lost. After some digging around, it seems as if Java doesn't serialize the FeatureHolder inside the sequence (I was working with SimpleSequence objects). Even though a NotSerializableException is not thrown, the FeatureHolder is missing. After making the FeatureHolder interface in Biojava extend Serializable, the problem disappeared. How much will this change affect the rest of the code - ie. is there a good reason why FeatureHolders are not serializable? Cheers, Vasa _______________________________________________ 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. =======================================================================