From benn at mpi-cbg.de Wed Jun 4 05:56:17 2008 From: benn at mpi-cbg.de (benn) Date: Wed, 04 Jun 2008 11:56:17 +0200 Subject: [Biojava-l] GFF Parsing Message-ID: <484666C1.30300@mpi-cbg.de> Hello, I am investigating the user of biojava for file parsing for in-house apps in my organisation. I have previously used biojava but if I am looking at a new implementation then I would like to use biojavax. I have managed to parse a fasta file with no problems but I now need to parse gff. I cannot see a parser for gff in biojavax, would I need to implement a new parser which works with the biojavax IOTools and rich sequence or can I use the parser from biojava2 in some way? Cheers, Neil From dicknetherlands at gmail.com Wed Jun 4 15:34:21 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Wed, 4 Jun 2008 20:34:21 +0100 Subject: [Biojava-l] GFF Parsing In-Reply-To: <484666C1.30300@mpi-cbg.de> References: <484666C1.30300@mpi-cbg.de> Message-ID: Hello. BioJavaX has no GFF parser yet, but we would most certainly welcome one. It'd have to be a from-scratch parser although you could certainly use the BJ2 parser as reference for working out what to put where in the object model. The idea of the BJX parsers was to make better use of the object model than the BJ2 ones, so you might have to move a few things to more appropriate slots. Also, take a look on the BioJava website about our discussions for BioJava 3 - on which work will start shortly. Thanks for your interest! cheers, Richard 2008/6/4 benn : > Hello, > > I am investigating the user of biojava for file parsing for in-house > apps in my organisation. I have previously used biojava but if I am looking > at a new implementation then I would like to use biojavax. I have managed > to parse a fasta file with no problems but I now need to parse gff. I > cannot see a parser for gff in biojavax, would I need to implement a new > parser which works with the biojavax IOTools and rich sequence or can I use > the parser from biojava2 in some way? > > Cheers, > > Neil > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > From allank at sanbi.ac.za Thu Jun 5 07:10:04 2008 From: allank at sanbi.ac.za (Allan Kamau) Date: Thu, 05 Jun 2008 13:10:04 +0200 Subject: [Biojava-l] Simple sequence viewer (may be off topic) Message-ID: <4847C98C.3030805@sanbi.ac.za> Hi all, Am looking for a simple sequence viewer to install on a Linux workstation. This tool should allow viewing and editing of alignments, any suggestions. I've googled without much success. Did not know where else to ask. Allan. From benn at mpi-cbg.de Thu Jun 5 07:49:02 2008 From: benn at mpi-cbg.de (benn) Date: Thu, 05 Jun 2008 13:49:02 +0200 Subject: [Biojava-l] Problem while using BlastXMLParserFacade Message-ID: <4847D2AE.8000801@mpi-cbg.de> Hello, Sorry to pepper the board with questions! I am working on BLAST parsing and have the standard output for BLAST working fine with JUnit tests. So I am attempting to recreate this for files in XML format coming from blast (blastp), however I have the problem that I get a SAXException that content is not allowed before prolog. I thought I could have some invisible characters which is causing it to throw a wobbly but I cannot see any. Has anyone else come across the problem? For completeness, the file can be downloaded at : http://idisk-srv1.mpi-cbg.de/~benn/xmloutput.xml (the mailing list server would not me attach the file to the email) and the code which parses is below: private List parseBlast(String filename) throws IOException, SAXException, BioException { InputStream is = new FileInputStream( "src/test/resources/blast/standardoutput.blastp"); BlastXMLParserFacade parser = new BlastXMLParserFacade(); SeqSimilarityAdapter adapter = new SeqSimilarityAdapter(); parser.setContentHandler(adapter); List results = new ArrayList(); SearchContentHandler builder = new BlastLikeSearchBuilder(results, new DummySequenceDB("queries"), new DummySequenceDBInstallation()); adapter.setSearchContentHandler(builder); parser.parse(new InputSource(is)); return results; } Cheers, Neil From ap3 at sanger.ac.uk Thu Jun 5 07:52:30 2008 From: ap3 at sanger.ac.uk (Andreas Prlic) Date: Thu, 5 Jun 2008 12:52:30 +0100 Subject: [Biojava-l] Simple sequence viewer (may be off topic) In-Reply-To: <4847C98C.3030805@sanbi.ac.za> References: <4847C98C.3030805@sanbi.ac.za> Message-ID: HI Allan, The best alignment viewer and editor in my opinion is Jalview http:// www.jalview.org/ Andreas On 5 Jun 2008, at 12:10, Allan Kamau wrote: > Hi all, > Am looking for a simple sequence viewer to install on a Linux > workstation. This tool should allow viewing and editing of > alignments, any suggestions. > I've googled without much success. Did not know where else to ask. > > Allan. > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l ----------------------------------------------------------------------- Andreas Prlic Wellcome Trust Sanger Institute Hinxton, Cambridge CB10 1SA, UK +44 (0) 1223 49 6891 ----------------------------------------------------------------------- -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. From dreher at molgen.mpg.de Thu Jun 5 08:08:44 2008 From: dreher at molgen.mpg.de (Felix Dreher) Date: Thu, 05 Jun 2008 14:08:44 +0200 Subject: [Biojava-l] Simple sequence viewer (may be off topic) In-Reply-To: <4847C98C.3030805@sanbi.ac.za> References: <4847C98C.3030805@sanbi.ac.za> Message-ID: <4847D74C.3060402@molgen.mpg.de> Hi Allan, you could try the Argo genome browser: --> http://www.broad.mit.edu/annotation/argo/ Regards, Felix Allan Kamau wrote: > Hi all, > Am looking for a simple sequence viewer to install on a Linux > workstation. This tool should allow viewing and editing of alignments, > any suggestions. > I've googled without much success. Did not know where else to ask. > > Allan. > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l -- ______________________________________________ Felix Dreher Max Planck Institute for Molecular Genetics Department of Vertebrate Genomics Bioinformatics Group Ihnestr. 73 | phone: 0049-30-84131279 D-14195 Berlin | mobile: 0049-163-7542426 ______________________________________________ From gabrielle_doan at gmx.net Thu Jun 5 09:32:32 2008 From: gabrielle_doan at gmx.net (Gabrielle Doan) Date: Thu, 05 Jun 2008 15:32:32 +0200 Subject: [Biojava-l] features of a sequence Message-ID: <4847EAF0.7060702@gmx.net> Hi all, I would like to query the features of a sequence with following code: public class Test{ public static void main(String[] args) { // load Hibernate config SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); // open the session Session session = sessionFactory.openSession(); // connect it to BioJavaX RichObjectFactory.connectToBioSQL(session); Transaction tx = session.beginTransaction(); Query q1 = session.createQuery( "from Feature as f " + "inner join fetch f.noteSet as n " + "where n.value=:val and f.typeTerm.name=:term"); q1.setString("val","TRNF"); q1.setString("term","gene"); List li = q1.list(); System.out.println("Found:\t"+li.size()); for (Iterator i = li.iterator(); i.hasNext(); ){ SimpleRichFeature f = i.next(); System.out.println("Term:\t"+f.getTypeTerm().getName()); System.out.println("Location:\t"+f.getLocation().getMin()+"\t"+f.getLocation().getMax()); System.out.println(f.getSequence().seqString()); Annotation a = f.getAnnotation(); for (Iterator keys = a.keys().iterator(); keys.hasNext(); ){ Object key = keys.next(); System.out.println(key+"\t"+a.getProperty(key)); } } tx.commit(); session.close(); } } When I try to print the SymbolList associated with the feature I receive the following exception. I appreciate any hint because I do not know what to do as it seems that the exception occurs somewhere within BioJava code. Exception in thread "main" org.hibernate.PropertyAccessException: Exception occurred inside setter of org.biojavax.bio.seq.SimpleRichFeature.locationSet at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:65) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337) at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200) at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3571) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:133) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854) at org.hibernate.loader.Loader.doQuery(Loader.java:729) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.loadCollection(Loader.java:1994) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454) at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:844) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:241) at org.hibernate.loader.Loader.loadEntity(Loader.java:1860) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3049) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:399) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:98) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:836) at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:66) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150) at org.biojavax.bio.seq.ThinRichSequence$$EnhancerByCGLIB$$e3c3c7ff.seqString() at meinVersuch.TestAbfragen.main(TestAbfragen.java:59) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42) ... 30 more Caused by: java.lang.RuntimeException: Error while trying to call new class org.biojavax.ontology.SimpleComparableOntology(class java.lang.String) at org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:166) at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:105) at org.biojavax.RichObjectFactory.getDefaultOntology(RichObjectFactory.java:221) at org.biojavax.bio.seq.CompoundRichLocation.getJoinTerm(CompoundRichLocation.java:61) at org.biojavax.bio.seq.CompoundRichLocation.(CompoundRichLocation.java:90) at org.biojavax.bio.seq.SimpleRichLocation.union(SimpleRichLocation.java:494) at org.biojavax.bio.seq.RichLocation$Tools.merge(RichLocation.java:363) at org.biojavax.bio.seq.SimpleRichFeature.setLocationSet(SimpleRichFeature.java:181) ... 35 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:133) ... 42 more Caused by: org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: Feature.locationSet at org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:96) at org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:39) at org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:218) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:77) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811) ... 47 more It would be very nice if someone can help me. I am grateful for any hints. Thanks a lot. Cheers, Gabrielle From dicknetherlands at gmail.com Thu Jun 5 12:25:00 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Thu, 5 Jun 2008 17:25:00 +0100 Subject: [Biojava-l] features of a sequence In-Reply-To: <4847EAF0.7060702@gmx.net> References: <4847EAF0.7060702@gmx.net> Message-ID: Oh dear, you found a bug.....! This is occurring in the location flattening routines in RichLocation.Tools, where it is inadvertently overwriting location data collection objects that should have been just emptied and repopulated instead of being replaced. I'll try and fix this. Can't promise it soon - I'm away for the next 7 days and am a bit busy after that - but will make a note. Maybe someone else here could fix it quicker? (please?! :) ) cheers, Richard 2008/6/5 Gabrielle Doan : > Hi all, > > I would like to query the features of a sequence with following code: > > > public class Test{ > public static void main(String[] args) { > // load Hibernate config > > SessionFactory sessionFactory = new > Configuration().configure().buildSessionFactory(); // open the > session > Session session = sessionFactory.openSession(); > // connect it to BioJavaX > RichObjectFactory.connectToBioSQL(session); > > Transaction tx = session.beginTransaction(); > Query q1 = session.createQuery( > "from Feature as f " + > "inner join fetch f.noteSet as n " + > "where n.value=:val and f.typeTerm.name=:term"); > q1.setString("val","TRNF"); > q1.setString("term","gene"); List li = q1.list(); > System.out.println("Found:\t"+li.size()); > for (Iterator i = li.iterator(); i.hasNext(); ){ > SimpleRichFeature f = i.next(); > System.out.println("Term:\t"+f.getTypeTerm().getName()); > > System.out.println("Location:\t"+f.getLocation().getMin()+"\t"+f.getLocation().getMax()); > System.out.println(f.getSequence().seqString()); > Annotation a = f.getAnnotation(); > for (Iterator keys = a.keys().iterator(); keys.hasNext(); ){ > Object key = keys.next(); > System.out.println(key+"\t"+a.getProperty(key)); > } > } > tx.commit(); > session.close(); > } > > } > > > > When I try to print the SymbolList associated with the feature I receive the > following exception. I appreciate any hint because I do not know what to do > as it seems that the exception occurs somewhere within BioJava code. > > > Exception in thread "main" org.hibernate.PropertyAccessException: Exception > occurred inside setter of org.biojavax.bio.seq.SimpleRichFeature.locationSet > at > org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:65) > at > org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337) > at > org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200) > at > org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3571) > at > org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:133) > at > org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854) > at org.hibernate.loader.Loader.doQuery(Loader.java:729) > at > org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) > at org.hibernate.loader.Loader.loadCollection(Loader.java:1994) > at > org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) > at > org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565) > at > org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63) > at > org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) > at > org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454) > at > org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:844) > at > org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:241) > at org.hibernate.loader.Loader.loadEntity(Loader.java:1860) > at > org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48) > at > org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42) > at > org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3049) > at > org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:399) > at > org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375) > at > org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139) > at > org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:98) > at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) > at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:836) > at > org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:66) > at > org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111) > at > org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150) > at > org.biojavax.bio.seq.ThinRichSequence$$EnhancerByCGLIB$$e3c3c7ff.seqString() > at meinVersuch.TestAbfragen.main(TestAbfragen.java:59) > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42) > ... 30 more > Caused by: java.lang.RuntimeException: Error while trying to call new class > org.biojavax.ontology.SimpleComparableOntology(class java.lang.String) > at > org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:166) > at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:105) > at > org.biojavax.RichObjectFactory.getDefaultOntology(RichObjectFactory.java:221) > at > org.biojavax.bio.seq.CompoundRichLocation.getJoinTerm(CompoundRichLocation.java:61) > at > org.biojavax.bio.seq.CompoundRichLocation.(CompoundRichLocation.java:90) > at > org.biojavax.bio.seq.SimpleRichLocation.union(SimpleRichLocation.java:494) > at org.biojavax.bio.seq.RichLocation$Tools.merge(RichLocation.java:363) > at > org.biojavax.bio.seq.SimpleRichFeature.setLocationSet(SimpleRichFeature.java:181) > ... 35 more > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:133) > ... 42 more > Caused by: org.hibernate.HibernateException: A collection with > cascade="all-delete-orphan" was no longer referenced by the owning entity > instance: Feature.locationSet > at > org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:96) > at > org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:39) > at > org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:218) > at > org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:77) > at > org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35) > at > org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > at > org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811) > ... 47 more > > It would be very nice if someone can help me. I am grateful for any hints. > Thanks a lot. > > Cheers, > Gabrielle > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > From markjschreiber at gmail.com Thu Jun 5 22:34:21 2008 From: markjschreiber at gmail.com (Mark Schreiber) Date: Fri, 6 Jun 2008 10:34:21 +0800 Subject: [Biojava-l] Problem while using BlastXMLParserFacade In-Reply-To: <4847D2AE.8000801@mpi-cbg.de> References: <4847D2AE.8000801@mpi-cbg.de> Message-ID: <93b45ca50806051934i3f7a7b36ye9806f6890fba8bc@mail.gmail.com> Hi - I have seen this problem twice. Once it was due to 'invisible' white space before the XML. If you call trim() on the String that you get from the file you can get rid of this. You may not even be able to see it as some meta-characters are non-printing. The other problem is if your file was produced and saved on linux/unix and parsed on Windows. Problems can occur due to the different line feeds and carriage returns. While Java automatically knows which combination works for which operating it will assume the file you are working on came from your operating system. If this is the problem you can solve it using the unix utility dos2unix or unix2dos depending on which way you are going. - Mark On Thu, Jun 5, 2008 at 7:49 PM, benn wrote: > > Hello, > > Sorry to pepper the board with questions! I am working on BLAST parsing and have the standard output for BLAST working fine with JUnit tests. So I am attempting to recreate this for files in XML format coming from blast (blastp), however I have the problem that I get a SAXException that content is not allowed before prolog. I thought I could have some invisible characters which is causing it to throw a wobbly but I cannot see any. Has anyone else come across the problem? For completeness, the file can be downloaded at : http://idisk-srv1.mpi-cbg.de/~benn/xmloutput.xml (the mailing list server would not me attach the file to the email) and the code which parses is below: > > > private List parseBlast(String filename) > throws IOException, SAXException, BioException { > > InputStream is = new FileInputStream( > "src/test/resources/blast/standardoutput.blastp"); > > BlastXMLParserFacade parser = new BlastXMLParserFacade(); > SeqSimilarityAdapter adapter = new SeqSimilarityAdapter(); > parser.setContentHandler(adapter); > List results = new ArrayList(); > > SearchContentHandler builder = new BlastLikeSearchBuilder(results, > new DummySequenceDB("queries"), > new DummySequenceDBInstallation()); > > adapter.setSearchContentHandler(builder); > > parser.parse(new InputSource(is)); > return results; > } > > > Cheers, > > Neil > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l From markjschreiber at gmail.com Thu Jun 5 22:39:07 2008 From: markjschreiber at gmail.com (Mark Schreiber) Date: Fri, 6 Jun 2008 10:39:07 +0800 Subject: [Biojava-l] features of a sequence In-Reply-To: References: <4847EAF0.7060702@gmx.net> Message-ID: <93b45ca50806051939xb6c41a3v40769d2cdbfd26f9@mail.gmail.com> Can someone post a bug report for this just to make sure it gets logged and fixed at some point? Thanks, - Mark On Fri, Jun 6, 2008 at 12:25 AM, Richard Holland wrote: > Oh dear, you found a bug.....! This is occurring in the location > flattening routines in RichLocation.Tools, where it is inadvertently > overwriting location data collection objects that should have been > just emptied and repopulated instead of being replaced. > > I'll try and fix this. Can't promise it soon - I'm away for the next 7 > days and am a bit busy after that - but will make a note. Maybe > someone else here could fix it quicker? (please?! :) ) > > cheers, > Richard > > 2008/6/5 Gabrielle Doan : >> Hi all, >> >> I would like to query the features of a sequence with following code: >> >> >> public class Test{ >> public static void main(String[] args) { >> // load Hibernate config >> >> SessionFactory sessionFactory = new >> Configuration().configure().buildSessionFactory(); // open the >> session >> Session session = sessionFactory.openSession(); >> // connect it to BioJavaX >> RichObjectFactory.connectToBioSQL(session); >> >> Transaction tx = session.beginTransaction(); >> Query q1 = session.createQuery( >> "from Feature as f " + >> "inner join fetch f.noteSet as n " + >> "where n.value=:val and f.typeTerm.name=:term"); >> q1.setString("val","TRNF"); >> q1.setString("term","gene"); List li = q1.list(); >> System.out.println("Found:\t"+li.size()); >> for (Iterator i = li.iterator(); i.hasNext(); ){ >> SimpleRichFeature f = i.next(); >> System.out.println("Term:\t"+f.getTypeTerm().getName()); >> >> System.out.println("Location:\t"+f.getLocation().getMin()+"\t"+f.getLocation().getMax()); >> System.out.println(f.getSequence().seqString()); >> Annotation a = f.getAnnotation(); >> for (Iterator keys = a.keys().iterator(); keys.hasNext(); ){ >> Object key = keys.next(); >> System.out.println(key+"\t"+a.getProperty(key)); >> } >> } >> tx.commit(); >> session.close(); >> } >> >> } >> >> >> >> When I try to print the SymbolList associated with the feature I receive the >> following exception. I appreciate any hint because I do not know what to do >> as it seems that the exception occurs somewhere within BioJava code. >> >> >> Exception in thread "main" org.hibernate.PropertyAccessException: Exception >> occurred inside setter of org.biojavax.bio.seq.SimpleRichFeature.locationSet >> at >> org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:65) >> at >> org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337) >> at >> org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200) >> at >> org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3571) >> at >> org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:133) >> at >> org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854) >> at org.hibernate.loader.Loader.doQuery(Loader.java:729) >> at >> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) >> at org.hibernate.loader.Loader.loadCollection(Loader.java:1994) >> at >> org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) >> at >> org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565) >> at >> org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63) >> at >> org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) >> at >> org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454) >> at >> org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:844) >> at >> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:241) >> at org.hibernate.loader.Loader.loadEntity(Loader.java:1860) >> at >> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48) >> at >> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42) >> at >> org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3049) >> at >> org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:399) >> at >> org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375) >> at >> org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139) >> at >> org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:98) >> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) >> at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:836) >> at >> org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:66) >> at >> org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111) >> at >> org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150) >> at >> org.biojavax.bio.seq.ThinRichSequence$$EnhancerByCGLIB$$e3c3c7ff.seqString() >> at meinVersuch.TestAbfragen.main(TestAbfragen.java:59) >> Caused by: java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at >> org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42) >> ... 30 more >> Caused by: java.lang.RuntimeException: Error while trying to call new class >> org.biojavax.ontology.SimpleComparableOntology(class java.lang.String) >> at >> org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:166) >> at org.biojavax.RichObjectFactory.getObject(RichObjectFactory.java:105) >> at >> org.biojavax.RichObjectFactory.getDefaultOntology(RichObjectFactory.java:221) >> at >> org.biojavax.bio.seq.CompoundRichLocation.getJoinTerm(CompoundRichLocation.java:61) >> at >> org.biojavax.bio.seq.CompoundRichLocation.(CompoundRichLocation.java:90) >> at >> org.biojavax.bio.seq.SimpleRichLocation.union(SimpleRichLocation.java:494) >> at org.biojavax.bio.seq.RichLocation$Tools.merge(RichLocation.java:363) >> at >> org.biojavax.bio.seq.SimpleRichFeature.setLocationSet(SimpleRichFeature.java:181) >> ... 35 more >> Caused by: java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at >> org.biojavax.bio.db.biosql.BioSQLRichObjectBuilder.buildObject(BioSQLRichObjectBuilder.java:133) >> ... 42 more >> Caused by: org.hibernate.HibernateException: A collection with >> cascade="all-delete-orphan" was no longer referenced by the owning entity >> instance: Feature.locationSet >> at >> org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:96) >> at >> org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:39) >> at >> org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:218) >> at >> org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:77) >> at >> org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35) >> at >> org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) >> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) >> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) >> at >> org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811) >> ... 47 more >> >> It would be very nice if someone can help me. I am grateful for any hints. >> Thanks a lot. >> >> Cheers, >> Gabrielle >> _______________________________________________ >> Biojava-l mailing list - Biojava-l at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/biojava-l >> > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > From katta.hemant at gmail.com Mon Jun 9 01:33:03 2008 From: katta.hemant at gmail.com (Hemant Katta) Date: Mon, 9 Jun 2008 11:03:03 +0530 Subject: [Biojava-l] Suffix Tree Searching Message-ID: <414420cb0806082233v33cc2791v481062dd3e181e3b@mail.gmail.com> Sir, From katta.hemant at gmail.com Mon Jun 9 01:37:43 2008 From: katta.hemant at gmail.com (Hemant Katta) Date: Mon, 9 Jun 2008 11:07:43 +0530 Subject: [Biojava-l] Suffix Tree Searching Message-ID: <414420cb0806082237k1639707fs29360f8e18b6897f@mail.gmail.com> Sir, I m creating Suffix Tree using biojava , but i m unable to search a symbollist in that created suffix tree . is there any function in suffixTree Class or Search Class to get desired result. with regards Hemant From markjschreiber at gmail.com Mon Jun 9 23:47:21 2008 From: markjschreiber at gmail.com (Mark Schreiber) Date: Tue, 10 Jun 2008 11:47:21 +0800 Subject: [Biojava-l] [sort of off topic] Java data mining APIs Message-ID: <93b45ca50806092047r6b8b9a73l123d1cd49b12b3e@mail.gmail.com> Hi - I am wanting to develop something to do some datamining of translational data (sequence clinical and microarray). I want to make use of an already existing data mining API. Ones I have found so far are RapidMiner (YALE), WEKA and JDM (which seems to be a JSR). Does anyone have any views on which is good or useful (or not)? - Mark From heuermh at acm.org Tue Jun 10 00:55:32 2008 From: heuermh at acm.org (Michael Heuer) Date: Tue, 10 Jun 2008 00:55:32 -0400 (EDT) Subject: [Biojava-l] [sort of off topic] Java data mining APIs In-Reply-To: <93b45ca50806092047r6b8b9a73l123d1cd49b12b3e@mail.gmail.com> Message-ID: Mark Schreiber wrote: > Hi - > > I am wanting to develop something to do some datamining of translational > data (sequence clinical and microarray). I want to make use of an already > existing data mining API. Bah, that's no fun. ;) > Ones I have found so far are RapidMiner (YALE), WEKA and JDM (which seems to > be a JSR). Does anyone have any views on which is good or useful (or not)? Some of what you need might be in Colt (e.g. hep.aida packages). JScience has nice maths APIs > http://jscience.org/api/overview-summary.html Alias-i LingPipe 3.5.0 is a commercial product focused on text-mining. A lot of the API is generic though. > http://alias-i.com/lingpipe/docs/api/overview-summary.html Or how about biojava 3.x? A lot of interesting new use cases in translational fields... michael From dicknetherlands at gmail.com Tue Jun 10 12:10:58 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Tue, 10 Jun 2008 17:10:58 +0100 Subject: [Biojava-l] Suffix Tree Searching In-Reply-To: <414420cb0806082237k1639707fs29360f8e18b6897f@mail.gmail.com> References: <414420cb0806082237k1639707fs29360f8e18b6897f@mail.gmail.com> Message-ID: Could you provide a more detailed use case? I'm not sure what it is you are trying to achieve. Perhaps you have some code with a gap where you want to perform a search, which you could show us? Please also detail what kind of search it is you are trying to perform. Are you looking for a substring, an exact or partial match, starting at a particular position or anywhere in the string, of a certain length, etc. etc. If you send some code, please paste it into the email and not as an attachment, as this list does not accept attachments. cheers, Richard 2008/6/9 Hemant Katta : > Sir, > I m creating Suffix Tree using biojava , but i m unable to search a > symbollist in that created > suffix tree . is there any function in suffixTree Class or Search Class to > get desired result. > > with regards > Hemant > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > From dicknetherlands at gmail.com Tue Jun 10 12:49:01 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Tue, 10 Jun 2008 17:49:01 +0100 Subject: [Biojava-l] [sort of off topic] Java data mining APIs In-Reply-To: References: <93b45ca50806092047r6b8b9a73l123d1cd49b12b3e@mail.gmail.com> Message-ID: Sounds interesting. If someone can stick a link to a good detailed use case on the wiki, I'll see what I can fit in to BJ3. Incidentally, I intend to start dev (and simultaneous doc) of BJ3 next week. Need to get a couple of things sorted first though. cheers, Richard 2008/6/10 Michael Heuer : > Mark Schreiber wrote: > >> Hi - >> >> I am wanting to develop something to do some datamining of translational >> data (sequence clinical and microarray). I want to make use of an already >> existing data mining API. > > Bah, that's no fun. ;) > > >> Ones I have found so far are RapidMiner (YALE), WEKA and JDM (which seems to >> be a JSR). Does anyone have any views on which is good or useful (or not)? > > Some of what you need might be in Colt (e.g. hep.aida packages). > > > JScience has nice maths APIs > >> http://jscience.org/api/overview-summary.html > > > Alias-i LingPipe 3.5.0 is a commercial product focused on text-mining. A > lot of the API is generic though. > >> http://alias-i.com/lingpipe/docs/api/overview-summary.html > > > Or how about biojava 3.x? > > A lot of interesting new use cases in translational fields... > > michael > > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > From katta.hemant at gmail.com Wed Jun 11 07:13:00 2008 From: katta.hemant at gmail.com (Hemant Katta) Date: Wed, 11 Jun 2008 16:43:00 +0530 Subject: [Biojava-l] query in suffixtree Message-ID: <414420cb0806110413q3736a11co643206f35a8b78a2@mail.gmail.com> Sir, //Genrating a suffixtree. FiniteAlphabet alpha = DNATools.getDNA(); SymbolList sml = DNATools.createDNA("atggtggtcct"); SuffixTree suf = new SuffixTree(alpha); suf.addSymbols(sml,sml.length); now I have listed queries. 1. what is role of window size in addSymbols(SymbolList sml, int Window) function. 2. why getFrequency(int i) always return the same value, whatever int i value have been passed but the result is always same. It should return the No. of motifs of int i length. 3. How can i print Suffix whatever are made in my SuffixTree. 4. How can i search a suffix of given length. I know these are quite basic Queries for U, but your Suggestion is really very Helpful to me.Because whatever i came to know about SuffuxTree on net they all created Suffix without any window size, this thing puzzled me a lot. With Regards Hemant From heuermh at acm.org Fri Jun 13 00:15:54 2008 From: heuermh at acm.org (Michael Heuer) Date: Fri, 13 Jun 2008 00:15:54 -0400 (EDT) Subject: [Biojava-l] [sort of off topic] Java data mining APIs In-Reply-To: Message-ID: Richard Holland wrote: > Sounds interesting. If someone can stick a link to a good detailed use > case on the wiki, I'll see what I can fit in to BJ3. > > Incidentally, I intend to start dev (and simultaneous doc) of BJ3 next > week. Need to get a couple of things sorted first though. Cool, let me know when you get started, and I will jump in with maven and test coverage reports and that sort of thing. michael From augustovmail-java at yahoo.com.br Thu Jun 19 06:34:50 2008 From: augustovmail-java at yahoo.com.br (Augusto Fernandes Vellozo) Date: Thu, 19 Jun 2008 12:34:50 +0200 Subject: [Biojava-l] Getting one feature of a organism In-Reply-To: <381a3e850806190258q1321ab30q90492977c0f02794@mail.gmail.com> References: <381a3e850806190258q1321ab30q90492977c0f02794@mail.gmail.com> Message-ID: <381a3e850806190334g4c01ee99i1549fe1bafcc767c@mail.gmail.com> Hi all I am new in BioJava and Hibernate. Sorry if the question is basic. I am trying to get one feature (gene) with this query: public static SimpleRichFeature getGene(String geneName, NCBITaxon organism) { Query query = session.createQuery("select f from Feature as f join f.parent as bioentry where " + "f.name=:geneName and f.typeTerm=:geneTerm and bioentry.taxon=:taxonId "); query.setString("geneName", geneName); query.setParameter("taxonId", organism); query.setParameter("geneTerm", TERM_GENE); List features = query.list(); return (features.size() == 0) ?null :(SimpleRichFeature) features.get(0); } I am getting the error: 35:55,061 ERROR AssertionFailure:22 - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: collection [BioEntry.comments] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at baobab.sequence.general.BioSql.getGene(BioSql.java:75) at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) Exception in thread "main" org.hibernate.AssertionFailure: collection [BioEntry.comments] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at baobab.sequence.general.BioSql.getGene(BioSql.java:75) at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) Please, could one help me? What is my fault? How can i do this? Thanks a lot, Augusto From dicknetherlands at gmail.com Thu Jun 19 07:50:24 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Thu, 19 Jun 2008 12:50:24 +0100 Subject: [Biojava-l] Getting one feature of a organism In-Reply-To: <381a3e850806190334g4c01ee99i1549fe1bafcc767c@mail.gmail.com> References: <381a3e850806190258q1321ab30q90492977c0f02794@mail.gmail.com> <381a3e850806190334g4c01ee99i1549fe1bafcc767c@mail.gmail.com> Message-ID: Hello. You're the second person to hit this problem recently on this list - it's a bug in BioJava that we need to fix. We'll let you know how we get on. Richard. 2008/6/19 Augusto Fernandes Vellozo : > Hi all > > I am new in BioJava and Hibernate. Sorry if the question is basic. > I am trying to get one feature (gene) with this query: > > public static SimpleRichFeature getGene(String geneName, NCBITaxon > organism) { > Query query = session.createQuery("select f from Feature as f join > f.parent as bioentry where " > + "f.name=:geneName and f.typeTerm=:geneTerm and > bioentry.taxon=:taxonId "); > query.setString("geneName", geneName); > query.setParameter("taxonId", organism); > query.setParameter("geneTerm", TERM_GENE); > List features = query.list(); > return (features.size() == 0) ?null :(SimpleRichFeature) > features.get(0); > } > > I am getting the error: > > 35:55,061 ERROR AssertionFailure:22 - an assertion failure occured (this may > indicate a bug in Hibernate, but is more likely due to unsafe use of the > session) > org.hibernate.AssertionFailure: collection [BioEntry.comments] was not > processed by flush() > at > org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) > at > org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) > at > org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) > at > org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > at baobab.sequence.general.BioSql.getGene(BioSql.java:75) > at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) > Exception in thread "main" org.hibernate.AssertionFailure: collection > [BioEntry.comments] was not processed by flush() > at > org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) > at > org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) > at > org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) > at > org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > at baobab.sequence.general.BioSql.getGene(BioSql.java:75) > at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) > > Please, could one help me? > What is my fault? > How can i do this? > > Thanks a lot, > > Augusto > _______________________________________________ > Biojava-l mailing list - Biojava-l at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-l > From dicknetherlands at gmail.com Thu Jun 19 08:10:15 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Thu, 19 Jun 2008 13:10:15 +0100 Subject: [Biojava-l] BioJava 3 work begins Message-ID: Hello all. We are about to start coding the first bits of the new BioJava 3 modules. We would like to document code in parallel to writing it, and also to write code based on use-cases rather than what we just think might be useful. We already have a design document based on the discussions late last year and included in that is a plan for how the internals will work, but now we need some use-cases so that code can be written to solve real-life problems first rather than just theoretical ones. Please add any use-cases you can think of to the following Wiki page. Doesn't matter if they're simple (e.g. read a file in a given format) or really complex (e.g. serve up a bunch of Genbank files to a web-based query interface). All will be considered and we as a team will do our best to include as many as we can, aiming to solve all of them if possible. http://biojava.org/w/index.php?title=BioJava_3_Use_Cases&action=edit cheers, Richard From koen.bruynseels at cropdesign.com Thu Jun 19 08:16:29 2008 From: koen.bruynseels at cropdesign.com (koen.bruynseels at cropdesign.com) Date: Thu, 19 Jun 2008 14:16:29 +0200 Subject: [Biojava-l] Koen Bruynseels is out of the office. Message-ID: I will be out of the office starting 17/06/2008 and will not return until 20/06/2008. I will respond to your message when I return. From dicknetherlands at gmail.com Thu Jun 19 10:48:22 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Thu, 19 Jun 2008 15:48:22 +0100 Subject: [Biojava-l] query in suffixtree In-Reply-To: <414420cb0806110413q3736a11co643206f35a8b78a2@mail.gmail.com> References: <414420cb0806110413q3736a11co643206f35a8b78a2@mail.gmail.com> Message-ID: Sorry for the delay in getting back to you. 2008/6/11 Hemant Katta : > Sir, > > //Genrating a suffixtree. > > FiniteAlphabet alpha = DNATools.getDNA(); > SymbolList sml = DNATools.createDNA("atggtggtcct"); > > SuffixTree suf = new SuffixTree(alpha); > suf.addSymbols(sml,sml.length); > > > now I have listed queries. > 1. what is role of window size in addSymbols(SymbolList sml, int Window) > function. The window size equals the maximum motif length that will be counted by the method. If you specify window=5, for instance, then motifs up to but no longer than 5 bases in length will be counted. > 2. why getFrequency(int i) always return the same value, whatever int i > value have been passed but the result is always same. > It should return the No. of motifs of int i length. There is no getFrequency() - I assume you mean frequency()? The function returns the number of motifs of the length specified as the parameter. If you pass in 5, you will get back the number of motifs that are 5 bases long. If you print out the suffix tree by walking through it from the object returned by getRoot() you'll be able to see what the tree looks like and therefore how the frequency value is calculated. > 3. How can i print Suffix whatever are made in my SuffixTree. By calling getRoot() and iterating through the child nodes it gives you. > 4. How can i search a suffix of given length. Again, by calling getRoot() and walking through the results. The JavaDocs for SuffixTree are quite helpful for working out what the methods are supposed to be doing: http://www.biojava.org/docs/api16/org/biojava/bio/symbol/SuffixTree.html cheers, Richard From augustovmail-java at yahoo.com.br Thu Jun 19 10:57:38 2008 From: augustovmail-java at yahoo.com.br (Augusto Fernandes Vellozo) Date: Thu, 19 Jun 2008 16:57:38 +0200 Subject: [Biojava-l] Getting one feature of a organism In-Reply-To: References: <381a3e850806190258q1321ab30q90492977c0f02794@mail.gmail.com> <381a3e850806190334g4c01ee99i1549fe1bafcc767c@mail.gmail.com> Message-ID: <381a3e850806190757i60173b46xbf178b33cc66264f@mail.gmail.com> Hello. I've already discovered a workaround to this problem: after to execute the query I've just called feature.toString(). I am not sure why this works, but I think that is because the method lazy to load the properties. With the call "toString()" the feature properties will be loaded. Thanks, Augusto 2008/6/19 Richard Holland : > Hello. You're the second person to hit this problem recently on this > list - it's a bug in BioJava that we need to fix. We'll let you know > how we get on. > > Richard. > > 2008/6/19 Augusto Fernandes Vellozo : > > Hi all > > > > I am new in BioJava and Hibernate. Sorry if the question is basic. > > I am trying to get one feature (gene) with this query: > > > > public static SimpleRichFeature getGene(String geneName, NCBITaxon > > organism) { > > Query query = session.createQuery("select f from Feature as f join > > f.parent as bioentry where " > > + "f.name=:geneName and f.typeTerm=:geneTerm and > > bioentry.taxon=:taxonId "); > > query.setString("geneName", geneName); > > query.setParameter("taxonId", organism); > > query.setParameter("geneTerm", TERM_GENE); > > List features = query.list(); > > return (features.size() == 0) ?null :(SimpleRichFeature) > > features.get(0); > > } > > > > I am getting the error: > > > > 35:55,061 ERROR AssertionFailure:22 - an assertion failure occured (this > may > > indicate a bug in Hibernate, but is more likely due to unsafe use of the > > session) > > org.hibernate.AssertionFailure: collection [BioEntry.comments] was not > > processed by flush() > > at > > org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) > > at > > > org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) > > at > > > org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) > > at > > org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) > > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) > > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > > at baobab.sequence.general.BioSql.getGene(BioSql.java:75) > > at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) > > Exception in thread "main" org.hibernate.AssertionFailure: collection > > [BioEntry.comments] was not processed by flush() > > at > > org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) > > at > > > org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) > > at > > > org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) > > at > > org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) > > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) > > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) > > at baobab.sequence.general.BioSql.getGene(BioSql.java:75) > > at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) > > > > Please, could one help me? > > What is my fault? > > How can i do this? > > > > Thanks a lot, > > > > Augusto > > _______________________________________________ > > Biojava-l mailing list - Biojava-l at lists.open-bio.org > > http://lists.open-bio.org/mailman/listinfo/biojava-l > > > -- Augusto F. Vellozo From dicknetherlands at gmail.com Thu Jun 19 11:03:24 2008 From: dicknetherlands at gmail.com (Richard Holland) Date: Thu, 19 Jun 2008 16:03:24 +0100 Subject: [Biojava-l] Getting one feature of a organism In-Reply-To: <381a3e850806190757i60173b46xbf178b33cc66264f@mail.gmail.com> References: <381a3e850806190258q1321ab30q90492977c0f02794@mail.gmail.com> <381a3e850806190334g4c01ee99i1549fe1bafcc767c@mail.gmail.com> <381a3e850806190757i60173b46xbf178b33cc66264f@mail.gmail.com> Message-ID: That's very helpful - thanks. I've also just committed some updates that might workaround the problem. Could you try updating from the head of subversion and compiling it locally (rather than downloading a precompiled version), then retrying your original code? cheers, Richard 2008/6/19 Augusto Fernandes Vellozo : > Hello. > > I've already discovered a workaround to this problem: after to execute the > query I've just called feature.toString(). > I am not sure why this works, but I think that is because the method lazy to > load the properties. With the call "toString()" the feature properties will > be loaded. > > Thanks, > > Augusto > > 2008/6/19 Richard Holland : >> >> Hello. You're the second person to hit this problem recently on this >> list - it's a bug in BioJava that we need to fix. We'll let you know >> how we get on. >> >> Richard. >> >> 2008/6/19 Augusto Fernandes Vellozo : >> > Hi all >> > >> > I am new in BioJava and Hibernate. Sorry if the question is basic. >> > I am trying to get one feature (gene) with this query: >> > >> > public static SimpleRichFeature getGene(String geneName, NCBITaxon >> > organism) { >> > Query query = session.createQuery("select f from Feature as f >> > join >> > f.parent as bioentry where " >> > + "f.name=:geneName and f.typeTerm=:geneTerm and >> > bioentry.taxon=:taxonId "); >> > query.setString("geneName", geneName); >> > query.setParameter("taxonId", organism); >> > query.setParameter("geneTerm", TERM_GENE); >> > List features = query.list(); >> > return (features.size() == 0) ?null :(SimpleRichFeature) >> > features.get(0); >> > } >> > >> > I am getting the error: >> > >> > 35:55,061 ERROR AssertionFailure:22 - an assertion failure occured (this >> > may >> > indicate a bug in Hibernate, but is more likely due to unsafe use of the >> > session) >> > org.hibernate.AssertionFailure: collection [BioEntry.comments] was not >> > processed by flush() >> > at >> > org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) >> > at >> > >> > org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) >> > at >> > >> > org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) >> > at >> > org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) >> > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) >> > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) >> > at baobab.sequence.general.BioSql.getGene(BioSql.java:75) >> > at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) >> > Exception in thread "main" org.hibernate.AssertionFailure: collection >> > [BioEntry.comments] was not processed by flush() >> > at >> > org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) >> > at >> > >> > org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333) >> > at >> > >> > org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:42) >> > at >> > org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) >> > at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114) >> > at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) >> > at baobab.sequence.general.BioSql.getGene(BioSql.java:75) >> > at baobab.sequence.loads.LoadEstToKo.main(LoadEstToKo.java:120) >> > >> > Please, could one help me? >> > What is my fault? >> > How can i do this? >> > >> > Thanks a lot, >> > >> > Augusto >> > _______________________________________________ >> > Biojava-l mailing list - Biojava-l at lists.open-bio.org >> > http://lists.open-bio.org/mailman/listinfo/biojava-l >> > > > > > -- > Augusto F. Vellozo From markjschreiber at gmail.com Thu Jun 19 21:40:49 2008 From: markjschreiber at gmail.com (Mark Schreiber) Date: Fri, 20 Jun 2008 09:40:49 +0800 Subject: [Biojava-l] [Biojava-dev] BioJava 3 work begins In-Reply-To: References: Message-ID: <93b45ca50806191840y14ca932cx64f688b1649f6212@mail.gmail.com> Can I follow this up by saying that all use cases _must_ be accompanied by a why. It is very important to understand what the rationale for the use case is as this will determine how we program it. For example. "A binding to BioSQL" is not a use case. The use case would be: "I want to upload a subset of Genbank to a relational database so that I can add my own de-novo gene predictions and then search the results in a relational manner". We would then analyse this use case and figure out a good way to do it. During this analysis we would probably identify that we need a binding from BJ3 to BioSQL. As a general rule you should never specify the technology in the use case. Rather analysis of the requirements of the usecase suggests the best technology. I will put up a template for what should be in a use case tonight (Singapore time) that people can use. It would also be great if people who suggest cases can provide contact details as frequently there has to be lots of iterative discussion to pin down the details. - Mark On 6/19/08, Richard Holland wrote: > Hello all. We are about to start coding the first bits of the new > BioJava 3 modules. > > We would like to document code in parallel to writing it, and also to > write code based on use-cases rather than what we just think might be > useful. We already have a design document based on the discussions > late last year and included in that is a plan for how the internals > will work, but now we need some use-cases so that code can be written > to solve real-life problems first rather than just theoretical ones. > > Please add any use-cases you can think of to the following Wiki page. > Doesn't matter if they're simple (e.g. read a file in a given format) > or really complex (e.g. serve up a bunch of Genbank files to a > web-based query interface). All will be considered and we as a team > will do our best to include as many as we can, aiming to solve all of > them if possible. > > http://biojava.org/w/index.php?title=BioJava_3_Use_Cases&action=edit > > cheers, > Richard > _______________________________________________ > biojava-dev mailing list > biojava-dev at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biojava-dev > From benn at mpi-cbg.de Wed Jun 4 14:16:50 2008 From: benn at mpi-cbg.de (benn) Date: Wed, 04 Jun 2008 18:16:50 -0000 Subject: [Biojava-l] Problem parsing biojava xml file Message-ID: <4846DBFE.1060105@mpi-cbg.de> Hello, Sorry to pepper the board with questions! I am working on BLAST parsing and have the standard output for BLAST working fine with JUnit tests. So I am attempting to recreate this for files in XML format comming from blast (blastp), however I have the problem that I get a SAXExepttion that content is not allowed before prolog. I thought I could have some invisible characters whihc is causing it to throw a wobbly but I cannto see any. Has anyone else come across the problem. for completeness i have attached teh blast file and the code to parse is below: private List parseBlast(String filename) throws IOException, SAXException, BioException { InputStream is = new FileInputStream( "src/test/resources/blast/standardoutput.blastp"); BlastXMLParserFacade parser = new BlastXMLParserFacade(); SeqSimilarityAdapter adapter = new SeqSimilarityAdapter(); parser.setContentHandler(adapter); List results = new ArrayList(); SearchContentHandler builder = new BlastLikeSearchBuilder(results, new DummySequenceDB("queries"), new DummySequenceDBInstallation()); adapter.setSearchContentHandler(builder); parser.parse(new InputSource(is)); return results; } Cheers, Neil -------------- next part -------------- A non-text attachment was scrubbed... Name: xmloutput.xml Type: text/xml Size: 48005 bytes Desc: not available URL: