From pculpep at hotmail.com Fri Jan 6 17:00:41 2006 From: pculpep at hotmail.com (Pamela Culpepper) Date: Fri Jan 6 17:14:16 2006 Subject: [Biojava-dev] Local BLAST Graphical View Message-ID: We have just updated our website --http://www.lifeformulae.com with the files required to modify the latest version of the NCBI Toolbox's blastall to support the local BLAST alignment graphical view. The bastall_diff.txt file is the patch file that contains the modifications to the Toolbox code. The HOW_TO.txt file provides instructions on how to apply the patch and compile the Toolbox. blastall will produce the graphical view with either the old or the new BLAST engine. You must use the blastall "-T T" (HTML option) to activate the graphical overview. This software is provided freely to all Biojava developers. Thanks, Pam Culpepper From heuermh at acm.org Wed Jan 11 23:52:05 2006 From: heuermh at acm.org (Michael Heuer) Date: Thu Jan 12 00:32:44 2006 Subject: [Biojava-dev] biojavax stress test In-Reply-To: Message-ID: Mark Schreiber wrote: > Right now we need people to stress test the new biojavax packages > available in CVS. Some more Unit tests for biojavax would also be great. > Especially ones that test for cases identified in stress testing. Hello Mark, Along these lines I tried to put together a functional test setup for the biojavax packages, but ran into a bit of a problem. I'd like to: - create an in-memory database and connection using HSQLDB - load the biosql DDL into the in-memory database using straight jdbc - load the hibernate mappings and create a hibernate session - load the taxon files into the database, using hibernate - load a handful of sequences from flat files into the database - run tests on the sequences pulled from the database (or the cache, as it may be) Unfortunately I'm stuck at the hibernate config part -- does anyone know how to load the mappings and create a session from an existing Connection? The Hibernate config works fine from a config file and an external database, but I would really like to do everything in code, so that it can be used in a set up method for tests. michael From mark.schreiber at novartis.com Thu Jan 12 01:47:19 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Thu Jan 12 01:50:44 2006 Subject: [Biojava-dev] biojavax stress test Message-ID: Hi Michael - Everything that can be configured with the Hibernate config.xml can be configured programatically with the hibernate API (or even XDoclet apparently!!). The best guide is the Hibernate reference (http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-programmatic) which has examples. A HSQL Junit test for the hibernate mappings would be excellent! - Mark Michael Heuer Sent by: biojava-dev-bounces@portal.open-bio.org 01/12/2006 12:52 PM To: biojava-dev@biojava.org cc: (bcc: Mark Schreiber/GP/Novartis) Subject: [Biojava-dev] biojavax stress test Mark Schreiber wrote: > Right now we need people to stress test the new biojavax packages > available in CVS. Some more Unit tests for biojavax would also be great. > Especially ones that test for cases identified in stress testing. Hello Mark, Along these lines I tried to put together a functional test setup for the biojavax packages, but ran into a bit of a problem. I'd like to: - create an in-memory database and connection using HSQLDB - load the biosql DDL into the in-memory database using straight jdbc - load the hibernate mappings and create a hibernate session - load the taxon files into the database, using hibernate - load a handful of sequences from flat files into the database - run tests on the sequences pulled from the database (or the cache, as it may be) Unfortunately I'm stuck at the hibernate config part -- does anyone know how to load the mappings and create a session from an existing Connection? The Hibernate config works fine from a config file and an external database, but I would really like to do everything in code, so that it can be used in a set up method for tests. michael _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From heuermh at acm.org Thu Jan 12 18:19:06 2006 From: heuermh at acm.org (Michael Heuer) Date: Thu Jan 12 18:31:11 2006 Subject: [Biojava-dev] biojavax stress test In-Reply-To: Message-ID: Thanks Mark, I got it working, up to a point now: org.biojava.bio.BioException: Could not read sequence at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:103) at org.biojavax.example.Example.loadFastaSequence(Example.java:226) at org.biojavax.example.Example.run(Example.java:76) at org.biojavax.example.Example.main(Example.java:320) Caused by: java.lang.RuntimeException: Error while trying to call new class org.biojavax.SimpleNamespace(class java.lang.String) at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:154) at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:95) at org.biojavax.RichObjectFactory.getDefaultNamespace(RichObjectFactory.java:160) at org.biojavax.bio.seq.io.FastaFormat.readRichSequence(FastaFormat.java:137) at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:100) ... 3 more Caused by: java.lang.reflect.InvocationTargetException 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:585) at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:121) ... 7 more Caused by: org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:2153) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) ... 12 more Caused by: java.sql.SQLException: Column not found: NAMESPACE0_.ACRONYM in statement [select namespace0_.biodatabase_id as biodatab1_16_, namespace0_.name as name16_, namespace0_.authority as authority16_, namespace0_.description as descript4_16_, namespace0_.acronym as acronym16_, namespace0_.uri as uri16_ from biodatabase namespace0_ where namespace0_.name=?] at org.hsqldb.jdbc.Util.throwError(Unknown Source) at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2150) ... 19 more Following the mappings, namespace --> biodatabase table, but there is no acronym column in either the hsql or mysql versions of the DDL. Should I just remove that column mapping, or add the column to the DDL? The oracle biosql DDL also has an URI column (mapped to URIString) that is missing from the hsql and mysql versions. michael On Thu, 12 Jan 2006 mark.schreiber@novartis.com wrote: > Hi Michael - > > Everything that can be configured with the Hibernate config.xml can be > configured programatically with the hibernate API (or even XDoclet > apparently!!). > > The best guide is the Hibernate reference > (http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-programmatic) > which has examples. > > A HSQL Junit test for the hibernate mappings would be excellent! > > - Mark > > > > > > Michael Heuer > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/12/2006 12:52 PM > > > To: biojava-dev@biojava.org > cc: (bcc: Mark Schreiber/GP/Novartis) > Subject: [Biojava-dev] biojavax stress test > > > Mark Schreiber wrote: > > > Right now we need people to stress test the new biojavax packages > > available in CVS. Some more Unit tests for biojavax would also be great. > > Especially ones that test for cases identified in stress testing. > > Hello Mark, > > Along these lines I tried to put together a functional test setup for the > biojavax packages, but ran into a bit of a problem. I'd like to: > > - create an in-memory database and connection using HSQLDB > > - load the biosql DDL into the in-memory database using straight jdbc > > - load the hibernate mappings and create a hibernate session > > - load the taxon files into the database, using hibernate > > - load a handful of sequences from flat files into the database > > - run tests on the sequences pulled from the database (or the cache, as > it may be) > > Unfortunately I'm stuck at the hibernate config part -- does anyone know > how to load the mappings and create a session from an existing Connection? > > The Hibernate config works fine from a config file and an external > database, but I would really like to do everything in code, so that it > can be used in a set up method for tests. > > michael > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > From mark.schreiber at novartis.com Thu Jan 12 20:11:04 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Thu Jan 12 20:07:31 2006 Subject: [Biojava-dev] biojavax stress test Message-ID: Hi - I thought I removed those mappings from MySQL, PostGres and Hypersonic?? I will remove them from all the mappings, including oracle as those fields are not part of the official BioSQL build. For some reason Hilmar included them in the Oracle DDL. - Mark Michael Heuer Sent by: biojava-dev-bounces@portal.open-bio.org 01/13/2006 07:19 AM To: biojava-dev@biojava.org cc: (bcc: Mark Schreiber/GP/Novartis) Subject: Re: [Biojava-dev] biojavax stress test Thanks Mark, I got it working, up to a point now: org.biojava.bio.BioException: Could not read sequence at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:103) at org.biojavax.example.Example.loadFastaSequence(Example.java:226) at org.biojavax.example.Example.run(Example.java:76) at org.biojavax.example.Example.main(Example.java:320) Caused by: java.lang.RuntimeException: Error while trying to call new class org.biojavax.SimpleNamespace(class java.lang.String) at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:154) at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:95) at org.biojavax.RichObjectFactory.getDefaultNamespace(RichObjectFactory.java:160) at org.biojavax.bio.seq.io.FastaFormat.readRichSequence(FastaFormat.java:137) at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:100) ... 3 more Caused by: java.lang.reflect.InvocationTargetException 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:585) at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:121) ... 7 more Caused by: org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:2153) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) ... 12 more Caused by: java.sql.SQLException: Column not found: NAMESPACE0_.ACRONYM in statement [select namespace0_.biodatabase_id as biodatab1_16_, namespace0_.name as name16_, namespace0_.authority as authority16_, namespace0_.description as descript4_16_, namespace0_.acronym as acronym16_, namespace0_.uri as uri16_ from biodatabase namespace0_ where namespace0_.name=?] at org.hsqldb.jdbc.Util.throwError(Unknown Source) at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2150) ... 19 more Following the mappings, namespace --> biodatabase table, but there is no acronym column in either the hsql or mysql versions of the DDL. Should I just remove that column mapping, or add the column to the DDL? The oracle biosql DDL also has an URI column (mapped to URIString) that is missing from the hsql and mysql versions. michael On Thu, 12 Jan 2006 mark.schreiber@novartis.com wrote: > Hi Michael - > > Everything that can be configured with the Hibernate config.xml can be > configured programatically with the hibernate API (or even XDoclet > apparently!!). > > The best guide is the Hibernate reference > (http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-programmatic) > which has examples. > > A HSQL Junit test for the hibernate mappings would be excellent! > > - Mark > > > > > > Michael Heuer > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/12/2006 12:52 PM > > > To: biojava-dev@biojava.org > cc: (bcc: Mark Schreiber/GP/Novartis) > Subject: [Biojava-dev] biojavax stress test > > > Mark Schreiber wrote: > > > Right now we need people to stress test the new biojavax packages > > available in CVS. Some more Unit tests for biojavax would also be great. > > Especially ones that test for cases identified in stress testing. > > Hello Mark, > > Along these lines I tried to put together a functional test setup for the > biojavax packages, but ran into a bit of a problem. I'd like to: > > - create an in-memory database and connection using HSQLDB > > - load the biosql DDL into the in-memory database using straight jdbc > > - load the hibernate mappings and create a hibernate session > > - load the taxon files into the database, using hibernate > > - load a handful of sequences from flat files into the database > > - run tests on the sequences pulled from the database (or the cache, as > it may be) > > Unfortunately I'm stuck at the hibernate config part -- does anyone know > how to load the mappings and create a session from an existing Connection? > > The Hibernate config works fine from a config file and an external > database, but I would really like to do everything in code, so that it > can be used in a set up method for tests. > > michael > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From mark.schreiber at novartis.com Thu Jan 12 20:19:49 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Thu Jan 12 20:16:16 2006 Subject: [Biojava-dev] biojavax stress test Message-ID: Fixed in CVS Michael Heuer Sent by: biojava-dev-bounces@portal.open-bio.org 01/13/2006 07:19 AM To: biojava-dev@biojava.org cc: (bcc: Mark Schreiber/GP/Novartis) Subject: Re: [Biojava-dev] biojavax stress test Thanks Mark, I got it working, up to a point now: org.biojava.bio.BioException: Could not read sequence at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:103) at org.biojavax.example.Example.loadFastaSequence(Example.java:226) at org.biojavax.example.Example.run(Example.java:76) at org.biojavax.example.Example.main(Example.java:320) Caused by: java.lang.RuntimeException: Error while trying to call new class org.biojavax.SimpleNamespace(class java.lang.String) at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:154) at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:95) at org.biojavax.RichObjectFactory.getDefaultNamespace(RichObjectFactory.java:160) at org.biojavax.bio.seq.io.FastaFormat.readRichSequence(FastaFormat.java:137) at org.biojavax.bio.seq.io.RichStreamReader.nextRichSequence(RichStreamReader.java:100) ... 3 more Caused by: java.lang.reflect.InvocationTargetException 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:585) at org.biojavax.bio.db.HibernateRichObjectBuilder.buildObject(HibernateRichObjectBuilder.java:121) ... 7 more Caused by: org.hibernate.exception.SQLGrammarException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:2153) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029) at org.hibernate.loader.Loader.list(Loader.java:2024) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) ... 12 more Caused by: java.sql.SQLException: Column not found: NAMESPACE0_.ACRONYM in statement [select namespace0_.biodatabase_id as biodatab1_16_, namespace0_.name as name16_, namespace0_.authority as authority16_, namespace0_.description as descript4_16_, namespace0_.acronym as acronym16_, namespace0_.uri as uri16_ from biodatabase namespace0_ where namespace0_.name=?] at org.hsqldb.jdbc.Util.throwError(Unknown Source) at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561) at org.hibernate.loader.Loader.doQuery(Loader.java:661) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.doList(Loader.java:2150) ... 19 more Following the mappings, namespace --> biodatabase table, but there is no acronym column in either the hsql or mysql versions of the DDL. Should I just remove that column mapping, or add the column to the DDL? The oracle biosql DDL also has an URI column (mapped to URIString) that is missing from the hsql and mysql versions. michael On Thu, 12 Jan 2006 mark.schreiber@novartis.com wrote: > Hi Michael - > > Everything that can be configured with the Hibernate config.xml can be > configured programatically with the hibernate API (or even XDoclet > apparently!!). > > The best guide is the Hibernate reference > (http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-programmatic) > which has examples. > > A HSQL Junit test for the hibernate mappings would be excellent! > > - Mark > > > > > > Michael Heuer > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/12/2006 12:52 PM > > > To: biojava-dev@biojava.org > cc: (bcc: Mark Schreiber/GP/Novartis) > Subject: [Biojava-dev] biojavax stress test > > > Mark Schreiber wrote: > > > Right now we need people to stress test the new biojavax packages > > available in CVS. Some more Unit tests for biojavax would also be great. > > Especially ones that test for cases identified in stress testing. > > Hello Mark, > > Along these lines I tried to put together a functional test setup for the > biojavax packages, but ran into a bit of a problem. I'd like to: > > - create an in-memory database and connection using HSQLDB > > - load the biosql DDL into the in-memory database using straight jdbc > > - load the hibernate mappings and create a hibernate session > > - load the taxon files into the database, using hibernate > > - load a handful of sequences from flat files into the database > > - run tests on the sequences pulled from the database (or the cache, as > it may be) > > Unfortunately I'm stuck at the hibernate config part -- does anyone know > how to load the mappings and create a session from an existing Connection? > > The Hibernate config works fine from a config file and an external > database, but I would really like to do everything in code, so that it > can be used in a set up method for tests. > > michael > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From heuermh at acm.org Fri Jan 13 16:13:36 2006 From: heuermh at acm.org (Michael Heuer) Date: Fri Jan 13 16:07:59 2006 Subject: [Biojava-dev] biojavax stress test In-Reply-To: Message-ID: Mark Schreiber wrote: > Fixed in CVS Thanks, moving further along, it looks like the sequences created by HSQLDialect are not quite correct: Caused by: java.sql.SQLException: Sequence not found: BIODATABASE_PK_SEQ in statement [select next value for biodatabase_pk_seq from dual_biodatabase_pk_seq] The HSQL docs read: "Sequences are created with the CREATE SEQUENCE command and their current value can be modified at any time with ALTER SEQUENCE. The next value for a sequence is retrieved with the NEXT VALUE FOR expression." but HSQLDialect uses: "create table dual_" + sequenceName + " (zero integer)", "insert into dual_" + sequenceName + " values (0)", "create sequence " + sequenceName + " start with 1" and the select statement in the exception message above. I modified the id generator to use identity instead of sequence and hibernate no longer throws exceptions. Second, the biojavax docs provide the following example for reading and persisting a sequence file RichStreamReader reader = new RichStreamReader(...); while (reader.hasNext()) { RichSequence richSequence = reader.nextRichSequence(); session.saveOrUpdate("RichSequence", richSequence); } but RichSequence is not mapped, one must use BioEntry instead session.saveOrUpdate("BioEntry", richSequence); Finally, if I create the RichStreamReader with a null Namespace, letting the sequence files provide the namespace, I can retrieve the persisted Namespace and BioEntries using hibernate queries, but the BioEntries are not associated with the Namespace via the getMembers() method as in the biojavax docs. e.g. Query query = session.createQuery("from Namespace"); List namespaces = query.list(); for (Iterator i = namespaces.iterator(); i.hasNext(); ) { Namespace namespace = (Namespace) i.next(); System.out.println("Namespace: " + namespace.getName()); for (Iterator j = namespace.getMembers().iterator(); j.hasNext(); ) { BioEntry bioEntry = (BioEntry) j.next(); System.out.println(" BioEntry: " + bioEntry.getName()); } } returns Namespace: MyNamespace whereas Query query = session.createQuery("from BioEntry"); List bioEntries = query.list(); for (Iterator i = bioEntries.iterator(); i.hasNext(); ) { BioEntry bioEntry = (BioEntry) i.next(); System.out.println("BioEntry: " + bioEntry.getName() + " Namespace: " + bioEntry.getNamespace()); } returns BioEntry: 12345 Namespace: MyNamespace BioEntry: 23456 Namespace: MyNamespace ... michael From mark.schreiber at novartis.com Sun Jan 15 20:56:01 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Sun Jan 15 20:52:23 2006 Subject: [Biojava-dev] biojavax stress test Message-ID: Hi Michael - A lot of the issues you describe (except possible the last one) have been resolved over the past week in CVS (including the xml doc book). Are you sure you have the latest from CVS? Notably the HSQL hibernate mappings do not use sequences any more. They use "native" mapping instead. You need to get these from CVS and copy to the appropriate location. - Mark Michael Heuer Sent by: biojava-dev-bounces@portal.open-bio.org 01/14/2006 05:13 AM To: biojava-dev@biojava.org cc: (bcc: Mark Schreiber/GP/Novartis) Subject: Re: [Biojava-dev] biojavax stress test Mark Schreiber wrote: > Fixed in CVS Thanks, moving further along, it looks like the sequences created by HSQLDialect are not quite correct: Caused by: java.sql.SQLException: Sequence not found: BIODATABASE_PK_SEQ in statement [select next value for biodatabase_pk_seq from dual_biodatabase_pk_seq] The HSQL docs read: "Sequences are created with the CREATE SEQUENCE command and their current value can be modified at any time with ALTER SEQUENCE. The next value for a sequence is retrieved with the NEXT VALUE FOR expression." but HSQLDialect uses: "create table dual_" + sequenceName + " (zero integer)", "insert into dual_" + sequenceName + " values (0)", "create sequence " + sequenceName + " start with 1" and the select statement in the exception message above. I modified the id generator to use identity instead of sequence and hibernate no longer throws exceptions. Second, the biojavax docs provide the following example for reading and persisting a sequence file RichStreamReader reader = new RichStreamReader(...); while (reader.hasNext()) { RichSequence richSequence = reader.nextRichSequence(); session.saveOrUpdate("RichSequence", richSequence); } but RichSequence is not mapped, one must use BioEntry instead session.saveOrUpdate("BioEntry", richSequence); Finally, if I create the RichStreamReader with a null Namespace, letting the sequence files provide the namespace, I can retrieve the persisted Namespace and BioEntries using hibernate queries, but the BioEntries are not associated with the Namespace via the getMembers() method as in the biojavax docs. e.g. Query query = session.createQuery("from Namespace"); List namespaces = query.list(); for (Iterator i = namespaces.iterator(); i.hasNext(); ) { Namespace namespace = (Namespace) i.next(); System.out.println("Namespace: " + namespace.getName()); for (Iterator j = namespace.getMembers().iterator(); j.hasNext(); ) { BioEntry bioEntry = (BioEntry) j.next(); System.out.println(" BioEntry: " + bioEntry.getName()); } } returns Namespace: MyNamespace whereas Query query = session.createQuery("from BioEntry"); List bioEntries = query.list(); for (Iterator i = bioEntries.iterator(); i.hasNext(); ) { BioEntry bioEntry = (BioEntry) i.next(); System.out.println("BioEntry: " + bioEntry.getName() + " Namespace: " + bioEntry.getNamespace()); } returns BioEntry: 12345 Namespace: MyNamespace BioEntry: 23456 Namespace: MyNamespace ... michael _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From mark.schreiber at novartis.com Sun Jan 15 21:03:45 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Sun Jan 15 21:00:07 2006 Subject: [Biojava-dev] biojavax stress test Message-ID: Ooops, despite what I said before I seem to have missed the HSQL mappings. These are fixed now. - Mark Michael Heuer Sent by: biojava-dev-bounces@portal.open-bio.org 01/14/2006 05:13 AM To: biojava-dev@biojava.org cc: (bcc: Mark Schreiber/GP/Novartis) Subject: Re: [Biojava-dev] biojavax stress test Mark Schreiber wrote: > Fixed in CVS Thanks, moving further along, it looks like the sequences created by HSQLDialect are not quite correct: Caused by: java.sql.SQLException: Sequence not found: BIODATABASE_PK_SEQ in statement [select next value for biodatabase_pk_seq from dual_biodatabase_pk_seq] The HSQL docs read: "Sequences are created with the CREATE SEQUENCE command and their current value can be modified at any time with ALTER SEQUENCE. The next value for a sequence is retrieved with the NEXT VALUE FOR expression." but HSQLDialect uses: "create table dual_" + sequenceName + " (zero integer)", "insert into dual_" + sequenceName + " values (0)", "create sequence " + sequenceName + " start with 1" and the select statement in the exception message above. I modified the id generator to use identity instead of sequence and hibernate no longer throws exceptions. Second, the biojavax docs provide the following example for reading and persisting a sequence file RichStreamReader reader = new RichStreamReader(...); while (reader.hasNext()) { RichSequence richSequence = reader.nextRichSequence(); session.saveOrUpdate("RichSequence", richSequence); } but RichSequence is not mapped, one must use BioEntry instead session.saveOrUpdate("BioEntry", richSequence); Finally, if I create the RichStreamReader with a null Namespace, letting the sequence files provide the namespace, I can retrieve the persisted Namespace and BioEntries using hibernate queries, but the BioEntries are not associated with the Namespace via the getMembers() method as in the biojavax docs. e.g. Query query = session.createQuery("from Namespace"); List namespaces = query.list(); for (Iterator i = namespaces.iterator(); i.hasNext(); ) { Namespace namespace = (Namespace) i.next(); System.out.println("Namespace: " + namespace.getName()); for (Iterator j = namespace.getMembers().iterator(); j.hasNext(); ) { BioEntry bioEntry = (BioEntry) j.next(); System.out.println(" BioEntry: " + bioEntry.getName()); } } returns Namespace: MyNamespace whereas Query query = session.createQuery("from BioEntry"); List bioEntries = query.list(); for (Iterator i = bioEntries.iterator(); i.hasNext(); ) { BioEntry bioEntry = (BioEntry) i.next(); System.out.println("BioEntry: " + bioEntry.getName() + " Namespace: " + bioEntry.getNamespace()); } returns BioEntry: 12345 Namespace: MyNamespace BioEntry: 23456 Namespace: MyNamespace ... michael _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From mark.schreiber at novartis.com Sun Jan 15 21:31:51 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Sun Jan 15 21:28:29 2006 Subject: [Biojava-dev] biojavax stress test Message-ID: >Finally, if I create the RichStreamReader with a null Namespace, letting >the sequence files provide the namespace, I can retrieve the persisted >Namespace and BioEntries using hibernate queries, but the BioEntries are >not associated with the Namespace via the getMembers() method as in the >biojavax docs. > >e.g. > >Query query = session.createQuery("from Namespace"); >List namespaces = query.list(); >for (Iterator i = namespaces.iterator(); i.hasNext(); ) >{ > Namespace namespace = (Namespace) i.next(); > System.out.println("Namespace: " + namespace.getName()); > > for (Iterator j = namespace.getMembers().iterator(); j.hasNext(); ) > { > BioEntry bioEntry = (BioEntry) j.next(); > System.out.println(" BioEntry: " + bioEntry.getName()); > } >} > >returns > >Namespace: MyNamespace > > >whereas > >Query query = session.createQuery("from BioEntry"); >List bioEntries = query.list(); >for (Iterator i = bioEntries.iterator(); i.hasNext(); ) >{ > BioEntry bioEntry = (BioEntry) i.next(); > System.out.println("BioEntry: " + bioEntry.getName() + > " Namespace: " + bioEntry.getNamespace()); >} > >returns > >BioEntry: 12345 Namespace: MyNamespace >BioEntry: 23456 Namespace: MyNamespace >... > > michael > Seems odd, it looks like Hibernate is not loading the contents of the Namespaces on demand. Richard, is this some sort of lazy loading issue? - Mark From hollandr at gis.a-star.edu.sg Sun Jan 15 21:34:10 2006 From: hollandr at gis.a-star.edu.sg (Richard HOLLAND) Date: Sun Jan 15 21:43:25 2006 Subject: [Biojava-dev] biojavax stress test Message-ID: <6D9E9B9DF347EF4385F6271C64FB8D5602B3FBF3@BIONIC.biopolis.one-north.com> Hi all. Mark noticed some time ago that getMembers() didn't work, for exactly the reason you state below - it cannot be guaranteed to return the correct answer. So we removed it - the current biojava-live does not have it and its gone from the javadocs too. cheers, Richard Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Monday, January 16, 2006 10:32 AM > To: Michael Heuer > Cc: biojava-dev@biojava.org; Richard HOLLAND > Subject: Re: [Biojava-dev] biojavax stress test > > > >Finally, if I create the RichStreamReader with a null > Namespace, letting > >the sequence files provide the namespace, I can retrieve the > persisted > >Namespace and BioEntries using hibernate queries, but the > BioEntries are > >not associated with the Namespace via the getMembers() > method as in the > >biojavax docs. > > > >e.g. > > > >Query query = session.createQuery("from Namespace"); > >List namespaces = query.list(); > >for (Iterator i = namespaces.iterator(); i.hasNext(); ) > >{ > > Namespace namespace = (Namespace) i.next(); > > System.out.println("Namespace: " + namespace.getName()); > > > > for (Iterator j = namespace.getMembers().iterator(); j.hasNext(); ) > > { > > BioEntry bioEntry = (BioEntry) j.next(); > > System.out.println(" BioEntry: " + bioEntry.getName()); > > } > >} > > > >returns > > > >Namespace: MyNamespace > > > > > >whereas > > > >Query query = session.createQuery("from BioEntry"); > >List bioEntries = query.list(); > >for (Iterator i = bioEntries.iterator(); i.hasNext(); ) > >{ > > BioEntry bioEntry = (BioEntry) i.next(); > > System.out.println("BioEntry: " + bioEntry.getName() + > > " Namespace: " + bioEntry.getNamespace()); > >} > > > >returns > > > >BioEntry: 12345 Namespace: MyNamespace > >BioEntry: 23456 Namespace: MyNamespace > >... > > > > michael > > > > Seems odd, it looks like Hibernate is not loading the contents of the > Namespaces on demand. Richard, is this some sort of lazy > loading issue? > > - Mark > > > From srouane at hotmail.com Mon Jan 9 15:59:39 2006 From: srouane at hotmail.com (Simon Rouane) Date: Mon Jan 16 16:25:23 2006 Subject: [Biojava-dev] getting involved Message-ID: Hello everyone, I'm a Java developer currently working in the commercial software industry but am interested in the more scientific applications of programming, so I'd love to get involved. Any suggestions advice as to the first steps? Thanks, Simon Rouane. From mark.schreiber at novartis.com Thu Jan 19 04:15:47 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Thu Jan 19 04:12:12 2006 Subject: [Biojava-dev] Doc changes Message-ID: Hello- I have made a large number of javadoc changes to some packages in biojava. This is because several classes are extended and in some cases deprecated by biojavax packages. In most cases the use of biojavax is prefered. Therefore several @deprecated, @see and {@link } tags have been added. This is in preperation for a preview release. - Mark Mark Schreiber Research Investigator (Bioinformatics) Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road #05-01 Chromos Singapore 138670 www.nitd.novartis.com phone +65 6722 2973 fax +65 6722 2910 From mark.schreiber at novartis.com Fri Jan 20 04:38:22 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Fri Jan 20 04:35:16 2006 Subject: [Biojava-dev] ant xslt task Message-ID: Hi - I'm trying to add an ant xslt task to the build.xml file to convert the BioJavaX.xml into html. When I run it I always seem to get a javax.xml.transform.TransformerException. I am using: jdk 1.5.0.03 ant 1.6.2 dockbook-xsl 1.6.9.1 Has anyone managed to get this to work in the past? - Mark Mark Schreiber Research Investigator (Bioinformatics) Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road #05-01 Chromos Singapore 138670 www.nitd.novartis.com phone +65 6722 2973 fax +65 6722 2910 From Martin.Szugat at GMX.net Fri Jan 20 09:42:13 2006 From: Martin.Szugat at GMX.net (Martin Szugat) Date: Fri Jan 20 09:45:30 2006 Subject: [Biojava-dev] ant xslt task In-Reply-To: Message-ID: <200601201444.k0KEit8U018020@portal.open-bio.org> Hi Mark, I tried it using XMLSpy. It didn't work. Next I used the xslt-proc command, and now it worked. Finally, I tried Saxon, and it didn't work. So my proposal is using the xslt-proc command within the Ant script. Best regards Martin > -----Original Message----- > From: biojava-dev-bounces@portal.open-bio.org > [mailto:biojava-dev-bounces@portal.open-bio.org] On Behalf Of > mark.schreiber@novartis.com > Sent: Friday, January 20, 2006 10:38 AM > To: biojava-dev@biojava.org > Subject: [Biojava-dev] ant xslt task > > Hi - > > I'm trying to add an ant xslt task to the build.xml file to > convert the BioJavaX.xml into html. > > When I run it I always seem to get a > javax.xml.transform.TransformerException. > > I am using: > > jdk 1.5.0.03 > ant 1.6.2 > dockbook-xsl 1.6.9.1 > > Has anyone managed to get this to work in the past? > > - Mark > > Mark Schreiber > Research Investigator (Bioinformatics) > > Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road > #05-01 Chromos > Singapore 138670 > www.nitd.novartis.com > > phone +65 6722 2973 > fax +65 6722 2910 > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > From jdiminic at gmail.com Sat Jan 21 01:31:19 2006 From: jdiminic at gmail.com (Janko Diminic) Date: Sat Jan 21 01:34:21 2006 Subject: [Biojava-dev] ant xslt task In-Reply-To: <43cbb78e0601201152l5c661861p@mail.gmail.com> References: <200601201444.k0KEit8U018020@portal.open-bio.org> <43cbb78e0601201113o8f5c64ao@mail.gmail.com> <43cbb78e0601201152l5c661861p@mail.gmail.com> Message-ID: <43cbb78e0601202231i2be668bfj@mail.gmail.com> Sory, address is: www.elo-pbf.hr/BioJavaX.xml.htm > 2006/1/20, Janko Diminic : > > I make transformation, you can download from here: > > www.elo-pbf.hr/BioJavaX.xml > > > > > > 2006/1/20, Martin Szugat : > > > Hi Mark, > > > > > > I tried it using XMLSpy. It didn't work. Next I used the xslt-proc command, > > > and now it worked. Finally, I tried Saxon, and it didn't work. So my > > > proposal is using the xslt-proc command within the Ant script. > > > > > > Best regards > > > > > > Martin > > > > > > > -----Original Message----- > > > > From: biojava-dev-bounces@portal.open-bio.org > > > > [mailto:biojava-dev-bounces@portal.open-bio.org] On Behalf Of > > > > mark.schreiber@novartis.com > > > > Sent: Friday, January 20, 2006 10:38 AM > > > > To: biojava-dev@biojava.org > > > > Subject: [Biojava-dev] ant xslt task > > > > > > > > Hi - > > > > > > > > I'm trying to add an ant xslt task to the build.xml file to > > > > convert the BioJavaX.xml into html. > > > > > > > > When I run it I always seem to get a > > > > javax.xml.transform.TransformerException. > > > > > > > > I am using: > > > > > > > > jdk 1.5.0.03 > > > > ant 1.6.2 > > > > dockbook-xsl 1.6.9.1 > > > > > > > > Has anyone managed to get this to work in the past? > > > > > > > > - Mark > > > > > > > > Mark Schreiber > > > > Research Investigator (Bioinformatics) > > > > > > > > Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road > > > > #05-01 Chromos > > > > Singapore 138670 > > > > www.nitd.novartis.com > > > > > > > > phone +65 6722 2973 > > > > fax +65 6722 2910 > > > > > > > > _______________________________________________ > > > > biojava-dev mailing list > > > > biojava-dev@biojava.org > > > > http://biojava.org/mailman/listinfo/biojava-dev > > > > > > > > > > > > > > _______________________________________________ > > > biojava-dev mailing list > > > biojava-dev@biojava.org > > > http://biojava.org/mailman/listinfo/biojava-dev > > > > > > > > > -- > > Janko Diminic > > > > > -- > Janko Diminic > -- Janko Diminic From jdiminic at gmail.com Sat Jan 21 01:52:25 2006 From: jdiminic at gmail.com (Janko Diminic) Date: Sat Jan 21 01:48:33 2006 Subject: [Biojava-dev] RichSequence.Tools.enrich(..) generate NoSuchElementException Message-ID: <43cbb78e0601202252v16109ccn@mail.gmail.com> Hi, RichSequence.Tools.enrich(seq) generate NoSuchElementException exception: // Samples.java class Set param = new HashSet(); param.add("AJ278573"); // NCBI accession GenbankSequenceDB genBank = new GenbankSequenceDB(); SequenceDB sequences = genBank.getSequences(param); sequenceIterator = sequences.sequenceIterator(); while (sequenceIterator.hasNext()) { try { Sequence seq = sequenceIterator.nextSequence(); RichSequence enrichSeq = RichSequence.Tools.enrich(seq); //line:92, here throw NoSuchElementException ??? session.saveOrUpdate("Sequence", enrichSeq); } catch (NoSuchElementException e) { e.printStackTrace(); } } java.util.NoSuchElementException at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:367) at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:376) at org.biojavax.bio.seq.SimpleRichFeature.(SimpleRichFeature.java:96) at org.biojavax.bio.seq.SimpleRichSequence.createFeature(SimpleRichSequence.java:323) at org.biojavax.bio.seq.RichSequence$Tools.enrich(RichSequence.java:434) at hr.Samples.main(Samples.java:92) Do you know way? Thanks for the help. -- Janko Diminic From jdiminic at gmail.com Fri Jan 20 14:13:25 2006 From: jdiminic at gmail.com (Janko Diminic) Date: Sat Jan 21 01:52:12 2006 Subject: [Biojava-dev] ant xslt task In-Reply-To: <200601201444.k0KEit8U018020@portal.open-bio.org> References: <200601201444.k0KEit8U018020@portal.open-bio.org> Message-ID: <43cbb78e0601201113o8f5c64ao@mail.gmail.com> I make transformation, you can download from here: www.elo-pbf.hr/BioJavaX.xml 2006/1/20, Martin Szugat : > Hi Mark, > > I tried it using XMLSpy. It didn't work. Next I used the xslt-proc command, > and now it worked. Finally, I tried Saxon, and it didn't work. So my > proposal is using the xslt-proc command within the Ant script. > > Best regards > > Martin > > > -----Original Message----- > > From: biojava-dev-bounces@portal.open-bio.org > > [mailto:biojava-dev-bounces@portal.open-bio.org] On Behalf Of > > mark.schreiber@novartis.com > > Sent: Friday, January 20, 2006 10:38 AM > > To: biojava-dev@biojava.org > > Subject: [Biojava-dev] ant xslt task > > > > Hi - > > > > I'm trying to add an ant xslt task to the build.xml file to > > convert the BioJavaX.xml into html. > > > > When I run it I always seem to get a > > javax.xml.transform.TransformerException. > > > > I am using: > > > > jdk 1.5.0.03 > > ant 1.6.2 > > dockbook-xsl 1.6.9.1 > > > > Has anyone managed to get this to work in the past? > > > > - Mark > > > > Mark Schreiber > > Research Investigator (Bioinformatics) > > > > Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road > > #05-01 Chromos > > Singapore 138670 > > www.nitd.novartis.com > > > > phone +65 6722 2973 > > fax +65 6722 2910 > > > > _______________________________________________ > > biojava-dev mailing list > > biojava-dev@biojava.org > > http://biojava.org/mailman/listinfo/biojava-dev > > > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > -- Janko Diminic From mark.schreiber at novartis.com Sun Jan 22 21:02:37 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Sun Jan 22 20:58:46 2006 Subject: [Biojava-dev] RichSequence.Tools.enrich(..) generate NoSuchElementException Message-ID: Hi - Will have a look into this. However, the enrich method is not the ideal way to do this. The method will do it's best to make a Sequence into a RichSequence but it usually cannot do a great job. Your best bet would be to use NCBI eutils to get sequences in GenBank or XML and then put them through the appropriate parser to directly generate a RichSequence. As a todo, we should update GenbankSequenceDB to provide RichSequence instances (or deprecate it and provide an alternative). - Mark Janko Diminic Sent by: biojava-dev-bounces@portal.open-bio.org 01/21/2006 02:52 PM To: biojava-dev@biojava.org cc: (bcc: Mark Schreiber/GP/Novartis) Subject: [Biojava-dev] RichSequence.Tools.enrich(..) generate NoSuchElementException Hi, RichSequence.Tools.enrich(seq) generate NoSuchElementException exception: // Samples.java class Set param = new HashSet(); param.add("AJ278573"); // NCBI accession GenbankSequenceDB genBank = new GenbankSequenceDB(); SequenceDB sequences = genBank.getSequences(param); sequenceIterator = sequences.sequenceIterator(); while (sequenceIterator.hasNext()) { try { Sequence seq = sequenceIterator.nextSequence(); RichSequence enrichSeq = RichSequence.Tools.enrich(seq); //line:92, here throw NoSuchElementException ??? session.saveOrUpdate("Sequence", enrichSeq); } catch (NoSuchElementException e) { e.printStackTrace(); } } java.util.NoSuchElementException at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:367) at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:376) at org.biojavax.bio.seq.SimpleRichFeature.(SimpleRichFeature.java:96) at org.biojavax.bio.seq.SimpleRichSequence.createFeature(SimpleRichSequence.java:323) at org.biojavax.bio.seq.RichSequence$Tools.enrich(RichSequence.java:434) at hr.Samples.main(Samples.java:92) Do you know way? Thanks for the help. -- Janko Diminic _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From hollandr at gis.a-star.edu.sg Sun Jan 22 21:42:17 2006 From: hollandr at gis.a-star.edu.sg (Richard HOLLAND) Date: Sun Jan 22 21:39:19 2006 Subject: [Biojava-dev] RichSequence.Tools.enrich(..) generateNoSuchElementException Message-ID: <6D9E9B9DF347EF4385F6271C64FB8D5602B3FF50@BIONIC.biopolis.one-north.com> Hello all. There was indeed a bug (in the constructor of SimpleRichFeature) which is now fixed, but Mark is right about using the appropriate BioJavaX parser instead to do this task. I've added a new module in biojava-live in CVS - org.biojavax.bio.seq.db.ncbi.GenbankSequenceDB. See the getRichSequence(), getRichSequenceDB() and getRichSequences() methods for details. Your sample code will work with the new module after you do this: 1. Import org.biojavax.bio.seq.db.ncbi.GenbankSequenceDB instead of org.biojava.bio.seq.db.GenbankSequenceDB 2. change Sequence seq = sequenceIterator.nextSequence(); to RichSequence seq = (RichSequence)sequenceIterator.nextSequence(); 3. delete the line that calls enrich(). (Note: GenbankSequenceDB should probably be tidied up a little and made to implement some kind of common interface, maybe RichSequenceDB? Comments please.) cheers, Richard Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Monday, January 23, 2006 10:03 AM > To: Janko Diminic > Cc: biojava-dev@biojava.org; Richard HOLLAND > Subject: Re: [Biojava-dev] RichSequence.Tools.enrich(..) > generateNoSuchElementException > > > Hi - > > Will have a look into this. > > However, the enrich method is not the ideal way to do this. > The method > will do it's best to make a Sequence into a RichSequence but > it usually > cannot do a great job. Your best bet would be to use NCBI > eutils to get > sequences in GenBank or XML and then put them through the appropriate > parser to directly generate a RichSequence. > > As a todo, we should update GenbankSequenceDB to provide RichSequence > instances (or deprecate it and provide an alternative). > > - Mark > > > > > > Janko Diminic > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/21/2006 02:52 PM > > > To: biojava-dev@biojava.org > cc: (bcc: Mark Schreiber/GP/Novartis) > Subject: [Biojava-dev] > RichSequence.Tools.enrich(..) generate > NoSuchElementException > > > Hi, RichSequence.Tools.enrich(seq) generate NoSuchElementException > exception: > > // Samples.java class > > Set param = new HashSet(); > param.add("AJ278573"); // NCBI accession > > GenbankSequenceDB genBank = new GenbankSequenceDB(); > SequenceDB sequences = genBank.getSequences(param); > > sequenceIterator = sequences.sequenceIterator(); > > while (sequenceIterator.hasNext()) { > try { > Sequence seq = sequenceIterator.nextSequence(); > RichSequence enrichSeq = RichSequence.Tools.enrich(seq); > //line:92, here throw NoSuchElementException ??? > > session.saveOrUpdate("Sequence", enrichSeq); > > } catch (NoSuchElementException e) { > e.printStackTrace(); > } > } > > > > java.util.NoSuchElementException > at > java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHas hMap.java:367) > at > java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:376) > at > org.biojavax.bio.seq.SimpleRichFeature.(SimpleRichFeatur > e.java:96) > at > org.biojavax.bio.seq.SimpleRichSequence.createFeature(SimpleRi > chSequence.java:323) > at > org.biojavax.bio.seq.RichSequence$Tools.enrich(RichSequence.java:434) > at hr.Samples.main(Samples.java:92) > > > Do you know way? > Thanks for the help. > > > > -- > Janko Diminic > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > From mark.schreiber at novartis.com Sun Jan 22 21:52:16 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Sun Jan 22 21:48:26 2006 Subject: [Biojava-dev] RichSequence.Tools.enrich(..) generateNoSuchElementException Message-ID: Good idea, We need a RichSequenceDB and a RichSequenceDBLite to extend the appropriate biojava interfaces. - Mark "Richard HOLLAND" Sent by: biojava-dev-bounces@portal.open-bio.org 01/23/2006 10:42 AM To: Mark Schreiber/GP/Novartis@PH, "Janko Diminic" cc: biojava-dev@biojava.org Subject: RE: [Biojava-dev] RichSequence.Tools.enrich(..) generateNoSuchElementException Hello all. There was indeed a bug (in the constructor of SimpleRichFeature) which is now fixed, but Mark is right about using the appropriate BioJavaX parser instead to do this task. I've added a new module in biojava-live in CVS - org.biojavax.bio.seq.db.ncbi.GenbankSequenceDB. See the getRichSequence(), getRichSequenceDB() and getRichSequences() methods for details. Your sample code will work with the new module after you do this: 1. Import org.biojavax.bio.seq.db.ncbi.GenbankSequenceDB instead of org.biojava.bio.seq.db.GenbankSequenceDB 2. change Sequence seq = sequenceIterator.nextSequence(); to RichSequence seq = (RichSequence)sequenceIterator.nextSequence(); 3. delete the line that calls enrich(). (Note: GenbankSequenceDB should probably be tidied up a little and made to implement some kind of common interface, maybe RichSequenceDB? Comments please.) cheers, Richard Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Monday, January 23, 2006 10:03 AM > To: Janko Diminic > Cc: biojava-dev@biojava.org; Richard HOLLAND > Subject: Re: [Biojava-dev] RichSequence.Tools.enrich(..) > generateNoSuchElementException > > > Hi - > > Will have a look into this. > > However, the enrich method is not the ideal way to do this. > The method > will do it's best to make a Sequence into a RichSequence but > it usually > cannot do a great job. Your best bet would be to use NCBI > eutils to get > sequences in GenBank or XML and then put them through the appropriate > parser to directly generate a RichSequence. > > As a todo, we should update GenbankSequenceDB to provide RichSequence > instances (or deprecate it and provide an alternative). > > - Mark > > > > > > Janko Diminic > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/21/2006 02:52 PM > > > To: biojava-dev@biojava.org > cc: (bcc: Mark Schreiber/GP/Novartis) > Subject: [Biojava-dev] > RichSequence.Tools.enrich(..) generate > NoSuchElementException > > > Hi, RichSequence.Tools.enrich(seq) generate NoSuchElementException > exception: > > // Samples.java class > > Set param = new HashSet(); > param.add("AJ278573"); // NCBI accession > > GenbankSequenceDB genBank = new GenbankSequenceDB(); > SequenceDB sequences = genBank.getSequences(param); > > sequenceIterator = sequences.sequenceIterator(); > > while (sequenceIterator.hasNext()) { > try { > Sequence seq = sequenceIterator.nextSequence(); > RichSequence enrichSeq = RichSequence.Tools.enrich(seq); > //line:92, here throw NoSuchElementException ??? > > session.saveOrUpdate("Sequence", enrichSeq); > > } catch (NoSuchElementException e) { > e.printStackTrace(); > } > } > > > > java.util.NoSuchElementException > at > java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHas hMap.java:367) > at > java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:376) > at > org.biojavax.bio.seq.SimpleRichFeature.(SimpleRichFeatur > e.java:96) > at > org.biojavax.bio.seq.SimpleRichSequence.createFeature(SimpleRi > chSequence.java:323) > at > org.biojavax.bio.seq.RichSequence$Tools.enrich(RichSequence.java:434) > at hr.Samples.main(Samples.java:92) > > > Do you know way? > Thanks for the help. > > > > -- > Janko Diminic > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From hollandr at gis.a-star.edu.sg Mon Jan 23 01:09:52 2006 From: hollandr at gis.a-star.edu.sg (Richard HOLLAND) Date: Mon Jan 23 01:06:49 2006 Subject: [Biojava-dev] RichSequence.Tools.enrich(..)generateNoSuchElementException Message-ID: <6D9E9B9DF347EF4385F6271C64FB8D5602B3FF84@BIONIC.biopolis.one-north.com> Done and committed to biojava-live in CVS. It compiles but I haven't had the chance to test functionality. Volunteers please? See: org.biojavax.bio.db.RichSequenceDBLite org.biojavax.bio.db.RichSequenceDB org.biojavax.bio.db.AbstractRichSequenceDB org.biojavax.bio.db.HashRichSequenceDB The biojavax version of GenbankFormat has changed to use the new interfaces and abstract classes, but its behaviour and previous interface implementations remain the same. cheers, Richard Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Monday, January 23, 2006 10:52 AM > To: Richard HOLLAND > Cc: biojava-dev@biojava.org; > biojava-dev-bounces@portal.open-bio.org; Janko Diminic > Subject: RE: [Biojava-dev] > RichSequence.Tools.enrich(..)generateNoSuchElementException > > > Good idea, > > We need a RichSequenceDB and a RichSequenceDBLite to extend the > appropriate biojava interfaces. > > - Mark > > > > > > "Richard HOLLAND" > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/23/2006 10:42 AM > > > To: Mark Schreiber/GP/Novartis@PH, "Janko > Diminic" > cc: biojava-dev@biojava.org > Subject: RE: [Biojava-dev] > RichSequence.Tools.enrich(..) > generateNoSuchElementException > > > Hello all. > > There was indeed a bug (in the constructor of SimpleRichFeature) which > is now fixed, but Mark is right about using the appropriate BioJavaX > parser instead to do this task. > > I've added a new module in biojava-live in CVS - > org.biojavax.bio.seq.db.ncbi.GenbankSequenceDB. See the > getRichSequence(), getRichSequenceDB() and getRichSequences() methods > for details. > > Your sample code will work with the new module after you do this: > > 1. Import > org.biojavax.bio.seq.db.ncbi.GenbankSequenceDB > instead of org.biojava.bio.seq.db.GenbankSequenceDB > 2. change > Sequence seq = > sequenceIterator.nextSequence(); > to > RichSequence seq = > (RichSequence)sequenceIterator.nextSequence(); > 3. delete the line that calls enrich(). > > (Note: GenbankSequenceDB should probably be tidied up a > little and made > to implement some kind of common interface, maybe RichSequenceDB? > Comments please.) > > cheers, > Richard > > Richard Holland > Bioinformatics Specialist > GIS extension 8199 > --------------------------------------------- > This email is confidential and may be privileged. If you are not the > intended recipient, please delete it and notify us immediately. Please > do not copy or use it for any purpose, or disclose its content to any > other person. Thank you. > --------------------------------------------- > > > > -----Original Message----- > > From: mark.schreiber@novartis.com > > [mailto:mark.schreiber@novartis.com] > > Sent: Monday, January 23, 2006 10:03 AM > > To: Janko Diminic > > Cc: biojava-dev@biojava.org; Richard HOLLAND > > Subject: Re: [Biojava-dev] RichSequence.Tools.enrich(..) > > generateNoSuchElementException > > > > > > Hi - > > > > Will have a look into this. > > > > However, the enrich method is not the ideal way to do this. > > The method > > will do it's best to make a Sequence into a RichSequence but > > it usually > > cannot do a great job. Your best bet would be to use NCBI > > eutils to get > > sequences in GenBank or XML and then put them through the > appropriate > > parser to directly generate a RichSequence. > > > > As a todo, we should update GenbankSequenceDB to provide > RichSequence > > instances (or deprecate it and provide an alternative). > > > > - Mark > > > > > > > > > > > > Janko Diminic > > Sent by: biojava-dev-bounces@portal.open-bio.org > > 01/21/2006 02:52 PM > > > > > > To: biojava-dev@biojava.org > > cc: (bcc: Mark Schreiber/GP/Novartis) > > Subject: [Biojava-dev] > > RichSequence.Tools.enrich(..) generate > > NoSuchElementException > > > > > > Hi, RichSequence.Tools.enrich(seq) generate NoSuchElementException > > exception: > > > > // Samples.java class > > > > Set param = new HashSet(); > > param.add("AJ278573"); // NCBI accession > > > > GenbankSequenceDB genBank = new GenbankSequenceDB(); > > SequenceDB sequences = genBank.getSequences(param); > > > > sequenceIterator = sequences.sequenceIterator(); > > > > while (sequenceIterator.hasNext()) { > > try { > > Sequence seq = sequenceIterator.nextSequence(); > > RichSequence enrichSeq = > RichSequence.Tools.enrich(seq); > > //line:92, here throw NoSuchElementException ??? > > > > session.saveOrUpdate("Sequence", enrichSeq); > > > > } catch (NoSuchElementException e) { > > e.printStackTrace(); > > } > > } > > > > > > > > java.util.NoSuchElementException > > at > > java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHas > hMap.java:367) > > at > > java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:376) > > at > > org.biojavax.bio.seq.SimpleRichFeature.(SimpleRichFeatur > > e.java:96) > > at > > org.biojavax.bio.seq.SimpleRichSequence.createFeature(SimpleRi > > chSequence.java:323) > > at > > > org.biojavax.bio.seq.RichSequence$Tools.enrich(RichSequence.java:434) > > at hr.Samples.main(Samples.java:92) > > > > > > Do you know way? > > Thanks for the help. > > > > > > > > -- > > Janko Diminic > > > > _______________________________________________ > > biojava-dev mailing list > > biojava-dev@biojava.org > > http://biojava.org/mailman/listinfo/biojava-dev > > > > > > > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > From mark.schreiber at novartis.com Mon Jan 23 04:32:58 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Mon Jan 23 04:29:41 2006 Subject: [Biojava-dev] ant xslt task Message-ID: Unfortunately that makes the Ant build dependant on some kind of Unix/ Linux environment which is not ideal. Any other ideas?? - Mark "Martin Szugat" Sent by: biojava-dev-bounces@portal.open-bio.org 01/20/2006 10:42 PM To: cc: Mark Schreiber/GP/Novartis@PH Subject: RE: [Biojava-dev] ant xslt task Hi Mark, I tried it using XMLSpy. It didn't work. Next I used the xslt-proc command, and now it worked. Finally, I tried Saxon, and it didn't work. So my proposal is using the xslt-proc command within the Ant script. Best regards Martin > -----Original Message----- > From: biojava-dev-bounces@portal.open-bio.org > [mailto:biojava-dev-bounces@portal.open-bio.org] On Behalf Of > mark.schreiber@novartis.com > Sent: Friday, January 20, 2006 10:38 AM > To: biojava-dev@biojava.org > Subject: [Biojava-dev] ant xslt task > > Hi - > > I'm trying to add an ant xslt task to the build.xml file to > convert the BioJavaX.xml into html. > > When I run it I always seem to get a > javax.xml.transform.TransformerException. > > I am using: > > jdk 1.5.0.03 > ant 1.6.2 > dockbook-xsl 1.6.9.1 > > Has anyone managed to get this to work in the past? > > - Mark > > Mark Schreiber > Research Investigator (Bioinformatics) > > Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road > #05-01 Chromos > Singapore 138670 > www.nitd.novartis.com > > phone +65 6722 2973 > fax +65 6722 2910 > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From Martin.Szugat at GMX.net Mon Jan 23 05:54:39 2006 From: Martin.Szugat at GMX.net (Martin Szugat) Date: Mon Jan 23 05:50:41 2006 Subject: [Biojava-dev] ant xslt task In-Reply-To: Message-ID: <200601231050.k0NAoZ8U008704@portal.open-bio.org> Hi Mark, Download the version 6.5.2 of Saxon: http://prdownloads.sourceforge.net/saxon/saxon6_5_2.zip?download Next, set the TransformerFactory property: javax.xml.transform.TransformerFactory=com/icl/saxon/TransformerFactoryImpl. class The saxon.jar library must be included in the ant classpath. Best regards Martin > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Monday, January 23, 2006 10:33 AM > To: Martin Szugat > Cc: biojava-dev@biojava.org; biojava-dev-bounces@portal.open-bio.org > Subject: RE: [Biojava-dev] ant xslt task > > Unfortunately that makes the Ant build dependant on some kind > of Unix/ Linux environment which is not ideal. > > Any other ideas?? > > - Mark > > > > > > "Martin Szugat" > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/20/2006 10:42 PM > > > To: > cc: Mark Schreiber/GP/Novartis@PH > Subject: RE: [Biojava-dev] ant xslt task > > > Hi Mark, > > I tried it using XMLSpy. It didn't work. Next I used the > xslt-proc command, and now it worked. Finally, I tried Saxon, > and it didn't work. So my proposal is using the xslt-proc > command within the Ant script. > > Best regards > > Martin > > > -----Original Message----- > > From: biojava-dev-bounces@portal.open-bio.org > > [mailto:biojava-dev-bounces@portal.open-bio.org] On Behalf Of > > mark.schreiber@novartis.com > > Sent: Friday, January 20, 2006 10:38 AM > > To: biojava-dev@biojava.org > > Subject: [Biojava-dev] ant xslt task > > > > Hi - > > > > I'm trying to add an ant xslt task to the build.xml file to convert > > the BioJavaX.xml into html. > > > > When I run it I always seem to get a > > javax.xml.transform.TransformerException. > > > > I am using: > > > > jdk 1.5.0.03 > > ant 1.6.2 > > dockbook-xsl 1.6.9.1 > > > > Has anyone managed to get this to work in the past? > > > > - Mark > > > > Mark Schreiber > > Research Investigator (Bioinformatics) > > > > Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road > > #05-01 Chromos > > Singapore 138670 > > www.nitd.novartis.com > > > > phone +65 6722 2973 > > fax +65 6722 2910 > > > > _______________________________________________ > > biojava-dev mailing list > > biojava-dev@biojava.org > > http://biojava.org/mailman/listinfo/biojava-dev > > > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > From hollandr at gis.a-star.edu.sg Mon Jan 23 21:51:12 2006 From: hollandr at gis.a-star.edu.sg (Richard HOLLAND) Date: Mon Jan 23 21:48:03 2006 Subject: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB Message-ID: <6D9E9B9DF347EF4385F6271C64FB8D5602B40002@BIONIC.biopolis.one-north.com> We've added two new modules to BioJavaX that allow you to wrap a BioSQL/Hibernate database in a SequenceDB compatible wrapper. More for convenience sake than anything else (its not foolproof) but it might be useful. They are: org.biojavax.bio.db.biosql.BioSQLBioEntryDB org.biojavax.bio.db.biosql.BioSQLRichSequenceDB The code depends on you having unique values in the 'name' column of the BioEntry table in your BioSQL database. You'll get 'IllegalIDExceptions' thrown all over the place if this does not hold true. If this is the case, you should use Hibernate directly rather than this convenience wrapper code. To use it, make sure Hibernate is on your classpath. Then you can do things like this: Session session = ...; // get a Hibernate session from somewhere RichObjectFactory.connectToHibernate(session); // bind BioJavaX to the hibernate session RichSequenceDB db = new BioSQLRichSequenceDB(session); // connect the hibernate session to our SequenceDB System.out.println(db.ids()); // prints out a list of all the values in the 'name' column of the BioEntry table in the database for (Iterator i = db.getRichSequences("bloggs"); i.hasNext(); ) { // retrieve all sequences where the name is 'bloggs' RichSequence seq = (RichSequence)i.next(); // get the next one ... // do something with it here } To add sequences to your database: RichSequence seq = ...; // get a RichSequence from somewhere db.addRichSequence(seq); To remove them again: db.removeRichSequence("bloggs"); // removes the sequence with the name 'bloggs' The BioSQLBioEntryDB works in exactly the same way but returns only BioEntry objects - ie. sequences without the sequence data attached. This might help with performance in some cases. Finally, we also added a GenbankRichSequenceDB object that behaves much like the old GenbankSequenceDB object but returns RichSequence objects instead. cheers, Richard Richard Holland Bioinformatics Specialist Genome Institute of Singapore 60 Biopolis Street, #02-01 Genome, Singapore 138672 Tel: (65) 6478 8000 DID: (65) 6478 8199 Email: hollandr@gis.a-star.edu.sg --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- From mark.schreiber at novartis.com Mon Jan 23 22:17:19 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Mon Jan 23 22:13:40 2006 Subject: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB Message-ID: Very cool use of reflection in there! I don't see how commits and rollbacks are handled though?? - Mark "Richard HOLLAND" Sent by: biojava-dev-bounces@portal.open-bio.org 01/24/2006 10:51 AM To: cc: Mark Schreiber/GP/Novartis@PH Subject: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB We've added two new modules to BioJavaX that allow you to wrap a BioSQL/Hibernate database in a SequenceDB compatible wrapper. More for convenience sake than anything else (its not foolproof) but it might be useful. They are: org.biojavax.bio.db.biosql.BioSQLBioEntryDB org.biojavax.bio.db.biosql.BioSQLRichSequenceDB The code depends on you having unique values in the 'name' column of the BioEntry table in your BioSQL database. You'll get 'IllegalIDExceptions' thrown all over the place if this does not hold true. If this is the case, you should use Hibernate directly rather than this convenience wrapper code. To use it, make sure Hibernate is on your classpath. Then you can do things like this: Session session = ...; // get a Hibernate session from somewhere RichObjectFactory.connectToHibernate(session); // bind BioJavaX to the hibernate session RichSequenceDB db = new BioSQLRichSequenceDB(session); // connect the hibernate session to our SequenceDB System.out.println(db.ids()); // prints out a list of all the values in the 'name' column of the BioEntry table in the database for (Iterator i = db.getRichSequences("bloggs"); i.hasNext(); ) { // retrieve all sequences where the name is 'bloggs' RichSequence seq = (RichSequence)i.next(); // get the next one ... // do something with it here } To add sequences to your database: RichSequence seq = ...; // get a RichSequence from somewhere db.addRichSequence(seq); To remove them again: db.removeRichSequence("bloggs"); // removes the sequence with the name 'bloggs' The BioSQLBioEntryDB works in exactly the same way but returns only BioEntry objects - ie. sequences without the sequence data attached. This might help with performance in some cases. Finally, we also added a GenbankRichSequenceDB object that behaves much like the old GenbankSequenceDB object but returns RichSequence objects instead. cheers, Richard Richard Holland Bioinformatics Specialist Genome Institute of Singapore 60 Biopolis Street, #02-01 Genome, Singapore 138672 Tel: (65) 6478 8000 DID: (65) 6478 8199 Email: hollandr@gis.a-star.edu.sg --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From hollandr at gis.a-star.edu.sg Mon Jan 23 22:22:10 2006 From: hollandr at gis.a-star.edu.sg (Richard HOLLAND) Date: Mon Jan 23 22:19:38 2006 Subject: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB Message-ID: <6D9E9B9DF347EF4385F6271C64FB8D5602B4000F@BIONIC.biopolis.one-north.com> All BJX needs is a Hibernate session. By default, Hibernate auto-commits, but you can wrap any part of your application in code like this to make it transactional (example from the Hibernate Session javadocs): Session sess = factory.openSession(); Transaction tx; try { tx = sess.beginTransaction(); //do some work ... tx.commit(); } catch (Exception e) { if (tx!=null) tx.rollback(); throw e; } finally { sess.close(); } So BJX doesn't need to worry about transactions - its entirely the user's responsibility. cheers, Richard Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Tuesday, January 24, 2006 11:17 AM > To: Richard HOLLAND > Cc: biojava-dev@biojava.org > Subject: Re: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB > > > Very cool use of reflection in there! > > I don't see how commits and rollbacks are handled though?? > > - Mark > > > > > > "Richard HOLLAND" > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/24/2006 10:51 AM > > > To: > cc: Mark Schreiber/GP/Novartis@PH > Subject: [Biojava-dev] BioSQLRichSequenceDB > and BioSQLBioEntryDB > > > We've added two new modules to BioJavaX that allow you to wrap a > BioSQL/Hibernate database in a SequenceDB compatible wrapper. > More for > convenience sake than anything else (its not foolproof) but > it might be > useful. > > They are: > > org.biojavax.bio.db.biosql.BioSQLBioEntryDB > org.biojavax.bio.db.biosql.BioSQLRichSequenceDB > > The code depends on you having unique values in the 'name' > column of the > BioEntry table in your BioSQL database. You'll get > 'IllegalIDExceptions' > thrown all over the place if this does not hold true. If this > is the case, > you should use Hibernate directly rather than this > convenience wrapper > code. > > To use it, make sure Hibernate is on your classpath. Then you can do > things like this: > > Session session = ...; // get a Hibernate > session from > somewhere > > > RichObjectFactory.connectToHibernate(session); // bind > BioJavaX to the hibernate session > RichSequenceDB db = new > BioSQLRichSequenceDB(session); // > connect the hibernate session to our SequenceDB > > System.out.println(db.ids()); // prints out > a list of all > the values in the 'name' column of the BioEntry table in the > database > > for (Iterator i = db.getRichSequences("bloggs"); > i.hasNext(); ) { // retrieve all sequences where the name is 'bloggs' > RichSequence seq = > (RichSequence)i.next(); // get the > next one > ... // do something with it here > } > > To add sequences to your database: > > RichSequence seq = ...; // get a RichSequence from > somewhere > db.addRichSequence(seq); > > To remove them again: > > db.removeRichSequence("bloggs"); // removes > the sequence > with the name 'bloggs' > > The BioSQLBioEntryDB works in exactly the same way but returns only > BioEntry objects - ie. sequences without the sequence data > attached. This > might help with performance in some cases. > > Finally, we also added a GenbankRichSequenceDB object that > behaves much > like the old GenbankSequenceDB object but returns > RichSequence objects > instead. > > cheers, > Richard > > Richard Holland > Bioinformatics Specialist > Genome Institute of Singapore > 60 Biopolis Street, #02-01 Genome, Singapore 138672 > Tel: (65) 6478 8000 DID: (65) 6478 8199 > Email: hollandr@gis.a-star.edu.sg > --------------------------------------------- > This email is confidential and may be privileged. If you are not the > intended recipient, please delete it and notify us > immediately. Please do > not copy or use it for any purpose, or disclose its content > to any other > person. Thank you. > --------------------------------------------- > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > From mark.schreiber at novartis.com Mon Jan 23 22:35:46 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Mon Jan 23 22:32:15 2006 Subject: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB Message-ID: So I should be able to get atomic transactions by doing this... Session sess = factory.openSession(); Transaction tx; RichObjectFactory.connectToHibernate(session); // bind BioJavaX to the hibernate session RichSequenceDB db = new BioSQLRichSequenceDB(session); RichSequence seq = ... //make a RichSequence try { tx = sess.beginTransaction(); //do something the the DB db.addSequence(seq1); tx.commit(); } catch (Exception e) { if (tx!=null) tx.rollback(); throw e; } finally { sess.close(); } "Richard HOLLAND" Sent by: biojava-dev-bounces@portal.open-bio.org 01/24/2006 11:22 AM To: Mark Schreiber/GP/Novartis@PH cc: biojava-dev@biojava.org Subject: RE: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB All BJX needs is a Hibernate session. By default, Hibernate auto-commits, but you can wrap any part of your application in code like this to make it transactional (example from the Hibernate Session javadocs): Session sess = factory.openSession(); Transaction tx; try { tx = sess.beginTransaction(); //do some work ... tx.commit(); } catch (Exception e) { if (tx!=null) tx.rollback(); throw e; } finally { sess.close(); } So BJX doesn't need to worry about transactions - its entirely the user's responsibility. cheers, Richard Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Tuesday, January 24, 2006 11:17 AM > To: Richard HOLLAND > Cc: biojava-dev@biojava.org > Subject: Re: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB > > > Very cool use of reflection in there! > > I don't see how commits and rollbacks are handled though?? > > - Mark > > > > > > "Richard HOLLAND" > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/24/2006 10:51 AM > > > To: > cc: Mark Schreiber/GP/Novartis@PH > Subject: [Biojava-dev] BioSQLRichSequenceDB > and BioSQLBioEntryDB > > > We've added two new modules to BioJavaX that allow you to wrap a > BioSQL/Hibernate database in a SequenceDB compatible wrapper. > More for > convenience sake than anything else (its not foolproof) but > it might be > useful. > > They are: > > org.biojavax.bio.db.biosql.BioSQLBioEntryDB > org.biojavax.bio.db.biosql.BioSQLRichSequenceDB > > The code depends on you having unique values in the 'name' > column of the > BioEntry table in your BioSQL database. You'll get > 'IllegalIDExceptions' > thrown all over the place if this does not hold true. If this > is the case, > you should use Hibernate directly rather than this > convenience wrapper > code. > > To use it, make sure Hibernate is on your classpath. Then you can do > things like this: > > Session session = ...; // get a Hibernate > session from > somewhere > > > RichObjectFactory.connectToHibernate(session); // bind > BioJavaX to the hibernate session > RichSequenceDB db = new > BioSQLRichSequenceDB(session); // > connect the hibernate session to our SequenceDB > > System.out.println(db.ids()); // prints out > a list of all > the values in the 'name' column of the BioEntry table in the > database > > for (Iterator i = db.getRichSequences("bloggs"); > i.hasNext(); ) { // retrieve all sequences where the name is 'bloggs' > RichSequence seq = > (RichSequence)i.next(); // get the > next one > ... // do something with it here > } > > To add sequences to your database: > > RichSequence seq = ...; // get a RichSequence from > somewhere > db.addRichSequence(seq); > > To remove them again: > > db.removeRichSequence("bloggs"); // removes > the sequence > with the name 'bloggs' > > The BioSQLBioEntryDB works in exactly the same way but returns only > BioEntry objects - ie. sequences without the sequence data > attached. This > might help with performance in some cases. > > Finally, we also added a GenbankRichSequenceDB object that > behaves much > like the old GenbankSequenceDB object but returns > RichSequence objects > instead. > > cheers, > Richard > > Richard Holland > Bioinformatics Specialist > Genome Institute of Singapore > 60 Biopolis Street, #02-01 Genome, Singapore 138672 > Tel: (65) 6478 8000 DID: (65) 6478 8199 > Email: hollandr@gis.a-star.edu.sg > --------------------------------------------- > This email is confidential and may be privileged. If you are not the > intended recipient, please delete it and notify us > immediately. Please do > not copy or use it for any purpose, or disclose its content > to any other > person. Thank you. > --------------------------------------------- > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From hollandr at gis.a-star.edu.sg Mon Jan 23 22:38:57 2006 From: hollandr at gis.a-star.edu.sg (Richard HOLLAND) Date: Mon Jan 23 22:35:51 2006 Subject: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB Message-ID: <6D9E9B9DF347EF4385F6271C64FB8D5602B40017@BIONIC.biopolis.one-north.com> Exactly. Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Tuesday, January 24, 2006 11:36 AM > To: Richard HOLLAND > Cc: biojava-dev@biojava.org; biojava-dev-bounces@portal.open-bio.org > Subject: RE: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB > > > So I should be able to get atomic transactions by doing this... > > Session sess = factory.openSession(); > Transaction tx; > RichObjectFactory.connectToHibernate(session); // bind > BioJavaX to the > hibernate session > RichSequenceDB db = new BioSQLRichSequenceDB(session); > > RichSequence seq = ... //make a RichSequence > > try { > tx = sess.beginTransaction(); > //do something the the DB > db.addSequence(seq1); > tx.commit(); > } > catch (Exception e) { > if (tx!=null) tx.rollback(); > throw e; > } > finally { > sess.close(); > } > > > > > > "Richard HOLLAND" > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/24/2006 11:22 AM > > > To: Mark Schreiber/GP/Novartis@PH > cc: biojava-dev@biojava.org > Subject: RE: [Biojava-dev] > BioSQLRichSequenceDB and BioSQLBioEntryDB > > > All BJX needs is a Hibernate session. By default, Hibernate > auto-commits, but you can wrap any part of your application > in code like > this to make it transactional (example from the Hibernate Session > javadocs): > > Session sess = factory.openSession(); > Transaction tx; > try { > tx = sess.beginTransaction(); > //do some work > ... > tx.commit(); > } > catch (Exception e) { > if (tx!=null) tx.rollback(); > throw e; > } > finally { > sess.close(); > } > > > So BJX doesn't need to worry about transactions - its entirely the > user's responsibility. > > cheers, > Richard > > Richard Holland > Bioinformatics Specialist > GIS extension 8199 > --------------------------------------------- > This email is confidential and may be privileged. If you are not the > intended recipient, please delete it and notify us immediately. Please > do not copy or use it for any purpose, or disclose its content to any > other person. Thank you. > --------------------------------------------- > > > > -----Original Message----- > > From: mark.schreiber@novartis.com > > [mailto:mark.schreiber@novartis.com] > > Sent: Tuesday, January 24, 2006 11:17 AM > > To: Richard HOLLAND > > Cc: biojava-dev@biojava.org > > Subject: Re: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB > > > > > > Very cool use of reflection in there! > > > > I don't see how commits and rollbacks are handled though?? > > > > - Mark > > > > > > > > > > > > "Richard HOLLAND" > > Sent by: biojava-dev-bounces@portal.open-bio.org > > 01/24/2006 10:51 AM > > > > > > To: > > cc: Mark Schreiber/GP/Novartis@PH > > Subject: [Biojava-dev] BioSQLRichSequenceDB > > and BioSQLBioEntryDB > > > > > > We've added two new modules to BioJavaX that allow you to wrap a > > BioSQL/Hibernate database in a SequenceDB compatible wrapper. > > More for > > convenience sake than anything else (its not foolproof) but > > it might be > > useful. > > > > They are: > > > > org.biojavax.bio.db.biosql.BioSQLBioEntryDB > > org.biojavax.bio.db.biosql.BioSQLRichSequenceDB > > > > The code depends on you having unique values in the 'name' > > column of the > > BioEntry table in your BioSQL database. You'll get > > 'IllegalIDExceptions' > > thrown all over the place if this does not hold true. If this > > is the case, > > you should use Hibernate directly rather than this > > convenience wrapper > > code. > > > > To use it, make sure Hibernate is on your classpath. Then > you can do > > things like this: > > > > Session session = ...; // get a Hibernate > > session from > > somewhere > > > > > > RichObjectFactory.connectToHibernate(session); // bind > > BioJavaX to the hibernate session > > RichSequenceDB db = new > > BioSQLRichSequenceDB(session); // > > connect the hibernate session to our SequenceDB > > > > System.out.println(db.ids()); // prints out > > a list of all > > the values in the 'name' column of the BioEntry table in the > > database > > > > for (Iterator i = db.getRichSequences("bloggs"); > > i.hasNext(); ) { // retrieve all sequences where the name > is 'bloggs' > > RichSequence seq = > > (RichSequence)i.next(); // get the > > next one > > ... // do something with it here > > } > > > > To add sequences to your database: > > > > RichSequence seq = ...; // get a RichSequence from > > somewhere > > db.addRichSequence(seq); > > > > To remove them again: > > > > db.removeRichSequence("bloggs"); // removes > > the sequence > > with the name 'bloggs' > > > > The BioSQLBioEntryDB works in exactly the same way but returns only > > BioEntry objects - ie. sequences without the sequence data > > attached. This > > might help with performance in some cases. > > > > Finally, we also added a GenbankRichSequenceDB object that > > behaves much > > like the old GenbankSequenceDB object but returns > > RichSequence objects > > instead. > > > > cheers, > > Richard > > > > Richard Holland > > Bioinformatics Specialist > > Genome Institute of Singapore > > 60 Biopolis Street, #02-01 Genome, Singapore 138672 > > Tel: (65) 6478 8000 DID: (65) 6478 8199 > > Email: hollandr@gis.a-star.edu.sg > > --------------------------------------------- > > This email is confidential and may be privileged. If you > are not the > > intended recipient, please delete it and notify us > > immediately. Please do > > not copy or use it for any purpose, or disclose its content > > to any other > > person. Thank you. > > --------------------------------------------- > > > > > > _______________________________________________ > > biojava-dev mailing list > > biojava-dev@biojava.org > > http://biojava.org/mailman/listinfo/biojava-dev > > > > > > > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > From mark.schreiber at novartis.com Mon Jan 23 22:44:08 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Mon Jan 23 22:47:13 2006 Subject: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB Message-ID: 'Tis a thing of great beauty! "Richard HOLLAND" Sent by: biojava-dev-bounces@portal.open-bio.org 01/24/2006 11:38 AM To: Mark Schreiber/GP/Novartis@PH cc: biojava-dev@biojava.org, biojava-dev-bounces@portal.open-bio.org Subject: RE: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB Exactly. Richard Holland Bioinformatics Specialist GIS extension 8199 --------------------------------------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its content to any other person. Thank you. --------------------------------------------- > -----Original Message----- > From: mark.schreiber@novartis.com > [mailto:mark.schreiber@novartis.com] > Sent: Tuesday, January 24, 2006 11:36 AM > To: Richard HOLLAND > Cc: biojava-dev@biojava.org; biojava-dev-bounces@portal.open-bio.org > Subject: RE: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB > > > So I should be able to get atomic transactions by doing this... > > Session sess = factory.openSession(); > Transaction tx; > RichObjectFactory.connectToHibernate(session); // bind > BioJavaX to the > hibernate session > RichSequenceDB db = new BioSQLRichSequenceDB(session); > > RichSequence seq = ... //make a RichSequence > > try { > tx = sess.beginTransaction(); > //do something the the DB > db.addSequence(seq1); > tx.commit(); > } > catch (Exception e) { > if (tx!=null) tx.rollback(); > throw e; > } > finally { > sess.close(); > } > > > > > > "Richard HOLLAND" > Sent by: biojava-dev-bounces@portal.open-bio.org > 01/24/2006 11:22 AM > > > To: Mark Schreiber/GP/Novartis@PH > cc: biojava-dev@biojava.org > Subject: RE: [Biojava-dev] > BioSQLRichSequenceDB and BioSQLBioEntryDB > > > All BJX needs is a Hibernate session. By default, Hibernate > auto-commits, but you can wrap any part of your application > in code like > this to make it transactional (example from the Hibernate Session > javadocs): > > Session sess = factory.openSession(); > Transaction tx; > try { > tx = sess.beginTransaction(); > //do some work > ... > tx.commit(); > } > catch (Exception e) { > if (tx!=null) tx.rollback(); > throw e; > } > finally { > sess.close(); > } > > > So BJX doesn't need to worry about transactions - its entirely the > user's responsibility. > > cheers, > Richard > > Richard Holland > Bioinformatics Specialist > GIS extension 8199 > --------------------------------------------- > This email is confidential and may be privileged. If you are not the > intended recipient, please delete it and notify us immediately. Please > do not copy or use it for any purpose, or disclose its content to any > other person. Thank you. > --------------------------------------------- > > > > -----Original Message----- > > From: mark.schreiber@novartis.com > > [mailto:mark.schreiber@novartis.com] > > Sent: Tuesday, January 24, 2006 11:17 AM > > To: Richard HOLLAND > > Cc: biojava-dev@biojava.org > > Subject: Re: [Biojava-dev] BioSQLRichSequenceDB and BioSQLBioEntryDB > > > > > > Very cool use of reflection in there! > > > > I don't see how commits and rollbacks are handled though?? > > > > - Mark > > > > > > > > > > > > "Richard HOLLAND" > > Sent by: biojava-dev-bounces@portal.open-bio.org > > 01/24/2006 10:51 AM > > > > > > To: > > cc: Mark Schreiber/GP/Novartis@PH > > Subject: [Biojava-dev] BioSQLRichSequenceDB > > and BioSQLBioEntryDB > > > > > > We've added two new modules to BioJavaX that allow you to wrap a > > BioSQL/Hibernate database in a SequenceDB compatible wrapper. > > More for > > convenience sake than anything else (its not foolproof) but > > it might be > > useful. > > > > They are: > > > > org.biojavax.bio.db.biosql.BioSQLBioEntryDB > > org.biojavax.bio.db.biosql.BioSQLRichSequenceDB > > > > The code depends on you having unique values in the 'name' > > column of the > > BioEntry table in your BioSQL database. You'll get > > 'IllegalIDExceptions' > > thrown all over the place if this does not hold true. If this > > is the case, > > you should use Hibernate directly rather than this > > convenience wrapper > > code. > > > > To use it, make sure Hibernate is on your classpath. Then > you can do > > things like this: > > > > Session session = ...; // get a Hibernate > > session from > > somewhere > > > > > > RichObjectFactory.connectToHibernate(session); // bind > > BioJavaX to the hibernate session > > RichSequenceDB db = new > > BioSQLRichSequenceDB(session); // > > connect the hibernate session to our SequenceDB > > > > System.out.println(db.ids()); // prints out > > a list of all > > the values in the 'name' column of the BioEntry table in the > > database > > > > for (Iterator i = db.getRichSequences("bloggs"); > > i.hasNext(); ) { // retrieve all sequences where the name > is 'bloggs' > > RichSequence seq = > > (RichSequence)i.next(); // get the > > next one > > ... // do something with it here > > } > > > > To add sequences to your database: > > > > RichSequence seq = ...; // get a RichSequence from > > somewhere > > db.addRichSequence(seq); > > > > To remove them again: > > > > db.removeRichSequence("bloggs"); // removes > > the sequence > > with the name 'bloggs' > > > > The BioSQLBioEntryDB works in exactly the same way but returns only > > BioEntry objects - ie. sequences without the sequence data > > attached. This > > might help with performance in some cases. > > > > Finally, we also added a GenbankRichSequenceDB object that > > behaves much > > like the old GenbankSequenceDB object but returns > > RichSequence objects > > instead. > > > > cheers, > > Richard > > > > Richard Holland > > Bioinformatics Specialist > > Genome Institute of Singapore > > 60 Biopolis Street, #02-01 Genome, Singapore 138672 > > Tel: (65) 6478 8000 DID: (65) 6478 8199 > > Email: hollandr@gis.a-star.edu.sg > > --------------------------------------------- > > This email is confidential and may be privileged. If you > are not the > > intended recipient, please delete it and notify us > > immediately. Please do > > not copy or use it for any purpose, or disclose its content > > to any other > > person. Thank you. > > --------------------------------------------- > > > > > > _______________________________________________ > > biojava-dev mailing list > > biojava-dev@biojava.org > > http://biojava.org/mailman/listinfo/biojava-dev > > > > > > > > > > _______________________________________________ > biojava-dev mailing list > biojava-dev@biojava.org > http://biojava.org/mailman/listinfo/biojava-dev > > > > _______________________________________________ biojava-dev mailing list biojava-dev@biojava.org http://biojava.org/mailman/listinfo/biojava-dev From mark.schreiber at novartis.com Tue Jan 24 04:26:08 2006 From: mark.schreiber at novartis.com (mark.schreiber@novartis.com) Date: Tue Jan 24 04:22:27 2006 Subject: [Biojava-dev] ant build file updated Message-ID: Hello - I have updated the ant build file so that it has a new task (docbook) that transforms the BioJavaX.xml documentation file to HTML. The task is largely based on Keith James' original task but uses the saxon.jar (provided) which seems to be required in at least some situtations (especially with some IDEs), The relevant XSL and DTD files are also provided as a jar which ant knows what to do with. Hopefully this will work on all platforms. Let me know if there is a problem. - Mark Mark Schreiber Research Investigator (Bioinformatics) Novartis Institute for Tropical Diseases (NITD) 10 Biopolis Road #05-01 Chromos Singapore 138670 www.nitd.novartis.com phone +65 6722 2973 fax +65 6722 2910