From jchang at jeffchang.com Tue Jul 1 00:04:14 2003 From: jchang at jeffchang.com (Jeffrey Chang) Date: Sat Mar 5 14:43:23 2005 Subject: [Biopython-dev] [Bug 1462] New: building Bio.trie fails In-Reply-To: <200306302036.h5UKalGn012616@localhost.localdomain> Message-ID: <142F02EF-AB79-11D7-84D8-000A956845CE@jeffchang.com> Hi, Thanks for the report. I think this has been fixed in the CVS version of the triemodule.c file, at cvs.biopython.org. Please let me know if it is still a problem. Thanks, Jeff On Monday, June 30, 2003, at 01:36 PM, bugzilla-daemon@portal.open-bio.org wrote: > http://bugzilla.bioperl.org/show_bug.cgi?id=1462 > > Summary: building Bio.trie fails > Product: Biopython > Version: 1.10 > Platform: PC > OS/Version: Linux > Status: NEW > Severity: blocker > Priority: P2 > Component: Main Distribution > AssignedTo: biopython-dev@biopython.org > ReportedBy: malex@purdue.edu > > > building 'Bio.trie' extension > gcc -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -fno-strict-aliasing > -fPIC -IBio -I/usr/include/python2.2 -c Bio/triemodule.c -o > build/temp.linux-i686-2.2/triemodule.o > In file included from Bio/triemodule.c:3: > Bio/trie.h:12: warning: function declaration isn't a prototype > Bio/triemodule.c:606:1: missing terminating " character > Bio/triemodule.c:607: error: syntax error before "This" > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:607: error: stray '\' in program > Bio/triemodule.c:616:1: missing terminating " character > Bio/triemodule.c:595: warning: `trie_methods' defined but not used > Bio/triemodule.c:605: warning: `trie__doc__' defined but not used > error: command 'gcc' failed with exit status 1 > > > > In order to resolve it one simply has to join the lines 606 and 607 > because line > 607 is not recognised as a string otherwise. When that is done the > build goes fine. > > Regards, > > Alex. > > > > ------- You are receiving this mail because: ------- > You are the assignee for the bug, or are watching the assignee. > _______________________________________________ > Biopython-dev mailing list > Biopython-dev@biopython.org > http://biopython.org/mailman/listinfo/biopython-dev From Yves.Bastide at irisa.fr Wed Jul 2 13:03:29 2003 From: Yves.Bastide at irisa.fr (Yves Bastide) Date: Sat Mar 5 14:43:23 2005 Subject: [Biopython-dev] FormatIO and SwissProt Message-ID: <3F031061.6040000@irisa.fr> Hi, FormatIO doesn't seem to handle SwissProt files well... bionix:~/src/bio/biopython/Tests% python Python 2.2.2 (#1, Feb 14 2003, 12:23:31) [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from Bio import SeqRecord >>> sequence_iterator = SeqRecord.io.readFile(open("SwissProt/sp008")) Traceback (most recent call last): File "", line 1, in ? File "/.amd/archipel/export/archive/d08/symbiose/ybastide/src/bio/biopython/build/lib.linux-i686-2.2/Bio/FormatIO.py", line 97, in readFile raise TypeError("Could not determine file type") TypeError: Could not determine file type [OK, there are two Swissprot parsers. Erm, why */build/lib-*/Bio/FormatIO.py? It's certainly not in my path :)] >>> sequence_iterator = SeqRecord.io.readFile(open("SwissProt/sp008"), format="swissprot/40") >>> sequence_iterator.next() Traceback (most recent call last): File "", line 1, in ? File "/.amd/archipel/export/archive/d08/symbiose/ybastide/src/bio/biopython/build/lib.linux-i686-2.2/Bio/FormatIO.py", line 13, in next x = self.obj.next() File "/local/lib/python2.2/site-packages/Martel/IterParser.py", line 76, in iterateFile self.record_parser.parseString(rec) File "/local/lib/python2.2/site-packages/Martel/Parser.py", line 366, in parseString self._err_handler.fatalError(result) File "/local/lib/python2.2/xml/sax/handler.py", line 38, in fatalError raise exception Martel.Parser.ParserPositionException: error parsing at or beyond character 0 Regards, yves From jchang at jeffchang.com Thu Jul 3 01:28:21 2003 From: jchang at jeffchang.com (Jeffrey Chang) Date: Sat Mar 5 14:43:23 2005 Subject: [Biopython-dev] FormatIO and SwissProt In-Reply-To: <3F031061.6040000@irisa.fr> Message-ID: <2927C98B-AD17-11D7-96A1-000A956845CE@jeffchang.com> On Wednesday, July 2, 2003, at 10:03 AM, Yves Bastide wrote: > Hi, > > FormatIO doesn't seem to handle SwissProt files well... > > bionix:~/src/bio/biopython/Tests% python > Python 2.2.2 (#1, Feb 14 2003, 12:23:31) > [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> from Bio import SeqRecord >>>> sequence_iterator = SeqRecord.io.readFile(open("SwissProt/sp008")) > Traceback (most recent call last): > File "", line 1, in ? > File > "/.amd/archipel/export/archive/d08/symbiose/ybastide/src/bio/ > biopython/build/lib.linux-i686-2.2/Bio/FormatIO.py", line 97, in > readFile > raise TypeError("Could not determine file type") > TypeError: Could not determine file type > > [OK, there are two Swissprot parsers. Erm, why > */build/lib-*/Bio/FormatIO.py? > It's certainly not in my path :)] Is this related to the patch you sent in? This also fails on my system, but the path points to my usual python path (i.e. not ../build...). And yes, you've hit the problem right on the nose. There are two Swiss-Prot parsers. The FormatIO one is still considered experimental, and is not maintained as well. I'd recommend using the Bio/SwissProt/SProt parser instead. Jeff From Yves.Bastide at irisa.fr Thu Jul 3 05:43:28 2003 From: Yves.Bastide at irisa.fr (Yves Bastide) Date: Sat Mar 5 14:43:23 2005 Subject: [Biopython-dev] FormatIO and SwissProt In-Reply-To: <2927C98B-AD17-11D7-96A1-000A956845CE@jeffchang.com> References: <2927C98B-AD17-11D7-96A1-000A956845CE@jeffchang.com> Message-ID: <3F03FAC0.6080600@irisa.fr> Jeffrey Chang wrote: > On Wednesday, July 2, 2003, at 10:03 AM, Yves Bastide wrote: > >> Hi, >> >> FormatIO doesn't seem to handle SwissProt files well... >> >> bionix:~/src/bio/biopython/Tests% python >> Python 2.2.2 (#1, Feb 14 2003, 12:23:31) >> [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>>>> from Bio import SeqRecord >>>>> sequence_iterator = SeqRecord.io.readFile(open("SwissProt/sp008")) >> >> Traceback (most recent call last): >> File "", line 1, in ? >> File "/.amd/archipel/export/archive/d08/symbiose/ybastide/src/bio/ >> biopython/build/lib.linux-i686-2.2/Bio/FormatIO.py", line 97, in >> readFile >> raise TypeError("Could not determine file type") >> TypeError: Could not determine file type >> >> [OK, there are two Swissprot parsers. Erm, why >> */build/lib-*/Bio/FormatIO.py? >> It's certainly not in my path :)] > > > Is this related to the patch you sent in? This also fails on my > system, but the path points to my usual python path (i.e. not > ../build...). Strange. No, don't see how it could be because of my patch: I didn't use run_test nor play with sys.path > > And yes, you've hit the problem right on the nose. There are two > Swiss-Prot parsers. The FormatIO one is still considered experimental, > and is not maintained as well. I'd recommend using the > Bio/SwissProt/SProt parser instead. There are three SP parsers: Bio/SwissProt/SProt and two for FormatIO (../Bio/expressions/swissprot/sprot{38,40}.py) I'd like to use FormatIO because 1. It's cool to use the same code whether I'm accessing nr or sprot or something else 2. Bio.SeqRecord: to insert into a database. One can't get a Bio.SeqRecord from SProt, I think About GenBank: GenBank.FeatureParser uses a nice Martel parser, FormatIO an experimental-unmaintened one; couldn't FormatIO use the good one? (OTOH Bio.SwissProt.SProt is not Martel-based) > > Jeff yves From jchang at jeffchang.com Fri Jul 4 02:53:12 2003 From: jchang at jeffchang.com (Jeffrey Chang) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] FormatIO and SwissProt In-Reply-To: <3F03FAC0.6080600@irisa.fr> Message-ID: <2DA5EE5C-ADEC-11D7-BB3A-000A956845CE@jeffchang.com> On Thursday, July 3, 2003, at 02:43 AM, Yves Bastide wrote: > Jeffrey Chang wrote: >> On Wednesday, July 2, 2003, at 10:03 AM, Yves Bastide wrote: [SwissProt in FormatIO fails on SwissProt file] >> And yes, you've hit the problem right on the nose. There are two >> Swiss-Prot parsers. The FormatIO one is still considered >> experimental, and is not maintained as well. I'd recommend using >> the Bio/SwissProt/SProt parser instead. > > There are three SP parsers: Bio/SwissProt/SProt and two for FormatIO > (../Bio/expressions/swissprot/sprot{38,40}.py) > > I'd like to use FormatIO because > > 1. It's cool to use the same code whether I'm accessing nr or sprot or > something else > > 2. Bio.SeqRecord: to insert into a database. One can't get a > Bio.SeqRecord from SProt, I think Yes, both are excellent points. Andrew started the framework for Bio.expressions and started to populate it with some parsers. However, he soon got busy with other things (like EUtils). We really need someone to pick up work on this (hint, hint :), before we can really start pushing it for mainstream use. > About GenBank: > GenBank.FeatureParser uses a nice Martel parser, FormatIO an > experimental-unmaintened one; couldn't FormatIO use the good one? > (OTOH Bio.SwissProt.SProt is not Martel-based) Yes, this has been discussed before. Someone needs to migrate the code, which will require some work, I think. The Bio.SwissProt.SProt parser pre-dates Martel. Jeff From bugzilla-daemon at portal.open-bio.org Mon Jul 14 21:45:38 2003 From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon@portal.open-bio.org) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] [Bug 1470] New: KDTree init error Message-ID: <200307150145.h6F1jcOV014479@localhost.localdomain> http://bugzilla.bioperl.org/show_bug.cgi?id=1470 Summary: KDTree init error Product: Biopython Version: 1.10 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Main Distribution AssignedTo: biopython-dev@biopython.org ReportedBy: yuji@pachbell.harvard.edu KDTree fail to initilize during loading of Numeric Python modules. KDTree/__init__.py raise an module import error on line 4: from RandomArray import * Simply comment out this line seems to solve the problem. System: Python2.2 Numberic Python 23.0 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From mdehoon at ims.u-tokyo.ac.jp Fri Jul 18 03:46:40 2003 From: mdehoon at ims.u-tokyo.ac.jp (Michiel Jan Laurens de Hoon) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] Bio.Cluster In-Reply-To: <3EEA4BC3.2080906@burnham.org> References: <3EE80536.5010808@ims.u-tokyo.ac.jp> <3EEA4BC3.2080906@burnham.org> Message-ID: <3F17A5E0.8040401@ims.u-tokyo.ac.jp> I have added an option to do hierarchical clustering based on the distance matrix directly. The new version in in Biopython's CVS. To apply hierarchical clustering to the gene expression data, use treecluster(my_matrix, ...) or treecluster(data=my_matrix, ...) To do hierarchical clustering on the distance matrix directly, use treecluster(distancematrix=my_distance_matrix, ...) where my_distance_matrix is a 2D Numpy array which is symmetric and has zeros on the diagonal (though the code does not check for it). This works for pairwise single-, maximum-, and average-linkage, but not for pairwise centroid-linkage, for which you would need the original gene expression data. I had to make some modifications in the Python <-> C interface for this, which tends to be error prone. If you find any bugs, please let me know. --Michiel. Iddo Friedberg wrote: > Dear Michiel, > > I just looked at the manual for Bio.Cluster (very well written, BTW). Is > there a way to do a k-means clustering (or other) based on a distance > matrix, rather than on the gene expression vector data? The data i am > trying to cluster teh structural similarity of protein structure > fragments, and as such already appears in the matrix form. > > Thanks, > > ./I > > > > Michiel Jan Laurens de Hoon wrote: > >> Dear biopython developers, >> >> I have added Bio.Cluster to the Biopython CVS. Bio.Cluster contains >> clustering techniques for gene expression data (hierarchical, k-means, >> and SOMs); most routines are written in C with a Python wrapper. This >> package also exists separately as Pycluster. >> >> The Python and C source code is in Bio/Cluster; I have also added >> Bio.Cluster to setup.py. >> >> In case you want to try this package, there is a manual at >> http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/cluster.pdf >> (replace "from Pycluster import *" by "from Bio.Cluster import *") and >> a sample data set at >> http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/demo.txt. >> Please let me know if you find any problems with this package. >> >> --Michiel. >> > -- Michiel de Hoon, Assistant Professor University of Tokyo, Institute of Medical Science Human Genome Center 4-6-1 Shirokane-dai, Minato-ku Tokyo 108-8639 Japan http://bonsai.ims.u-tokyo.ac.jp/~mdehoon From idoerg at burnham.org Fri Jul 18 12:23:08 2003 From: idoerg at burnham.org (Iddo Friedberg) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] Bio.Cluster In-Reply-To: <3F17A5E0.8040401@ims.u-tokyo.ac.jp> References: <3EE80536.5010808@ims.u-tokyo.ac.jp> <3EEA4BC3.2080906@burnham.org> <3F17A5E0.8040401@ims.u-tokyo.ac.jp> Message-ID: <3F181EEC.3090101@burnham.org> Thanks! That looks extremely useful. One comment (just from reading your email, I haven't looked at this yet): if the data in the matrix is very sparse, then a NumPy array would seem redundant in the sense that most of it will be zeros, and the user wil be trying to pass a huge data structure, in which most of the data is superfluous. Or am I getting something wrong here? Thanks! Iddo Michiel Jan Laurens de Hoon wrote: > I have added an option to do hierarchical clustering based on the > distance matrix directly. The new version in in Biopython's CVS. To > apply hierarchical clustering to the gene expression data, use > > treecluster(my_matrix, ...) > > or > > treecluster(data=my_matrix, ...) > > To do hierarchical clustering on the distance matrix directly, use > > treecluster(distancematrix=my_distance_matrix, ...) > > where my_distance_matrix is a 2D Numpy array which is symmetric and has > zeros on the diagonal (though the code does not check for it). This > works for pairwise single-, maximum-, and average-linkage, but not for > pairwise centroid-linkage, for which you would need the original gene > expression data. > > I had to make some modifications in the Python <-> C interface for this, > which tends to be error prone. If you find any bugs, please let me know. > > --Michiel. > > Iddo Friedberg wrote: > >> Dear Michiel, >> >> I just looked at the manual for Bio.Cluster (very well written, BTW). >> Is there a way to do a k-means clustering (or other) based on a >> distance matrix, rather than on the gene expression vector data? The >> data i am trying to cluster teh structural similarity of protein >> structure fragments, and as such already appears in the matrix form. >> >> Thanks, >> >> ./I >> >> >> >> Michiel Jan Laurens de Hoon wrote: >> >>> Dear biopython developers, >>> >>> I have added Bio.Cluster to the Biopython CVS. Bio.Cluster contains >>> clustering techniques for gene expression data (hierarchical, >>> k-means, and SOMs); most routines are written in C with a Python >>> wrapper. This package also exists separately as Pycluster. >>> >>> The Python and C source code is in Bio/Cluster; I have also added >>> Bio.Cluster to setup.py. >>> >>> In case you want to try this package, there is a manual at >>> http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/cluster.pdf >>> (replace "from Pycluster import *" by "from Bio.Cluster import *") >>> and a sample data set at >>> http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/cluster/demo.txt. >>> Please let me know if you find any problems with this package. >>> >>> --Michiel. >>> >> > -- Iddo Friedberg, Ph.D. The Burnham Institute 10901 N. Torrey Pines Rd. La Jolla, CA 92037 USA Tel: +1 (858) 646 3100 x3516 Fax: +1 (858) 646 3171 http://ffas.ljcrf.edu/~iddo From bartek at rezolwenta.eu.org Fri Jul 18 12:45:02 2003 From: bartek at rezolwenta.eu.org (Bartek Wilczynski) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] checker_function for the options in bio.application.abstractCommandline Message-ID: <1058546702.3f18240e3bbdd@imp.rezolwenta.eu.org> Hello, I think, there's something not exactly consistent about the parameter setting in AbstractCommandline class. The problem i see is the following code in the set_parameter method: if parameter.checker_function is not None: paramater.checker_function(value) parameter.value = value if we put it together with the documentation of a checker_function: o checker_function -- a reference to a function that will determine if a given value is valid for this parameter. it is at least confusing. I'm not sure, whether the author meant checker_function to raise an exception when the parameter is not valid, or he just forgot to put the value assignement into another if-then statement with the result of checker_function as condition, but I would really appreciate if someone made it more clear. I would rather opt for the if-then statement, because it allows me to write simple and self-explanatory checker functions like lambda x : isinstance(x,int) and not to bother with raising the exception. the code in the set_parameter could look then like: if parameter.checker_function is not None: if paramater.checker_function(value): parameter.value = value else: raise ValueError("Invalid parameter value " + repr(value) + " for parameter " + name) -- regards Bartek Wilczy?ski From idoerg at burnham.org Fri Jul 18 12:44:54 2003 From: idoerg at burnham.org (Iddo Friedberg) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] [Fwd: O'Reilly Life Science Informatics Conference: Call For Participation] Message-ID: <3F182406.2040007@burnham.org> Hi all, O'Reilly is holding another Bioinformatics conference. They have a slot for a Biopython presentation. Free admission to speakers. Any takers? Iddo -------- Original Message -------- Subject: O'Reilly Life Science Informatics Conference: Call For Participation Date: Thu, 17 Jul 2003 16:27:01 -0700 From: O'Reilly Conferences To: idoerg Call For Participation: The 2004 O'Reilly Life Science Informatics Conference February 9-12, 2004 Westin Horton Plaza, San Diego, CA, USA http://conferences.oreilly.com/lsicon/ With two successful conferences focused on bioinformatics behind us, O'Reilly & Associates is putting a new twist on the 2004 event: we're expanding its scope to reflect the evolutionary changes happening in the field of life science informatics. If you're a biologist, computer scientist, software engineer, mathematician, or an expert in another related field, we invite you to submit proposals to lead tutorial and conference sessions at the 2004 O'Reilly Life Science Informatics Conference. Proposals are due September 1, 2003. The O'Reilly Life Science Informatics Conference brings together practitioners from biology, molecular biology, computer science, pharmacology, medicine, software engineering, chemistry, and mathematics for four days of information exchange, learning, and fun. The conference begins with one day of tutorials, providing background information or deep coverage of important issues in life science informatics. Three days of conference sessions follow, exploring topics in life science--from the fundamental levels to the advanced-- and highlighting the technologies, techniques, and tools used to understand and analyze biological data. Confirmed keynote presenters include Howard Cash of Gene Codes Corporation and Thure Etzold of LION bioscience Ltd. Since practicality is a conference theme, we'd particularly like to see proposals that highlight case studies, best practices for a tool or system, and fundamental skills. We'd also like to learn from things that didn't work for you. Topics of specific interest are systems biology, drug discovery, advanced sequence analysis, cheminformatics and chemogenomics, biomedical informatics, open source efforts, ontologies, controlled vocabularies, taxonomies, standards, and tools and techniques. The O'Reilly Life Science Informatics Conference will also feature a poster session, for which we are accepting proposals. For complete details on specific topics and areas of interest, and to submit a proposal, go to: http://conferences.oreilly.com/lsicon/ Details from last year's O'Reilly Bioinformatics Technology Conference can be found at: http://conferences.oreillynet.com/bio2003/ Check out news from last year's O'Reilly Bioinformatics Technology Conference: http://www.oreillynet.com/biocon2003/ For information on exhibition and sponsorship opportunities at the conference, contact Andrew Calvo at (707) 827-7176, or andrewc@oreilly.com. ******************************************************************** If you want to cancel an O'Reilly Network newsletter subscription, go to http://elists.oreilly.com/ and de-select any newsletters you no longer wish to receive. For assistance, email help@oreillynet.com ******************************************************************** -- Iddo Friedberg, Ph.D. The Burnham Institute 10901 N. Torrey Pines Rd. La Jolla, CA 92037 USA Tel: +1 (858) 646 3100 x3516 Fax: +1 (858) 646 3171 http://ffas.ljcrf.edu/~iddo -- Iddo Friedberg, Ph.D. The Burnham Institute 10901 N. Torrey Pines Rd. La Jolla, CA 92037 USA Tel: +1 (858) 646 3100 x3516 Fax: +1 (858) 646 3171 http://ffas.ljcrf.edu/~iddo From chapmanb at uga.edu Fri Jul 18 13:51:29 2003 From: chapmanb at uga.edu (Brad Chapman) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] checker_function for the options in bio.application.abstractCommandline In-Reply-To: <1058546702.3f18240e3bbdd@imp.rezolwenta.eu.org> References: <1058546702.3f18240e3bbdd@imp.rezolwenta.eu.org> Message-ID: <20030718175129.GB69411@evostick.agtec.uga.edu> Hi Bartek; > I think, there's something not exactly consistent about the > parameter setting in AbstractCommandline class. [...] > I'm not sure, whether the author meant checker_function to > raise an exception when the parameter is not valid, or he > just forgot to put the value assignement into another if-then > statement with the result of checker_function as condition, but > I would really appreciate if someone made it more clear. > > I would rather opt for the if-then statement, because it allows > me to write simple and self-explanatory checker functions I can definitely see how this would be useful. Philosophically, I like the raise an exception approach better (and is actually what I intended when I wrote the code), but there is really no reason why we can't support both ways. What do you think about the attached patch, which clears up the documentation a bit and adds support for having a 0/1 return value specifying whether the value is good? I haven't really tested it out yet (but will before I check it in, promise :-), and just wanted to make sure it fulfilled what you were looking for. Thanks much for the comments on the Application commandline stuff. This is something I worked up until it was decent enough to use, but haven't had enough time to make it actually be good. If you have any other patches/comments, they'd be gratefully accepted. Thanks again. Brad -------------- next part -------------- Index: __init__.py =================================================================== RCS file: /home/repository/biopython/biopython/Bio/Application/__init__.py,v retrieving revision 1.1 diff -c -r1.1 __init__.py *** __init__.py 14 Dec 2001 13:04:22 -0000 1.1 --- __init__.py 18 Jul 2003 17:53:02 -0000 *************** *** 89,103 **** for parameter in self.parameters: if name in parameter.names: if value is not None: ! if parameter.checker_function is not None: ! paramater.checker_function(value) ! parameter.value = value parameter.is_set = 1 set_option = 1 if set_option == 0: raise ValueError("Option name %s was not found." % name) class _AbstractParameter: """A class to hold information about a parameter for a commandline. --- 89,117 ---- for parameter in self.parameters: if name in parameter.names: if value is not None: ! self._check_value(value, name, parameter.checker_function) parameter.value = value parameter.is_set = 1 set_option = 1 if set_option == 0: raise ValueError("Option name %s was not found." % name) + + def _check_value(self, value, name, check_function): + """Check whether the given value is valid. + + This uses the passed function 'check_function', which can either + return a [0, 1] (bad, good) value or raise an error. Either way + this function will raise an error if the value is not valid, or + finish silently otherwise. + """ + if check_function is not None: + is_good = check_function(value) + if is_good in [0, 1]: # if we are dealing with a good/bad check + if not(is_good): + raise ValueError( + "Invalid parameter value %r for parameter %s" % + (value, name)) class _AbstractParameter: """A class to hold information about a parameter for a commandline. *************** *** 118,124 **** include 'input', 'output', 'file' o checker_function -- a reference to a function that will determine ! if a given value is valid for this parameter. o description -- a description of the option. --- 132,140 ---- include 'input', 'output', 'file' o checker_function -- a reference to a function that will determine ! if a given value is valid for this parameter. This function can either ! raise an error when given a bad value, or return a [0, 1] decision on ! whether the value is correct. o description -- a description of the option. From jchang at smi.stanford.edu Mon Jul 21 01:28:36 2003 From: jchang at smi.stanford.edu (Jeffrey Chang) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] Biopython wiki Message-ID: <2D8DC486-BB3C-11D7-8B37-000A956845CE@smi.stanford.edu> Does anyone know what happened to the Biopython wiki when we changed servers? Is it still alive somewhere, or has it been disabled? Can we still get to the content? My instructions for building a new biopython release is on it, and I'd like to retrieve it... Jeff From chapmanb at uga.edu Mon Jul 21 18:25:01 2003 From: chapmanb at uga.edu (Brad Chapman) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] Biopython wiki In-Reply-To: <2D8DC486-BB3C-11D7-8B37-000A956845CE@smi.stanford.edu> References: <2D8DC486-BB3C-11D7-8B37-000A956845CE@smi.stanford.edu> Message-ID: <20030721222501.GD36660@evostick.agtec.uga.edu> Hey Jeff; > Does anyone know what happened to the Biopython wiki when we changed > servers? Is it still alive somewhere, or has it been disabled? Can we > still get to the content? My instructions for building a new biopython > release is on it, and I'd like to retrieve it... It's still alive on the biojava namespace (I guess biojava is over on the old servers): http://biojava.org/wiki/html/BioPython/FrontPage.html Grab what you like! Brad From jchang at smi.stanford.edu Tue Jul 22 01:52:52 2003 From: jchang at smi.stanford.edu (Jeffrey Chang) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] biopython release redux Message-ID: Hello Everybody, I'm back from my travels, so it's time to get back to building the biopython release. It sounds like we're almost there, so I'm going to try to get it out by the end of the week. Please let me know immediately if you're working on something, and the CVS repository is in an unreleasable state! The regression tests seem to work for me (except for 1). Please check it on your system and report any problems. test_BioSQL is failing for me. It can import BioSQL, but has trouble loading records in the database. I don't believe I actually have a database running on this system. Should the test be skipped if the database or BioSQL schema can't be found? [sophie:~/remotecvs/biopython/Tests] jchang% python run_tests.py test_BioSQL.py test_BioSQL ... FAIL ====================================================================== FAIL: test_BioSQL ---------------------------------------------------------------------- Traceback (most recent call last): File "run_tests.py", line 148, in runTest self.runSafeTest() File "run_tests.py", line 185, in runSafeTest expected_handle) File "run_tests.py", line 285, in compare_output assert expected_line == output_line, \ AssertionError: Output : 'Load SeqRecord objects into a BioSQL database. ... ERROR\n' Expected: 'Load SeqRecord objects into a BioSQL database. ... ok\n' ---------------------------------------------------------------------- Ran 1 tests in 0.157s FAILED (failures=1) Jeff From johj at pacbell.net Tue Jul 22 20:26:06 2003 From: johj at pacbell.net (Joh Johannsen) Date: Sat Mar 5 14:43:24 2005 Subject: [Biopython-dev] does something already do this? Message-ID: <004301c350b1$01ef2870$74dd7942@library> Hi, I'm new to biopython, been looking at the tutorial, trying out examples, and tried to code something that made sense to me, but I'm wondering if such a thing exists and I just haven't found it. There are some cases, like the NCBI.query method where parsable results are embedded in HTML. For example, on page 17 of the tutorial, there is an NCBI.query that gets results in FASTA format, then displays the HTML in a browser. And on page 13, there is an example that iterates over FASTA records from a "FASTA-only" formatted file. So I made something that merged these two into one by creating a file handle-like object that has "readline" method that returns only the FASTA formatted lines (extracted from the HTML). So it looks like: result_handle = NCBI.query(...) xtractor = TextExtractor( result_handle, "
", "
" ) # because
 is how FASTA is delimited in this case
parser = Fasta.RecordParser()
iterator = Fasta.iterator( parser, xtractor )

Anyway, the whole point of doing this is to not see HTML.  I'm totally not sure if the above makes sense as a general approach, but it is fairly easy in cases where delimiters are identifiable and the desired format is embedded in HTML.

So my question is, if I don't want to see the HTML, and to see only the python objects, is this problem totally solved?  Or are there areas like the above where the biopython methods return only HTML?

Regards,

JJ

From verma at cc.helsinki.fi  Wed Jul 23 07:07:40 2003
From: verma at cc.helsinki.fi (Abhinav Verma)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] errata in cookbook
Message-ID: 


in cookbook, section 3.3.2, we have

>>from Bio.Medline import PubMed

but i got an error while trying this statement, and found out that rather

>>from Bio import PubMed

works.

I am working on a linux platform, and just felt that this might be a
typographical error. Would be fine for new users.

cheers,
Abhinav.

From Y.Benita at pharm.uu.nl  Wed Jul 23 10:38:51 2003
From: Y.Benita at pharm.uu.nl (Yair Benita)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] EMBL parser
Message-ID: 

I was wondering why the EMBL parser is in the expression module and not in a
separate EMBL module which allows to parse records. It is also strange as it
does not have any functions. How is this module used to parse EMBL records?

Yair
-- 
Yair Benita
Pharmaceutical Proteomics
Utrecht University 


From jchang at jeffchang.com  Wed Jul 23 11:37:11 2003
From: jchang at jeffchang.com (Jeffrey Chang)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] errata in cookbook
In-Reply-To: 
Message-ID: <86E599D4-BD23-11D7-840A-000A956845CE@jeffchang.com>

Thanks.  I've fixed these.

Jeff



On Wednesday, July 23, 2003, at 04:07  AM, Abhinav Verma wrote:

>
> in cookbook, section 3.3.2, we have
>
>>> from Bio.Medline import PubMed
>
> but i got an error while trying this statement, and found out that 
> rather
>
>>> from Bio import PubMed
>
> works.
>
> I am working on a linux platform, and just felt that this might be a
> typographical error. Would be fine for new users.
>
> cheers,
> Abhinav.
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev@biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev


From jchang at jeffchang.com  Wed Jul 23 11:44:42 2003
From: jchang at jeffchang.com (Jeffrey Chang)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] EMBL parser
In-Reply-To: 
Message-ID: <93818E1E-BD24-11D7-840A-000A956845CE@jeffchang.com>

It is a Martel expression, so the functions are in the Martel package.  
The file just contains a description of the EMBL format, which Martel 
uses to construct a parser.  There's a "format" variable in the module 
that you can use to create the parser in the usual Martel way:
     parser = embl65.format.make_parser()
     parser.setContentHandler(saxutils.XMLGenerator())
     parser.parseFile(open(FILENAME))

Jeff



On Wednesday, July 23, 2003, at 07:38  AM, Yair Benita wrote:

> I was wondering why the EMBL parser is in the expression module and 
> not in a
> separate EMBL module which allows to parse records. It is also strange 
> as it
> does not have any functions. How is this module used to parse EMBL 
> records?
>
> Yair
> -- 
> Yair Benita
> Pharmaceutical Proteomics
> Utrecht University
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev@biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev


From djaeggi at imim.es  Wed Jul 23 12:29:29 2003
From: djaeggi at imim.es (Daniel Jaeggi)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] BIND XML parser
Message-ID: <200307231829.29551.djaeggi@imim.es>

Hello!

We're trying to parse BIND XML files. I know that a biopython version doesn't 
exist, but does anyone have one (written in any language) before we write our 
own. It would save a lot of time - the BIND specification looks really dense!

Thanks,

Daniel


From bartek at rezolwenta.eu.org  Wed Jul 23 14:53:19 2003
From: bartek at rezolwenta.eu.org (Bartek Wilczynski)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Support for standalone version of AlignACE motif
	search program
Message-ID: <1058986399.3f1ed99f8c4ed@imp.rezolwenta.eu.org>

Hello All,

I have written a wrapper for standalone version of AlignACE software.
(http://atlas.med.harvard.edu/) It's still far from perfect, but it serves well
for me.

It includes the Application class, AlignAceStandalone.AlignAce() function to run
it, Scanner and Parser. As a result of the code like this:

from Bio.AlignAce.AlignAceStandalone import AlignAce
from Bio.AlignAce.Parser import AlignAceParser

result = AlignAce("test.seq")
motifs = AlignAceParser().parse(result[1])

you have set of motifs found by AlignAce in the sequences from the FASTA file
test.seq. 

It assumes that the AlignACE executable is in your path, and the test.seq file
is in current directory.

This module includes also the implementation of a motif object. I'm not sure if
my implementation is general enough to become a BioPython structure, but I think
there's a need for something like that. Probably it should be called
Bio.SeqMotif and include different things (more than my simplistic idea).

I would be really glad if You will find it interesting enough to include it to
the biopython cvs, any comments/remarks are more than welcome.  
-- 
regards
   Bartek Wilczy?ski




-------------- next part --------------
A non-text attachment was scrubbed...
Name: AlignAce.tar.gz
Type: application/x-gzip
Size: 14822 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/biopython-dev/attachments/20030723/dd0de249/AlignAce.tar.bin
From jefftc at stanford.edu  Wed Jul 23 16:40:00 2003
From: jefftc at stanford.edu (Jeffrey Chang)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Support for standalone version of AlignACE motif
	search program
In-Reply-To: <1058986399.3f1ed99f8c4ed@imp.rezolwenta.eu.org>
Message-ID: 

Hey Bartek,

Your package looks very nice.  I'd be happy to check it in under 
Bio.AlignAce.  I am getting ready to put out a release, so it will have 
to be done after that goes out.

Please take a look at the documentation for contributing code to 
Biopython the website at:
http://www.biopython.org/docs/developer/contrib.html

In particular, please read the "Submitting Code" section and make sure 
you agree with it.  Mostly, it is just to make sure that you want to 
support your code, and that you agree to the Biopython license.  Let me 
know if everything seems good to you.

Jeff


On Wednesday, July 23, 2003, at 11:53  AM, Bartek Wilczynski wrote:

> Hello All,
>
> I have written a wrapper for standalone version of AlignACE software.
> (http://atlas.med.harvard.edu/) It's still far from perfect, but it 
> serves well
> for me.
>
> It includes the Application class, AlignAceStandalone.AlignAce() 
> function to run
> it, Scanner and Parser. As a result of the code like this:
>
> from Bio.AlignAce.AlignAceStandalone import AlignAce
> from Bio.AlignAce.Parser import AlignAceParser
>
> result = AlignAce("test.seq")
> motifs = AlignAceParser().parse(result[1])
>
> you have set of motifs found by AlignAce in the sequences from the 
> FASTA file
> test.seq.
>
> It assumes that the AlignACE executable is in your path, and the 
> test.seq file
> is in current directory.
>
> This module includes also the implementation of a motif object. I'm 
> not sure if
> my implementation is general enough to become a BioPython structure, 
> but I think
> there's a need for something like that. Probably it should be called
> Bio.SeqMotif and include different things (more than my simplistic 
> idea).
>
> I would be really glad if You will find it interesting enough to 
> include it to
> the biopython cvs, any comments/remarks are more than welcome.
> -- 
> regards
>    Bartek Wilczy?ski
>
>
>
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev@biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev



From bartek at rezolwenta.eu.org  Wed Jul 23 17:18:23 2003
From: bartek at rezolwenta.eu.org (Bartek Wilczynski)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Support for standalone version of AlignACE motif
	search program
In-Reply-To: 
References: 
Message-ID: <1058995103.3f1efb9fdce01@imp.rezolwenta.eu.org>

Quoting Jeffrey Chang :

> Hey Bartek,
> 
> Your package looks very nice.  I'd be happy to check it in under 
> Bio.AlignAce.  I am getting ready to put out a release, so it will have 
> to be done after that goes out.
> 
> Please take a look at the documentation for contributing code to 
> Biopython the website at:
> http://www.biopython.org/docs/developer/contrib.html
> 
> In particular, please read the "Submitting Code" section and make sure 
> you agree with it.  Mostly, it is just to make sure that you want to 
> support your code, and that you agree to the Biopython license.  Let me 
> know if everything seems good to you.
> 
> Jeff
> 
I do agree with the license and I'd be happy to support it.

The other thing is that I'll probably be working with other motif Finding tools
as well, and here arises the need of the general class for sequence motifs.
There exists a TFBS module for bioperl (http://forkhead.cgb.ki.se/TFBS/), and it
serves well for my inspiration , but I think that a sequence motif is something
more general than just Transcription Factor Binding Sites. It would be really
great if someone would help me with other possible uses for the sequence motifs. 

looking forward to any comments
   Bartek Wilczy?ski



From Y.Benita at pharm.uu.nl  Thu Jul 24 10:23:19 2003
From: Y.Benita at pharm.uu.nl (Yair Benita)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
Message-ID: 

I am trying to use Martel to make a parser but something appears to be
wrong.
First, the test fails after building:
###### running tests in test_IterParser ###############
---> I skip all the line until the last:
  File "/Volumes/Applications/CVS/biopython/Martel/LAX.py", line 101, in
__getattr__
    raise AttributeError(name)
AttributeError: data

I think this is something in the test file and not in the Martel code
because all my other Martel scripts work.

Second, trying to run the same script as Andrew wrote in the Readme
(attached), I only get:


Basically nothing is executed after the command: parser.parse(open(File))

Is something wrong on my system or something wrong with the Martel code?
Could anyone try to run the above script?
Thanks,
Yair
-- 
Yair Benita
Pharmaceutical Proteomics
Utrecht University

-------------- next part --------------
Skipped content of type multipart/appledouble
From jchang at jeffchang.com  Thu Jul 24 12:15:03 2003
From: jchang at jeffchang.com (Jeffrey Chang)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
In-Reply-To: 
Message-ID: 

Yep, it looks like something might be wrong with Martel now.

Andreas, this looks like it might be related to the switch over to 
using a dict object?  Could you take a look at it?

Jeff


On Thursday, July 24, 2003, at 07:23  AM, Yair Benita wrote:

> I am trying to use Martel to make a parser but something appears to be
> wrong.
> First, the test fails after building:
> ###### running tests in test_IterParser ###############
> ---> I skip all the line until the last:
>   File "/Volumes/Applications/CVS/biopython/Martel/LAX.py", line 101, 
> in
> __getattr__
>     raise AttributeError(name)
> AttributeError: data
>
> I think this is something in the test file and not in the Martel code
> because all my other Martel scripts work.
>
> Second, trying to run the same script as Andrew wrote in the Readme
> (attached), I only get:
> 
>
> Basically nothing is executed after the command: 
> parser.parse(open(File))
>
> Is something wrong on my system or something wrong with the Martel 
> code?
> Could anyone try to run the above script?
> Thanks,
> Yair
> -- 
> Yair Benita
> Pharmaceutical Proteomics
> Utrecht University
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev@biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev


From andreas.kuntzagk at mdc-berlin.de  Fri Jul 25 04:30:37 2003
From: andreas.kuntzagk at mdc-berlin.de (Andreas Kuntzagk)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
In-Reply-To: 
References: 
Message-ID: <1059121772.15989.42.camel@sulawesi>

Hi,

> Andreas, this looks like it might be related to the switch over to 
> using a dict object?  Could you take a look at it?

First issue is related to dict. Appended a diff to patch this.

Would be good if setup.py in BioPython root dir would also test the
Martel tests.

> > Second, trying to run the same script as Andrew wrote in the Readme
> > (attached), I only get:
> > 
> >
> > Basically nothing is executed after the command: 
> > parser.parse(open(File))
> >
> > Is something wrong on my system or something wrong with the Martel 
> > code?
> > Could anyone try to run the above script?
Yair, do you have a file "/etc/passwd" (looks like your email is from a
Windows system)? What do you mean "nothing is executed"? Script hangs,
script returns whithout output, script throws an error?

The parser.parse works for me, but the script is failing at
doc.normalize() whith

AttributeError: 'NoneType' object has no attribute 'normalize'

I still don't know enough about the Martel infrastructure to understand
this. sax2dom.document seems to be None.

By, Andreas
-------------- next part --------------
Index: LAX.py
===================================================================
RCS file: /home/repository/biopython/biopython/Martel/LAX.py,v
retrieving revision 1.3
diff -r1.3 LAX.py
116c116
<         self.data.clear()
---
>         self.clear()
139c139
<         self.data.setdefault(tag, []).append(text)
---
>         self.setdefault(tag, []).append(text)
157c157
<         self.data.setdefault(tag, []).append( (text, attrs) )
---
>         self.setdefault(tag, []).append( (text, attrs) )
169c169
<         self.data.setdefault(tag, []).append(
---
>         self.setdefault(tag, []).append(
From greg at tyrelle.net  Sat Jul 26 02:32:44 2003
From: greg at tyrelle.net (Greg Tyrelle)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
In-Reply-To: 
References: 
Message-ID: <20030726063244.GB22134@nodalpoint.org>

*** Yair Benita wrote: 
  |Second, trying to run the same script as Andrew wrote in the Readme
  |(attached), I only get:
  |
  |
  |Basically nothing is executed after the command: parser.parse(open(File))
  |
  |Is something wrong on my system or something wrong with the Martel code?

Something in your /etc/passwd file is causing the Martel expression to
fail. The script fails on my system (OSX) because of comments in the
passwd file. I have attached a slight modification of the demo script
that deals with comments.

Was that the problem ?

_greg

-- 
Greg Tyrelle
-------------- next part --------------
import Martel
from xml.sax import saxutils,handler

def ToColon(name):
    return Martel.ToSep(name, ":")

comment = Martel.Rep(Martel.Re("^#") +Martel.ToEol())

passwd =  Martel.Rep(
              Martel.Group("record",
              ToColon("account") + ToColon("password") + ToColon("UID") + \
              ToColon("GID") + ToColon("GECOS") + ToColon("directory") + \
              Martel.ToEol("shell")))

format = Martel.Group("passwd", comment + passwd)

parser = format.make_parser()
parser.setContentHandler(saxutils.XMLGenerator())
parser.parseFile(open("/etc/passwd"))

from xml.dom import pulldom
sax2dom = pulldom.SAX2DOM()
parser.setContentHandler(sax2dom)
parser.parseFile(open("/etc/passwd"))
doc = sax2dom.document
doc.normalize()
for record in doc.getElementsByTagName("record"):
    account = record.getElementsByTagName("account")[0].firstChild.nodeValue
    shell = record.getElementsByTagName("shell")[0].firstChild.nodeValue
    print account, "uses", shell
From Y.Benita at pharm.uu.nl  Sat Jul 26 04:04:21 2003
From: Y.Benita at pharm.uu.nl (Yair Benita)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
In-Reply-To: <20030726063244.GB22134@nodalpoint.org>
Message-ID: 

on 26/7/2003 8:32, Greg Tyrelle at greg@tyrelle.net wrote:

> *** Yair Benita wrote:
> |Second, trying to run the same script as Andrew wrote in the Readme
> |(attached), I only get:
> |
> |
> |Basically nothing is executed after the command: parser.parse(open(File))
> |
> |Is something wrong on my system or something wrong with the Martel code?
> 
> Something in your /etc/passwd file is causing the Martel expression to
> fail. The script fails on my system (OSX) because of comments in the
> passwd file. I have attached a slight modification of the demo script
> that deals with comments.
> 
> Was that the problem ?
> 
> _greg
Yes, that was the problem.
The strange thing is that it does not give any error. The script basically
terminates as if everything is fine.
Thanks,
Yair
-- 
Yair Benita
Pharmaceutical Proteomics
Utrecht University



From Y.Benita at pharm.uu.nl  Sat Jul 26 04:10:53 2003
From: Y.Benita at pharm.uu.nl (Yair Benita)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
In-Reply-To: <1059121772.15989.42.camel@sulawesi>
Message-ID: 

on 25/7/2003 10:29, Andreas Kuntzagk at andreas.kuntzagk@mdc-berlin.de
wrote:

> Hi,
> 
>> Andreas, this looks like it might be related to the switch over to
>> using a dict object?  Could you take a look at it?
> 
> First issue is related to dict. Appended a diff to patch this.
> 
> Would be good if setup.py in BioPython root dir would also test the
> Martel tests.
> 
>>> Second, trying to run the same script as Andrew wrote in the Readme
>>> (attached), I only get:
>>> 
>>> 
>>> Basically nothing is executed after the command:
>>> parser.parse(open(File))
>>> 
>>> Is something wrong on my system or something wrong with the Martel
>>> code?
>>> Could anyone try to run the above script?
> Yair, do you have a file "/etc/passwd" (looks like your email is from a
> Windows system)? What do you mean "nothing is executed"? Script hangs,
> script returns whithout output, script throws an error?
> 
I do have the file, I work on Mac OS X.
The script just terminates after the command parser.parse and all the
commands after that are not executed. There is no error to suggest that
something went wrong.

> The parser.parse works for me, but the script is failing at
> doc.normalize() whith
> 
> AttributeError: 'NoneType' object has no attribute 'normalize'
> 
> I still don't know enough about the Martel infrastructure to understand
> this. sax2dom.document seems to be None.
> 
> By, Andreas
> 

Greg Tyrelle solved the problem for me (see following email), but still I
find it strange that Martel does not raise an error when the format is not
matching the file being parsed.

Yair
-- 
Yair Benita
Pharmaceutical Proteomics
Utrecht University



From jefftc at stanford.edu  Sat Jul 26 13:22:13 2003
From: jefftc at stanford.edu (Jeffrey Chang)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
In-Reply-To: <1059121772.15989.42.camel@sulawesi>
Message-ID: 

Thanks for that patch!  I've committed it, and the LAX test suite runs 
properly now.

Jeff



On Friday, July 25, 2003, at 01:29  AM, Andreas Kuntzagk wrote:

> Hi,
>
>> Andreas, this looks like it might be related to the switch over to
>> using a dict object?  Could you take a look at it?
>
> First issue is related to dict. Appended a diff to patch this.
>
> Would be good if setup.py in BioPython root dir would also test the
> Martel tests.
>
>>> Second, trying to run the same script as Andrew wrote in the Readme
>>> (attached), I only get:
>>> 
>>>
>>> Basically nothing is executed after the command:
>>> parser.parse(open(File))
>>>
>>> Is something wrong on my system or something wrong with the Martel
>>> code?
>>> Could anyone try to run the above script?
> Yair, do you have a file "/etc/passwd" (looks like your email is from a
> Windows system)? What do you mean "nothing is executed"? Script hangs,
> script returns whithout output, script throws an error?
>
> The parser.parse works for me, but the script is failing at
> doc.normalize() whith
>
> AttributeError: 'NoneType' object has no attribute 'normalize'
>
> I still don't know enough about the Martel infrastructure to understand
> this. sax2dom.document seems to be None.
>
> By, Andreas
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev@biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev


From jchang at jeffchang.com  Sat Jul 26 13:22:38 2003
From: jchang at jeffchang.com (Jeffrey Chang)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Something wrong with Martel?
In-Reply-To: <20030726063244.GB22134@nodalpoint.org>
Message-ID: 

Yep, it does seem to be messing up on eht comments.  I've updated the 
README file with your fixes.  Thanks!

Jeff


On Friday, July 25, 2003, at 11:32  PM, Greg Tyrelle wrote:

> *** Yair Benita wrote:
>   |Second, trying to run the same script as Andrew wrote in the Readme
>   |(attached), I only get:
>   |
>   |
>   |Basically nothing is executed after the command: 
> parser.parse(open(File))
>   |
>   |Is something wrong on my system or something wrong with the Martel 
> code?
>
> Something in your /etc/passwd file is causing the Martel expression to
> fail. The script fails on my system (OSX) because of comments in the
> passwd file. I have attached a slight modification of the demo script
> that deals with comments.
>
> Was that the problem ?
>
> _greg
>
> -- 
> Greg Tyrelle
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev@biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev


From andreas.kuntzagk at mdc-berlin.de  Mon Jul 28 07:24:14 2003
From: andreas.kuntzagk at mdc-berlin.de (Andreas Kuntzagk)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Patch for GenBank.Iterator
Message-ID: <1059391393.15987.64.camel@sulawesi>

to handle empty files (current version hangs in an indefinite loop)
There are probably other places whith the same problem

RCS file: /home/repository/biopython/biopython/Bio/GenBank/__init__.py,v
retrieving revision 1.41
diff -r1.41 __init__.py
126c126
<         while _handle.peekline().find("LOCUS") < 0:
---
>         while _handle.peekline() and _handle.peekline().find("LOCUS")
< 0:





From Y.Benita at pharm.uu.nl  Mon Jul 28 09:11:50 2003
From: Y.Benita at pharm.uu.nl (Yair Benita)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Martel module is missing in the 1.20 tar file
Message-ID: 

I tried to install biopython 1.20 from the tar file on the website and it
turns out that the Martel folder is missing. We used to distribute Martel
with the biopython installation. Did that change?
Yair
-- 
Yair Benita
Pharmaceutical Proteomics
Faculty of Pharmacy
Utrecht University


From jchang at jeffchang.com  Mon Jul 28 11:44:17 2003
From: jchang at jeffchang.com (Jeffrey Chang)
Date: Sat Mar  5 14:43:24 2005
Subject: [Biopython-dev] Martel module is missing in the 1.20 tar file
In-Reply-To: 
Message-ID: <5908C4E0-C112-11D7-8DDE-000A956845CE@jeffchang.com>

Yep, Martel is indeed missing.  I have overlooked this in the build.  
I'll fix this, and put out Biopython 1.21 later today.

Thanks,
Jeff



On Monday, July 28, 2003, at 06:11  AM, Yair Benita wrote:

> I tried to install biopython 1.20 from the tar file on the website and 
> it
> turns out that the Martel folder is missing. We used to distribute 
> Martel
> with the biopython installation. Did that change?
> Yair
> -- 
> Yair Benita
> Pharmaceutical Proteomics
> Faculty of Pharmacy
> Utrecht University
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev@biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev