From adionne at warnex.ca Tue Jun 1 12:10:04 2004 From: adionne at warnex.ca (Alexandre Dionne Laporte) Date: Tue Jun 1 12:13:11 2004 Subject: [Biojava-l] Biojava uses which BioSQL shema version ? Message-ID: Hi and thanks for for the reply, I have reloaded the biosql-db schema to mysql and I have inserted one sequence form a Genbank format with the 'load_seqdatabase.pl' perl script. When I try to fetch this entry for the first time with Biojava1.4pre1 I get this error : --------------------------------------------------------------------------------- *** Importing a core ontology -- hope this is okay *** Importing terms org.biojava.bio.BioException: Error accessing ontologies at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.initDb(BioSQLSequenceDB.java:238) at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.(BioSQLSequenceDB.java:193) at ca.warnex.sab.util.helpers.biosqlTest.main(biosqlTest.java:49) Caused by: java.sql.SQLException: General error, message from server: "Table 'bioseqdb.term_relationship_term' doesn't exist" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1977) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1272) at com.mysql.jdbc.Connection.execSQL(Connection.java:2236) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1588) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:205) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:205) at org.biojava.bio.seq.db.biosql.OntologySQL.persistTriple(OntologySQL.java:616) at org.biojava.bio.seq.db.biosql.OntologySQL.processTerm(OntologySQL.java:262) at org.biojava.bio.seq.db.biosql.OntologySQL.processTerm(OntologySQL.java:251) at org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:218) at org.biojava.bio.seq.db.biosql.OntologySQL.(OntologySQL.java:396) at org.biojava.bio.seq.db.biosql.OntologySQL.getOntologySQL(OntologySQL.java:71) at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.initDb(BioSQLSequenceDB.java:236) ... 2 more -------------------------------------------------------------------------------- which added a row with '__core_ontology' in the table 'ontology'; When I try to fetch the entry for a second time, I get: ------------------------------------------------------------------------------------------ Exception in thread "main" org.biojava.bio.BioError: Invalid term id 4 at org.biojava.bio.seq.db.biosql.OntologySQL.termForID(OntologySQL.java:691) at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.getOntologyTerm(BioSQLSequenceDB.java:951) at org.biojava.bio.seq.db.biosql.FeaturesSQL.retrieveFeatures(FeaturesSQL.java:155) at org.biojava.bio.seq.db.biosql.BioSQLAllFeatures.getFeatures(BioSQLAllFeatures.java:145) at org.biojava.bio.seq.db.biosql.BioSQLAllFeatures.features(BioSQLAllFeatures.java:73) at org.biojava.bio.seq.db.biosql.BioSQLSequence.features(BioSQLSequence.java:237) at ca.warnex.sab.util.helpers.biosqlTest.main(biosqlTest.java:62) ------------------------------------------------------------------------------------------ The fourth Ontology row is the one with '__core_ontology' in its name. Any Ideas??? Are you sure the biosql-db schema (biosqldb-mysql.sql v. 1.38) is the wright one to use ? Alexandre D.L. -----Original Message----- From: Simon Foote [mailto:simon.foote@nrc-cnrc.gc.ca] Sent: Tue 6/1/2004 9:05 AM To: Alexandre Dionne Laporte Cc: biojava-l@biojava.org Subject: Re: [Biojava-l] Biojava uses which BioSQL shema version ? Hi Alexandre, That version of biosql schema should work fine with the biojava snapshot you have. To load a Genbank file into the database, the following code should do the trick with the various variables set and error handling code added: BioSQLSequenceDB bsd = new BioSQLSequenceDB(driver, url, user, password, biodatabase, create); BufferedReader br = new BufferedReader(new FileReader(inFile)); SequenceIterator si = SeqIOTools.readGenbank(br); Sequence seq = (Sequence) si.nextSequence(); bsd.addBioEntry(seq); To write it in Genbank format you can use the getSequence() and appropriate writeSequence() method for the format you want. Cheers, Simon Alexandre Dionne Laporte wrote: >Hi, > >First of all, here are the softwares I use: > >1) Biojava snapshot 'biojava-20040528' >2) latest biosql shema : biosqldb-mysql.sql v. 1.38 >3) Some of Bioperl 1.4 and bioperl-db projects > > >I would like to store entries from a Genbank file from the NCBI to the >BioSQL schema using biojava. That I can do with the 'load_seqdatabase.pl' >script found in bioperl-db without any problem. > >In a same way, I would like to retreive sequences with the Biojava package >and dump it in Genbank file format, as I can do with 'bioentry2flat.pl' >script. > >My question is : Which version of biosqldb should I use with the biojava >snapshot ? > >Thanks, > >Alexandre D.L. > >_______________________________________________ >Biojava-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > > -- Bioinformatics Programmer Pathogen Genomics Institute for Biological Sciences National Research Council of Canada [T] 613-990-0561 [F] 613-952-9092 simon.foote@nrc-cnrc.gc.ca From gwu at molbio.mgh.harvard.edu Wed Jun 2 11:21:59 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Wed Jun 2 11:23:07 2004 Subject: [Biojava-l] Genbank ASN.1 or XML parser Message-ID: Hi everyone, I just tried out the APIs for parsing Genbank format files. Though it works well, I still wonder if there are APIs for parsing Genbank files in ASN.1 or XML formats because the Genbank format was designed for human being and the ASN.1 and XML formats should be more reliable for data exchange. Gang Wu From gwu at molbio.mgh.harvard.edu Wed Jun 2 18:42:48 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Wed Jun 2 18:43:56 2004 Subject: [Biojava-l] BioSQL exception Message-ID: When I tested the biosql.UploadFlat under the demos folder, got the following exception. Seems the code can not find MySQL driver. Can anyone tell me what I should do or where I can find related docs? Thanks. =================================================== C:\java -cp %CLASSPATH%;C:\development\src\lib\biojava-1.4pre1.jar -Djdbc.drivers=C:\dev elopment\src\lib\mysql-connector-java-3.0.11-stable-bin.jar biosql.UploadFlat jdbc:mysql://localhost root rootPass genbank genbank C:/development/genome/arabidopsis_thaliana/IV.fcgi Opening database: genbank org.biojava.bio.BioException: Error getting datasource at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.(BioSQLSequenceDB.java: 191) at biosql.UploadFlat.main(UploadFlat.java:31) Caused by: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(Unknown Source) at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.(BioSQLSequenceDB.java: 188) ... 1 more ================================================== Gang From mark.schreiber at group.novartis.com Wed Jun 2 20:59:09 2004 From: mark.schreiber at group.novartis.com (mark.schreiber@group.novartis.com) Date: Wed Jun 2 21:02:26 2004 Subject: [Biojava-l] Genbank ASN.1 or XML parser Message-ID: Hello - At the moment there are no parsers for XEMBL, GenBankXML or ASN.1, They could both be easily made if someone had that time. GenBankXML could easily draw on a SAX or DOM parser to pass events to the BioJava SequenceBuilders (using some kind of adapter). ASN.1 would need a more custom parser but because it is highly structured that shouldn't be too hard. Any volunteers? - Mark "Gang Wu" Sent by: biojava-l-bounces@portal.open-bio.org 06/02/2004 11:21 PM Please respond to gwu To: "Bio-Java" cc: Subject: [Biojava-l] Genbank ASN.1 or XML parser Hi everyone, I just tried out the APIs for parsing Genbank format files. Though it works well, I still wonder if there are APIs for parsing Genbank files in ASN.1 or XML formats because the Genbank format was designed for human being and the ASN.1 and XML formats should be more reliable for data exchange. Gang Wu _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From Mark.Hoebeke at jouy.inra.fr Thu Jun 3 05:39:12 2004 From: Mark.Hoebeke at jouy.inra.fr (Hoebeke Mark) Date: Thu Jun 3 05:42:21 2004 Subject: [Biojava-l] Exporting accessions to Genbank files Message-ID: <1086255552.2334.62.camel@hurd> Hi all, In the context of importing/exporting genbank files into/from a database I stumbled across an oddity : - when building a Sequence instance from a genbank file (SeqIOTools.readGenbank()), the accession is available through the "ACCESSION" property of its Annotation - when exporting a Sequence instance into a genbank file (SeqIOTools.writeGenBank()), after having intialized the accession through the "ACCESSION" property, no ACCESSION line is generated. Wading through the code (stable 1.3 or 1.4pre1) I noticed the following comment in GenBankFormat.java : (...) * Added GenBank header info to the sequence annotation. The ACCESSION header * tag is not included. Stored in sequence.getName(). (...) which I interpreted as "the ACCESSION property is not written to the file". To solve my problem I has to resort to the ugly line below : annot.setProperty(GenbankProcessor.PROPERTY_GENBANK_ACCESSIONS,acces); I'm sure there must be a better way. If anyone has a pointer related to this issue, I'll gladly adopt a cleaner way of coding this. Thanks Mark -- --------------------------Mark.Hoebeke@jouy.inra.fr---------------------- Unit? Statistique & G?nome Unit? MIG +33 (0)1 60 87 38 03 T?l. +33 (0)1 34 65 28 85 +33 (0)1 60 87 38 09 Fax. +33 (0)1 34 65 29 01 Tour Evry 2, 523 pl. des Terrasses INRA - Domaine de Vilvert F - 91000 Evry F - 78352 Jouy-en-Josas CEDEX From birney at ebi.ac.uk Thu Jun 3 12:41:25 2004 From: birney at ebi.ac.uk (Ewan Birney) Date: Thu Jun 3 12:44:43 2004 Subject: [Biojava-l] Genome Informatics meeting. Message-ID: The third Genome Informatics meeting is being held in September at Hinxton from 22nd-26th September (Hinxton is just outside Cambridge in the UK, and is where the EBI and Sanger are). This is a meeting focused on large scale, genome-wide data manipulation and analysis, and I think is a great forum for people to discuss the aspects of bioinformatics which don't other wise get alot of air time at other conferences (eg, large scale pipelines, or image analysis). For more information, go to: http://meetings.cshl.org/2004/2004infouk.htm Abstracts are due by June 30th which is pretty soon, but it is pretty easy to put together an abstract for this (2 or so paragraphs). The meeting is run in "cold spring harbor" manner; ie, all the talks are drawn from open abstract submission. If people have any queries about the meeting, just drop me a line. ----------------------------------------------------------------- Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420 . ----------------------------------------------------------------- From gwu at molbio.mgh.harvard.edu Thu Jun 3 12:52:52 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Thu Jun 3 12:53:57 2004 Subject: [Biojava-l] Genbank ASN.1 or XML parser In-Reply-To: Message-ID: Hi, I would be glad to write the parser. Since I am pretty new to BioJava project, can anybody give me a guide on how to start? Thanks. - Gang -----Original Message----- From: mark.schreiber@group.novartis.com [mailto:mark.schreiber@group.novartis.com] Sent: Wednesday, June 02, 2004 8:59 PM To: gwu@molbio.mgh.harvard.edu Cc: Bio-Java; biojava-l-bounces@portal.open-bio.org Subject: Re: [Biojava-l] Genbank ASN.1 or XML parser Hello - At the moment there are no parsers for XEMBL, GenBankXML or ASN.1, They could both be easily made if someone had that time. GenBankXML could easily draw on a SAX or DOM parser to pass events to the BioJava SequenceBuilders (using some kind of adapter). ASN.1 would need a more custom parser but because it is highly structured that shouldn't be too hard. Any volunteers? - Mark "Gang Wu" Sent by: biojava-l-bounces@portal.open-bio.org 06/02/2004 11:21 PM Please respond to gwu To: "Bio-Java" cc: Subject: [Biojava-l] Genbank ASN.1 or XML parser Hi everyone, I just tried out the APIs for parsing Genbank format files. Though it works well, I still wonder if there are APIs for parsing Genbank files in ASN.1 or XML formats because the Genbank format was designed for human being and the ASN.1 and XML formats should be more reliable for data exchange. Gang Wu _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From mark.schreiber at group.novartis.com Thu Jun 3 21:48:49 2004 From: mark.schreiber at group.novartis.com (mark.schreiber@group.novartis.com) Date: Thu Jun 3 21:52:02 2004 Subject: [Biojava-l] Genbank ASN.1 or XML parser Message-ID: Hi - The general pattern of input in Biojava is: BufferedReader -> SequenceFormat -> SeqIOListener -> SequenceIterator. A specific example would be: BufferedReader -> FastaFormat -> SequenceBuilderFactory -> SequenceIterator The format object is responsible for parsing the input and generating events that the SequenceBuilderFactory listens for and uses to build one or more Sequence objects. The SequenceFormat implementation usually draws on a SymbolTokenization object which determines how characters are mapped to biojava Symbols (eg a is mapped to adenosine). Basically you make a parser that emits callback events to a registered SeqIOListener. If the listener is a SequenceBuilderFactory it generates Sequence objects base on those events. It is very similar to the SAX API for XML parsing. Hope this helps, Mark "Gang Wu" 06/04/2004 12:52 AM Please respond to gwu To: Mark Schreiber/GP/Novartis@PH cc: "Bio-Java" , Subject: RE: [Biojava-l] Genbank ASN.1 or XML parser Hi, I would be glad to write the parser. Since I am pretty new to BioJava project, can anybody give me a guide on how to start? Thanks. - Gang -----Original Message----- From: mark.schreiber@group.novartis.com [mailto:mark.schreiber@group.novartis.com] Sent: Wednesday, June 02, 2004 8:59 PM To: gwu@molbio.mgh.harvard.edu Cc: Bio-Java; biojava-l-bounces@portal.open-bio.org Subject: Re: [Biojava-l] Genbank ASN.1 or XML parser Hello - At the moment there are no parsers for XEMBL, GenBankXML or ASN.1, They could both be easily made if someone had that time. GenBankXML could easily draw on a SAX or DOM parser to pass events to the BioJava SequenceBuilders (using some kind of adapter). ASN.1 would need a more custom parser but because it is highly structured that shouldn't be too hard. Any volunteers? - Mark "Gang Wu" Sent by: biojava-l-bounces@portal.open-bio.org 06/02/2004 11:21 PM Please respond to gwu To: "Bio-Java" cc: Subject: [Biojava-l] Genbank ASN.1 or XML parser Hi everyone, I just tried out the APIs for parsing Genbank format files. Though it works well, I still wonder if there are APIs for parsing Genbank files in ASN.1 or XML formats because the Genbank format was designed for human being and the ASN.1 and XML formats should be more reliable for data exchange. Gang Wu _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From mark.schreiber at group.novartis.com Mon Jun 7 00:00:19 2004 From: mark.schreiber at group.novartis.com (mark.schreiber@group.novartis.com) Date: Mon Jun 7 00:03:26 2004 Subject: [Biojava-l] Heat map gradients Message-ID: Hi - Slightly off topic but, I am making an application that will display a heat map based on the value of a variable. I'm wondering if anyone has some sample code for generating a color on a gradient between color a and color b (red and green are traditional but something generic would be nice) based on the value of the variable? I guess this is the sort of thing you use for microarray displays/ correlations etc. Cellular automata in this case but it should be useful to others in the list. - Mark Mark Schreiber Principal Scientist (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 dmb at mrc-dunn.cam.ac.uk Mon Jun 7 05:25:37 2004 From: dmb at mrc-dunn.cam.ac.uk (Dan Bolser) Date: Mon Jun 7 05:11:52 2004 Subject: [Biojava-l] Heat map gradients Message-ID: A friend of mine in human computer interaction warns against such scales (I found out when I asked him this exact same question). He prefers a discrete scale of say 7 colors, which are clearly labeled with their bounds. This is because we are not very good at judging the significance of subtle color gradients, and the colors used and the context given can all play a part in informing our decision. We can more clearly understand a discrete color 'scale'. Just one of those things I guess... Dan. On Mon, 7 Jun 2004 mark.schreiber@group.novartis.com wrote: >Hi - > >Slightly off topic but, > >I am making an application that will display a heat map based on the value >of a variable. I'm wondering if anyone has some sample code for generating >a color on a gradient between color a and color b (red and green are >traditional but something generic would be nice) based on the value of the >variable? > >I guess this is the sort of thing you use for microarray displays/ >correlations etc. Cellular automata in this case but it should be useful >to others in the list. > >- Mark > >Mark Schreiber >Principal Scientist (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-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > From dmb at mrc-dunn.cam.ac.uk Mon Jun 7 05:26:11 2004 From: dmb at mrc-dunn.cam.ac.uk (Dan Bolser) Date: Mon Jun 7 05:12:16 2004 Subject: [Biojava-l] Heat map gradients In-Reply-To: Message-ID: p.s. is their anything like 'matrix2png' for biojava? On Mon, 7 Jun 2004 mark.schreiber@group.novartis.com wrote: >Hi - > >Slightly off topic but, > >I am making an application that will display a heat map based on the value >of a variable. I'm wondering if anyone has some sample code for generating >a color on a gradient between color a and color b (red and green are >traditional but something generic would be nice) based on the value of the >variable? > >I guess this is the sort of thing you use for microarray displays/ >correlations etc. Cellular automata in this case but it should be useful >to others in the list. > >- Mark > >Mark Schreiber >Principal Scientist (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-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > From thomas at derkholm.net Mon Jun 7 06:14:35 2004 From: thomas at derkholm.net (Thomas Down) Date: Mon Jun 7 06:04:51 2004 Subject: [Biojava-l] Heat map gradients In-Reply-To: References: Message-ID: <20040607101435.GA13979@calette.derkholm.net> On Mon, Jun 07, 2004 at 12:00:19PM +0800, mark.schreiber@group.novartis.com wrote: > Hi - > > Slightly off topic but, > > I am making an application that will display a heat map based on the value > of a variable. I'm wondering if anyone has some sample code for generating > a color on a gradient between color a and color b (red and green are > traditional but something generic would be nice) based on the value of the > variable? > > I guess this is the sort of thing you use for microarray displays/ > correlations etc. Cellular automata in this case but it should be useful > to others in the list. This is pretty straightforward in Java, for instance: public Color mixColor(Color from, Color to, double amount) { float x = (float) amount; float y = (float) (1.0 - amount); return new Color((int) (y * from.getRed() + x * to.getRed()), (int) (y * from.getGreen() + x * to.getGreen()), (int) (y * from.getBlue() + x * to.getBlue())); } This is nice for 'fluffy' viewing of new data, but for serious analysis I'd agree with Dan's point about using a discrete scale instead. Thomas. From MCCon012 at mc.duke.edu Mon Jun 7 08:20:49 2004 From: MCCon012 at mc.duke.edu (Patrick McConnell) Date: Mon Jun 7 08:23:57 2004 Subject: [Biojava-l] Heat map gradients Message-ID: One of the problems is that we do not perceive gradient changes in a linear fashion. -Patrick McConnell Duke Bioinformatics Shared Resource Duke Comprehensive Cancer Center patrick.mcconnell@duke.edu Dan Bolser To: mark.schreiber@group.novartis.com Sent by: cc: biojava-l@open-bio.org biojava-l-bounces@portal.o Subject: Re: [Biojava-l] Heat map gradients pen-bio.org 06/07/2004 05:25 AM A friend of mine in human computer interaction warns against such scales (I found out when I asked him this exact same question). He prefers a discrete scale of say 7 colors, which are clearly labeled with their bounds. This is because we are not very good at judging the significance of subtle color gradients, and the colors used and the context given can all play a part in informing our decision. We can more clearly understand a discrete color 'scale'. Just one of those things I guess... Dan. On Mon, 7 Jun 2004 mark.schreiber@group.novartis.com wrote: >Hi - > >Slightly off topic but, > >I am making an application that will display a heat map based on the value >of a variable. I'm wondering if anyone has some sample code for generating >a color on a gradient between color a and color b (red and green are >traditional but something generic would be nice) based on the value of the >variable? > >I guess this is the sort of thing you use for microarray displays/ >correlations etc. Cellular automata in this case but it should be useful >to others in the list. > >- Mark > >Mark Schreiber >Principal Scientist (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-l mailing list - Biojava-l@biojava.org >http://biojava.org/mailman/listinfo/biojava-l > _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From gwu at molbio.mgh.harvard.edu Mon Jun 7 14:26:34 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Mon Jun 7 14:31:43 2004 Subject: [Biojava-l] BioJava, BioSQL versions In-Reply-To: Message-ID: Can anybody tell me what versions of BioJava work with what versions of BioSQL? Thanks Gang From Clemens_Steegborn at gmx.de Mon Jun 7 17:28:13 2004 From: Clemens_Steegborn at gmx.de (Clemens Steegborn) Date: Mon Jun 7 17:31:15 2004 Subject: [Biojava-l] reading sequence files Message-ID: <21257.1086643693@www29.gmx.net> Hi, I have problems to extract sequence data from files (Genbank or EMBL) using BioJava 1.3; I can get sequence names or annotations, but when I try to get the sequence itself, I get a null pointer exception! Can anybody help? Thanks .. Clemens -- ------------------------------- Clemens Steegborn, Ph.D. Dept. Biochemistry Cornell Medical School 1300 York Avenue New York, NY 10021 "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! Jetzt aktivieren unter http://www.gmx.net/info From mark.schreiber at group.novartis.com Mon Jun 7 21:25:24 2004 From: mark.schreiber at group.novartis.com (mark.schreiber@group.novartis.com) Date: Mon Jun 7 21:28:33 2004 Subject: [Biojava-l] reading sequence files Message-ID: Hi - Could you post your code and an example GenBank or EMBL accession as well so we can get an idea of what might be going wrong? Alternatively you might want to look at http://www.biojava.org/docs/bj_in_anger/ for some examples of sequence I/O - Mark Mark Schreiber Principal Scientist (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 "Clemens Steegborn" Sent by: biojava-l-bounces@portal.open-bio.org 06/08/2004 05:28 AM To: biojava-l@biojava.org cc: Subject: [Biojava-l] reading sequence files Hi, I have problems to extract sequence data from files (Genbank or EMBL) using BioJava 1.3; I can get sequence names or annotations, but when I try to get the sequence itself, I get a null pointer exception! Can anybody help? Thanks .. Clemens -- ------------------------------- Clemens Steegborn, Ph.D. Dept. Biochemistry Cornell Medical School 1300 York Avenue New York, NY 10021 "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! Jetzt aktivieren unter http://www.gmx.net/info _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From mark.schreiber at group.novartis.com Mon Jun 7 21:27:12 2004 From: mark.schreiber at group.novartis.com (mark.schreiber@group.novartis.com) Date: Mon Jun 7 21:30:36 2004 Subject: [Biojava-l] BioJava, BioSQL versions Message-ID: My understanding is that biojava 1.3.x is not compatable with the more recent versions of biosql. To use the current biosql I reccommend getting one of the nightly snapshots or the pre release version of biojava 1.4 - Mark Mark Schreiber Principal Scientist (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 "Gang Wu" Sent by: biojava-l-bounces@portal.open-bio.org 06/08/2004 02:26 AM Please respond to gwu To: cc: Subject: [Biojava-l] BioJava, BioSQL versions Can anybody tell me what versions of BioJava work with what versions of BioSQL? Thanks Gang _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From gwu at molbio.mgh.harvard.edu Tue Jun 8 17:26:52 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Tue Jun 8 17:31:56 2004 Subject: [Biojava-l] BioJava, BioSQL versions In-Reply-To: Message-ID: Dear All, I am using the latest nightly built Biojava(biojava-20040608.jar) and BioSQL v1.38 for MySQL. When I tried the following code: ================================================================= public static void main (String [] args) throws Exception { BioSQLSequenceDB bdb = new BioSQLSequenceDB( "com.mysql.jdbc.Driver", "jdbc:mysql://mysql_server_ip/biosqldb", "root", "password","biosqldb", true); } ================================================================= I got the following exceptions: ============================================================================ ============= *** Importing a core ontology -- hope this is okay *** Importing terms Exception in thread "main" org.biojava.bio.BioException: Error accessing ontologies at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.initDb(BioSQLSequenceDB.java: 238) at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.(BioSQLSequenceDB.java: 164) at biosql.MyTest.main(MyTest.java:13) Caused by: java.sql.SQLException: Base table or view not found, message from server: "Table 'biosqldb.term_relationship_term' doesn't exist" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203) at com.mysql.jdbc.Connection.execSQL(Connection.java:2090) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegating PreparedStatement.java:233) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegating PreparedStatement.java:233) at org.biojava.bio.seq.db.biosql.OntologySQL.persistTriple(OntologySQL.java:616 ) at org.biojava.bio.seq.db.biosql.OntologySQL.processTerm(OntologySQL.java:262) at org.biojava.bio.seq.db.biosql.OntologySQL.processTerm(OntologySQL.java:251) at org.biojava.bio.seq.db.biosql.OntologySQL.addCore(OntologySQL.java:218) at org.biojava.bio.seq.db.biosql.OntologySQL.(OntologySQL.java:396) at org.biojava.bio.seq.db.biosql.OntologySQL.getOntologySQL(OntologySQL.java:71 ) at org.biojava.bio.seq.db.biosql.BioSQLSequenceDB.initDb(BioSQLSequenceDB.java: 236) ... 2 more ============================================================================ ================ I guess the message means it can find the MySQL driver and the database, but the Java APIs does not match the BioSQL schema. Does the "Table 'biosqldb.term_relationship_term' doesn't exist" mean I'm using a wrong version of BioSQL? Anybody has any idea about it? Help is needed and deeply appreciated. Gang -----Original Message----- From: mark.schreiber@group.novartis.com [mailto:mark.schreiber@group.novartis.com] Sent: Monday, June 07, 2004 9:27 PM To: gwu@molbio.mgh.harvard.edu Cc: biojava-l@open-bio.org; biojava-l-bounces@portal.open-bio.org Subject: Re: [Biojava-l] BioJava, BioSQL versions My understanding is that biojava 1.3.x is not compatable with the more recent versions of biosql. To use the current biosql I reccommend getting one of the nightly snapshots or the pre release version of biojava 1.4 - Mark Mark Schreiber Principal Scientist (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 "Gang Wu" Sent by: biojava-l-bounces@portal.open-bio.org 06/08/2004 02:26 AM Please respond to gwu To: cc: Subject: [Biojava-l] BioJava, BioSQL versions Can anybody tell me what versions of BioJava work with what versions of BioSQL? Thanks Gang _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From len at reeltwo.com Wed Jun 9 17:26:54 2004 From: len at reeltwo.com (Len Trigg) Date: Wed Jun 9 17:30:09 2004 Subject: [Biojava-l] BioJava, BioSQL versions In-Reply-To: References: Message-ID: "Gang Wu" wrote: > I got the following exceptions: > Exception in thread "main" org.biojava.bio.BioException: Error accessing > ontologies > Caused by: java.sql.SQLException: Base table or view not found, message > from server: "Table 'biosqldb.term_relationship_term' doesn't exist" The BioJava Ontologies require an extra table in the schema, which isn't part of the official BioSQL (this should *really* be resolved, guys). A bit of searching on the archives will reveal more (I don't recall the details myself). It should also be possible to postpone creation of the core ontology until it's actually needed, since many applications don't use it at all (I've never used them). Cheers, Len. From gwu at molbio.mgh.harvard.edu Fri Jun 11 13:28:33 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Fri Jun 11 13:33:32 2004 Subject: [Biojava-l] BioJava, BioSQL versions In-Reply-To: Message-ID: Hi, Just searched the archive and found the extra table term_relationship_term as following. And then the demo code works. Should some lines be added in the BioJava package document? There is no way for new BioJava developers to use it witout explaining what's missing in the BioSQL schema. Thanks for the helps from all of you. ================================================================== CREATE TABLE term_relationship_term ( term_relationship_id INTEGER NOT NULL, term_id INTEGER NOT NULL, PRIMARY KEY ( term_relationship_id, term_id ), UNIQUE ( term_relationship_id ), UNIQUE ( term_id ) ); ================================================================== Thanks, Gang -----Original Message----- From: Len Trigg [mailto:len@reeltwo.com] Sent: Wednesday, June 09, 2004 5:27 PM To: gwu@molbio.mgh.harvard.edu Cc: mark.schreiber@group.novartis.com; biojava-l@open-bio.org Subject: Re: [Biojava-l] BioJava, BioSQL versions "Gang Wu" wrote: > I got the following exceptions: > Exception in thread "main" org.biojava.bio.BioException: Error accessing > ontologies > Caused by: java.sql.SQLException: Base table or view not found, message > from server: "Table 'biosqldb.term_relationship_term' doesn't exist" The BioJava Ontologies require an extra table in the schema, which isn't part of the official BioSQL (this should *really* be resolved, guys). A bit of searching on the archives will reveal more (I don't recall the details myself). It should also be possible to postpone creation of the core ontology until it's actually needed, since many applications don't use it at all (I've never used them). Cheers, Len. From thorsten at photono-software.de Sat Jun 12 15:52:53 2004 From: thorsten at photono-software.de (Thorsten) Date: Sat Jun 12 15:54:25 2004 Subject: [Biojava-l] Symbol to Token? Message-ID: <19639836501.20040612215253@photono-software.de> Hello, I simply want to have the textual one letter code of a Protein Symbol. How can I do this? Example Symbol ala = ProteinTools.ala(); //Now I want to print out the one letter code of Alanin: The desired result should be "A". Any solutions? -Th P.S.: I need it for calculating the hydrophobicity of a lot of sequences using a hydrophobicty scale. From thorsten at photono-software.de Sat Jun 12 18:31:29 2004 From: thorsten at photono-software.de (Thorsten) Date: Sat Jun 12 18:33:01 2004 Subject: [Biojava-l] Symbol to Token? In-Reply-To: <19639836501.20040612215253@photono-software.de> References: <19639836501.20040612215253@photono-software.de> Message-ID: <1049352184.20040613003129@photono-software.de> ok, I've found it: SymbolTokenization tok = ProteinTools.getAlphabet().getTokenization("token"); String str = tok.tokenizeSymbol(sym); btw: converting the BioJava-Sequence to a simple string and working with the native Java String is much faster... -Th T> Hello, T> I simply want to have the textual one letter code of a Protein Symbol. T> How can I do this? T> Example T> Symbol ala = ProteinTools.ala(); T> //Now I want to print out the one letter code of Alanin: T> The desired result should be "A". T> Any solutions? T> -Th T> P.S.: T> I need it for calculating the hydrophobicity of a lot of sequences using a T> hydrophobicty scale. T> _______________________________________________ T> Biojava-l mailing list - Biojava-l@biojava.org T> http://biojava.org/mailman/listinfo/biojava-l From mark.schreiber at group.novartis.com Sun Jun 13 21:00:16 2004 From: mark.schreiber at group.novartis.com (mark.schreiber@group.novartis.com) Date: Sun Jun 13 21:03:10 2004 Subject: [Biojava-l] Symbol to Token? Message-ID: Faster than what? Thorsten Sent by: biojava-l-bounces@portal.open-bio.org 06/13/2004 06:31 AM Please respond to Thorsten Schmidt To: biojava-l@biojava.org cc: Subject: Re: [Biojava-l] Symbol to Token? ok, I've found it: SymbolTokenization tok = ProteinTools.getAlphabet().getTokenization("token"); String str = tok.tokenizeSymbol(sym); btw: converting the BioJava-Sequence to a simple string and working with the native Java String is much faster... -Th T> Hello, T> I simply want to have the textual one letter code of a Protein Symbol. T> How can I do this? T> Example T> Symbol ala = ProteinTools.ala(); T> //Now I want to print out the one letter code of Alanin: T> The desired result should be "A". T> Any solutions? T> -Th T> P.S.: T> I need it for calculating the hydrophobicity of a lot of sequences using a T> hydrophobicty scale. T> _______________________________________________ T> Biojava-l mailing list - Biojava-l@biojava.org T> http://biojava.org/mailman/listinfo/biojava-l _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From gwu at molbio.mgh.harvard.edu Mon Jun 14 15:35:37 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Mon Jun 14 15:38:26 2004 Subject: [Biojava-l] BioSQL successes, failures and questions In-Reply-To: Message-ID: Hi everyone, I finally can make BioSQL 1.38(MySQL) work with BioJava(biojava-20040608.jar). Hope my frustrating learning experience can help other new developers a little bit. I deeply appreciate it if any experienced developers can answer my new questions. Before you can start, you have to create a database and user later you are going to use to connect to the database. Please refer MySQL mannual if you don't know how to do it. 1. Run the standard BioSQL 1.38 schema to create an empty sequence database. I changed the unique key term.name(UNIQUE `name` (`name`,`ontology_id`)) to key (KEY `name` (`name`,`ontology_id`)) since later when I tried to upload sequences I got duplicate value exceptions. Any suggestions on this? 2. Run the "term_relationship_term" table creation schema. Without this table, the BioJava package will throw exceptions. See ATTACHMENT 1 at the end of this message. 3. Create the "biodatabase" entry. Say you are uploading Genbank files, you need create an entry in biodatabase table with value of "genbank" for the "name" column. 4. If you are trying to upload flat files such as Genbank files, try ATTACHMENT 2, derived from the demo code UploadFlat.java. If the new BioSQLSequenceDB() line does not work, try another constructor with "dbDriver" parameter. I put all required jar files in the JDK_ROOT/jre/lib/ext so JVM can load them automatically. BioJava needs very much RAM. I suggest put the Xmx???m to be 10 times big as the Genbank file. Say you have a Genbank file of 40 MB, use "java -Xmx400m your_file_full_path". I just uploaded the 5 Genbank genome files of Arabidopsis thaliana and it works pretty well. Though digging information from the tables needs a lot joins(especially with term table), it's still much much easier than writing your own code. So far, I'm happy with it. Questions: 1. How can I quickly pull certain pieces of sequence from the biosequence table? I tried to join the seqfeature, seqfeature_qualifier_value, location, biosequence, term tables to retrieve all gene sequences. It turned out to be not doable because the substring function is extremely slow when applying on the 'seq' column. The following SQL takes about 20 seconds on a dual Xeon 2.6G Dell PowerEdge 2650 server and the required time varies when the gene locations are different. SELECT t1.seqfeature_id,t1.bioentry_id,t2.start_pos, t2.end_pos, t2.strand, t4.value locus_tag, substring(t6.seq, t2.start_pos,t2.end_pos) seq FROM `seqfeature` t1 inner join location t2 on t1.seqfeature_id=t2.seqfeature_id inner join term t3 on t1.type_term_id=t3.term_id inner join seqfeature_qualifier_value t4 on t1.seqfeature_id=t4.seqfeature_id inner join term t5 on t4.term_id=t5.term_id inner join biosequence t6 on t1.bioentry_id=t6.bioentry_id where t3.name='gene' and t5.name='locus_tag' limit 2 ========================================= ATTACHMENT 1 ========================================= CREATE TABLE `term_relationship_term` ( `term_relationship_id` int(11) NOT NULL default '0', `term_id` int(11) NOT NULL default '0', PRIMARY KEY (`term_relationship_id`,`term_id`), UNIQUE KEY `term_relationship_id` (`term_relationship_id`), UNIQUE KEY `term_id` (`term_id`) ) TYPE=InnoDB; ======================================== ========================================= ATTACHMENT 2 ========================================= import java.io.*; import org.biojava.bio.*; import org.biojava.bio.symbol.*; import org.biojava.bio.seq.*; import org.biojava.bio.seq.io.*; import org.biojava.bio.seq.db.*; import org.biojava.bio.seq.db.biosql.*; import org.biojava.bio.taxa.*; public class UploadFlat { public static void main(String [] args) { try { String dbDriver="com.mysql.jdbc.Driver"; String dbURL = "jdbc:mysql://mysql_server_ip_address_or_domain_name/biosql_database_name"; String dbUser = "database_user"; String dbPass = "password"; String bioDB = "biodatabase.name"; String format = "genbank"; //you can change this or input from command line System.setProperty("jdbc.drivers", "com.mysql.jdbc.Driver"); SequenceDB seqDB = new BioSQLSequenceDB( dbURL, dbUser, dbPass, bioDB, false ); SequenceFormat sFormat; SequenceBuilderFactory sbFact; Alphabet alpha; if ("embl".equalsIgnoreCase(format)) { sFormat = new EmblLikeFormat(); sbFact = new EmblProcessor.Factory(SimpleSequenceBuilder.FACTORY); alpha = DNATools.getDNA(); } else if ("swissprot".equalsIgnoreCase(format)) { sFormat = new EmblLikeFormat(); sbFact = new SwissprotProcessor.Factory( SimpleSequenceBuilder.FACTORY ); alpha = ProteinTools.getAlphabet(); } else if ("fasta".equalsIgnoreCase(format)) { sFormat = new FastaFormat(); sbFact = new FastaDescriptionLineParser.Factory(SimpleSequenceBuilder.FACTORY); alpha = DNATools.getDNA(); } else if ("fasta-protein".equalsIgnoreCase(format)) { sFormat = new FastaFormat(); sbFact = new FastaDescriptionLineParser.Factory(SimpleSequenceBuilder.FACTORY); alpha = ProteinTools.getAlphabet(); } else if ("genbank".equalsIgnoreCase(format)) { sFormat = new GenbankFormat(); sbFact = new GenbankProcessor.Factory(SimpleSequenceBuilder.FACTORY); alpha = DNATools.getDNA(); }else { System.err.println("Unknown format: " + format); return; } SymbolTokenization rParser = alpha.getTokenization("token"); File swissProtFile = new File(args[0]); BufferedReader sReader = new BufferedReader(new InputStreamReader(new FileInputStream(swissProtFile))); SequenceIterator seqI = new StreamReader(sReader, sFormat, rParser, sbFact); while(seqI.hasNext()) { try { System.out.print("."); Sequence seq = seqI.nextSequence(); seqDB.addSequence(seq); } catch (Throwable t) { t.printStackTrace(System.out); } } } catch (Throwable t) { t.printStackTrace(); System.exit(1); } } } ========================================= From Clemens_Steegborn at gmx.de Tue Jun 15 17:04:23 2004 From: Clemens_Steegborn at gmx.de (Clemens Steegborn) Date: Tue Jun 15 17:07:19 2004 Subject: [Biojava-l] reading sequence files References: Message-ID: <5769.1087333463@www37.gmx.net> Hi, I used the bj_in_anger code when I had the sequence I/O problems; and I found the reason: I used JDK 1.3; worked fine when I switched to 1.4; Sorry, mea culpa Clemens > Hi - > > Could you post your code and an example GenBank or EMBL accession as well > so we can get an idea of what might be going wrong? Alternatively you > might want to look at http://www.biojava.org/docs/bj_in_anger/ for some > examples of sequence I/O > > - Mark > > Mark Schreiber > Principal Scientist (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 > > > > > > "Clemens Steegborn" > Sent by: biojava-l-bounces@portal.open-bio.org > 06/08/2004 05:28 AM > > > To: biojava-l@biojava.org > cc: > Subject: [Biojava-l] reading sequence files > > > > Hi, > > I have problems to extract sequence data from files (Genbank or EMBL) > using > BioJava 1.3; I can get sequence names or annotations, but when I try to > get > the sequence itself, I get a null pointer exception! Can anybody help? > Thanks .. > > Clemens > > -- > ------------------------------- > Clemens Steegborn, Ph.D. > Dept. Biochemistry > Cornell Medical School > 1300 York Avenue > New York, NY 10021 > > "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! > Jetzt aktivieren unter http://www.gmx.net/info > > _______________________________________________ > Biojava-l mailing list - Biojava-l@biojava.org > http://biojava.org/mailman/listinfo/biojava-l > > > -- ------------------------------- Clemens Steegborn, Ph.D. Dept. Biochemistry Cornell Medical School 1300 York Avenue New York, NY 10021 "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! Jetzt aktivieren unter http://www.gmx.net/info From matthew_pocock at yahoo.co.uk Wed Jun 16 07:05:13 2004 From: matthew_pocock at yahoo.co.uk (Matthew Pocock) Date: Wed Jun 16 07:08:11 2004 Subject: [Biojava-l] biojava article Message-ID: <40D02969.1050908@yahoo.co.uk> from the "blowing our own trumpet" department: Take a look at java.sun.com today - there's an article about BioJava and os and genomics. Matthew From Russell.Smithies at agresearch.co.nz Mon Jun 21 17:34:09 2004 From: Russell.Smithies at agresearch.co.nz (Smithies, Russell) Date: Mon Jun 21 17:36:55 2004 Subject: [Biojava-l] Java VM performance. Message-ID: I just read an interesting article that re-ran the benchmark tests for Java vs. C++. http://www.sys-con.com/story/?storyid=45250 According to the author, Keith Lea, "..no one should ever run the client JVM when given the choice" and "..the Server VM is much faster than the Client VM,". Some simple editing of jvm.cfg will cause the server VM to be run for all applications, unless they are run with the -client argument. Performance rating (bigger is better) G++ 3.3.1 Java 1.4.2 Intel 386 Intel 686 Server JVM Client JVM Ackermann 73% 114% 129% N/A* Fibonacci 88% 101% 132% 88% Hash2 79% 77% 168% 115% Hash 194% 193% 402% 36% Heapsort 101% 104% 94% 99% Matrix 157% 155% 111% 54% Method call 89% 105% 871% 54% Nested loop 165% 138% 89% 64% Object creation 62% 65% 241% 215% Random no. gen. 145% 204% 102% 54% Sieve 97% 98% 107% 97% String concatenation 99% 137% 94% 82% Sumcol 101% 108% 138% 72% Word count 88% 91% 128% 99% *The Client JVM could not run the Ackermann test without producing a StackOverflowError. Russell Smithies Bioinformatics Software Developer AgResearch Invermay Private Bag 50034 Puddle Alley Mosgiel New Zealand Tel: +64 3 489 9171 Fax: +64 3 489 3739 ======================================================================= Attention: The information contained in this message and/or attachments from AgResearch Limited is intended only for the persons or entities to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipients is prohibited by AgResearch Limited. If you have received this message in error, please notify the sender immediately. ======================================================================= From xjw2101 at columbia.edu Mon Jun 28 16:44:30 2004 From: xjw2101 at columbia.edu (xjw2101@columbia.edu) Date: Mon Jun 28 16:46:52 2004 Subject: [Biojava-l] DistributionLogo help Message-ID: <1088455470.40e0832e544cc@cubmail.cc.columbia.edu> I am trying to use DistributionLogo class to represent a PSSM for a transcription factor. I can generate DistributionLogos for each position but can't merge them together to form a nice looking single logo to be displayed on a panel. Basically,I don't know how to control the color or the size. can someone show me how this class works or give me some sample code of how this class works? Thanks, Xuegong From td2 at sanger.ac.uk Tue Jun 29 09:40:33 2004 From: td2 at sanger.ac.uk (Thomas Down) Date: Tue Jun 29 09:42:56 2004 Subject: [Biojava-l] DistributionLogo help In-Reply-To: <1088455470.40e0832e544cc@cubmail.cc.columbia.edu> References: <1088455470.40e0832e544cc@cubmail.cc.columbia.edu> Message-ID: On 28 Jun 2004, at 21:44, xjw2101@columbia.edu wrote: > > > I am trying to use DistributionLogo class to represent a PSSM for a > transcription factor. I can generate DistributionLogos for each > position but can't merge them together to form a nice looking > single logo to be displayed on a panel. Basically,I don't know how > to control the color or the size. can someone show me how this > class works or give me some sample code of how this class works? Hi Xuegong, I generally use the following code, which creates a row of DistributionLogo objects, for displaying a BioJava WeightMatrix (i.e. PSSM) objects. Can this be adapted to do what you want? Thomas. import java.awt.*; import javax.swing.*; import org.biojava.bio.*; import org.biojava.bio.dist.Distribution; import org.biojava.bio.dp.WeightMatrix; import org.biojava.bio.gui.*; public class WMPanel extends JPanel { private WeightMatrix wm; private DistributionLogo[] logos; public WMPanel(WeightMatrix wm) { super(); this.wm = wm; setBackground(Color.white); RenderingHints hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); try { setLayout(new GridLayout(1, wm.columns())); logos = new DistributionLogo[wm.columns()]; for (int pos = 0; pos < wm.columns(); ++pos) { Distribution dist = wm.getColumn(pos); DistributionLogo dl = new DistributionLogo(); dl.setRenderingHints(hints); dl.setBackground(Color.white); dl.setOpaque(true); dl.setDistribution(dist); dl.setPreferredSize(new Dimension(40, 50)); dl.setLogoPainter(new TextLogoPainter()); dl.setStyle(new DNAStyle()); add(dl); logos[pos] = dl; } } catch (BioException ex) { throw new BioError(ex); } } public static void wmViewer(WeightMatrix wm, String message) { WMPanel wmv = new WMPanel(wm); JFrame frame = new JFrame("Weight matrix viewer" + ((message == null) ? "" : (" (" + message + ")"))); frame.getContentPane().add(wmv); frame.pack(); frame.setVisible(true); } } From xjw2101 at columbia.edu Tue Jun 29 10:49:07 2004 From: xjw2101 at columbia.edu (xjw2101@columbia.edu) Date: Tue Jun 29 10:51:28 2004 Subject: [Biojava-l] DistributionLogo help Message-ID: <1088520547.40e18163a3944@cubmail.cc.columbia.edu> Thomas, Seems the version is different from mine. In my version DistributionLogo is extension of Component and there are no setRenderingHints(hints) or setPreferedSize() methods. Xuegong --- Thomas Down wrote: > > On 28 Jun 2004, at 21:44, xjw2101@columbia.edu > wrote: > > > > > > > I am trying to use DistributionLogo class to > represent a PSSM for a > > transcription factor. I can generate > DistributionLogos for each > > position but can't merge them together to form a > nice looking > > single logo to be displayed on a panel. > Basically,I don't know how > > to control the color or the size. can someone show > me how this > > class works or give me some sample code of how > this class works? > > Hi Xuegong, > > I generally use the following code, which creates a > row of > DistributionLogo objects, for displaying a BioJava > WeightMatrix (i.e. > PSSM) objects. Can this be adapted to do what you > want? > > Thomas. > > > > import java.awt.*; > > import javax.swing.*; > > import org.biojava.bio.*; > import org.biojava.bio.dist.Distribution; > import org.biojava.bio.dp.WeightMatrix; > import org.biojava.bio.gui.*; > > public class WMPanel extends JPanel { > private WeightMatrix wm; > private DistributionLogo[] logos; > > public WMPanel(WeightMatrix wm) { > super(); > this.wm = wm; > setBackground(Color.white); > > RenderingHints hints = new > RenderingHints(RenderingHints.KEY_ANTIALIASING, > RenderingHints.VALUE_ANTIALIAS_ON); > > try { > setLayout(new GridLayout(1, > wm.columns())); > logos = new > DistributionLogo[wm.columns()]; > for (int pos = 0; pos < wm.columns(); > ++pos) { > Distribution dist = > wm.getColumn(pos); > DistributionLogo dl = new > DistributionLogo(); > dl.setRenderingHints(hints); > dl.setBackground(Color.white); > dl.setOpaque(true); > dl.setDistribution(dist); > dl.setPreferredSize(new > Dimension(40, 50)); > dl.setLogoPainter(new > TextLogoPainter()); > dl.setStyle(new DNAStyle()); > add(dl); > logos[pos] = dl; > } > } catch (BioException ex) { > throw new BioError(ex); > } > } > > public static void wmViewer(WeightMatrix wm, > String message) > { > WMPanel wmv = new WMPanel(wm); > JFrame frame = new JFrame("Weight matrix > viewer" + ((message == > null) ? "" : (" (" + message + ")"))); > frame.getContentPane().add(wmv); > frame.pack(); > frame.setVisible(true); > } > } > > From td2 at sanger.ac.uk Tue Jun 29 11:03:13 2004 From: td2 at sanger.ac.uk (Thomas Down) Date: Tue Jun 29 11:05:35 2004 Subject: [Biojava-l] DistributionLogo help In-Reply-To: <1088520547.40e18163a3944@cubmail.cc.columbia.edu> References: <1088520547.40e18163a3944@cubmail.cc.columbia.edu> Message-ID: <71B1D264-C9DD-11D8-937E-000A95C8B056@sanger.ac.uk> On 29 Jun 2004, at 15:49, xjw2101@columbia.edu wrote: > Thomas, > Seems the version is different from mine. In my version > DistributionLogo is extension of Component and there are no > setRenderingHints(hints) or setPreferedSize() methods. Hmmm, do you know what version of BioJava you're using? Those methods have been there since at least 1.3.0. I'd suggest upgrading to either a 1.3.x release or (probably a better idea) 1.4pre1. (Obviously, there's no problem removing the call to setRenderingHints, I just included that because the logos look a bit prettier with anti-aliasing turned on). Thomas. From project4.bioinformatics at erasmusmc.nl Tue Jun 29 11:32:38 2004 From: project4.bioinformatics at erasmusmc.nl (Selmar Leeuwenburgh) Date: Tue Jun 29 11:32:40 2004 Subject: [Biojava-l] java.lang.NoClassDefFoundError error Message-ID: Hi, I have a question. I know there are some messages of this subject in the list, but I can't find the right answer. Do someone know why I get java.lang.NoClassDefFoundError error? I get the same error on my Linux computer with mandrake. the command: C:\>c:\j2sdk1.4.2_04\bin\java c:\bio-java\demos\seq\TestEmbl C:\bio-java\demos\s eq\AL121903.embl Exception in thread "main" java.lang.NoClassDefFoundError: c:\bio-java\demos\seq \TestEmbl the content of the ext directory: Directory of C:\j2sdk1.4.2_04\jre\lib\ext 29/08/2004 16:24 . 29/08/2004 16:24 .. 29/08/2004 16:11 2,385,919 biojava-1.30-jdk14.jar 29/08/2004 16:24 60,044 bytecode-0.91.jar 22/02/2004 23:18 8,896 dnsns.jar 29/08/2004 16:23 29,871 jakarta-regexp.jar 22/02/2004 23:21 53,247 ldapsec.jar 22/02/2004 23:50 769,335 localedata.jar 29/08/2004 15:58 111,374 sunjce_provider.jar 29/08/2004 16:24 1,783,457 xerces.jar 8 File(s) 5,202,143 bytes 2 Dir(s) 10,133,127,168 bytes free My env variable are C:\bio-java\demos\seq>set ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\Selmar\Application Data CLASSPATH=C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_ 04\j re\lib\ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sd k1.4 .2_04\jre\lib\ext\jakarta-regexp.jar; CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=SELMAR ComSpec=C:\WINDOWS\system32\cmd.exe HOMEDRIVE=C: HOMEPATH=\ LOGONSERVER=\\SELMAR NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Co mmon Files\Adaptec Shared\System;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls \ENGLISH;C:\Program Files\UltraEdit;C:\Sun\AppServer\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0209 ProgramFiles=C:\Program Files PROMPT=$P$G SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp TMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en USERDOMAIN=SELMAR USERNAME=Selmar USERPROFILE=C:\Documents and Settings\Selmar windir=C:\WINDOWS From gwu at molbio.mgh.harvard.edu Tue Jun 29 11:48:23 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Tue Jun 29 11:50:44 2004 Subject: [Biojava-l] java.lang.NoClassDefFoundError error In-Reply-To: Message-ID: Give C:\>c:\j2sdk1.4.2_04\jre\bin\java a try. I got the similar problem, which seems the "java" you called did not include the jar files under C:\>c:\j2sdk1.4.2_04\jre\lib\ext properly, any hint? Gang -----Original Message----- From: biojava-l-bounces@portal.open-bio.org [mailto:biojava-l-bounces@portal.open-bio.org]On Behalf Of Selmar Leeuwenburgh Sent: Sunday, August 29, 2004 11:30 AM To: biojava-l@biojava.org Subject: [Biojava-l] java.lang.NoClassDefFoundError error Hi, I have a question. I know there are some messages of this subject in the list, but I can't find the right answer. Do someone know why I get java.lang.NoClassDefFoundError error? I get the same error on my Linux computer with mandrake. the command: C:\>c:\j2sdk1.4.2_04\bin\java c:\bio-java\demos\seq\TestEmbl C:\bio-java\demos\s eq\AL121903.embl Exception in thread "main" java.lang.NoClassDefFoundError: c:\bio-java\demos\seq \TestEmbl the content of the ext directory: Directory of C:\j2sdk1.4.2_04\jre\lib\ext 29/08/2004 16:24 . 29/08/2004 16:24 .. 29/08/2004 16:11 2,385,919 biojava-1.30-jdk14.jar 29/08/2004 16:24 60,044 bytecode-0.91.jar 22/02/2004 23:18 8,896 dnsns.jar 29/08/2004 16:23 29,871 jakarta-regexp.jar 22/02/2004 23:21 53,247 ldapsec.jar 22/02/2004 23:50 769,335 localedata.jar 29/08/2004 15:58 111,374 sunjce_provider.jar 29/08/2004 16:24 1,783,457 xerces.jar 8 File(s) 5,202,143 bytes 2 Dir(s) 10,133,127,168 bytes free My env variable are C:\bio-java\demos\seq>set ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\Selmar\Application Data CLASSPATH=C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_ 04\j re\lib\ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sd k1.4 .2_04\jre\lib\ext\jakarta-regexp.jar; CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=SELMAR ComSpec=C:\WINDOWS\system32\cmd.exe HOMEDRIVE=C: HOMEPATH=\ LOGONSERVER=\\SELMAR NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Co mmon Files\Adaptec Shared\System;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls \ENGLISH;C:\Program Files\UltraEdit;C:\Sun\AppServer\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0209 ProgramFiles=C:\Program Files PROMPT=$P$G SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp TMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en USERDOMAIN=SELMAR USERNAME=Selmar USERPROFILE=C:\Documents and Settings\Selmar windir=C:\WINDOWS _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From gwu at molbio.mgh.harvard.edu Tue Jun 29 12:03:32 2004 From: gwu at molbio.mgh.harvard.edu (Gang Wu) Date: Tue Jun 29 12:05:52 2004 Subject: [Biojava-l] java.lang.NoClassDefFoundError error In-Reply-To: Message-ID: Another problem is you have to include "c:\bio-java\demos" in your CLASSPATH and call the TestEmbl as "seq.TestEmbl" because the class package started from "c:\bio-java\demos\seq". So the command line should be like: c:\j2sdk1.4.2_04\jre\bin\java -cp CLASSPATH;c:\bio-java\demos seq.TestEmbl C:\bio-java\demos\seq\AL121903.embl gang -----Original Message----- From: biojava-l-bounces@portal.open-bio.org [mailto:biojava-l-bounces@portal.open-bio.org]On Behalf Of Selmar Leeuwenburgh Sent: Sunday, August 29, 2004 11:30 AM To: biojava-l@biojava.org Subject: [Biojava-l] java.lang.NoClassDefFoundError error Hi, I have a question. I know there are some messages of this subject in the list, but I can't find the right answer. Do someone know why I get java.lang.NoClassDefFoundError error? I get the same error on my Linux computer with mandrake. the command: C:\>c:\j2sdk1.4.2_04\bin\java c:\bio-java\demos\seq\TestEmbl C:\bio-java\demos\s eq\AL121903.embl Exception in thread "main" java.lang.NoClassDefFoundError: c:\bio-java\demos\seq \TestEmbl the content of the ext directory: Directory of C:\j2sdk1.4.2_04\jre\lib\ext 29/08/2004 16:24 . 29/08/2004 16:24 .. 29/08/2004 16:11 2,385,919 biojava-1.30-jdk14.jar 29/08/2004 16:24 60,044 bytecode-0.91.jar 22/02/2004 23:18 8,896 dnsns.jar 29/08/2004 16:23 29,871 jakarta-regexp.jar 22/02/2004 23:21 53,247 ldapsec.jar 22/02/2004 23:50 769,335 localedata.jar 29/08/2004 15:58 111,374 sunjce_provider.jar 29/08/2004 16:24 1,783,457 xerces.jar 8 File(s) 5,202,143 bytes 2 Dir(s) 10,133,127,168 bytes free My env variable are C:\bio-java\demos\seq>set ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\Selmar\Application Data CLASSPATH=C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_ 04\j re\lib\ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sd k1.4 .2_04\jre\lib\ext\jakarta-regexp.jar; CommonProgramFiles=C:\Program Files\Common Files COMPUTERNAME=SELMAR ComSpec=C:\WINDOWS\system32\cmd.exe HOMEDRIVE=C: HOMEPATH=\ LOGONSERVER=\\SELMAR NUMBER_OF_PROCESSORS=2 OS=Windows_NT Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Co mmon Files\Adaptec Shared\System;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls \ENGLISH;C:\Program Files\UltraEdit;C:\Sun\AppServer\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH PROCESSOR_ARCHITECTURE=x86 PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel PROCESSOR_LEVEL=15 PROCESSOR_REVISION=0209 ProgramFiles=C:\Program Files PROMPT=$P$G SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp TMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en USERDOMAIN=SELMAR USERNAME=Selmar USERPROFILE=C:\Documents and Settings\Selmar windir=C:\WINDOWS _______________________________________________ Biojava-l mailing list - Biojava-l@biojava.org http://biojava.org/mailman/listinfo/biojava-l From fpepin at cs.mcgill.ca Tue Jun 29 12:35:11 2004 From: fpepin at cs.mcgill.ca (Francois Pepin) Date: Tue Jun 29 12:39:18 2004 Subject: [Biojava-l] java.lang.NoClassDefFoundError error In-Reply-To: References: Message-ID: <1088526911.10990.27.camel@ybrig.MCB.McGill.CA> Good old classpath error would be my guess. try: cd bio-java\demos c:\j2sdk1.4.2_04\bin\java -cp . seq/TestEmbl this should give you the following error (output is from linux): [francois@bern demos]$ java -cp . seq/TestEmbl Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/symbol/Alphabet This means that you don't have the biojava.jar mounted. In my case, I can do it with: [francois@bern demos]$ java -cp ~/cvs/bias/biojava.jar:. seq/TestEmbl seq/AL121903.embl >HSDJ155G6 has 191 features [rest of normal output follows] java classpath is a bit tricky at the beginning but you get used to it. You can also use a IDE that takes care of everything for you. Francois On Sun, 2004-08-29 at 11:29, Selmar Leeuwenburgh wrote: > Hi, > > I have a question. I know there are some messages of this subject in the > list, but I can't find the right answer. > > Do someone know why I get java.lang.NoClassDefFoundError error? I get the > same error on my Linux computer with mandrake. > > > the command: > > C:\>c:\j2sdk1.4.2_04\bin\java c:\bio-java\demos\seq\TestEmbl > C:\bio-java\demos\s > eq\AL121903.embl > Exception in thread "main" java.lang.NoClassDefFoundError: > c:\bio-java\demos\seq > \TestEmbl > > the content of the ext directory: > > Directory of C:\j2sdk1.4.2_04\jre\lib\ext > > 29/08/2004 16:24 . > 29/08/2004 16:24 .. > 29/08/2004 16:11 2,385,919 biojava-1.30-jdk14.jar > 29/08/2004 16:24 60,044 bytecode-0.91.jar > 22/02/2004 23:18 8,896 dnsns.jar > 29/08/2004 16:23 29,871 jakarta-regexp.jar > 22/02/2004 23:21 53,247 ldapsec.jar > 22/02/2004 23:50 769,335 localedata.jar > 29/08/2004 15:58 111,374 sunjce_provider.jar > 29/08/2004 16:24 1,783,457 xerces.jar > 8 File(s) 5,202,143 bytes > 2 Dir(s) 10,133,127,168 bytes free > > My env variable are > > C:\bio-java\demos\seq>set > ALLUSERSPROFILE=C:\Documents and Settings\All Users > APPDATA=C:\Documents and Settings\Selmar\Application Data > CLASSPATH=C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_ > 04\j > re\lib\ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sd > k1.4 > .2_04\jre\lib\ext\jakarta-regexp.jar; > CommonProgramFiles=C:\Program Files\Common Files > COMPUTERNAME=SELMAR > ComSpec=C:\WINDOWS\system32\cmd.exe > HOMEDRIVE=C: > HOMEPATH=\ > LOGONSERVER=\\SELMAR > NUMBER_OF_PROCESSORS=2 > OS=Windows_NT > Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program > Files\Co > mmon Files\Adaptec > Shared\System;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls > \ENGLISH;C:\Program Files\UltraEdit;C:\Sun\AppServer\bin > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH > PROCESSOR_ARCHITECTURE=x86 > PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel > PROCESSOR_LEVEL=15 > PROCESSOR_REVISION=0209 > ProgramFiles=C:\Program Files > PROMPT=$P$G > SystemDrive=C: > SystemRoot=C:\WINDOWS > TEMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp > TMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp > ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en > USERDOMAIN=SELMAR > USERNAME=Selmar > USERPROFILE=C:\Documents and Settings\Selmar > windir=C:\WINDOWS > > > _______________________________________________ > Biojava-l mailing list - Biojava-l@biojava.org > http://biojava.org/mailman/listinfo/biojava-l From xjw2101 at columbia.edu Tue Jun 29 14:09:00 2004 From: xjw2101 at columbia.edu (xjw2101@columbia.edu) Date: Tue Jun 29 14:11:27 2004 Subject: [Biojava-l] DistributionLogo help Message-ID: <1088532540.40e1b03c7bee0@cubmail.cc.columbia.edu> Thomas, Thanks, that I found out later it's my mistake that I use Component object to represent the logo. Seems to work now but there still is a problem-- the height of the logos displayed seems to be only 1/2 of the space I provided to them on the panel. Change the dimension of the logo dosen't help. Any thoughts? Xuegong >On 29 Jun 2004, at 15:49, xjw2101@columbia.edu wrote: > Thomas, > Seems the version is different from mine. In my version > DistributionLogo is extension of Component and there are no > setRenderingHints(hints) or setPreferedSize() methods. >Hmmm, do you know what version of BioJava you're using? Those >methods >have been there since at least 1.3.0. >I'd suggest upgrading to either a 1.3.x release or (probably a >better >idea) 1.4pre1. >(Obviously, there's no problem removing the call to >setRenderingHints, >I just included that because the logos look a bit prettier with >anti-aliasing turned on). > Thomas. From project4.bioinformatics at erasmusmc.nl Wed Jun 30 07:43:10 2004 From: project4.bioinformatics at erasmusmc.nl (Selmar Leeuwenburgh) Date: Wed Jun 30 07:43:13 2004 Subject: [Biojava-l] java.lang.NoClassDefFoundError error In-Reply-To: <1088526911.10990.27.camel@ybrig.MCB.McGill.CA> Message-ID: thank you al for help. finally is work as follows: export CLASSPATH=/usr/java/j2sdk1.4.2_04/jre/lib/ext/biojava-1.30-jdk14.jar:/usr/ja va/j2sdk1.4.2_04/jre/lib/ext/bytecode-0.91.jar:/usr/java/j2sdk1.4.2_04/jre/l ib/ext/jakarta-regexp.jar:/usr/java/j2sdk1.4.2_04/jre/lib/ext/xerces.jar:/us r/bio-java/demos java seq.TestEmbl /bio-java/demos/seq/AL121903.embl and on windows: properties of this computer > advanced > environment variables en dan systemvariable CLASSPATH C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_04\jre\lib \ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sdk1.4.2 _04\jre\lib\ext\jakarta-regexp.jar;c:\bio-java\demos; java seq.TestEmbl C:\bio-java\demos\seq\AL121903.embl zo run ik het nu kind regards, Selmar. -----Original Message----- From: Francois Pepin [mailto:fpepin@cs.mcgill.ca] Sent: 29 June 2004 18:35 To: Selmar Leeuwenburgh Cc: biojava-l@biojava.org Subject: Re: [Biojava-l] java.lang.NoClassDefFoundError error Good old classpath error would be my guess. try: cd bio-java\demos c:\j2sdk1.4.2_04\bin\java -cp . seq/TestEmbl this should give you the following error (output is from linux): [francois@bern demos]$ java -cp . seq/TestEmbl Exception in thread "main" java.lang.NoClassDefFoundError: org/biojava/bio/symbol/Alphabet This means that you don't have the biojava.jar mounted. In my case, I can do it with: [francois@bern demos]$ java -cp ~/cvs/bias/biojava.jar:. seq/TestEmbl seq/AL121903.embl >HSDJ155G6 has 191 features [rest of normal output follows] java classpath is a bit tricky at the beginning but you get used to it. You can also use a IDE that takes care of everything for you. Francois On Sun, 2004-08-29 at 11:29, Selmar Leeuwenburgh wrote: > Hi, > > I have a question. I know there are some messages of this subject in the > list, but I can't find the right answer. > > Do someone know why I get java.lang.NoClassDefFoundError error? I get the > same error on my Linux computer with mandrake. > > > the command: > > C:\>c:\j2sdk1.4.2_04\bin\java c:\bio-java\demos\seq\TestEmbl > C:\bio-java\demos\s > eq\AL121903.embl > Exception in thread "main" java.lang.NoClassDefFoundError: > c:\bio-java\demos\seq > \TestEmbl > > the content of the ext directory: > > Directory of C:\j2sdk1.4.2_04\jre\lib\ext > > 29/08/2004 16:24 . > 29/08/2004 16:24 .. > 29/08/2004 16:11 2,385,919 biojava-1.30-jdk14.jar > 29/08/2004 16:24 60,044 bytecode-0.91.jar > 22/02/2004 23:18 8,896 dnsns.jar > 29/08/2004 16:23 29,871 jakarta-regexp.jar > 22/02/2004 23:21 53,247 ldapsec.jar > 22/02/2004 23:50 769,335 localedata.jar > 29/08/2004 15:58 111,374 sunjce_provider.jar > 29/08/2004 16:24 1,783,457 xerces.jar > 8 File(s) 5,202,143 bytes > 2 Dir(s) 10,133,127,168 bytes free > > My env variable are > > C:\bio-java\demos\seq>set > ALLUSERSPROFILE=C:\Documents and Settings\All Users > APPDATA=C:\Documents and Settings\Selmar\Application Data > CLASSPATH=C:\j2sdk1.4.2_04\jre\lib\ext\biojava-1.30-jdk14.jar;C:\j2sdk1.4.2_ > 04\j > re\lib\ext\xerces.jar;C:\j2sdk1.4.2_04\jre\lib\ext\bytecode-0.91.jar;C:\j2sd > k1.4 > .2_04\jre\lib\ext\jakarta-regexp.jar; > CommonProgramFiles=C:\Program Files\Common Files > COMPUTERNAME=SELMAR > ComSpec=C:\WINDOWS\system32\cmd.exe > HOMEDRIVE=C: > HOMEPATH=\ > LOGONSERVER=\\SELMAR > NUMBER_OF_PROCESSORS=2 > OS=Windows_NT > Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program > Files\Co > mmon Files\Adaptec > Shared\System;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls > \ENGLISH;C:\Program Files\UltraEdit;C:\Sun\AppServer\bin > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH > PROCESSOR_ARCHITECTURE=x86 > PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel > PROCESSOR_LEVEL=15 > PROCESSOR_REVISION=0209 > ProgramFiles=C:\Program Files > PROMPT=$P$G > SystemDrive=C: > SystemRoot=C:\WINDOWS > TEMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp > TMP=C:\DOCUME~1\Selmar\LOCALS~1\Temp > ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en > USERDOMAIN=SELMAR > USERNAME=Selmar > USERPROFILE=C:\Documents and Settings\Selmar > windir=C:\WINDOWS > > > _______________________________________________ > Biojava-l mailing list - Biojava-l@biojava.org > http://biojava.org/mailman/listinfo/biojava-l