From lueck at ipk-gatersleben.de Mon Feb 2 02:37:35 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Mon, 2 Feb 2009 08:37:35 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> Message-ID: <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> Hi Peter and the rest of the mailing list! I'm using Biopython 1.49b and Python 2.5. I tried your suggestion and changed \Blast\NCBIStandalone.py as you said: import subprocess, sys #We don't need to supply any piped input, but we setup the #pipe anyway as a work around for a python bug if this is #called from a Windows GUI program. For details, see: #http://bugs.python.org/issue1124861 blast_process = subprocess.Popen(cmd_string, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform!="win32")) blast_process.stdin.close() return blast_process.stdout, blast_process.stderr And after comipilation with py2exe it's seem to work! In addition I changed \Application\__init__.py in function generic_run \ClustalW\__init__.py in function do_alignment in the same way because I got the same error message when I used Primer3 and ClustalW. I tried up to now only on view Windows XP PC's but it's looks like the problem is solved! Finally I can release the tool for testing! Thanks to all for their help! Thanks a lot Peter and sorry for the late reply! Kind regards Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Wednesday, January 28, 2009 6:45 PM Subject: [BioPython] BLAST subprocess problem with a GUI On Tue, Jan 13, 2009 at 10:41 AM, Peter wrote: > On Tue, Jan 13, 2009 at 7:38 AM, Stefanie L?ck > wrote: >> I was a little bit to optimistic... >> >> After compilation with py2exe, blast hangs. In the log file of py2exe >> I get the following error message: >> >> Traceback (most recent call last): >> File "prim_search.pyc", line 464, in make_xml >> >> File "Bio\Blast\NCBIStandalone.pyc", line 1668, in blastall >> File "Bio\Blast\NCBIStandalone.pyc", line 1992, in _invoke_blast >> File "subprocess.pyc", line 586, in __init__ >> File "subprocess.pyc", line 681, in _get_handles >> File "subprocess.pyc", line 722, in _make_inheritable >> TypeError: an integer is required >> >> Any ideas? >> Stefanie > > Are you using Biopython 1.49? > > What version of Python are you using here? (Python 2.3 is handled a > little differently, as it does not have the subprocess module). > > Can you confirm the exact same code works fine run from Python > directly (via IDLE or the commandline?), but fails via py2exe? > > Are you running the py2exe compiled version from the Windows command > line? Can you try that, even thought you said it was a GUI program. > This might be related to the following python bug on Windows to do > with pipe redirection, http://bugs.python.org/issue1124861 > If so, I think there is a suggested work around we can try (this will > require a change to the Biopython code). > > Peter Hi Stefanie, Did you make any progress with this problem? If as I suspect the problem is the python subprocess bug http://bugs.python.org/issue1124861 then you can try the suggested work around in Biopython, by modifying the _invoke_blast function in Bio\Blast\NCBIStandalone.py file as follows: import subprocess, sys #We don't need to supply any piped input, but we setup the #pipe anyway as a work around for a python bug if this is #called from a Windows GUI program. For details, see: #http://bugs.python.org/issue1124861 blast_process = subprocess.Popen(cmd_string, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform!="win32")) blast_process.stdin.close() return blast_process.stdout, blast_process.stderr I've checked this change doesn't seem to break anything - but does it help for your GUI program? Peter From biopython at maubp.freeserve.co.uk Mon Feb 2 05:16:23 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 2 Feb 2009 10:16:23 +0000 Subject: [BioPython] BLAST subprocess problem with a GUI In-Reply-To: <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> Message-ID: <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> On Mon, Feb 2, 2009 at 7:37 AM, Stefanie L?ck wrote: > > Hi Peter and the rest of the mailing list! > > I'm using Biopython 1.49b and Python 2.5. > > I tried your suggestion and changed \Blast\NCBIStandalone.py as you said: > > import subprocess, sys > #We don't need to supply any piped input, but we setup the > #pipe anyway as a work around for a python bug if this is > #called from a Windows GUI program. For details, see: > #http://bugs.python.org/issue1124861 > blast_process = subprocess.Popen(cmd_string, > stdin=subprocess.PIPE, > stdout=subprocess.PIPE, > stderr=subprocess.PIPE, > shell=(sys.platform!="win32")) > blast_process.stdin.close() > return blast_process.stdout, blast_process.stderr > > And after comipilation with py2exe it's seem to work! In addition I changed > \Application\__init__.py in function generic_run > \ClustalW\__init__.py in function do_alignment > in the same way because I got the same error message when I used Primer3 > and ClustalW. I tried up to now only on view Windows XP PC's but it's looks > like the problem is solved! Great - I've made this change in CVS now: Blast/NCBIStandalone.py revision: 1.85 Clustalw/__init__.py revision 1.26 Application/__init__.py revision 1.9 > Finally I can release the tool for testing! Thanks to all for their help! > > Thanks a lot Peter and sorry for the late reply! > > Kind regards > Stefanie Thank you for reporting the issue, testing the change and letting us know it works. Peter From rapandey at iupui.edu Mon Feb 2 16:33:13 2009 From: rapandey at iupui.edu (Ragini Pandey) Date: Mon, 2 Feb 2009 16:33:13 -0500 Subject: [BioPython] KEGG enzyme error Message-ID: <002201c9857d$da39ff50$8eadfdf0$@edu> Hi, I am trying to parse KEGG enzyme. The parser is failing for EC 1.1.1.49 The data line where it is failing is- "DRE: 100148915 570579(wu:fj78b06)" There are several other data lines in this format. The error I am getting is: line 227, in parse key, values = data.split(":") ValueError: too many values to unpack Here is my code: import urllib from Bio.KEGG import Enzyme dataFile = open(myFile) for record in Enzyme.parse(dataFile): print record.entry Would appreciate your help on this. Thanks Ragini From idoerg at gmail.com Mon Feb 2 17:39:02 2009 From: idoerg at gmail.com (Iddo Friedberg) Date: Mon, 02 Feb 2009 14:39:02 -0800 Subject: [BioPython] 10th year Message-ID: <1233614342.25080.11.camel@lafa> I guess everybody is too busy to notice that biopython is into its 10th year now.. birthday celebrations are nine months away, Since the mailing lists start in September 1999. But I guess that some sort of party at BOSC would be nice... -- Iddo Friedberg, Ph.D. CALIT2 Atkinson Hall MC #0446 University of California San Diego 9500 Gilman Drive La Jolla, CA 92093-0446 USA +1 (858) 534-0570 http://iddo-friedberg.org -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From biopython at maubp.freeserve.co.uk Tue Feb 3 06:35:17 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Tue, 3 Feb 2009 11:35:17 +0000 Subject: [BioPython] KEGG enzyme error In-Reply-To: <002201c9857d$da39ff50$8eadfdf0$@edu> References: <002201c9857d$da39ff50$8eadfdf0$@edu> Message-ID: <320fb6e00902030335u372c23d2v32e841c33c738b22@mail.gmail.com> On Mon, Feb 2, 2009 at 9:33 PM, Ragini Pandey wrote: > Hi, > > I am trying to parse KEGG enzyme. The parser is failing for EC 1.1.1.49 > The data line where it is failing is- > "DRE: 100148915 570579(wu:fj78b06)" > There are several other data lines in this format. > > The error I am getting is: > line 227, in parse > key, values = data.split(":") > ValueError: too many values to unpack The problem is the code expects a single ":" character which can be used to split the string into the key ("DRE") and the data, here "100148915 570579(wu:fj78b06)" but the extra ":" is causing the split to give three parts. Try editing that line to read: key, values = data.split(":",1) > Here is my code: > > import urllib > from Bio.KEGG import Enzyme > dataFile = open(myFile) > for record in Enzyme.parse(dataFile): > print record.entry > > Would appreciate your help on this. Which file exactly are you using? The problem data line you gave doesn't match http://www.expasy.ch/enzyme/1.1.1.49.txt Peter From biopython at maubp.freeserve.co.uk Tue Feb 3 13:14:03 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Tue, 3 Feb 2009 18:14:03 +0000 Subject: [BioPython] KEGG enzyme error In-Reply-To: <000b01c98629$4419c350$cc4d49f0$@edu> References: <002201c9857d$da39ff50$8eadfdf0$@edu> <320fb6e00902030335u372c23d2v32e841c33c738b22@mail.gmail.com> <000b01c98629$4419c350$cc4d49f0$@edu> Message-ID: <320fb6e00902031014y57735fd1s82e86af2229c0cee@mail.gmail.com> On Tue, Feb 3, 2009 at 6:00 PM, Ragini Pandey wrote: > > Hi Peter, > > The file I am trying to parse is > ftp://ftp.genome.jp/pub/kegg/ligand/enzyme/enzyme > > Thanks > Ragini Hi Ragini, I was able to quickly test my suggested fix on that file, and it seems to resolve the problem. I've checked this into CVS, see Bio/KEGG/Enzyme/__init__.py revision 1.12 (which should be visible on the website in an hour or so), http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/KEGG/Enzyme/__init__.py?cvsroot=biopython You should be able to edit your Bio/KEGG/Enzyme/__init__.py file by hand, or you could update it by downloading the new one from CVS. Ask for help if you need clearer instructions... Let us know if you have any other problems with KEGG. Thanks, Peter From dalloliogm at gmail.com Tue Feb 3 22:01:51 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Wed, 4 Feb 2009 04:01:51 +0100 Subject: [BioPython] a template for unittests in biopython Message-ID: <5aa3b3570902031901q5450bf43nfeb23ded1c70608c@mail.gmail.com> Hi people, I have posted here: - http://github.com/dalloliogm/bio-test-datasets-repository/blob/master/templates/biopython/biotest_template.py a draft for a template for unittests in biopython. You can also refer to it as bug 2749 (http://bugzilla.open-bio.org/show_bug.cgi?id=2749). So, the idea is that if we have a template for test files, it will be easier for new developers to write new tests and modules. This one in particular makes use of nose, and it has some example of global fixtures (the two setUpClass and tearDownAll methods). What do you think about it? Cheers.. -- My blog on bioinformatics (now in English): http://bioinfoblog.it From bsouthey at gmail.com Wed Feb 4 11:59:02 2009 From: bsouthey at gmail.com (Bruce Southey) Date: Wed, 04 Feb 2009 10:59:02 -0600 Subject: [BioPython] Does anyone use EZRetrieve? In-Reply-To: <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> References: <4925CCAA.2040809@gmail.com> <320fb6e00811201253j66336d7cl977e4e3112c9f9f7@mail.gmail.com> <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> Message-ID: <4989C956.4020709@gmail.com> Peter wrote: > On Thu, Nov 20, 2008 at 8:53 PM, Peter wrote: > >> On Thu, Nov 20, 2008 at 8:46 PM, Bruce Southey wrote: >> >>> Hi, >>> Does anyone use EZRetrieve >>> (http://siriusb.umdnj.edu:18080/EZRetrieve/single_r.jsp) ? >>> This allows a user to retrieve a human, mouse or rat genome nucleic sequence >>> based on an valid identifier. >>> >>> I think that most of the functionality of Bio.EZRetrieve is already present >>> in Biopython and the genome sources appear to be 5 years old. For example, >>> it uses LocusLink that was discontinued March 2005. >>> >>> If so could you please let me know? >>> >> Actually - could you let the whole mailing list know? ;) >> >> Given nature of the database and the limited functionality this python >> code offers, if no-one is using Bio.EZRetrieve then it could be >> considered for deprecation. >> > > I've seen no replies so I've marked Bio.EZRetrieve as obsolete in CVS > (and therefore for Biopython 1.50), and unless anyone speaks up it > will be deprecated in the release after that. > > I'm not sure that the EZRetrieve data is that out of date (they may > have updated things since Bruce looked), but all the Bio.EZRetrieve > code does is fetch an HTML page and extract the FASTA formatted > sequence (ignoring any metadata or cross references). In any case, > this kind of HTML "screen scraping" is fragile (liable to break when > the site gets a visual redesign) and is not explicitly condoned by the > service itself. > > Peter > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython > Hi, I got nothing back from this nor for Bio.Affy and Bio.NMR (I tried a couple of emails) so I would suggest you also mark these as depreciated for Biopython 1.5. The EZRetrieve help page still refers to 2003 releases. http://siriusb.umdnj.edu:18080/EZRetrieve/help.jsp Thanks Bruce From biopython at maubp.freeserve.co.uk Wed Feb 4 12:09:56 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Wed, 4 Feb 2009 17:09:56 +0000 Subject: [BioPython] Does anyone use EZRetrieve? In-Reply-To: <4989C956.4020709@gmail.com> References: <4925CCAA.2040809@gmail.com> <320fb6e00811201253j66336d7cl977e4e3112c9f9f7@mail.gmail.com> <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> <4989C956.4020709@gmail.com> Message-ID: <320fb6e00902040909k616ba7bex25494f18ed757743@mail.gmail.com> > Hi, > I got nothing back from this nor for Bio.Affy and Bio.NMR (I tried a couple > of emails) so I would suggest you also mark these as depreciated for > Biopython 1.5. I'm being pedantic/nit-picking, but the next release will be Biopython 1.50, (one, fifty) and then Biopython 1.51 (one, fifty one). There never was a Biopython 1.5 (one, five). > The EZRetrieve help page still refers to 2003 releases. > http://siriusb.umdnj.edu:18080/EZRetrieve/help.jsp Anyway - maybe you are right, and we could deprecate Bio.EZRetrieve in Biopython 1.50 (rather than just declaring it obsolete with the intension of deprecating it in Biopython 1.51). Peter From bsouthey at gmail.com Wed Feb 4 12:41:20 2009 From: bsouthey at gmail.com (Bruce Southey) Date: Wed, 04 Feb 2009 11:41:20 -0600 Subject: [BioPython] Does anyone use EZRetrieve? In-Reply-To: <320fb6e00902040909k616ba7bex25494f18ed757743@mail.gmail.com> References: <4925CCAA.2040809@gmail.com> <320fb6e00811201253j66336d7cl977e4e3112c9f9f7@mail.gmail.com> <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> <4989C956.4020709@gmail.com> <320fb6e00902040909k616ba7bex25494f18ed757743@mail.gmail.com> Message-ID: <4989D340.1060001@gmail.com> Peter wrote: >> Hi, >> I got nothing back from this nor for Bio.Affy and Bio.NMR (I tried a couple >> of emails) so I would suggest you also mark these as depreciated for >> Biopython 1.5. >> > > I'm being pedantic/nit-picking, but the next release will be Biopython > 1.50, (one, fifty) and then Biopython 1.51 (one, fifty one). There > never was a Biopython 1.5 (one, five). > > Thanks as it is critical to get the numbers right! Perhaps I am missing a Bio.__version__ (but interesting history of numbering) . >> The EZRetrieve help page still refers to 2003 releases. >> http://siriusb.umdnj.edu:18080/EZRetrieve/help.jsp >> > > Anyway - maybe you are right, and we could deprecate Bio.EZRetrieve in > Biopython 1.50 (rather than just declaring it obsolete with the > intension of deprecating it in Biopython 1.51). > > Peter > I know we have had this discussion before but either option is agreeable to me for these modules. Bruce From bala.biophysics at gmail.com Thu Feb 5 13:19:04 2009 From: bala.biophysics at gmail.com (Bala subramanian) Date: Thu, 5 Feb 2009 19:19:04 +0100 Subject: [BioPython] vector distance Message-ID: <288df32a0902051019gf152619oae5e082bd6a893eb@mail.gmail.com> Dear Friends, Can someone please tell me if it is possible to calculate the vector distance between two atoms using Bio.PDB. Given two pdb files, i want to calculate the vector distance between the Calpha atoms in the two pdb files. Someone kindly enlighten me how can i do it. Thanks in advance, Bala From rodrigo_faccioli at uol.com.br Thu Feb 5 16:06:52 2009 From: rodrigo_faccioli at uol.com.br (Rodrigo faccioli) Date: Thu, 5 Feb 2009 19:06:52 -0200 Subject: [BioPython] Biopython on Eclipse IDE Message-ID: <3715adb70902051306w29b25518k1d06d08f3d9544ef@mail.gmail.com> Hi, I'm working with Eclipse IDE to develop my programs. I use it because I develop in C/C++ and Java and now I'm studying python and biopython. I write python code using Pydev plugin. I want to know, if it's possible when I'm using a biopython object Eclipse shows me its methods. In another words, how can I import biopython module to Eclipse? Sorry, if this place isn't the best place about my question. However, I don't know another place. Thanks any help. -- Rodrigo Antonio Faccioli Ph.D Student in Electrical Engineering University of Sao Paulo - USP Engineering School of Sao Carlos - EESC Department of Electrical Engineering - SEL Intelligent System in Structure Bioinformatics http://laips.sel.eesc.usp.br Phone: 55 (16) 3373-9366 Ext 229 Curriculum Lattes - http://lattes.cnpq.br/1025157978990218 From mailinglist.honeypot at gmail.com Thu Feb 5 16:22:21 2009 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Thu, 5 Feb 2009 16:22:21 -0500 Subject: [BioPython] Biopython on Eclipse IDE In-Reply-To: <3715adb70902051306w29b25518k1d06d08f3d9544ef@mail.gmail.com> References: <3715adb70902051306w29b25518k1d06d08f3d9544ef@mail.gmail.com> Message-ID: <486AA5FD-9DC6-462C-BBF4-BF857135578B@gmail.com> Hi Rodrigo, > I'm working with Eclipse IDE to develop my programs. I use it > because I > develop in C/C++ and Java and now I'm studying python and biopython. > I write > python code using Pydev plugin. > > I want to know, if it's possible when I'm using a biopython object > Eclipse > shows me its methods. In another words, how can I import biopython > module > to Eclipse? I don't use pydev so much anymore, though I still have it installed on my system. This is working for me (I have the PyDev extenstions as well). For instance, if I type: from Bio import and hit ctrl-space, I get a list of completions, like Affy, ..., Blast, ..., ExPASy, etc. You might want to reload the libs found in your Python Interpreter setting. > Sorry, if this place isn't the best place about my question. > However, I > don't know another place. You could try the PyDev user forums: http://sourceforge.net/forum/forum.php?forum_id=293649 HTH, -steve From hyunchul.mailing at gmail.com Thu Feb 5 22:52:18 2009 From: hyunchul.mailing at gmail.com (Hyunchul Kim) Date: Fri, 6 Feb 2009 12:52:18 +0900 Subject: [BioPython] How to automate "save column scores to file" in clustalx? Message-ID: <573a3abd0902051952y123e9f6cx4ac0806166b36e79@mail.gmail.com> Hi, all I need 'quality scores' of clustal. ClustalW provides only 4 degrees by simbols (*, :, ., ' ') and biopython supports it. ClustalX provides quality scores and it can be saved via menu 'Quality' -> 'save column scores to file'. However, I couldn't figure out how to do it automatically such as command line or biopython scripting. More specifically, ClustalW can produce the 'quality scores'? or ClustalX can produce output containing 'quality scores' by command line? or Any other suggestions? Thanks Hyunchul From biopython at maubp.freeserve.co.uk Fri Feb 6 05:41:02 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 6 Feb 2009 10:41:02 +0000 Subject: [BioPython] How to automate "save column scores to file" in clustalx? In-Reply-To: <573a3abd0902051952y123e9f6cx4ac0806166b36e79@mail.gmail.com> References: <573a3abd0902051952y123e9f6cx4ac0806166b36e79@mail.gmail.com> Message-ID: <320fb6e00902060241v14493ee6h1c3cf288011598a9@mail.gmail.com> On Fri, Feb 6, 2009 at 3:52 AM, Hyunchul Kim wrote: > Hi, all > > I need 'quality scores' of clustal. > ClustalW provides only 4 degrees by simbols (*, :, ., ' ') and biopython > supports it. > ClustalX provides quality scores and it can be saved via menu 'Quality' -> > 'save column scores to file'. > However, I couldn't figure out how to do it automatically such as command > line or biopython scripting. > > More specifically, > ClustalW can produce the 'quality scores'? Not that I am aware of. You could try looking at the source code or email the authors. > or ClustalX can produce output containing 'quality scores' by command line? Not that I am aware of. You could try looking at the source code or email the authors. > or Any other suggestions? Do you know how this score is calculated? Perhaps it can be calculated from the alignment columns themselves? Certainly the four symbols can be calculated from the column composition ("*" for 100% conserved, ":" if there are all in the same amino acid strong group, "." if they are all in the same amino acid week group, space otherwise). Peter From p.j.a.cock at googlemail.com Fri Feb 6 05:51:29 2009 From: p.j.a.cock at googlemail.com (Peter Cock) Date: Fri, 6 Feb 2009 10:51:29 +0000 Subject: [BioPython] vector distance In-Reply-To: <288df32a0902051019gf152619oae5e082bd6a893eb@mail.gmail.com> References: <288df32a0902051019gf152619oae5e082bd6a893eb@mail.gmail.com> Message-ID: <320fb6e00902060251t27c3e173v9c32980d0db41617@mail.gmail.com> On Thu, Feb 5, 2009 at 6:19 PM, Bala subramanian wrote: > Dear Friends, > > Can someone please tell me if it is possible to calculate the vector > distance between two atoms using Bio.PDB. Given two pdb files, i want to > calculate the vector distance between the Calpha atoms in the two pdb files. > Someone kindly enlighten me how can i do it. Have you ever worked with Numeric or NumPy before? That would be very helpful for you. Given two residue objects, this worked on Biopython 1.48 or older (using Numeric): import Numeric def calc_residue_dist(residue_one, residue_two) : """Returns the C-alpha distance between two residues""" diff_vector = residue_one["CA"].coord - residue_two["CA"].coord return Numeric.sqrt(Numeric.sum(diff_vector * diff_vector)) Now that Biopython 1.49+ is using NumPy instead of Numeric, you'd probably want to do this instead: import numpy def calc_residue_dist(residue_one, residue_two) : """Returns the C-alpha distance between two residues""" diff_vector = residue_one["CA"].coord - residue_two["CA"].coord return numpy.sqrt(numpy.sum(diff_vector * diff_vector)) See http://www.warwick.ac.uk/go/peter_cock/python/protein_contact_map/ for more information. Peter From p.j.a.cock at googlemail.com Fri Feb 6 10:00:55 2009 From: p.j.a.cock at googlemail.com (Peter Cock) Date: Fri, 6 Feb 2009 15:00:55 +0000 Subject: [BioPython] 10th year In-Reply-To: <1233614342.25080.11.camel@lafa> References: <1233614342.25080.11.camel@lafa> Message-ID: <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> Iddo Friedberg wrote: > I guess everybody is too busy to notice that biopython is into its 10th > year now.. birthday celebrations are nine months away, Since the mailing > lists start in September 1999. But I guess that some sort of party at > BOSC would be nice... Whoever gives the Biopython project update at BOSC 2009 should try and include this news in a slide :) I'm hoping to be able to attend BOSC 2009 this year (end of June, Stockholm, Sweden) but haven't been able to confirm with work - lots of other stuff keeping me busy at the moment. http://www.open-bio.org/wiki/BOSC_2009 Is anyone else planning or hoping to go? Peter From bav853 at bham.ac.uk Fri Feb 6 12:42:01 2009 From: bav853 at bham.ac.uk (Bhima A van der Molen) Date: Fri, 06 Feb 2009 17:42:01 +0000 Subject: [BioPython] hsexposure.py Message-ID: <498C7669.60007@bham.ac.uk> Hi, I am a newbe to the list.. I just started my PhD and I am trying to get some calculations for surface accessibility for some proteins stored in PDB format. There is a niffty little script included with the BioPython download in the scripts folder called hsexposure.py which is supposed to calculate the half sphere exposure of each residue in the PDB file. However, when I run it with the option to calculate HSE (all variations) I get 0 stored in the b-factor column of my PDB file instead of the count.. so I tried extracting the code I want specifically.. i.e. the part to calculate the HSEBU values and tried to get it to print on the screen.. I get the same result.. 0.0 as my HSE value.. see code below: ##code begins## from Bio import PDB from Bio.PDB import * import sys pdbfile=open('/home/aurobhima/pdb/pdb1fat.ent') p=PDBParser() s=p.get_structure('X', pdbfile) m=s[0] RADIUS=12.0 format ="4%i" hse=PDB.HSExposureCB(m, RADIUS) k = 'EXP_HSE_A_U' residue_list=PDB.Selection.unfold_entities(m,'R') for r in residue_list: if r.xtra.has_key(k): exposure=r.xtra[k] if icode==' ': icode='_' resname=r.get_resname() print (("%s %4i %c\t"+format) % (resname, resseq, icode, exposure)) else: exposure=0.0 print exposure ##code ends## if anybody has any ideas it would really help out.. I should point out that the DSSP and CN calculations work fine with the script.. Thanks Bhima -------------- next part -------------- A non-text attachment was scrubbed... Name: bav853.vcf Type: text/x-vcard Size: 312 bytes Desc: not available URL: From sbassi at genesdigitales.com Fri Feb 6 16:22:14 2009 From: sbassi at genesdigitales.com (Sebastian Bassi) Date: Fri, 6 Feb 2009 19:22:14 -0200 Subject: [BioPython] 10th year In-Reply-To: <1233614342.25080.11.camel@lafa> References: <1233614342.25080.11.camel@lafa> Message-ID: On Mon, Feb 2, 2009 at 8:39 PM, Iddo Friedberg wrote: > I guess everybody is too busy to notice that biopython is into its 10th > year now.. birthday celebrations are nine months away, Since the mailing > lists start in September 1999. But I guess that some sort of party at > BOSC would be nice... Hi, the timing for this announce is right for me. In an Biopython chapter I wrote this about Biopython history: "It started as an idea in August of 1999, it was an initiative by Jeff Chang and Andrew Dalke. Although they came up with the idea, collaborators soon joined the project. Among the most active developers, Brad Chapman, Peter Cock, Michiel de Hoon and Iddo Friedberg stands out. The project began to take code form in February 2000 and in July of the same year the first release was made." What do you think about this? Is there something you would like to change on this paragraph? From dalke at dalkescientific.com Fri Feb 6 20:44:25 2009 From: dalke at dalkescientific.com (Andrew Dalke) Date: Sat, 7 Feb 2009 02:44:25 +0100 Subject: [BioPython] 10th year In-Reply-To: <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> References: <1233614342.25080.11.camel@lafa> <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> Message-ID: <1C91CBF7-F233-4C9E-AC12-0322A1EDC9D8@dalkescientific.com> On Feb 6, 2009, at 4:00 PM, Peter Cock wrote: > Is anyone else planning or hoping to go [to BOSC]? I am, even though I haven't been to BOSC for a few years. While I effectively only do cheminformatics these days, Stockholm is just down the (rail)road from Gothenburg, where I live. Andrew dalke at dalkescientific.com From chapmanb at 50mail.com Sun Feb 8 10:07:51 2009 From: chapmanb at 50mail.com (Brad Chapman) Date: Sun, 8 Feb 2009 10:07:51 -0500 Subject: [BioPython] 10th year In-Reply-To: <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> References: <1233614342.25080.11.camel@lafa> <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> Message-ID: <20090208150750.GB10946@kunkel> > > I guess everybody is too busy to notice that biopython is into its 10th > > year now.. birthday celebrations are nine months away, Since the mailing > > lists start in September 1999. But I guess that some sort of party at > > BOSC would be nice... > > Whoever gives the Biopython project update at BOSC 2009 should try and > include this news in a slide :) I for one am refusing to acknowledge this milestone due to suddenly feeling very old. > I'm hoping to be able to attend BOSC 2009 this year (end of June, > Stockholm, Sweden) but haven't been able to confirm with work - lots > of other stuff keeping me busy at the moment. > http://www.open-bio.org/wiki/BOSC_2009 > > Is anyone else planning or hoping to go? Like Andrew, I haven't been for a few years but hope to make it this year. If we have good python representation, we should plan some informal coding sessions. Brad From lueck at ipk-gatersleben.de Mon Feb 9 10:21:11 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Mon, 9 Feb 2009 16:21:11 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> Message-ID: <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> Never ending story... After compilation and changing in the Application/__init__.py file, unfortunatly Primer3 don't work and gives this Error: Traceback (most recent call last): File "primer3.pyc", line 208, in get_2 File "Bio\Application\__init__.pyc", line 29, in generic_run File "subprocess.pyc", line 593, in __init__ File "subprocess.pyc", line 793, in _execute_child WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden Any ideas? ClustalW and blastall work fine! Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Monday, February 02, 2009 11:16 AM Subject: Re: [BioPython] BLAST subprocess problem with a GUI On Mon, Feb 2, 2009 at 7:37 AM, Stefanie L?ck wrote: > > Hi Peter and the rest of the mailing list! > > I'm using Biopython 1.49b and Python 2.5. > > I tried your suggestion and changed \Blast\NCBIStandalone.py as you said: > > import subprocess, sys > #We don't need to supply any piped input, but we setup the > #pipe anyway as a work around for a python bug if this is > #called from a Windows GUI program. For details, see: > #http://bugs.python.org/issue1124861 > blast_process = subprocess.Popen(cmd_string, > stdin=subprocess.PIPE, > stdout=subprocess.PIPE, > stderr=subprocess.PIPE, > shell=(sys.platform!="win32")) > blast_process.stdin.close() > return blast_process.stdout, blast_process.stderr > > And after comipilation with py2exe it's seem to work! In addition I > changed > \Application\__init__.py in function generic_run > \ClustalW\__init__.py in function do_alignment > in the same way because I got the same error message when I used Primer3 > and ClustalW. I tried up to now only on view Windows XP PC's but it's > looks > like the problem is solved! Great - I've made this change in CVS now: Blast/NCBIStandalone.py revision: 1.85 Clustalw/__init__.py revision 1.26 Application/__init__.py revision 1.9 > Finally I can release the tool for testing! Thanks to all for their help! > > Thanks a lot Peter and sorry for the late reply! > > Kind regards > Stefanie Thank you for reporting the issue, testing the change and letting us know it works. Peter From bala.biophysics at gmail.com Mon Feb 9 10:48:32 2009 From: bala.biophysics at gmail.com (Bala subramanian) Date: Mon, 9 Feb 2009 16:48:32 +0100 Subject: [BioPython] parsing pdb files Message-ID: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> Dear Friends, I have a pdb file generated by a simulation program. it dosent have the B-factor information. When use PDBParser, i get the following error. I got to know by googling that this is due to the absence of b-factor information in the pdb file. Kindly write me how to parser such pdb files. File "arrow.py", line 7, in structure=par.get_structure('test','1.pdb') File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 65, in get_structure self._parse(file.readlines()) File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 85, in _parse self.trailer=self._parse_coordinates(coords_trailer) File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 158, in _parse_coordinates occupancy=float(line[54:60]) ValueError: empty string for float() Thanks in advance, Bala From biopython at maubp.freeserve.co.uk Mon Feb 9 11:06:02 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 16:06:02 +0000 Subject: [BioPython] BLAST subprocess problem with a GUI In-Reply-To: <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> Message-ID: <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> On Mon, Feb 9, 2009 at 3:21 PM, Stefanie L?ck wrote: > > Never ending story... > > After compilation and changing in the > Application/__init__.py file, unfortunatly Primer3 don't work and gives this > Error: > > Traceback (most recent call last): > ?File "primer3.pyc", line 208, in get_2 > ?File "Bio\Application\__init__.pyc", line 29, in generic_run > ?File "subprocess.pyc", line 593, in __init__ > ?File "subprocess.pyc", line 793, in _execute_child > > WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden In English that's something like "The system cannot find the indicated file", which suggests that you don't have the primer3 path specified correctly (and this this isn't the pipe problem we had before with BLAST). Try adding check on the primer3 executable filename: import os primer3_exe = r"C:\Program Files\EMBOSS\primer3.exe" assert os.path.isfile(primer3_exe) cline = Primer3Commandline(primer3_exe) ... Note that you can create the Primer3Commandline object without specifying the location of the executable file. On Unix, this will then try and locate the tool from the path environment variable. On Windows, I find it best to always be explicit and provide the full path to the filename. Peter From biopython at maubp.freeserve.co.uk Mon Feb 9 11:34:22 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 16:34:22 +0000 Subject: [BioPython] parsing pdb files In-Reply-To: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> References: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> Message-ID: <320fb6e00902090834t10e6e6fby557ac7e75dcabefb@mail.gmail.com> On Mon, Feb 9, 2009 at 3:48 PM, Bala subramanian wrote: > Dear Friends, > > I have a pdb file generated by a simulation program. it dosent have the > B-factor information. When use PDBParser, i get the following error. I got > to know by googling that this is due to the absence of b-factor information > in the pdb file. Kindly write me how to parser such pdb files. > > ?File "arrow.py", line 7, in > ? ?structure=par.get_structure('test','1.pdb') > ?File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 65, in > get_structure > ? ?self._parse(file.readlines()) > ?File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 85, in > _parse > ? ?self.trailer=self._parse_coordinates(coords_trailer) > ?File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 158, in > _parse_coordinates > ? ?occupancy=float(line[54:60]) > ValueError: empty string for float() > > Thanks in advance, > Bala I'm note sure off hand if the occupancy is intended to be mandatory or not. If it should be present, it would be nice if Bio.PDB could parse this in permissive mode, and reject the file in strict mode. Note this issue sounds very similar to missing tempFactor fields, Biopython Bug 2751: http://bugzilla.open-bio.org/show_bug.cgi?id=2751 Alternatively, can you ask the simulation program authors to record an occupancy of one? Peter From biopython at maubp.freeserve.co.uk Mon Feb 9 13:11:06 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 18:11:06 +0000 Subject: [BioPython] parsing pdb files In-Reply-To: <288df32a0902090925j22eb0119r57e6cc55ea6d512@mail.gmail.com> References: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> <320fb6e00902090834t10e6e6fby557ac7e75dcabefb@mail.gmail.com> <288df32a0902090925j22eb0119r57e6cc55ea6d512@mail.gmail.com> Message-ID: <320fb6e00902091011q62bb4f55vf00fadf08253678c@mail.gmail.com> On Mon, Feb 9, 2009 at 5:25 PM, Bala subramanian wrote: > Dear Peter, Hi Bala, I've CC'd this message back to the mailing list. > Thank you for you reply. I dnt have any way to write the B-factor. I tried > to write the bfactor by a small script but still the parser dosent work and > i get the value error as follows: > > Traceback (most recent call last): > ... > ? File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 158, in > _parse_coordinates > ??? occupancy=float(line[54:60]) > ValueError: invalid literal for float(): 8??? 1 > > Few lines from my pdb file is as follows > > ATOM??? 29??? P??? C??? 2??? -5.431??? 7.793??? -13.678??? 1 > ATOM??? 60??? P??? A??? 3??? -7.411??? 4.185??? -9.249??? 1 > ATOM??? 93??? P??? C??? 4??? -10.773??? -0.351??? -8.752??? 1 > ATOM??? 124??? P??? A??? 5??? -12.260??? -6.200??? -8.124??? 1 > ATOM??? 157??? P??? A??? 6??? -13.059??? -12.433??? -8.140??? 1 You said your PDB file is from a simulation program - did you write this or someone else? If you wrote it then you should be able to add in these missing fields. Even if you didn't write it, it would be fairly easy to "fix" the file using a short python script like this: bad_pdb_filename = "1AD5_invalid.pdb" fixed_pdb_filename = "1AD5_fixed.pdb" input_handle = open(bad_pdb_filename,"rU") output_handle = open(fixed_pdb_filename, "w") for number, line in enumerate(input_handle) : if line.startswith("ATOM ") : if not line[54:60].strip() : print "Line %i missing occupancy" % (number+1) if len(line) < 60 : #It was a very short line! line = line[:54] + " 0.0 \n" #We'll add the B factor in a moment... else : line = line[:54] + " 0.0 " + line[60:] if not line[60:66].strip() : print "Line %i missing B factor" % (number+1) if len(line) < 66 : #It was a very short line! line = line[:60] + " 0.0 \n" else : line = line[:60] + " 0.0 " + line[66:] assert line.endswith("\n") else : #Not an ATOM line, leave it alone pass output_handle.write(line) input_handle.close() output_handle.close() Also, if you wanted to try the latest Biopython code from CVS it should ignore these missing fields in permissive mode (but will print warning messages - see Bug 2751 for details). Peter From biopython at maubp.freeserve.co.uk Mon Feb 9 16:32:34 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 21:32:34 +0000 Subject: [BioPython] parsing pdb files In-Reply-To: <288df32a0902091025l2783fc8aj8f3fa96907c35f63@mail.gmail.com> References: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> <320fb6e00902090834t10e6e6fby557ac7e75dcabefb@mail.gmail.com> <288df32a0902090925j22eb0119r57e6cc55ea6d512@mail.gmail.com> <320fb6e00902091011q62bb4f55vf00fadf08253678c@mail.gmail.com> <288df32a0902091025l2783fc8aj8f3fa96907c35f63@mail.gmail.com> Message-ID: <320fb6e00902091332q77de476ew83527b8606ff29be@mail.gmail.com> >> >> Also, if you wanted to try the latest Biopython code from CVS it >> should ignore these missing fields in permissive mode (but will print >> warning messages - see Bug 2751 for details). > > Peter, > Thank you very much. I installed the latest biopython only. Anyways give me > the link to download it so that i would try it out > > Bala Biopython 1.49 (and earlier) won't parse PDB files missing the B-factor or occupancy information. Using the short example script in my earlier email, you should be able to fix individual PDB files so Biopython 1.49 is happy. I would recommend this option first. Alternatively, using the code in our source code repository (CVS), which will one day become Biopython 1.50, you can now parse these "naughty" PDB files - although you'll get a warning message for every missing B-factor or occupancy (see Bug 2751). If you want to try this new unreleased Biopython code, you have to get our latest code from CVS and install it. See http://biopython.org/wiki/CVS In this case, assuming you already have Biopython 1.49, you only really need to update one file, which you could download from our CVS webpage, instead http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/PDB/PDBParser.py?cvsroot=biopython Don't try this unless you are confident you can put things back if something goes wrong... I would just suggest "fixing" the individual PDB files instead. Peter From biopython at maubp.freeserve.co.uk Thu Feb 12 07:05:09 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 12 Feb 2009 12:05:09 +0000 Subject: [BioPython] hsexposure.py In-Reply-To: <498C7669.60007@bham.ac.uk> References: <498C7669.60007@bham.ac.uk> Message-ID: <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> On Fri, Feb 6, 2009 at 5:42 PM, Bhima A van der Molen wrote: > Hi, > > I am a newbe to the list.. I just started my PhD and I am trying to get > some calculations for surface accessibility for some proteins stored in > PDB format. > > There is a niffty little script included with the BioPython download in > the scripts folder called hsexposure.py which is supposed to calculate > the half sphere exposure of each residue in the PDB file. ?However, when > I run it with the option to calculate HSE (all variations) I get 0 > stored in the b-factor column of my PDB file instead of the count.. It looks like the hsexposure script may be a tiny it out of date, I'll have a quick look at this. > so I tried extracting the code I want specifically.. i.e. the part to > calculate the HSEBU values and tried to get it to print on the screen.. > I get the same result.. 0.0 as my HSE value.. see code below: > > hse=PDB.HSExposureCB(m, RADIUS) > k = 'EXP_HSE_A_U' Your code was looking for the EXP_HSE_A_U result, but never calculated it. If you used HSExposureCB, then the extra data keys are EXP_HSE_B_U and EXP_HSE_B_D. If you want EXP_HSE_A_U then use the HSExposureCA class instead. e.g. ##code begins## from Bio import PDB pdbfile=open('1AD5.pdb') p=PDB.PDBParser() s=p.get_structure('X', pdbfile) m=s[0] RADIUS=12.0 print "Using CB" hse=PDB.HSExposureCB(m, RADIUS) residue_list=PDB.Selection.unfold_entities(m,'R') for r in residue_list[:10]: print r.get_resname(), r.xtra print "..." print "Using CA" hse=PDB.HSExposureCA(m, RADIUS) residue_list=PDB.Selection.unfold_entities(m,'R') for r in residue_list[:10]: print r.get_resname(), r.xtra print "..." ##code ends## Peter From biopython at maubp.freeserve.co.uk Thu Feb 12 07:18:13 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 12 Feb 2009 12:18:13 +0000 Subject: [BioPython] hsexposure.py In-Reply-To: <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> References: <498C7669.60007@bham.ac.uk> <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> Message-ID: <320fb6e00902120418v4b0d50ddya375ca5a93d75453@mail.gmail.com> On Thu, Feb 12, 2009 at 12:05 PM, Peter wrote: > On Fri, Feb 6, 2009 at 5:42 PM, Bhima A van der Molen wrote: >> There is a niffty little script included with the BioPython download in >> the scripts folder called hsexposure.py which is supposed to calculate >> the half sphere exposure of each residue in the PDB file. ?However, when >> I run it with the option to calculate HSE (all variations) I get 0 >> stored in the b-factor column of my PDB file instead of the count.. > > It looks like the hsexposure script may be a tiny it out of date, I'll > have a quick look at this. It looks like Thomas must have been trying two naming schemes for the xtra data dictionary keys, unfortunately the example script got checked in using EXP_HSEAD, EXP_HSEAU, EXP_HSEBD and EXP_HSEBU but the Bio.PDB.HSExposure module was checked in using the similar but different EXP_HSE_A_D, EXP_HSE_A_U, EXP_HSE_B_U and EXP_HSE_B_D. I have updated the script in CVS, which you will be able to download from here in about an hour's time: http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Scripts/Structure/hsexpo?cvsroot=biopython This now seems to work :) Peter From biopython at maubp.freeserve.co.uk Thu Feb 12 15:26:02 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 12 Feb 2009 20:26:02 +0000 Subject: [BioPython] hsexposure.py In-Reply-To: <1234459277.7817.14.camel@bio-haw-pc8> References: <498C7669.60007@bham.ac.uk> <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> <320fb6e00902120418v4b0d50ddya375ca5a93d75453@mail.gmail.com> <1234459277.7817.14.camel@bio-haw-pc8> Message-ID: <320fb6e00902121226q224f7afq334c30468a71512e@mail.gmail.com> On Thu, Feb 12, 2009 at 5:21 PM, Bhima Van der Molen wrote: > > HI Peter, > > Thank you for sorting that out... I am running the script on my > sequences now and I'm getting useful results. > > Thank you again, you saved me a lot of work. > > Regards > Bhima Great - and thanks for reporting the problem to us. Peter From lueck at ipk-gatersleben.de Fri Feb 13 09:07:09 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Fri, 13 Feb 2009 15:07:09 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> Message-ID: <008c01c98de4$5c7410a0$1022a8c0@ipkgatersleben.de> Thanks! That's was! Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Monday, February 09, 2009 5:06 PM Subject: Re: [BioPython] BLAST subprocess problem with a GUI On Mon, Feb 9, 2009 at 3:21 PM, Stefanie L?ck wrote: > > Never ending story... > > After compilation and changing in the > Application/__init__.py file, unfortunatly Primer3 don't work and gives > this > Error: > > Traceback (most recent call last): > File "primer3.pyc", line 208, in get_2 > File "Bio\Application\__init__.pyc", line 29, in generic_run > File "subprocess.pyc", line 593, in __init__ > File "subprocess.pyc", line 793, in _execute_child > > WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden In English that's something like "The system cannot find the indicated file", which suggests that you don't have the primer3 path specified correctly (and this this isn't the pipe problem we had before with BLAST). Try adding check on the primer3 executable filename: import os primer3_exe = r"C:\Program Files\EMBOSS\primer3.exe" assert os.path.isfile(primer3_exe) cline = Primer3Commandline(primer3_exe) ... Note that you can create the Primer3Commandline object without specifying the location of the executable file. On Unix, this will then try and locate the tool from the path environment variable. On Windows, I find it best to always be explicit and provide the full path to the filename. Peter From hlapp at gmx.net Fri Feb 13 11:54:07 2009 From: hlapp at gmx.net (Hilmar Lapp) Date: Fri, 13 Feb 2009 11:54:07 -0500 Subject: [BioPython] Google Summer of Code: Call for Bio* Volunteers Message-ID: Google is committed to run the Summer of Code program [1] again this year. It will be for the 5th time. In broad strokes, the program funds what you might call remote summer internships for students to contribute to an open-source software project. Participating projects (or umbrella organizations) provide project ideas and supply mentors that guide the work on those. Students apply to a project within the program with specific project ideas, based on those suggested or based on their own idea, get ranked by the mentors of the project, and those accepted into the program get paired up with mentors. Projects are chiefly about programming, the coding period is 3 months (Jun-Aug), and there is no travel required by either student or mentor. The program is global; other than the US trade restrictions that Google is under, there are no restrictions as to where student or mentor reside. The main motivations behind the program are to recruit new contributors to open-source projects, and to produce more open-source code. See the program FAQs [2] for more information. I've had the honor of being part of the program for the last two years, administering NESCent's participation as an organization [3] and in 2007 mentoring a student. I have to say I find it the most awesome open-source program since sliced bread (or the invention of BLAST if that means more to you). Despite that and sadly enough, there has been a dearth of participating bioinformatics projects (though some notable ones, such as CytoScape have participated). There have been two Bio* Summer of Code projects under the NESCent umbrella, one in 2007 [4] and one in 2008 [5]. I would be willing to volunteer to take the lead on and administer a full-blown participation of O|B|F as a Bio* umbrella organization, provided 1) at least one Bio* person volunteers to serve as backup administrator, and 2) enough Bio* contributors volunteer to serve as prospective mentors. Mentoring involves participating in creating the page of project ideas (I'd provide template and guidance), corresponding with applicants who have questions, participating in student application ranking, and for primary mentors (those directly assigned to a student) based on empirical evidence at least 5hrs/week of time spent with the student to help him/her get over obstacles or avoid wrong paths. I think almost all mentors would concur that the experience was very gratifying, but as a mentor you will be spending a non-negligible amount of time with the student. I think it is the student-mentor pairing and interaction, not the stipend, that in the end makes the participation for students uniquely productive in terms of learning, and different from simply contributing to the project of choice (which they could always do). For a personal impression for how the program is from a mentor perspective, I'll let Chris Fields speak who was the mentor for the 2008 phyloXML in BioPerl project. From a student's perspective, I'll leave it to the 2007 Biojava student Bohyun Lee (blee34-at- mail.gatech.edu) and the 2008 BioPerl student Mira Han (mirhan-at- indiana.edu) to comment (if they are still on the list). So if you think this is a good idea for Bio* to be part of, if you would like to help in some way, if you can see yourself as a mentor, or if you are a lurking would-be student, please let yourself be heard. Email either to the list or to me. Cheers, -hilmar [1] http://code.google.com/soc/2008 [2] http://code.google.com/opensource/gsoc/2009/faqs.html [3] http://hackathon.nescent.org/Phyloinformatics_Summer_of_Code_2007 http://hackathon.nescent.org/Phyloinformatics_Summer_of_Code_2008 [4] http://biojava.org/wiki/BioJava:PhyloSOC07 [5] http://bioperl.org/wiki/PhyloXML_support_in_BioPerl -- =========================================================== : Hilmar Lapp -:- Durham, NC -:- hlapp at gmx dot net : =========================================================== From dalloliogm at gmail.com Fri Feb 13 12:27:18 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Fri, 13 Feb 2009 18:27:18 +0100 Subject: [BioPython] summer of code Message-ID: <5aa3b3570902130927o222f0411tfc2728b7c25c944a@mail.gmail.com> Hi! ehm - on the bioperl mailing list, they just have sent an email explaining that they have been included in the google-summer of code program. Is biopython also included in the same program? Why don't we propose some project for the next year? Some ideas that could be proposed: the population genetics modules, or the collection of use cases in bioinformatics. -- My blog on bioinformatics (now in English): http://bioinfoblog.it From hlapp at gmx.net Fri Feb 13 13:38:39 2009 From: hlapp at gmx.net (Hilmar Lapp) Date: Fri, 13 Feb 2009 13:38:39 -0500 Subject: [BioPython] [bip] summer of code In-Reply-To: <4995AFE7.3020503@gmail.com> References: <5aa3b3570902130927o222f0411tfc2728b7c25c944a@mail.gmail.com> <4995AFE7.3020503@gmail.com> Message-ID: <97D828AD-3E4F-4502-A1C9-84985142AC5A@gmx.net> Giovanni Marco Dall'Olio wrote: > they just have sent an email explaining that they have been included > in the google-summer of code program. Just to prevent any misunderstandings, whoever is meant by "they", nobody has been included in the Summer of Code program yet for this year. Organizations who want to participate can start applying March 9. Google expects to announce who has been accepted on March 18. Last year, about 2/3 of applying orgs were not accepted. This year the rejection ratio is going to be higher b/c fewer orgs will be accepted. There is no guarantee that we would be accepted if we apply. I'm relatively optimistic though that we'd have a fair chance, but I'm often optimistic. -hilmar -- =========================================================== : Hilmar Lapp -:- Durham, NC -:- hlapp at gmx dot net : =========================================================== From mjldehoon at yahoo.com Sat Feb 14 04:48:02 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Sat, 14 Feb 2009 01:48:02 -0800 (PST) Subject: [BioPython] Bio.File.SGMLHandle; Bio.FilteredReader Message-ID: <798455.54544.qm@web62404.mail.re1.yahoo.com> Hi everybody, Does anybody use the SGMLHandle class from Bio.File, or the Bio.FilteredReader module? Currently they are not being used anywhere in Biopython. If there are no users, I suggest we start the deprecation process for these two. --Michiel. From mjldehoon at yahoo.com Sun Feb 15 01:49:27 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Sat, 14 Feb 2009 22:49:27 -0800 (PST) Subject: [BioPython] Bio.NetCatch Message-ID: <294018.64091.qm@web62402.mail.re1.yahoo.com> Hi everybody, Is anybody using the Bio.NetCatch module? Currently, it is not used anywhere in Biopython. If there are no users of this module, I suggest we start the deprecation process for Bio.NetCatch. --Michiel. From amend at nature.berkeley.edu Wed Feb 18 20:05:58 2009 From: amend at nature.berkeley.edu (Anthony Amend) Date: Wed, 18 Feb 2009 17:05:58 -0800 Subject: [BioPython] Biopython installation syntax error Message-ID: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> Hi, I'm trying to install biopython 1.49 on a mac running OSX 10.4. I've installed numpy 1.2.1 and when I log on as root and try to install biopython I get the following error: File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/numpy/lib/arrayterator.py", line 89 slice_ = tuple(slice(*t) for t in zip( ^ SyntaxError: invalid syntax I figured it had something to do with the numpy installation, so I went back and installed numpy 1.1.1, but got the same error message when I tried to install biopython again. I'm a VERY new unix/python user, so if you have any insight please dumb down your answers accordingly. Many thanks for your help Anthony From bsouthey at gmail.com Wed Feb 18 21:21:10 2009 From: bsouthey at gmail.com (Bruce Southey) Date: Wed, 18 Feb 2009 20:21:10 -0600 Subject: [BioPython] Biopython installation syntax error In-Reply-To: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> References: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> Message-ID: Hi, It appears that you are using Python2.3 which is not support by numpy version1.2. See the release notes at: http://sourceforge.net/project/shownotes.php?group_id=1369&release_id=628858 So either use an earlier version or, even better, upgrade to Python 2.5. I do not recommend Python 2.6 because I do not know how well numpy 1.2 is supported on the Mac. Regards Bruce On Wed, Feb 18, 2009 at 7:05 PM, Anthony Amend wrote: > Hi, > > I'm trying to install biopython 1.49 on a mac running OSX 10.4. I've > installed numpy 1.2.1 and when I log on as root and try to install biopython > I get the following error: > > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/numpy/lib/arrayterator.py", > line 89 > slice_ = tuple(slice(*t) for t in zip( > ^ > SyntaxError: invalid syntax > > I figured it had something to do with the numpy installation, so I went back > and installed numpy 1.1.1, but got the same error message when I tried to > install biopython again. > > I'm a VERY new unix/python user, so if you have any insight please dumb down > your answers accordingly. > > Many thanks for your help > > Anthony > > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython > From 2huggie at gmail.com Wed Feb 18 23:29:28 2009 From: 2huggie at gmail.com (Timothy Wu) Date: Thu, 19 Feb 2009 12:29:28 +0800 Subject: [BioPython] How to check BioPython version Message-ID: Hi, I've got BioPython installed some time ago, and I don't know which version I'm using. Where do I check the BioPython version? Additionally, is there a standard way to check the version number for any Python package? Timothy From lueck at ipk-gatersleben.de Thu Feb 19 02:36:51 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Thu, 19 Feb 2009 08:36:51 +0100 Subject: [BioPython] How to check BioPython version References: Message-ID: <002601c99264$d441b270$1022a8c0@ipkgatersleben.de> Hi Timothy! On Windows you can check in the "biopython-wininst.log" file at the installation directory of Python. Kind regards Stefanie ----- Original Message ----- From: "Timothy Wu" <2huggie at gmail.com> To: Sent: Thursday, February 19, 2009 5:29 AM Subject: [BioPython] How to check BioPython version > Hi, > > I've got BioPython installed some time ago, and I don't know which version > I'm using. Where do I check the BioPython version? Additionally, is there > a > standard way to check the version number for any Python package? > > Timothy > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython > From 2huggie at gmail.com Thu Feb 19 05:01:07 2009 From: 2huggie at gmail.com (Timothy Wu) Date: Thu, 19 Feb 2009 18:01:07 +0800 Subject: [BioPython] How to check BioPython version In-Reply-To: <002601c99264$d441b270$1022a8c0@ipkgatersleben.de> References: <002601c99264$d441b270$1022a8c0@ipkgatersleben.de> Message-ID: On Thu, Feb 19, 2009 at 3:36 PM, Stefanie L?ck wrote: > Hi Timothy! > > On Windows you can check in the "biopython-wininst.log" file at the > installation directory of Python. > > Kind regards > Stefanie > Hi Stefanie: Thanks for the reply, how about Linux? Timothy From biopython at maubp.freeserve.co.uk Thu Feb 19 05:09:50 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 19 Feb 2009 10:09:50 +0000 Subject: [BioPython] Biopython installation syntax error In-Reply-To: References: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> Message-ID: <320fb6e00902190209x3994b25cp22f0580f1f1539ef@mail.gmail.com> On Thu, Feb 19, 2009 at 2:21 AM, Bruce Southey wrote: > Hi, > It appears that you are using Python2.3 which is not support by numpy > version1.2. See the release notes at: > http://sourceforge.net/project/shownotes.php?group_id=1369&release_id=628858 > > So either use an earlier version or, even better, upgrade to Python > 2.5. I do not recommend Python 2.6 because I do not know how well > numpy 1.2 is supported on the Mac. > > Regards > Bruce I agree with Bruce that trying to use NumPy 1.2 (or later) on Python 2.3 is a bad plan. Their installer really ought to abort rather than letting you do this! You could upgrade your python to 2.4 or 2.5 (or possible 2.6) but on the Mac this is complicated. You shouldn't replace the Apple provided python as many of the Apple tools use it. Personally I would stick with the Apple provided python and install NumPy 1.1.1. However, it sounds like you already have installed the incompatible NumPy 1.2 on the machine which you'll need to remove. To remove NumPy I think you should be OK to remove the folder /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/numpy (or to be safe, just move it somewhere else like you desktop, in case you need to put it back). Peter From biopython at maubp.freeserve.co.uk Thu Feb 19 05:23:40 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 19 Feb 2009 10:23:40 +0000 Subject: [BioPython] How to check BioPython version In-Reply-To: References: Message-ID: <320fb6e00902190223t7d86ba3foc2332953a038bbe9@mail.gmail.com> On Thu, Feb 19, 2009 at 4:29 AM, Timothy Wu <2huggie at gmail.com> wrote: > Hi, > > I've got BioPython installed some time ago, and I don't know which version > I'm using. Where do I check the BioPython version? Sadly we don't have an official mechanism. This was discussed with a proposed solution late last year. Perhaps we should actually do this now... See here for the details: http://lists.open-bio.org/pipermail/biopython-dev/2008-September/004267.html However, assuming your Biopython is fairly recent this should work: $ python >>> import Martel >>> print Martel.__version__ 1.49 Martel is a text parsing library we used to use and ship with Biopython - it has been deprecated but is still included with Biopython. The point of this is that for a while now we've kept its version number in sync with the main Biopython version, so the version of Martel should be the version of Biopython. If you don't have mxTextTools installed, this will fail with an ImportError. $ python >>> import Martel ... ImportError: No module named TextTools In this case, just have a quick look at the Martel/__init__.py file, look at the error message to see where exactly the file is on your machine. $ grep "__version__" /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Martel/__init__.py __version__ = "1.49" > Additionally, is there a standard way to check the version number > for any Python package? Lots of python packages use this __version__ convention (but not all). e.g. $ python >>> import numpy >>> print numpy.__version__ 1.1.1 Peter From amend at nature.berkeley.edu Thu Feb 19 19:02:56 2009 From: amend at nature.berkeley.edu (Anthony Amend) Date: Thu, 19 Feb 2009 16:02:56 -0800 Subject: [BioPython] Biopython installation syntax error In-Reply-To: <320fb6e00902190209x3994b25cp22f0580f1f1539ef@mail.gmail.com> References: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> <320fb6e00902190209x3994b25cp22f0580f1f1539ef@mail.gmail.com> Message-ID: Hi, I took Bruce's advice before I saw Peter's e-mail. I've now upgraded to Python2.5 and kept NumPy 1.1.1, biopython seems to be up and running. Thanks so much for your help. Cheers, Anthony > On Thu, Feb 19, 2009 at 2:21 AM, Bruce Southey > wrote: >> Hi, >> It appears that you are using Python2.3 which is not support by numpy >> version1.2. See the release notes at: >> http://sourceforge.net/project/shownotes.php? >> group_id=1369&release_id=628858 >> >> So either use an earlier version or, even better, upgrade to Python >> 2.5. I do not recommend Python 2.6 because I do not know how well >> numpy 1.2 is supported on the Mac. >> >> Regards >> Bruce > > I agree with Bruce that trying to use NumPy 1.2 (or later) on Python > 2.3 is a bad plan. Their installer really ought to abort rather than > letting you do this! > > You could upgrade your python to 2.4 or 2.5 (or possible 2.6) but on > the Mac this is complicated. You shouldn't replace the Apple provided > python as many of the Apple tools use it. > > Personally I would stick with the Apple provided python and install > NumPy 1.1.1. However, it sounds like you already have installed the > incompatible NumPy 1.2 on the machine which you'll need to remove. To > remove NumPy I think you should be OK to remove the folder > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/site-packages/numpy > (or to be safe, just move it somewhere else like you desktop, in case > you need to put it back). > > Peter From dalloliogm at gmail.com Fri Feb 20 09:47:35 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Fri, 20 Feb 2009 15:47:35 +0100 Subject: [BioPython] biopython soap? Message-ID: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> Does biopython use any SOAP service? In that case, which library is used? I would like to write a script to interrogate the NCBI dbSNP database, using the soap protocol and these wdsl: - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html Does biopython provide tools to interrogate the ncbi database directly from within a script? And how is it implemented? Moreover, which library do you use for the soap protocol with python? I have been pointed to suds[1], which seems the only one currently developed. (there is also soaplab and zsi, but they seem to be not maintained any more). Or, do you recommend me any alternative method to soap to interrogate ncbi? Thanks in advance... [1] https://fedorahosted.org/suds -- My blog on bioinformatics (now in English): http://bioinfoblog.it From biopython at maubp.freeserve.co.uk Fri Feb 20 10:18:53 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 20 Feb 2009 15:18:53 +0000 Subject: [BioPython] biopython soap? In-Reply-To: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> Message-ID: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio wrote: > Does biopython use any SOAP service? > In that case, which library is used? The deprecated and removed Bio.biblio used an old version of the EBI SOAP API. This used "import SOAP" internally. I don't recall any other SOAP code in Biopython. > I would like to write a script to interrogate the NCBI dbSNP database, > using the soap protocol and these wdsl: > - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html Why do you specifically want to use their SOAP interface? > Does biopython provide tools to interrogate the ncbi database directly > from within a script? And how is it implemented? Biopython's Bio.Entrez module allows you to use the NCBI Entrez E-Utils databases (but this is not using SOAP), and this is pretty well documented in our tutorial for the more mainstream databases. >From using the Entrez einfo command, they do offer access to the "snp" database which I assume is dbSNP. See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp "dbSNP is now incorporated into NCBI's Entrez system and can be queried using the same approach as the other Entrez databases such as PubMed and GenBank." So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. Peter From dalloliogm at gmail.com Fri Feb 20 11:03:23 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Fri, 20 Feb 2009 17:03:23 +0100 Subject: [BioPython] biopython soap? In-Reply-To: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> Message-ID: <5aa3b3570902200803y26bd0f9co232bbb844f19f86@mail.gmail.com> On Fri, Feb 20, 2009 at 4:18 PM, Peter wrote: > On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio > wrote: >> Does biopython use any SOAP service? >> In that case, which library is used? > > The deprecated and removed Bio.biblio used an old version of the EBI > SOAP API. This used "import SOAP" internally. I don't recall any > other SOAP code in Biopython. > >> I would like to write a script to interrogate the NCBI dbSNP database, >> using the soap protocol and these wdsl: >> - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html > > Why do you specifically want to use their SOAP interface? No particular reason :) Just curious about trying soap. >> Does biopython provide tools to interrogate the ncbi database directly >> from within a script? And how is it implemented? > > Biopython's Bio.Entrez module allows you to use the NCBI Entrez > E-Utils databases (but this is not using SOAP), and this is pretty > well documented in our tutorial for the more mainstream databases. > From using the Entrez einfo command, they do offer access to the "snp" > database which I assume is dbSNP. Thanks.. I am using it already. Yes, I was referring to dbSNP on ncbi. > See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp > "dbSNP is now incorporated into NCBI's Entrez system and can be > queried using the same approach as the other Entrez databases such as > PubMed and GenBank." > > So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. > > Peter > -- My blog on bioinformatics (now in English): http://bioinfoblog.it From chapmanb at 50mail.com Fri Feb 20 11:06:09 2009 From: chapmanb at 50mail.com (Brad Chapman) Date: Fri, 20 Feb 2009 11:06:09 -0500 Subject: [BioPython] biopython soap? In-Reply-To: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> Message-ID: <20090220160609.GB18294@sobchak.mgh.harvard.edu> Giovanni; I did quite a bit of work with SOAP/WebServices at my old job, and generally working with it from python is a pain. As you mention, suds is actively developed and has a nice interface but in my experience it will choke on a lot of WSDLs. ZSI works stably for many cases, but the interface and usage is a bit messy. If your goal is to access dbSNP, using the Entrez EUtils REST interfaces Biopython already wraps should definitely be preferred; I am in agreement with Peter's comments. If your goal is to play with SOAP in a biological context, one good target is the PubChem interface (http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap_help.html) which I don't believe has corresponding REST access. If you go this route, I did some initial work with ZSI and could share my code with you. Brad > On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio > wrote: > > Does biopython use any SOAP service? > > In that case, which library is used? > > The deprecated and removed Bio.biblio used an old version of the EBI > SOAP API. This used "import SOAP" internally. I don't recall any > other SOAP code in Biopython. > > > I would like to write a script to interrogate the NCBI dbSNP database, > > using the soap protocol and these wdsl: > > - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html > > Why do you specifically want to use their SOAP interface? > > > Does biopython provide tools to interrogate the ncbi database directly > > from within a script? And how is it implemented? > > Biopython's Bio.Entrez module allows you to use the NCBI Entrez > E-Utils databases (but this is not using SOAP), and this is pretty > well documented in our tutorial for the more mainstream databases. > >From using the Entrez einfo command, they do offer access to the "snp" > database which I assume is dbSNP. > > See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp > "dbSNP is now incorporated into NCBI's Entrez system and can be > queried using the same approach as the other Entrez databases such as > PubMed and GenBank." > > So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. > > Peter > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython From chapmanb at 50mail.com Fri Feb 20 11:06:09 2009 From: chapmanb at 50mail.com (Brad Chapman) Date: Fri, 20 Feb 2009 11:06:09 -0500 Subject: [BioPython] biopython soap? In-Reply-To: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> Message-ID: <20090220160609.GB18294@sobchak.mgh.harvard.edu> Giovanni; I did quite a bit of work with SOAP/WebServices at my old job, and generally working with it from python is a pain. As you mention, suds is actively developed and has a nice interface but in my experience it will choke on a lot of WSDLs. ZSI works stably for many cases, but the interface and usage is a bit messy. If your goal is to access dbSNP, using the Entrez EUtils REST interfaces Biopython already wraps should definitely be preferred; I am in agreement with Peter's comments. If your goal is to play with SOAP in a biological context, one good target is the PubChem interface (http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap_help.html) which I don't believe has corresponding REST access. If you go this route, I did some initial work with ZSI and could share my code with you. Brad > On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio > wrote: > > Does biopython use any SOAP service? > > In that case, which library is used? > > The deprecated and removed Bio.biblio used an old version of the EBI > SOAP API. This used "import SOAP" internally. I don't recall any > other SOAP code in Biopython. > > > I would like to write a script to interrogate the NCBI dbSNP database, > > using the soap protocol and these wdsl: > > - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html > > Why do you specifically want to use their SOAP interface? > > > Does biopython provide tools to interrogate the ncbi database directly > > from within a script? And how is it implemented? > > Biopython's Bio.Entrez module allows you to use the NCBI Entrez > E-Utils databases (but this is not using SOAP), and this is pretty > well documented in our tutorial for the more mainstream databases. > >From using the Entrez einfo command, they do offer access to the "snp" > database which I assume is dbSNP. > > See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp > "dbSNP is now incorporated into NCBI's Entrez system and can be > queried using the same approach as the other Entrez databases such as > PubMed and GenBank." > > So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. > > Peter > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython From mjldehoon at yahoo.com Fri Feb 20 22:03:10 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Fri, 20 Feb 2009 19:03:10 -0800 (PST) Subject: [BioPython] Bio.Prosite.Prodoc Dictionary, index_file Message-ID: <295247.41329.qm@web62408.mail.re1.yahoo.com> Hi everybody, Does anybody use the Dictionary class or index_file function in Bio.Prosite.Prodoc? I think that with the current capabilities of computers, there is little sense for these functions in Bio.Prosite.Prodoc, and as far as I can tell these functions are broken anyway. If there are no users, I suggest we deprecate the Dictionary class and the index_file function in Bio.Prosite.Prodoc. --Michiel From lueck at ipk-gatersleben.de Wed Feb 25 02:48:42 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Wed, 25 Feb 2009 08:48:42 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> Message-ID: <001e01c9971d$7a8d5be0$1022a8c0@ipkgatersleben.de> I tried this but after compilation/installation Primer3 gives no output, only a return code of -1073741515 (but no errors or messages)... Regards Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Monday, February 09, 2009 5:06 PM Subject: Re: [BioPython] BLAST subprocess problem with a GUI On Mon, Feb 9, 2009 at 3:21 PM, Stefanie L?ck wrote: > > Never ending story... > > After compilation and changing in the > Application/__init__.py file, unfortunatly Primer3 don't work and gives > this > Error: > > Traceback (most recent call last): > File "primer3.pyc", line 208, in get_2 > File "Bio\Application\__init__.pyc", line 29, in generic_run > File "subprocess.pyc", line 593, in __init__ > File "subprocess.pyc", line 793, in _execute_child > > WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden In English that's something like "The system cannot find the indicated file", which suggests that you don't have the primer3 path specified correctly (and this this isn't the pipe problem we had before with BLAST). Try adding check on the primer3 executable filename: import os primer3_exe = r"C:\Program Files\EMBOSS\primer3.exe" assert os.path.isfile(primer3_exe) cline = Primer3Commandline(primer3_exe) ... Note that you can create the Primer3Commandline object without specifying the location of the executable file. On Unix, this will then try and locate the tool from the path environment variable. On Windows, I find it best to always be explicit and provide the full path to the filename. Peter From biopython at maubp.freeserve.co.uk Wed Feb 25 03:59:29 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Wed, 25 Feb 2009 08:59:29 +0000 Subject: [BioPython] BLAST subprocess problem with a GUI In-Reply-To: <001e01c9971d$7a8d5be0$1022a8c0@ipkgatersleben.de> References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> <001e01c9971d$7a8d5be0$1022a8c0@ipkgatersleben.de> Message-ID: <320fb6e00902250059v1afd152ex51bc4439a34441c4@mail.gmail.com> On Wed, Feb 25, 2009 at 7:48 AM, Stefanie L?ck wrote: > I tried this but after compilation/installation Primer3 gives no output, > only a return code of -1073741515 (but no errors or messages)... The error number -1073741515 can be regarded as the hex representation 0xc0000135, which could be "The application failed to initialize properly" (try searching both in Google). Without more information this would be hard to resolve as this seems to be a rather generic error code. Is this problem showing up on your own machine or someone elses? If it works on some computers and not others, this would suggest its could be a problem with the primer3 installation rather than your code. Does it work if you run the code directly in Python rather than via py2exe? I would suggest you add a message box or print statement to show the actual command line string to the user just before trying to run the program. Make a note of this, then also try running this command by hand. It could be something missing in your EMBOSS setup (e.g. it can't find certain data files). Peter From mjldehoon at yahoo.com Thu Feb 26 09:52:13 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Thu, 26 Feb 2009 06:52:13 -0800 (PST) Subject: [BioPython] Bio.Prosite Dictionary, index_file Message-ID: <996228.286.qm@web62402.mail.re1.yahoo.com> Hi everybody, Does anybody use the Dictionary class or index_file function in Bio.Prosite? As far as I can tell these functions are broken. If there are no users, I suggest we deprecate the Dictionary class and the index_file function in Bio.Prosite. --Michiel From biopython at maubp.freeserve.co.uk Thu Feb 26 17:00:39 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 26 Feb 2009 22:00:39 +0000 Subject: [BioPython] [Biopython-dev] library to create gel image In-Reply-To: <1235675865.49a6ead98bc24@webmail.upv.es> References: <200902261612.54306.jblanca@btc.upv.es> <320fb6e00902261051n62899098i86edd36ba00ee7d4@mail.gmail.com> <1235675865.49a6ead98bc24@webmail.upv.es> Message-ID: <320fb6e00902261400v22af3c52ob1a8cb80113f6756@mail.gmail.com> On Thu, Feb 26, 2009 at 7:17 PM, Blanca Postigo Jose Miguel wrote: > >> Do you want to recreate the hexagonal grid, or would a simplified >> rectangular grid do? > > I don't understand that. I just want to recreate an electroforesis gel using the > raw or the analyzed data provided by the Applied Biosystem software. Each > chromatogram would be a lane in this virtual gel. The example was a bit small - so I had guessed a bit, and it sounds like my guess was wrong. Do you have a larger example picture? Peter From dschruth at gmail.com Fri Feb 27 02:26:15 2009 From: dschruth at gmail.com (David Michael Schruth) Date: Thu, 26 Feb 2009 23:26:15 -0800 Subject: [BioPython] Reading Fasta-like Qual Files Message-ID: Hello, This is my first post on the list. I'm enjoying using biopython but am running into some snags when trying to incorporate quality information into my analysis. Namely I can't quite read in qual files (output from 454, solid) the way I would like. Namely, the spaces between the two digit integer phred scores get squished indistinguishably together. I've actually fixed this in my own copy of the code by removing the .replace(" ","") call from ~58th line of FastaIO.py (in the FastaIterator class). Hopefully this doesn'thave any adverse effects that I might not have forseen. In the mean time, It would be nice to have some sort of more permanant solution to this.... some way to specify or to otherwise accomodate these fasta-like qual files in FastaIO and Biopython In general. Supporting the fastQ format would also be nice. The only mention of biopython and quality I've run across is on the Biopython-dev list: http://portal.open-bio.org/pipermail/biopython-dev/2007-October/003131.html The email is dated 2007 but I'm doubting that any progress on this front has been made. Perhaps there is a better way to search these lists that I don't know about but I've sure had a hard time finding any discussions about quality score handling. (Which brings up another idea: why don't we make this list and the list archive part of google groups?) Thanks, Dave From biopython at maubp.freeserve.co.uk Fri Feb 27 05:54:26 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 27 Feb 2009 10:54:26 +0000 Subject: [BioPython] Reading Fasta-like Qual Files In-Reply-To: References: Message-ID: <320fb6e00902270254q7dd23f5aj3ecacfb357aa1ddb@mail.gmail.com> On Fri, Feb 27, 2009 at 7:26 AM, David Michael Schruth wrote: > Hello, > > This is my first post on the list. ?I'm enjoying using biopython but am > running into some snags when trying to incorporate quality information into > my analysis. ?Namely I can't quite read in qual files (output from 454, > solid) ?the way I would like. ? Namely, the spaces between the two digit > integer phred scores get squished indistinguishably together. ? I've > actually fixed this in my own copy of the code by removing the > > .replace(" ","") > > call from ~58th line of FastaIO.py (in the FastaIterator class). > > Hopefully this doesn't have any adverse effects that I might not have > forseen. ?In the mean time, It would be nice to have some sort of more > permanant solution to this.... some way to specify or to otherwise > accomodate these fasta-like qual files in FastaIO and Biopython In > general. ? ?Supporting the fastQ format would also be nice. The Bio.SeqIO.FastaIO parser is intended for FASTA sequence files only, where any white space should be removed. Even with your suggested change, it doesn't make sense to stick a string of numbers into a Seq object. Basically that parser just isn't intended to be used with QUAL files. But there is some good news - your email is quite timely! > The only mention of biopython and quality I've run across is on the > Biopython-dev list: > http://portal.open-bio.org/pipermail/biopython-dev/2007-October/003131.html > The email is dated 2007 but I'm doubting that any progress on this front has > been made. Maybe the search engines haven't indexed the latest discussions, just this month: http://lists.open-bio.org/pipermail/biopython-dev/2009-February/005340.html Also searching our Bugzilla should have found a few hits for enhancements. There isn't any code checked into CVS yet, but things are happening and I hope we'll have built in support for reading (and probably writing) FASTQ and QUAL files in the next release of Biopython. If you are interested in the details, you might want to sign up to the dev mailing list, but I'm sure we'll have some announcement or discussion on this list too. Peter From bala.biophysics at gmail.com Fri Feb 27 10:16:09 2009 From: bala.biophysics at gmail.com (Bala subramanian) Date: Fri, 27 Feb 2009 16:16:09 +0100 Subject: [BioPython] SASA calculation Message-ID: <288df32a0902270716s1124d573q3b445d869f832e2@mail.gmail.com> Friends, I want to open a pdb file, calculate the solvent accessible surface area for each atom and write a new pdb with SASA as the last column of the pdb. Your inputs would be highly helpful for me. Thanks, Bala From biopython at maubp.freeserve.co.uk Fri Feb 27 10:30:12 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 27 Feb 2009 15:30:12 +0000 Subject: [BioPython] SASA calculation In-Reply-To: <288df32a0902270716s1124d573q3b445d869f832e2@mail.gmail.com> References: <288df32a0902270716s1124d573q3b445d869f832e2@mail.gmail.com> Message-ID: <320fb6e00902270730k7f83e615nb659f080dfeaf564@mail.gmail.com> On Fri, Feb 27, 2009 at 3:16 PM, Bala subramanian wrote: > Friends, > > I want to open a pdb file, calculate the solvent accessible surface area for > each atom and write a new pdb with SASA as the last column of the pdb. Your > inputs would be highly helpful for me. Hi Bala, Have a look at the example script hsexpo to see if there is anything useful to you (e.g. writing out a PDB file containing extra data). This is the source code archive but there was a bug fixed since we released Biopython 1.49. You can just download the latest version from here: http://biopython.org/SRC/biopython/Scripts/Structure/hsexpo or: http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Scripts/Structure/hsexpo?cvsroot=biopython I would also look at the Bio.PDB.NACCESS module in Biopython - this acts as a wrapper for the command line tool NACCESS, http://www.bioinf.manchester.ac.uk/naccess/ Peter From lueck at ipk-gatersleben.de Mon Feb 2 07:37:35 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Mon, 2 Feb 2009 08:37:35 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> Message-ID: <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> Hi Peter and the rest of the mailing list! I'm using Biopython 1.49b and Python 2.5. I tried your suggestion and changed \Blast\NCBIStandalone.py as you said: import subprocess, sys #We don't need to supply any piped input, but we setup the #pipe anyway as a work around for a python bug if this is #called from a Windows GUI program. For details, see: #http://bugs.python.org/issue1124861 blast_process = subprocess.Popen(cmd_string, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform!="win32")) blast_process.stdin.close() return blast_process.stdout, blast_process.stderr And after comipilation with py2exe it's seem to work! In addition I changed \Application\__init__.py in function generic_run \ClustalW\__init__.py in function do_alignment in the same way because I got the same error message when I used Primer3 and ClustalW. I tried up to now only on view Windows XP PC's but it's looks like the problem is solved! Finally I can release the tool for testing! Thanks to all for their help! Thanks a lot Peter and sorry for the late reply! Kind regards Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Wednesday, January 28, 2009 6:45 PM Subject: [BioPython] BLAST subprocess problem with a GUI On Tue, Jan 13, 2009 at 10:41 AM, Peter wrote: > On Tue, Jan 13, 2009 at 7:38 AM, Stefanie L?ck > wrote: >> I was a little bit to optimistic... >> >> After compilation with py2exe, blast hangs. In the log file of py2exe >> I get the following error message: >> >> Traceback (most recent call last): >> File "prim_search.pyc", line 464, in make_xml >> >> File "Bio\Blast\NCBIStandalone.pyc", line 1668, in blastall >> File "Bio\Blast\NCBIStandalone.pyc", line 1992, in _invoke_blast >> File "subprocess.pyc", line 586, in __init__ >> File "subprocess.pyc", line 681, in _get_handles >> File "subprocess.pyc", line 722, in _make_inheritable >> TypeError: an integer is required >> >> Any ideas? >> Stefanie > > Are you using Biopython 1.49? > > What version of Python are you using here? (Python 2.3 is handled a > little differently, as it does not have the subprocess module). > > Can you confirm the exact same code works fine run from Python > directly (via IDLE or the commandline?), but fails via py2exe? > > Are you running the py2exe compiled version from the Windows command > line? Can you try that, even thought you said it was a GUI program. > This might be related to the following python bug on Windows to do > with pipe redirection, http://bugs.python.org/issue1124861 > If so, I think there is a suggested work around we can try (this will > require a change to the Biopython code). > > Peter Hi Stefanie, Did you make any progress with this problem? If as I suspect the problem is the python subprocess bug http://bugs.python.org/issue1124861 then you can try the suggested work around in Biopython, by modifying the _invoke_blast function in Bio\Blast\NCBIStandalone.py file as follows: import subprocess, sys #We don't need to supply any piped input, but we setup the #pipe anyway as a work around for a python bug if this is #called from a Windows GUI program. For details, see: #http://bugs.python.org/issue1124861 blast_process = subprocess.Popen(cmd_string, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=(sys.platform!="win32")) blast_process.stdin.close() return blast_process.stdout, blast_process.stderr I've checked this change doesn't seem to break anything - but does it help for your GUI program? Peter From biopython at maubp.freeserve.co.uk Mon Feb 2 10:16:23 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 2 Feb 2009 10:16:23 +0000 Subject: [BioPython] BLAST subprocess problem with a GUI In-Reply-To: <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> Message-ID: <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> On Mon, Feb 2, 2009 at 7:37 AM, Stefanie L?ck wrote: > > Hi Peter and the rest of the mailing list! > > I'm using Biopython 1.49b and Python 2.5. > > I tried your suggestion and changed \Blast\NCBIStandalone.py as you said: > > import subprocess, sys > #We don't need to supply any piped input, but we setup the > #pipe anyway as a work around for a python bug if this is > #called from a Windows GUI program. For details, see: > #http://bugs.python.org/issue1124861 > blast_process = subprocess.Popen(cmd_string, > stdin=subprocess.PIPE, > stdout=subprocess.PIPE, > stderr=subprocess.PIPE, > shell=(sys.platform!="win32")) > blast_process.stdin.close() > return blast_process.stdout, blast_process.stderr > > And after comipilation with py2exe it's seem to work! In addition I changed > \Application\__init__.py in function generic_run > \ClustalW\__init__.py in function do_alignment > in the same way because I got the same error message when I used Primer3 > and ClustalW. I tried up to now only on view Windows XP PC's but it's looks > like the problem is solved! Great - I've made this change in CVS now: Blast/NCBIStandalone.py revision: 1.85 Clustalw/__init__.py revision 1.26 Application/__init__.py revision 1.9 > Finally I can release the tool for testing! Thanks to all for their help! > > Thanks a lot Peter and sorry for the late reply! > > Kind regards > Stefanie Thank you for reporting the issue, testing the change and letting us know it works. Peter From rapandey at iupui.edu Mon Feb 2 21:33:13 2009 From: rapandey at iupui.edu (Ragini Pandey) Date: Mon, 2 Feb 2009 16:33:13 -0500 Subject: [BioPython] KEGG enzyme error Message-ID: <002201c9857d$da39ff50$8eadfdf0$@edu> Hi, I am trying to parse KEGG enzyme. The parser is failing for EC 1.1.1.49 The data line where it is failing is- "DRE: 100148915 570579(wu:fj78b06)" There are several other data lines in this format. The error I am getting is: line 227, in parse key, values = data.split(":") ValueError: too many values to unpack Here is my code: import urllib from Bio.KEGG import Enzyme dataFile = open(myFile) for record in Enzyme.parse(dataFile): print record.entry Would appreciate your help on this. Thanks Ragini From idoerg at gmail.com Mon Feb 2 22:39:02 2009 From: idoerg at gmail.com (Iddo Friedberg) Date: Mon, 02 Feb 2009 14:39:02 -0800 Subject: [BioPython] 10th year Message-ID: <1233614342.25080.11.camel@lafa> I guess everybody is too busy to notice that biopython is into its 10th year now.. birthday celebrations are nine months away, Since the mailing lists start in September 1999. But I guess that some sort of party at BOSC would be nice... -- Iddo Friedberg, Ph.D. CALIT2 Atkinson Hall MC #0446 University of California San Diego 9500 Gilman Drive La Jolla, CA 92093-0446 USA +1 (858) 534-0570 http://iddo-friedberg.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From biopython at maubp.freeserve.co.uk Tue Feb 3 11:35:17 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Tue, 3 Feb 2009 11:35:17 +0000 Subject: [BioPython] KEGG enzyme error In-Reply-To: <002201c9857d$da39ff50$8eadfdf0$@edu> References: <002201c9857d$da39ff50$8eadfdf0$@edu> Message-ID: <320fb6e00902030335u372c23d2v32e841c33c738b22@mail.gmail.com> On Mon, Feb 2, 2009 at 9:33 PM, Ragini Pandey wrote: > Hi, > > I am trying to parse KEGG enzyme. The parser is failing for EC 1.1.1.49 > The data line where it is failing is- > "DRE: 100148915 570579(wu:fj78b06)" > There are several other data lines in this format. > > The error I am getting is: > line 227, in parse > key, values = data.split(":") > ValueError: too many values to unpack The problem is the code expects a single ":" character which can be used to split the string into the key ("DRE") and the data, here "100148915 570579(wu:fj78b06)" but the extra ":" is causing the split to give three parts. Try editing that line to read: key, values = data.split(":",1) > Here is my code: > > import urllib > from Bio.KEGG import Enzyme > dataFile = open(myFile) > for record in Enzyme.parse(dataFile): > print record.entry > > Would appreciate your help on this. Which file exactly are you using? The problem data line you gave doesn't match http://www.expasy.ch/enzyme/1.1.1.49.txt Peter From biopython at maubp.freeserve.co.uk Tue Feb 3 18:14:03 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Tue, 3 Feb 2009 18:14:03 +0000 Subject: [BioPython] KEGG enzyme error In-Reply-To: <000b01c98629$4419c350$cc4d49f0$@edu> References: <002201c9857d$da39ff50$8eadfdf0$@edu> <320fb6e00902030335u372c23d2v32e841c33c738b22@mail.gmail.com> <000b01c98629$4419c350$cc4d49f0$@edu> Message-ID: <320fb6e00902031014y57735fd1s82e86af2229c0cee@mail.gmail.com> On Tue, Feb 3, 2009 at 6:00 PM, Ragini Pandey wrote: > > Hi Peter, > > The file I am trying to parse is > ftp://ftp.genome.jp/pub/kegg/ligand/enzyme/enzyme > > Thanks > Ragini Hi Ragini, I was able to quickly test my suggested fix on that file, and it seems to resolve the problem. I've checked this into CVS, see Bio/KEGG/Enzyme/__init__.py revision 1.12 (which should be visible on the website in an hour or so), http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/KEGG/Enzyme/__init__.py?cvsroot=biopython You should be able to edit your Bio/KEGG/Enzyme/__init__.py file by hand, or you could update it by downloading the new one from CVS. Ask for help if you need clearer instructions... Let us know if you have any other problems with KEGG. Thanks, Peter From dalloliogm at gmail.com Wed Feb 4 03:01:51 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Wed, 4 Feb 2009 04:01:51 +0100 Subject: [BioPython] a template for unittests in biopython Message-ID: <5aa3b3570902031901q5450bf43nfeb23ded1c70608c@mail.gmail.com> Hi people, I have posted here: - http://github.com/dalloliogm/bio-test-datasets-repository/blob/master/templates/biopython/biotest_template.py a draft for a template for unittests in biopython. You can also refer to it as bug 2749 (http://bugzilla.open-bio.org/show_bug.cgi?id=2749). So, the idea is that if we have a template for test files, it will be easier for new developers to write new tests and modules. This one in particular makes use of nose, and it has some example of global fixtures (the two setUpClass and tearDownAll methods). What do you think about it? Cheers.. -- My blog on bioinformatics (now in English): http://bioinfoblog.it From bsouthey at gmail.com Wed Feb 4 16:59:02 2009 From: bsouthey at gmail.com (Bruce Southey) Date: Wed, 04 Feb 2009 10:59:02 -0600 Subject: [BioPython] Does anyone use EZRetrieve? In-Reply-To: <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> References: <4925CCAA.2040809@gmail.com> <320fb6e00811201253j66336d7cl977e4e3112c9f9f7@mail.gmail.com> <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> Message-ID: <4989C956.4020709@gmail.com> Peter wrote: > On Thu, Nov 20, 2008 at 8:53 PM, Peter wrote: > >> On Thu, Nov 20, 2008 at 8:46 PM, Bruce Southey wrote: >> >>> Hi, >>> Does anyone use EZRetrieve >>> (http://siriusb.umdnj.edu:18080/EZRetrieve/single_r.jsp) ? >>> This allows a user to retrieve a human, mouse or rat genome nucleic sequence >>> based on an valid identifier. >>> >>> I think that most of the functionality of Bio.EZRetrieve is already present >>> in Biopython and the genome sources appear to be 5 years old. For example, >>> it uses LocusLink that was discontinued March 2005. >>> >>> If so could you please let me know? >>> >> Actually - could you let the whole mailing list know? ;) >> >> Given nature of the database and the limited functionality this python >> code offers, if no-one is using Bio.EZRetrieve then it could be >> considered for deprecation. >> > > I've seen no replies so I've marked Bio.EZRetrieve as obsolete in CVS > (and therefore for Biopython 1.50), and unless anyone speaks up it > will be deprecated in the release after that. > > I'm not sure that the EZRetrieve data is that out of date (they may > have updated things since Bruce looked), but all the Bio.EZRetrieve > code does is fetch an HTML page and extract the FASTA formatted > sequence (ignoring any metadata or cross references). In any case, > this kind of HTML "screen scraping" is fragile (liable to break when > the site gets a visual redesign) and is not explicitly condoned by the > service itself. > > Peter > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython > Hi, I got nothing back from this nor for Bio.Affy and Bio.NMR (I tried a couple of emails) so I would suggest you also mark these as depreciated for Biopython 1.5. The EZRetrieve help page still refers to 2003 releases. http://siriusb.umdnj.edu:18080/EZRetrieve/help.jsp Thanks Bruce From biopython at maubp.freeserve.co.uk Wed Feb 4 17:09:56 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Wed, 4 Feb 2009 17:09:56 +0000 Subject: [BioPython] Does anyone use EZRetrieve? In-Reply-To: <4989C956.4020709@gmail.com> References: <4925CCAA.2040809@gmail.com> <320fb6e00811201253j66336d7cl977e4e3112c9f9f7@mail.gmail.com> <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> <4989C956.4020709@gmail.com> Message-ID: <320fb6e00902040909k616ba7bex25494f18ed757743@mail.gmail.com> > Hi, > I got nothing back from this nor for Bio.Affy and Bio.NMR (I tried a couple > of emails) so I would suggest you also mark these as depreciated for > Biopython 1.5. I'm being pedantic/nit-picking, but the next release will be Biopython 1.50, (one, fifty) and then Biopython 1.51 (one, fifty one). There never was a Biopython 1.5 (one, five). > The EZRetrieve help page still refers to 2003 releases. > http://siriusb.umdnj.edu:18080/EZRetrieve/help.jsp Anyway - maybe you are right, and we could deprecate Bio.EZRetrieve in Biopython 1.50 (rather than just declaring it obsolete with the intension of deprecating it in Biopython 1.51). Peter From bsouthey at gmail.com Wed Feb 4 17:41:20 2009 From: bsouthey at gmail.com (Bruce Southey) Date: Wed, 04 Feb 2009 11:41:20 -0600 Subject: [BioPython] Does anyone use EZRetrieve? In-Reply-To: <320fb6e00902040909k616ba7bex25494f18ed757743@mail.gmail.com> References: <4925CCAA.2040809@gmail.com> <320fb6e00811201253j66336d7cl977e4e3112c9f9f7@mail.gmail.com> <320fb6e00901300452vdfd1a73yf70fd78d77d12eb5@mail.gmail.com> <4989C956.4020709@gmail.com> <320fb6e00902040909k616ba7bex25494f18ed757743@mail.gmail.com> Message-ID: <4989D340.1060001@gmail.com> Peter wrote: >> Hi, >> I got nothing back from this nor for Bio.Affy and Bio.NMR (I tried a couple >> of emails) so I would suggest you also mark these as depreciated for >> Biopython 1.5. >> > > I'm being pedantic/nit-picking, but the next release will be Biopython > 1.50, (one, fifty) and then Biopython 1.51 (one, fifty one). There > never was a Biopython 1.5 (one, five). > > Thanks as it is critical to get the numbers right! Perhaps I am missing a Bio.__version__ (but interesting history of numbering) . >> The EZRetrieve help page still refers to 2003 releases. >> http://siriusb.umdnj.edu:18080/EZRetrieve/help.jsp >> > > Anyway - maybe you are right, and we could deprecate Bio.EZRetrieve in > Biopython 1.50 (rather than just declaring it obsolete with the > intension of deprecating it in Biopython 1.51). > > Peter > I know we have had this discussion before but either option is agreeable to me for these modules. Bruce From bala.biophysics at gmail.com Thu Feb 5 18:19:04 2009 From: bala.biophysics at gmail.com (Bala subramanian) Date: Thu, 5 Feb 2009 19:19:04 +0100 Subject: [BioPython] vector distance Message-ID: <288df32a0902051019gf152619oae5e082bd6a893eb@mail.gmail.com> Dear Friends, Can someone please tell me if it is possible to calculate the vector distance between two atoms using Bio.PDB. Given two pdb files, i want to calculate the vector distance between the Calpha atoms in the two pdb files. Someone kindly enlighten me how can i do it. Thanks in advance, Bala From rodrigo_faccioli at uol.com.br Thu Feb 5 21:06:52 2009 From: rodrigo_faccioli at uol.com.br (Rodrigo faccioli) Date: Thu, 5 Feb 2009 19:06:52 -0200 Subject: [BioPython] Biopython on Eclipse IDE Message-ID: <3715adb70902051306w29b25518k1d06d08f3d9544ef@mail.gmail.com> Hi, I'm working with Eclipse IDE to develop my programs. I use it because I develop in C/C++ and Java and now I'm studying python and biopython. I write python code using Pydev plugin. I want to know, if it's possible when I'm using a biopython object Eclipse shows me its methods. In another words, how can I import biopython module to Eclipse? Sorry, if this place isn't the best place about my question. However, I don't know another place. Thanks any help. -- Rodrigo Antonio Faccioli Ph.D Student in Electrical Engineering University of Sao Paulo - USP Engineering School of Sao Carlos - EESC Department of Electrical Engineering - SEL Intelligent System in Structure Bioinformatics http://laips.sel.eesc.usp.br Phone: 55 (16) 3373-9366 Ext 229 Curriculum Lattes - http://lattes.cnpq.br/1025157978990218 From mailinglist.honeypot at gmail.com Thu Feb 5 21:22:21 2009 From: mailinglist.honeypot at gmail.com (Steve Lianoglou) Date: Thu, 5 Feb 2009 16:22:21 -0500 Subject: [BioPython] Biopython on Eclipse IDE In-Reply-To: <3715adb70902051306w29b25518k1d06d08f3d9544ef@mail.gmail.com> References: <3715adb70902051306w29b25518k1d06d08f3d9544ef@mail.gmail.com> Message-ID: <486AA5FD-9DC6-462C-BBF4-BF857135578B@gmail.com> Hi Rodrigo, > I'm working with Eclipse IDE to develop my programs. I use it > because I > develop in C/C++ and Java and now I'm studying python and biopython. > I write > python code using Pydev plugin. > > I want to know, if it's possible when I'm using a biopython object > Eclipse > shows me its methods. In another words, how can I import biopython > module > to Eclipse? I don't use pydev so much anymore, though I still have it installed on my system. This is working for me (I have the PyDev extenstions as well). For instance, if I type: from Bio import and hit ctrl-space, I get a list of completions, like Affy, ..., Blast, ..., ExPASy, etc. You might want to reload the libs found in your Python Interpreter setting. > Sorry, if this place isn't the best place about my question. > However, I > don't know another place. You could try the PyDev user forums: http://sourceforge.net/forum/forum.php?forum_id=293649 HTH, -steve From hyunchul.mailing at gmail.com Fri Feb 6 03:52:18 2009 From: hyunchul.mailing at gmail.com (Hyunchul Kim) Date: Fri, 6 Feb 2009 12:52:18 +0900 Subject: [BioPython] How to automate "save column scores to file" in clustalx? Message-ID: <573a3abd0902051952y123e9f6cx4ac0806166b36e79@mail.gmail.com> Hi, all I need 'quality scores' of clustal. ClustalW provides only 4 degrees by simbols (*, :, ., ' ') and biopython supports it. ClustalX provides quality scores and it can be saved via menu 'Quality' -> 'save column scores to file'. However, I couldn't figure out how to do it automatically such as command line or biopython scripting. More specifically, ClustalW can produce the 'quality scores'? or ClustalX can produce output containing 'quality scores' by command line? or Any other suggestions? Thanks Hyunchul From biopython at maubp.freeserve.co.uk Fri Feb 6 10:41:02 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 6 Feb 2009 10:41:02 +0000 Subject: [BioPython] How to automate "save column scores to file" in clustalx? In-Reply-To: <573a3abd0902051952y123e9f6cx4ac0806166b36e79@mail.gmail.com> References: <573a3abd0902051952y123e9f6cx4ac0806166b36e79@mail.gmail.com> Message-ID: <320fb6e00902060241v14493ee6h1c3cf288011598a9@mail.gmail.com> On Fri, Feb 6, 2009 at 3:52 AM, Hyunchul Kim wrote: > Hi, all > > I need 'quality scores' of clustal. > ClustalW provides only 4 degrees by simbols (*, :, ., ' ') and biopython > supports it. > ClustalX provides quality scores and it can be saved via menu 'Quality' -> > 'save column scores to file'. > However, I couldn't figure out how to do it automatically such as command > line or biopython scripting. > > More specifically, > ClustalW can produce the 'quality scores'? Not that I am aware of. You could try looking at the source code or email the authors. > or ClustalX can produce output containing 'quality scores' by command line? Not that I am aware of. You could try looking at the source code or email the authors. > or Any other suggestions? Do you know how this score is calculated? Perhaps it can be calculated from the alignment columns themselves? Certainly the four symbols can be calculated from the column composition ("*" for 100% conserved, ":" if there are all in the same amino acid strong group, "." if they are all in the same amino acid week group, space otherwise). Peter From p.j.a.cock at googlemail.com Fri Feb 6 10:51:29 2009 From: p.j.a.cock at googlemail.com (Peter Cock) Date: Fri, 6 Feb 2009 10:51:29 +0000 Subject: [BioPython] vector distance In-Reply-To: <288df32a0902051019gf152619oae5e082bd6a893eb@mail.gmail.com> References: <288df32a0902051019gf152619oae5e082bd6a893eb@mail.gmail.com> Message-ID: <320fb6e00902060251t27c3e173v9c32980d0db41617@mail.gmail.com> On Thu, Feb 5, 2009 at 6:19 PM, Bala subramanian wrote: > Dear Friends, > > Can someone please tell me if it is possible to calculate the vector > distance between two atoms using Bio.PDB. Given two pdb files, i want to > calculate the vector distance between the Calpha atoms in the two pdb files. > Someone kindly enlighten me how can i do it. Have you ever worked with Numeric or NumPy before? That would be very helpful for you. Given two residue objects, this worked on Biopython 1.48 or older (using Numeric): import Numeric def calc_residue_dist(residue_one, residue_two) : """Returns the C-alpha distance between two residues""" diff_vector = residue_one["CA"].coord - residue_two["CA"].coord return Numeric.sqrt(Numeric.sum(diff_vector * diff_vector)) Now that Biopython 1.49+ is using NumPy instead of Numeric, you'd probably want to do this instead: import numpy def calc_residue_dist(residue_one, residue_two) : """Returns the C-alpha distance between two residues""" diff_vector = residue_one["CA"].coord - residue_two["CA"].coord return numpy.sqrt(numpy.sum(diff_vector * diff_vector)) See http://www.warwick.ac.uk/go/peter_cock/python/protein_contact_map/ for more information. Peter From p.j.a.cock at googlemail.com Fri Feb 6 15:00:55 2009 From: p.j.a.cock at googlemail.com (Peter Cock) Date: Fri, 6 Feb 2009 15:00:55 +0000 Subject: [BioPython] 10th year In-Reply-To: <1233614342.25080.11.camel@lafa> References: <1233614342.25080.11.camel@lafa> Message-ID: <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> Iddo Friedberg wrote: > I guess everybody is too busy to notice that biopython is into its 10th > year now.. birthday celebrations are nine months away, Since the mailing > lists start in September 1999. But I guess that some sort of party at > BOSC would be nice... Whoever gives the Biopython project update at BOSC 2009 should try and include this news in a slide :) I'm hoping to be able to attend BOSC 2009 this year (end of June, Stockholm, Sweden) but haven't been able to confirm with work - lots of other stuff keeping me busy at the moment. http://www.open-bio.org/wiki/BOSC_2009 Is anyone else planning or hoping to go? Peter From bav853 at bham.ac.uk Fri Feb 6 17:42:01 2009 From: bav853 at bham.ac.uk (Bhima A van der Molen) Date: Fri, 06 Feb 2009 17:42:01 +0000 Subject: [BioPython] hsexposure.py Message-ID: <498C7669.60007@bham.ac.uk> Hi, I am a newbe to the list.. I just started my PhD and I am trying to get some calculations for surface accessibility for some proteins stored in PDB format. There is a niffty little script included with the BioPython download in the scripts folder called hsexposure.py which is supposed to calculate the half sphere exposure of each residue in the PDB file. However, when I run it with the option to calculate HSE (all variations) I get 0 stored in the b-factor column of my PDB file instead of the count.. so I tried extracting the code I want specifically.. i.e. the part to calculate the HSEBU values and tried to get it to print on the screen.. I get the same result.. 0.0 as my HSE value.. see code below: ##code begins## from Bio import PDB from Bio.PDB import * import sys pdbfile=open('/home/aurobhima/pdb/pdb1fat.ent') p=PDBParser() s=p.get_structure('X', pdbfile) m=s[0] RADIUS=12.0 format ="4%i" hse=PDB.HSExposureCB(m, RADIUS) k = 'EXP_HSE_A_U' residue_list=PDB.Selection.unfold_entities(m,'R') for r in residue_list: if r.xtra.has_key(k): exposure=r.xtra[k] if icode==' ': icode='_' resname=r.get_resname() print (("%s %4i %c\t"+format) % (resname, resseq, icode, exposure)) else: exposure=0.0 print exposure ##code ends## if anybody has any ideas it would really help out.. I should point out that the DSSP and CN calculations work fine with the script.. Thanks Bhima -------------- next part -------------- A non-text attachment was scrubbed... Name: bav853.vcf Type: text/x-vcard Size: 312 bytes Desc: not available URL: From sbassi at genesdigitales.com Fri Feb 6 21:22:14 2009 From: sbassi at genesdigitales.com (Sebastian Bassi) Date: Fri, 6 Feb 2009 19:22:14 -0200 Subject: [BioPython] 10th year In-Reply-To: <1233614342.25080.11.camel@lafa> References: <1233614342.25080.11.camel@lafa> Message-ID: On Mon, Feb 2, 2009 at 8:39 PM, Iddo Friedberg wrote: > I guess everybody is too busy to notice that biopython is into its 10th > year now.. birthday celebrations are nine months away, Since the mailing > lists start in September 1999. But I guess that some sort of party at > BOSC would be nice... Hi, the timing for this announce is right for me. In an Biopython chapter I wrote this about Biopython history: "It started as an idea in August of 1999, it was an initiative by Jeff Chang and Andrew Dalke. Although they came up with the idea, collaborators soon joined the project. Among the most active developers, Brad Chapman, Peter Cock, Michiel de Hoon and Iddo Friedberg stands out. The project began to take code form in February 2000 and in July of the same year the first release was made." What do you think about this? Is there something you would like to change on this paragraph? From dalke at dalkescientific.com Sat Feb 7 01:44:25 2009 From: dalke at dalkescientific.com (Andrew Dalke) Date: Sat, 7 Feb 2009 02:44:25 +0100 Subject: [BioPython] 10th year In-Reply-To: <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> References: <1233614342.25080.11.camel@lafa> <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> Message-ID: <1C91CBF7-F233-4C9E-AC12-0322A1EDC9D8@dalkescientific.com> On Feb 6, 2009, at 4:00 PM, Peter Cock wrote: > Is anyone else planning or hoping to go [to BOSC]? I am, even though I haven't been to BOSC for a few years. While I effectively only do cheminformatics these days, Stockholm is just down the (rail)road from Gothenburg, where I live. Andrew dalke at dalkescientific.com From chapmanb at 50mail.com Sun Feb 8 15:07:51 2009 From: chapmanb at 50mail.com (Brad Chapman) Date: Sun, 8 Feb 2009 10:07:51 -0500 Subject: [BioPython] 10th year In-Reply-To: <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> References: <1233614342.25080.11.camel@lafa> <320fb6e00902060700v209db176r676668eab2415fc4@mail.gmail.com> Message-ID: <20090208150750.GB10946@kunkel> > > I guess everybody is too busy to notice that biopython is into its 10th > > year now.. birthday celebrations are nine months away, Since the mailing > > lists start in September 1999. But I guess that some sort of party at > > BOSC would be nice... > > Whoever gives the Biopython project update at BOSC 2009 should try and > include this news in a slide :) I for one am refusing to acknowledge this milestone due to suddenly feeling very old. > I'm hoping to be able to attend BOSC 2009 this year (end of June, > Stockholm, Sweden) but haven't been able to confirm with work - lots > of other stuff keeping me busy at the moment. > http://www.open-bio.org/wiki/BOSC_2009 > > Is anyone else planning or hoping to go? Like Andrew, I haven't been for a few years but hope to make it this year. If we have good python representation, we should plan some informal coding sessions. Brad From lueck at ipk-gatersleben.de Mon Feb 9 15:21:11 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Mon, 9 Feb 2009 16:21:11 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> Message-ID: <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> Never ending story... After compilation and changing in the Application/__init__.py file, unfortunatly Primer3 don't work and gives this Error: Traceback (most recent call last): File "primer3.pyc", line 208, in get_2 File "Bio\Application\__init__.pyc", line 29, in generic_run File "subprocess.pyc", line 593, in __init__ File "subprocess.pyc", line 793, in _execute_child WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden Any ideas? ClustalW and blastall work fine! Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Monday, February 02, 2009 11:16 AM Subject: Re: [BioPython] BLAST subprocess problem with a GUI On Mon, Feb 2, 2009 at 7:37 AM, Stefanie L?ck wrote: > > Hi Peter and the rest of the mailing list! > > I'm using Biopython 1.49b and Python 2.5. > > I tried your suggestion and changed \Blast\NCBIStandalone.py as you said: > > import subprocess, sys > #We don't need to supply any piped input, but we setup the > #pipe anyway as a work around for a python bug if this is > #called from a Windows GUI program. For details, see: > #http://bugs.python.org/issue1124861 > blast_process = subprocess.Popen(cmd_string, > stdin=subprocess.PIPE, > stdout=subprocess.PIPE, > stderr=subprocess.PIPE, > shell=(sys.platform!="win32")) > blast_process.stdin.close() > return blast_process.stdout, blast_process.stderr > > And after comipilation with py2exe it's seem to work! In addition I > changed > \Application\__init__.py in function generic_run > \ClustalW\__init__.py in function do_alignment > in the same way because I got the same error message when I used Primer3 > and ClustalW. I tried up to now only on view Windows XP PC's but it's > looks > like the problem is solved! Great - I've made this change in CVS now: Blast/NCBIStandalone.py revision: 1.85 Clustalw/__init__.py revision 1.26 Application/__init__.py revision 1.9 > Finally I can release the tool for testing! Thanks to all for their help! > > Thanks a lot Peter and sorry for the late reply! > > Kind regards > Stefanie Thank you for reporting the issue, testing the change and letting us know it works. Peter From bala.biophysics at gmail.com Mon Feb 9 15:48:32 2009 From: bala.biophysics at gmail.com (Bala subramanian) Date: Mon, 9 Feb 2009 16:48:32 +0100 Subject: [BioPython] parsing pdb files Message-ID: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> Dear Friends, I have a pdb file generated by a simulation program. it dosent have the B-factor information. When use PDBParser, i get the following error. I got to know by googling that this is due to the absence of b-factor information in the pdb file. Kindly write me how to parser such pdb files. File "arrow.py", line 7, in structure=par.get_structure('test','1.pdb') File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 65, in get_structure self._parse(file.readlines()) File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 85, in _parse self.trailer=self._parse_coordinates(coords_trailer) File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 158, in _parse_coordinates occupancy=float(line[54:60]) ValueError: empty string for float() Thanks in advance, Bala From biopython at maubp.freeserve.co.uk Mon Feb 9 16:06:02 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 16:06:02 +0000 Subject: [BioPython] BLAST subprocess problem with a GUI In-Reply-To: <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> Message-ID: <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> On Mon, Feb 9, 2009 at 3:21 PM, Stefanie L?ck wrote: > > Never ending story... > > After compilation and changing in the > Application/__init__.py file, unfortunatly Primer3 don't work and gives this > Error: > > Traceback (most recent call last): > ?File "primer3.pyc", line 208, in get_2 > ?File "Bio\Application\__init__.pyc", line 29, in generic_run > ?File "subprocess.pyc", line 593, in __init__ > ?File "subprocess.pyc", line 793, in _execute_child > > WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden In English that's something like "The system cannot find the indicated file", which suggests that you don't have the primer3 path specified correctly (and this this isn't the pipe problem we had before with BLAST). Try adding check on the primer3 executable filename: import os primer3_exe = r"C:\Program Files\EMBOSS\primer3.exe" assert os.path.isfile(primer3_exe) cline = Primer3Commandline(primer3_exe) ... Note that you can create the Primer3Commandline object without specifying the location of the executable file. On Unix, this will then try and locate the tool from the path environment variable. On Windows, I find it best to always be explicit and provide the full path to the filename. Peter From biopython at maubp.freeserve.co.uk Mon Feb 9 16:34:22 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 16:34:22 +0000 Subject: [BioPython] parsing pdb files In-Reply-To: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> References: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> Message-ID: <320fb6e00902090834t10e6e6fby557ac7e75dcabefb@mail.gmail.com> On Mon, Feb 9, 2009 at 3:48 PM, Bala subramanian wrote: > Dear Friends, > > I have a pdb file generated by a simulation program. it dosent have the > B-factor information. When use PDBParser, i get the following error. I got > to know by googling that this is due to the absence of b-factor information > in the pdb file. Kindly write me how to parser such pdb files. > > ?File "arrow.py", line 7, in > ? ?structure=par.get_structure('test','1.pdb') > ?File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 65, in > get_structure > ? ?self._parse(file.readlines()) > ?File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 85, in > _parse > ? ?self.trailer=self._parse_coordinates(coords_trailer) > ?File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 158, in > _parse_coordinates > ? ?occupancy=float(line[54:60]) > ValueError: empty string for float() > > Thanks in advance, > Bala I'm note sure off hand if the occupancy is intended to be mandatory or not. If it should be present, it would be nice if Bio.PDB could parse this in permissive mode, and reject the file in strict mode. Note this issue sounds very similar to missing tempFactor fields, Biopython Bug 2751: http://bugzilla.open-bio.org/show_bug.cgi?id=2751 Alternatively, can you ask the simulation program authors to record an occupancy of one? Peter From biopython at maubp.freeserve.co.uk Mon Feb 9 18:11:06 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 18:11:06 +0000 Subject: [BioPython] parsing pdb files In-Reply-To: <288df32a0902090925j22eb0119r57e6cc55ea6d512@mail.gmail.com> References: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> <320fb6e00902090834t10e6e6fby557ac7e75dcabefb@mail.gmail.com> <288df32a0902090925j22eb0119r57e6cc55ea6d512@mail.gmail.com> Message-ID: <320fb6e00902091011q62bb4f55vf00fadf08253678c@mail.gmail.com> On Mon, Feb 9, 2009 at 5:25 PM, Bala subramanian wrote: > Dear Peter, Hi Bala, I've CC'd this message back to the mailing list. > Thank you for you reply. I dnt have any way to write the B-factor. I tried > to write the bfactor by a small script but still the parser dosent work and > i get the value error as follows: > > Traceback (most recent call last): > ... > ? File "/usr/lib/python2.5/site-packages/Bio/PDB/PDBParser.py", line 158, in > _parse_coordinates > ??? occupancy=float(line[54:60]) > ValueError: invalid literal for float(): 8??? 1 > > Few lines from my pdb file is as follows > > ATOM??? 29??? P??? C??? 2??? -5.431??? 7.793??? -13.678??? 1 > ATOM??? 60??? P??? A??? 3??? -7.411??? 4.185??? -9.249??? 1 > ATOM??? 93??? P??? C??? 4??? -10.773??? -0.351??? -8.752??? 1 > ATOM??? 124??? P??? A??? 5??? -12.260??? -6.200??? -8.124??? 1 > ATOM??? 157??? P??? A??? 6??? -13.059??? -12.433??? -8.140??? 1 You said your PDB file is from a simulation program - did you write this or someone else? If you wrote it then you should be able to add in these missing fields. Even if you didn't write it, it would be fairly easy to "fix" the file using a short python script like this: bad_pdb_filename = "1AD5_invalid.pdb" fixed_pdb_filename = "1AD5_fixed.pdb" input_handle = open(bad_pdb_filename,"rU") output_handle = open(fixed_pdb_filename, "w") for number, line in enumerate(input_handle) : if line.startswith("ATOM ") : if not line[54:60].strip() : print "Line %i missing occupancy" % (number+1) if len(line) < 60 : #It was a very short line! line = line[:54] + " 0.0 \n" #We'll add the B factor in a moment... else : line = line[:54] + " 0.0 " + line[60:] if not line[60:66].strip() : print "Line %i missing B factor" % (number+1) if len(line) < 66 : #It was a very short line! line = line[:60] + " 0.0 \n" else : line = line[:60] + " 0.0 " + line[66:] assert line.endswith("\n") else : #Not an ATOM line, leave it alone pass output_handle.write(line) input_handle.close() output_handle.close() Also, if you wanted to try the latest Biopython code from CVS it should ignore these missing fields in permissive mode (but will print warning messages - see Bug 2751 for details). Peter From biopython at maubp.freeserve.co.uk Mon Feb 9 21:32:34 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Mon, 9 Feb 2009 21:32:34 +0000 Subject: [BioPython] parsing pdb files In-Reply-To: <288df32a0902091025l2783fc8aj8f3fa96907c35f63@mail.gmail.com> References: <288df32a0902090748j96e5ddan901c1fa77d34b97e@mail.gmail.com> <320fb6e00902090834t10e6e6fby557ac7e75dcabefb@mail.gmail.com> <288df32a0902090925j22eb0119r57e6cc55ea6d512@mail.gmail.com> <320fb6e00902091011q62bb4f55vf00fadf08253678c@mail.gmail.com> <288df32a0902091025l2783fc8aj8f3fa96907c35f63@mail.gmail.com> Message-ID: <320fb6e00902091332q77de476ew83527b8606ff29be@mail.gmail.com> >> >> Also, if you wanted to try the latest Biopython code from CVS it >> should ignore these missing fields in permissive mode (but will print >> warning messages - see Bug 2751 for details). > > Peter, > Thank you very much. I installed the latest biopython only. Anyways give me > the link to download it so that i would try it out > > Bala Biopython 1.49 (and earlier) won't parse PDB files missing the B-factor or occupancy information. Using the short example script in my earlier email, you should be able to fix individual PDB files so Biopython 1.49 is happy. I would recommend this option first. Alternatively, using the code in our source code repository (CVS), which will one day become Biopython 1.50, you can now parse these "naughty" PDB files - although you'll get a warning message for every missing B-factor or occupancy (see Bug 2751). If you want to try this new unreleased Biopython code, you have to get our latest code from CVS and install it. See http://biopython.org/wiki/CVS In this case, assuming you already have Biopython 1.49, you only really need to update one file, which you could download from our CVS webpage, instead http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/PDB/PDBParser.py?cvsroot=biopython Don't try this unless you are confident you can put things back if something goes wrong... I would just suggest "fixing" the individual PDB files instead. Peter From biopython at maubp.freeserve.co.uk Thu Feb 12 12:05:09 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 12 Feb 2009 12:05:09 +0000 Subject: [BioPython] hsexposure.py In-Reply-To: <498C7669.60007@bham.ac.uk> References: <498C7669.60007@bham.ac.uk> Message-ID: <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> On Fri, Feb 6, 2009 at 5:42 PM, Bhima A van der Molen wrote: > Hi, > > I am a newbe to the list.. I just started my PhD and I am trying to get > some calculations for surface accessibility for some proteins stored in > PDB format. > > There is a niffty little script included with the BioPython download in > the scripts folder called hsexposure.py which is supposed to calculate > the half sphere exposure of each residue in the PDB file. ?However, when > I run it with the option to calculate HSE (all variations) I get 0 > stored in the b-factor column of my PDB file instead of the count.. It looks like the hsexposure script may be a tiny it out of date, I'll have a quick look at this. > so I tried extracting the code I want specifically.. i.e. the part to > calculate the HSEBU values and tried to get it to print on the screen.. > I get the same result.. 0.0 as my HSE value.. see code below: > > hse=PDB.HSExposureCB(m, RADIUS) > k = 'EXP_HSE_A_U' Your code was looking for the EXP_HSE_A_U result, but never calculated it. If you used HSExposureCB, then the extra data keys are EXP_HSE_B_U and EXP_HSE_B_D. If you want EXP_HSE_A_U then use the HSExposureCA class instead. e.g. ##code begins## from Bio import PDB pdbfile=open('1AD5.pdb') p=PDB.PDBParser() s=p.get_structure('X', pdbfile) m=s[0] RADIUS=12.0 print "Using CB" hse=PDB.HSExposureCB(m, RADIUS) residue_list=PDB.Selection.unfold_entities(m,'R') for r in residue_list[:10]: print r.get_resname(), r.xtra print "..." print "Using CA" hse=PDB.HSExposureCA(m, RADIUS) residue_list=PDB.Selection.unfold_entities(m,'R') for r in residue_list[:10]: print r.get_resname(), r.xtra print "..." ##code ends## Peter From biopython at maubp.freeserve.co.uk Thu Feb 12 12:18:13 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 12 Feb 2009 12:18:13 +0000 Subject: [BioPython] hsexposure.py In-Reply-To: <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> References: <498C7669.60007@bham.ac.uk> <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> Message-ID: <320fb6e00902120418v4b0d50ddya375ca5a93d75453@mail.gmail.com> On Thu, Feb 12, 2009 at 12:05 PM, Peter wrote: > On Fri, Feb 6, 2009 at 5:42 PM, Bhima A van der Molen wrote: >> There is a niffty little script included with the BioPython download in >> the scripts folder called hsexposure.py which is supposed to calculate >> the half sphere exposure of each residue in the PDB file. ?However, when >> I run it with the option to calculate HSE (all variations) I get 0 >> stored in the b-factor column of my PDB file instead of the count.. > > It looks like the hsexposure script may be a tiny it out of date, I'll > have a quick look at this. It looks like Thomas must have been trying two naming schemes for the xtra data dictionary keys, unfortunately the example script got checked in using EXP_HSEAD, EXP_HSEAU, EXP_HSEBD and EXP_HSEBU but the Bio.PDB.HSExposure module was checked in using the similar but different EXP_HSE_A_D, EXP_HSE_A_U, EXP_HSE_B_U and EXP_HSE_B_D. I have updated the script in CVS, which you will be able to download from here in about an hour's time: http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Scripts/Structure/hsexpo?cvsroot=biopython This now seems to work :) Peter From biopython at maubp.freeserve.co.uk Thu Feb 12 20:26:02 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 12 Feb 2009 20:26:02 +0000 Subject: [BioPython] hsexposure.py In-Reply-To: <1234459277.7817.14.camel@bio-haw-pc8> References: <498C7669.60007@bham.ac.uk> <320fb6e00902120405w33de328bm2550968dfa3bfa24@mail.gmail.com> <320fb6e00902120418v4b0d50ddya375ca5a93d75453@mail.gmail.com> <1234459277.7817.14.camel@bio-haw-pc8> Message-ID: <320fb6e00902121226q224f7afq334c30468a71512e@mail.gmail.com> On Thu, Feb 12, 2009 at 5:21 PM, Bhima Van der Molen wrote: > > HI Peter, > > Thank you for sorting that out... I am running the script on my > sequences now and I'm getting useful results. > > Thank you again, you saved me a lot of work. > > Regards > Bhima Great - and thanks for reporting the problem to us. Peter From lueck at ipk-gatersleben.de Fri Feb 13 14:07:09 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Fri, 13 Feb 2009 15:07:09 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> Message-ID: <008c01c98de4$5c7410a0$1022a8c0@ipkgatersleben.de> Thanks! That's was! Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Monday, February 09, 2009 5:06 PM Subject: Re: [BioPython] BLAST subprocess problem with a GUI On Mon, Feb 9, 2009 at 3:21 PM, Stefanie L?ck wrote: > > Never ending story... > > After compilation and changing in the > Application/__init__.py file, unfortunatly Primer3 don't work and gives > this > Error: > > Traceback (most recent call last): > File "primer3.pyc", line 208, in get_2 > File "Bio\Application\__init__.pyc", line 29, in generic_run > File "subprocess.pyc", line 593, in __init__ > File "subprocess.pyc", line 793, in _execute_child > > WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden In English that's something like "The system cannot find the indicated file", which suggests that you don't have the primer3 path specified correctly (and this this isn't the pipe problem we had before with BLAST). Try adding check on the primer3 executable filename: import os primer3_exe = r"C:\Program Files\EMBOSS\primer3.exe" assert os.path.isfile(primer3_exe) cline = Primer3Commandline(primer3_exe) ... Note that you can create the Primer3Commandline object without specifying the location of the executable file. On Unix, this will then try and locate the tool from the path environment variable. On Windows, I find it best to always be explicit and provide the full path to the filename. Peter From hlapp at gmx.net Fri Feb 13 16:54:07 2009 From: hlapp at gmx.net (Hilmar Lapp) Date: Fri, 13 Feb 2009 11:54:07 -0500 Subject: [BioPython] Google Summer of Code: Call for Bio* Volunteers Message-ID: Google is committed to run the Summer of Code program [1] again this year. It will be for the 5th time. In broad strokes, the program funds what you might call remote summer internships for students to contribute to an open-source software project. Participating projects (or umbrella organizations) provide project ideas and supply mentors that guide the work on those. Students apply to a project within the program with specific project ideas, based on those suggested or based on their own idea, get ranked by the mentors of the project, and those accepted into the program get paired up with mentors. Projects are chiefly about programming, the coding period is 3 months (Jun-Aug), and there is no travel required by either student or mentor. The program is global; other than the US trade restrictions that Google is under, there are no restrictions as to where student or mentor reside. The main motivations behind the program are to recruit new contributors to open-source projects, and to produce more open-source code. See the program FAQs [2] for more information. I've had the honor of being part of the program for the last two years, administering NESCent's participation as an organization [3] and in 2007 mentoring a student. I have to say I find it the most awesome open-source program since sliced bread (or the invention of BLAST if that means more to you). Despite that and sadly enough, there has been a dearth of participating bioinformatics projects (though some notable ones, such as CytoScape have participated). There have been two Bio* Summer of Code projects under the NESCent umbrella, one in 2007 [4] and one in 2008 [5]. I would be willing to volunteer to take the lead on and administer a full-blown participation of O|B|F as a Bio* umbrella organization, provided 1) at least one Bio* person volunteers to serve as backup administrator, and 2) enough Bio* contributors volunteer to serve as prospective mentors. Mentoring involves participating in creating the page of project ideas (I'd provide template and guidance), corresponding with applicants who have questions, participating in student application ranking, and for primary mentors (those directly assigned to a student) based on empirical evidence at least 5hrs/week of time spent with the student to help him/her get over obstacles or avoid wrong paths. I think almost all mentors would concur that the experience was very gratifying, but as a mentor you will be spending a non-negligible amount of time with the student. I think it is the student-mentor pairing and interaction, not the stipend, that in the end makes the participation for students uniquely productive in terms of learning, and different from simply contributing to the project of choice (which they could always do). For a personal impression for how the program is from a mentor perspective, I'll let Chris Fields speak who was the mentor for the 2008 phyloXML in BioPerl project. From a student's perspective, I'll leave it to the 2007 Biojava student Bohyun Lee (blee34-at- mail.gatech.edu) and the 2008 BioPerl student Mira Han (mirhan-at- indiana.edu) to comment (if they are still on the list). So if you think this is a good idea for Bio* to be part of, if you would like to help in some way, if you can see yourself as a mentor, or if you are a lurking would-be student, please let yourself be heard. Email either to the list or to me. Cheers, -hilmar [1] http://code.google.com/soc/2008 [2] http://code.google.com/opensource/gsoc/2009/faqs.html [3] http://hackathon.nescent.org/Phyloinformatics_Summer_of_Code_2007 http://hackathon.nescent.org/Phyloinformatics_Summer_of_Code_2008 [4] http://biojava.org/wiki/BioJava:PhyloSOC07 [5] http://bioperl.org/wiki/PhyloXML_support_in_BioPerl -- =========================================================== : Hilmar Lapp -:- Durham, NC -:- hlapp at gmx dot net : =========================================================== From dalloliogm at gmail.com Fri Feb 13 17:27:18 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Fri, 13 Feb 2009 18:27:18 +0100 Subject: [BioPython] summer of code Message-ID: <5aa3b3570902130927o222f0411tfc2728b7c25c944a@mail.gmail.com> Hi! ehm - on the bioperl mailing list, they just have sent an email explaining that they have been included in the google-summer of code program. Is biopython also included in the same program? Why don't we propose some project for the next year? Some ideas that could be proposed: the population genetics modules, or the collection of use cases in bioinformatics. -- My blog on bioinformatics (now in English): http://bioinfoblog.it From hlapp at gmx.net Fri Feb 13 18:38:39 2009 From: hlapp at gmx.net (Hilmar Lapp) Date: Fri, 13 Feb 2009 13:38:39 -0500 Subject: [BioPython] [bip] summer of code In-Reply-To: <4995AFE7.3020503@gmail.com> References: <5aa3b3570902130927o222f0411tfc2728b7c25c944a@mail.gmail.com> <4995AFE7.3020503@gmail.com> Message-ID: <97D828AD-3E4F-4502-A1C9-84985142AC5A@gmx.net> Giovanni Marco Dall'Olio wrote: > they just have sent an email explaining that they have been included > in the google-summer of code program. Just to prevent any misunderstandings, whoever is meant by "they", nobody has been included in the Summer of Code program yet for this year. Organizations who want to participate can start applying March 9. Google expects to announce who has been accepted on March 18. Last year, about 2/3 of applying orgs were not accepted. This year the rejection ratio is going to be higher b/c fewer orgs will be accepted. There is no guarantee that we would be accepted if we apply. I'm relatively optimistic though that we'd have a fair chance, but I'm often optimistic. -hilmar -- =========================================================== : Hilmar Lapp -:- Durham, NC -:- hlapp at gmx dot net : =========================================================== From mjldehoon at yahoo.com Sat Feb 14 09:48:02 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Sat, 14 Feb 2009 01:48:02 -0800 (PST) Subject: [BioPython] Bio.File.SGMLHandle; Bio.FilteredReader Message-ID: <798455.54544.qm@web62404.mail.re1.yahoo.com> Hi everybody, Does anybody use the SGMLHandle class from Bio.File, or the Bio.FilteredReader module? Currently they are not being used anywhere in Biopython. If there are no users, I suggest we start the deprecation process for these two. --Michiel. From mjldehoon at yahoo.com Sun Feb 15 06:49:27 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Sat, 14 Feb 2009 22:49:27 -0800 (PST) Subject: [BioPython] Bio.NetCatch Message-ID: <294018.64091.qm@web62402.mail.re1.yahoo.com> Hi everybody, Is anybody using the Bio.NetCatch module? Currently, it is not used anywhere in Biopython. If there are no users of this module, I suggest we start the deprecation process for Bio.NetCatch. --Michiel. From amend at nature.berkeley.edu Thu Feb 19 01:05:58 2009 From: amend at nature.berkeley.edu (Anthony Amend) Date: Wed, 18 Feb 2009 17:05:58 -0800 Subject: [BioPython] Biopython installation syntax error Message-ID: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> Hi, I'm trying to install biopython 1.49 on a mac running OSX 10.4. I've installed numpy 1.2.1 and when I log on as root and try to install biopython I get the following error: File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/numpy/lib/arrayterator.py", line 89 slice_ = tuple(slice(*t) for t in zip( ^ SyntaxError: invalid syntax I figured it had something to do with the numpy installation, so I went back and installed numpy 1.1.1, but got the same error message when I tried to install biopython again. I'm a VERY new unix/python user, so if you have any insight please dumb down your answers accordingly. Many thanks for your help Anthony From bsouthey at gmail.com Thu Feb 19 02:21:10 2009 From: bsouthey at gmail.com (Bruce Southey) Date: Wed, 18 Feb 2009 20:21:10 -0600 Subject: [BioPython] Biopython installation syntax error In-Reply-To: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> References: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> Message-ID: Hi, It appears that you are using Python2.3 which is not support by numpy version1.2. See the release notes at: http://sourceforge.net/project/shownotes.php?group_id=1369&release_id=628858 So either use an earlier version or, even better, upgrade to Python 2.5. I do not recommend Python 2.6 because I do not know how well numpy 1.2 is supported on the Mac. Regards Bruce On Wed, Feb 18, 2009 at 7:05 PM, Anthony Amend wrote: > Hi, > > I'm trying to install biopython 1.49 on a mac running OSX 10.4. I've > installed numpy 1.2.1 and when I log on as root and try to install biopython > I get the following error: > > File > "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/numpy/lib/arrayterator.py", > line 89 > slice_ = tuple(slice(*t) for t in zip( > ^ > SyntaxError: invalid syntax > > I figured it had something to do with the numpy installation, so I went back > and installed numpy 1.1.1, but got the same error message when I tried to > install biopython again. > > I'm a VERY new unix/python user, so if you have any insight please dumb down > your answers accordingly. > > Many thanks for your help > > Anthony > > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython > From 2huggie at gmail.com Thu Feb 19 04:29:28 2009 From: 2huggie at gmail.com (Timothy Wu) Date: Thu, 19 Feb 2009 12:29:28 +0800 Subject: [BioPython] How to check BioPython version Message-ID: Hi, I've got BioPython installed some time ago, and I don't know which version I'm using. Where do I check the BioPython version? Additionally, is there a standard way to check the version number for any Python package? Timothy From lueck at ipk-gatersleben.de Thu Feb 19 07:36:51 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Thu, 19 Feb 2009 08:36:51 +0100 Subject: [BioPython] How to check BioPython version References: Message-ID: <002601c99264$d441b270$1022a8c0@ipkgatersleben.de> Hi Timothy! On Windows you can check in the "biopython-wininst.log" file at the installation directory of Python. Kind regards Stefanie ----- Original Message ----- From: "Timothy Wu" <2huggie at gmail.com> To: Sent: Thursday, February 19, 2009 5:29 AM Subject: [BioPython] How to check BioPython version > Hi, > > I've got BioPython installed some time ago, and I don't know which version > I'm using. Where do I check the BioPython version? Additionally, is there > a > standard way to check the version number for any Python package? > > Timothy > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython > From 2huggie at gmail.com Thu Feb 19 10:01:07 2009 From: 2huggie at gmail.com (Timothy Wu) Date: Thu, 19 Feb 2009 18:01:07 +0800 Subject: [BioPython] How to check BioPython version In-Reply-To: <002601c99264$d441b270$1022a8c0@ipkgatersleben.de> References: <002601c99264$d441b270$1022a8c0@ipkgatersleben.de> Message-ID: On Thu, Feb 19, 2009 at 3:36 PM, Stefanie L?ck wrote: > Hi Timothy! > > On Windows you can check in the "biopython-wininst.log" file at the > installation directory of Python. > > Kind regards > Stefanie > Hi Stefanie: Thanks for the reply, how about Linux? Timothy From biopython at maubp.freeserve.co.uk Thu Feb 19 10:09:50 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 19 Feb 2009 10:09:50 +0000 Subject: [BioPython] Biopython installation syntax error In-Reply-To: References: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> Message-ID: <320fb6e00902190209x3994b25cp22f0580f1f1539ef@mail.gmail.com> On Thu, Feb 19, 2009 at 2:21 AM, Bruce Southey wrote: > Hi, > It appears that you are using Python2.3 which is not support by numpy > version1.2. See the release notes at: > http://sourceforge.net/project/shownotes.php?group_id=1369&release_id=628858 > > So either use an earlier version or, even better, upgrade to Python > 2.5. I do not recommend Python 2.6 because I do not know how well > numpy 1.2 is supported on the Mac. > > Regards > Bruce I agree with Bruce that trying to use NumPy 1.2 (or later) on Python 2.3 is a bad plan. Their installer really ought to abort rather than letting you do this! You could upgrade your python to 2.4 or 2.5 (or possible 2.6) but on the Mac this is complicated. You shouldn't replace the Apple provided python as many of the Apple tools use it. Personally I would stick with the Apple provided python and install NumPy 1.1.1. However, it sounds like you already have installed the incompatible NumPy 1.2 on the machine which you'll need to remove. To remove NumPy I think you should be OK to remove the folder /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/numpy (or to be safe, just move it somewhere else like you desktop, in case you need to put it back). Peter From biopython at maubp.freeserve.co.uk Thu Feb 19 10:23:40 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 19 Feb 2009 10:23:40 +0000 Subject: [BioPython] How to check BioPython version In-Reply-To: References: Message-ID: <320fb6e00902190223t7d86ba3foc2332953a038bbe9@mail.gmail.com> On Thu, Feb 19, 2009 at 4:29 AM, Timothy Wu <2huggie at gmail.com> wrote: > Hi, > > I've got BioPython installed some time ago, and I don't know which version > I'm using. Where do I check the BioPython version? Sadly we don't have an official mechanism. This was discussed with a proposed solution late last year. Perhaps we should actually do this now... See here for the details: http://lists.open-bio.org/pipermail/biopython-dev/2008-September/004267.html However, assuming your Biopython is fairly recent this should work: $ python >>> import Martel >>> print Martel.__version__ 1.49 Martel is a text parsing library we used to use and ship with Biopython - it has been deprecated but is still included with Biopython. The point of this is that for a while now we've kept its version number in sync with the main Biopython version, so the version of Martel should be the version of Biopython. If you don't have mxTextTools installed, this will fail with an ImportError. $ python >>> import Martel ... ImportError: No module named TextTools In this case, just have a quick look at the Martel/__init__.py file, look at the error message to see where exactly the file is on your machine. $ grep "__version__" /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Martel/__init__.py __version__ = "1.49" > Additionally, is there a standard way to check the version number > for any Python package? Lots of python packages use this __version__ convention (but not all). e.g. $ python >>> import numpy >>> print numpy.__version__ 1.1.1 Peter From amend at nature.berkeley.edu Fri Feb 20 00:02:56 2009 From: amend at nature.berkeley.edu (Anthony Amend) Date: Thu, 19 Feb 2009 16:02:56 -0800 Subject: [BioPython] Biopython installation syntax error In-Reply-To: <320fb6e00902190209x3994b25cp22f0580f1f1539ef@mail.gmail.com> References: <0E59814B-DF45-443B-9230-A36D59856592@nature.berkeley.edu> <320fb6e00902190209x3994b25cp22f0580f1f1539ef@mail.gmail.com> Message-ID: Hi, I took Bruce's advice before I saw Peter's e-mail. I've now upgraded to Python2.5 and kept NumPy 1.1.1, biopython seems to be up and running. Thanks so much for your help. Cheers, Anthony > On Thu, Feb 19, 2009 at 2:21 AM, Bruce Southey > wrote: >> Hi, >> It appears that you are using Python2.3 which is not support by numpy >> version1.2. See the release notes at: >> http://sourceforge.net/project/shownotes.php? >> group_id=1369&release_id=628858 >> >> So either use an earlier version or, even better, upgrade to Python >> 2.5. I do not recommend Python 2.6 because I do not know how well >> numpy 1.2 is supported on the Mac. >> >> Regards >> Bruce > > I agree with Bruce that trying to use NumPy 1.2 (or later) on Python > 2.3 is a bad plan. Their installer really ought to abort rather than > letting you do this! > > You could upgrade your python to 2.4 or 2.5 (or possible 2.6) but on > the Mac this is complicated. You shouldn't replace the Apple provided > python as many of the Apple tools use it. > > Personally I would stick with the Apple provided python and install > NumPy 1.1.1. However, it sounds like you already have installed the > incompatible NumPy 1.2 on the machine which you'll need to remove. To > remove NumPy I think you should be OK to remove the folder > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/site-packages/numpy > (or to be safe, just move it somewhere else like you desktop, in case > you need to put it back). > > Peter From dalloliogm at gmail.com Fri Feb 20 14:47:35 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Fri, 20 Feb 2009 15:47:35 +0100 Subject: [BioPython] biopython soap? Message-ID: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> Does biopython use any SOAP service? In that case, which library is used? I would like to write a script to interrogate the NCBI dbSNP database, using the soap protocol and these wdsl: - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html Does biopython provide tools to interrogate the ncbi database directly from within a script? And how is it implemented? Moreover, which library do you use for the soap protocol with python? I have been pointed to suds[1], which seems the only one currently developed. (there is also soaplab and zsi, but they seem to be not maintained any more). Or, do you recommend me any alternative method to soap to interrogate ncbi? Thanks in advance... [1] https://fedorahosted.org/suds -- My blog on bioinformatics (now in English): http://bioinfoblog.it From biopython at maubp.freeserve.co.uk Fri Feb 20 15:18:53 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 20 Feb 2009 15:18:53 +0000 Subject: [BioPython] biopython soap? In-Reply-To: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> Message-ID: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio wrote: > Does biopython use any SOAP service? > In that case, which library is used? The deprecated and removed Bio.biblio used an old version of the EBI SOAP API. This used "import SOAP" internally. I don't recall any other SOAP code in Biopython. > I would like to write a script to interrogate the NCBI dbSNP database, > using the soap protocol and these wdsl: > - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html Why do you specifically want to use their SOAP interface? > Does biopython provide tools to interrogate the ncbi database directly > from within a script? And how is it implemented? Biopython's Bio.Entrez module allows you to use the NCBI Entrez E-Utils databases (but this is not using SOAP), and this is pretty well documented in our tutorial for the more mainstream databases. >From using the Entrez einfo command, they do offer access to the "snp" database which I assume is dbSNP. See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp "dbSNP is now incorporated into NCBI's Entrez system and can be queried using the same approach as the other Entrez databases such as PubMed and GenBank." So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. Peter From dalloliogm at gmail.com Fri Feb 20 16:03:23 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Fri, 20 Feb 2009 17:03:23 +0100 Subject: [BioPython] biopython soap? In-Reply-To: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> Message-ID: <5aa3b3570902200803y26bd0f9co232bbb844f19f86@mail.gmail.com> On Fri, Feb 20, 2009 at 4:18 PM, Peter wrote: > On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio > wrote: >> Does biopython use any SOAP service? >> In that case, which library is used? > > The deprecated and removed Bio.biblio used an old version of the EBI > SOAP API. This used "import SOAP" internally. I don't recall any > other SOAP code in Biopython. > >> I would like to write a script to interrogate the NCBI dbSNP database, >> using the soap protocol and these wdsl: >> - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html > > Why do you specifically want to use their SOAP interface? No particular reason :) Just curious about trying soap. >> Does biopython provide tools to interrogate the ncbi database directly >> from within a script? And how is it implemented? > > Biopython's Bio.Entrez module allows you to use the NCBI Entrez > E-Utils databases (but this is not using SOAP), and this is pretty > well documented in our tutorial for the more mainstream databases. > From using the Entrez einfo command, they do offer access to the "snp" > database which I assume is dbSNP. Thanks.. I am using it already. Yes, I was referring to dbSNP on ncbi. > See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp > "dbSNP is now incorporated into NCBI's Entrez system and can be > queried using the same approach as the other Entrez databases such as > PubMed and GenBank." > > So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. > > Peter > -- My blog on bioinformatics (now in English): http://bioinfoblog.it From chapmanb at 50mail.com Fri Feb 20 16:06:09 2009 From: chapmanb at 50mail.com (Brad Chapman) Date: Fri, 20 Feb 2009 11:06:09 -0500 Subject: [BioPython] biopython soap? In-Reply-To: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> Message-ID: <20090220160609.GB18294@sobchak.mgh.harvard.edu> Giovanni; I did quite a bit of work with SOAP/WebServices at my old job, and generally working with it from python is a pain. As you mention, suds is actively developed and has a nice interface but in my experience it will choke on a lot of WSDLs. ZSI works stably for many cases, but the interface and usage is a bit messy. If your goal is to access dbSNP, using the Entrez EUtils REST interfaces Biopython already wraps should definitely be preferred; I am in agreement with Peter's comments. If your goal is to play with SOAP in a biological context, one good target is the PubChem interface (http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap_help.html) which I don't believe has corresponding REST access. If you go this route, I did some initial work with ZSI and could share my code with you. Brad > On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio > wrote: > > Does biopython use any SOAP service? > > In that case, which library is used? > > The deprecated and removed Bio.biblio used an old version of the EBI > SOAP API. This used "import SOAP" internally. I don't recall any > other SOAP code in Biopython. > > > I would like to write a script to interrogate the NCBI dbSNP database, > > using the soap protocol and these wdsl: > > - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html > > Why do you specifically want to use their SOAP interface? > > > Does biopython provide tools to interrogate the ncbi database directly > > from within a script? And how is it implemented? > > Biopython's Bio.Entrez module allows you to use the NCBI Entrez > E-Utils databases (but this is not using SOAP), and this is pretty > well documented in our tutorial for the more mainstream databases. > >From using the Entrez einfo command, they do offer access to the "snp" > database which I assume is dbSNP. > > See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp > "dbSNP is now incorporated into NCBI's Entrez system and can be > queried using the same approach as the other Entrez databases such as > PubMed and GenBank." > > So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. > > Peter > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython From chapmanb at 50mail.com Fri Feb 20 16:06:09 2009 From: chapmanb at 50mail.com (Brad Chapman) Date: Fri, 20 Feb 2009 11:06:09 -0500 Subject: [BioPython] biopython soap? In-Reply-To: <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> References: <5aa3b3570902200647m67cf2f6ta9dae1d9d9b0ddfe@mail.gmail.com> <320fb6e00902200718g3d0b274fpa7030d0970f026fe@mail.gmail.com> Message-ID: <20090220160609.GB18294@sobchak.mgh.harvard.edu> Giovanni; I did quite a bit of work with SOAP/WebServices at my old job, and generally working with it from python is a pain. As you mention, suds is actively developed and has a nice interface but in my experience it will choke on a lot of WSDLs. ZSI works stably for many cases, but the interface and usage is a bit messy. If your goal is to access dbSNP, using the Entrez EUtils REST interfaces Biopython already wraps should definitely be preferred; I am in agreement with Peter's comments. If your goal is to play with SOAP in a biological context, one good target is the PubChem interface (http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap_help.html) which I don't believe has corresponding REST access. If you go this route, I did some initial work with ZSI and could share my code with you. Brad > On Fri, Feb 20, 2009 at 2:47 PM, Giovanni Marco Dall'Olio > wrote: > > Does biopython use any SOAP service? > > In that case, which library is used? > > The deprecated and removed Bio.biblio used an old version of the EBI > SOAP API. This used "import SOAP" internally. I don't recall any > other SOAP code in Biopython. > > > I would like to write a script to interrogate the NCBI dbSNP database, > > using the soap protocol and these wdsl: > > - http://eutils.ncbi.nlm.nih.gov/entrez/query/static/esoap_help.html > > Why do you specifically want to use their SOAP interface? > > > Does biopython provide tools to interrogate the ncbi database directly > > from within a script? And how is it implemented? > > Biopython's Bio.Entrez module allows you to use the NCBI Entrez > E-Utils databases (but this is not using SOAP), and this is pretty > well documented in our tutorial for the more mainstream databases. > >From using the Entrez einfo command, they do offer access to the "snp" > database which I assume is dbSNP. > > See: http://www.ncbi.nlm.nih.gov/sites/entrez?db=snp > "dbSNP is now incorporated into NCBI's Entrez system and can be > queried using the same approach as the other Entrez databases such as > PubMed and GenBank." > > So if I was you, I'd just try Bio.Entrez instead of messing about with SOAP. > > Peter > _______________________________________________ > BioPython mailing list - BioPython at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/biopython From mjldehoon at yahoo.com Sat Feb 21 03:03:10 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Fri, 20 Feb 2009 19:03:10 -0800 (PST) Subject: [BioPython] Bio.Prosite.Prodoc Dictionary, index_file Message-ID: <295247.41329.qm@web62408.mail.re1.yahoo.com> Hi everybody, Does anybody use the Dictionary class or index_file function in Bio.Prosite.Prodoc? I think that with the current capabilities of computers, there is little sense for these functions in Bio.Prosite.Prodoc, and as far as I can tell these functions are broken anyway. If there are no users, I suggest we deprecate the Dictionary class and the index_file function in Bio.Prosite.Prodoc. --Michiel From lueck at ipk-gatersleben.de Wed Feb 25 07:48:42 2009 From: lueck at ipk-gatersleben.de (=?iso-8859-1?Q?Stefanie_L=FCck?=) Date: Wed, 25 Feb 2009 08:48:42 +0100 Subject: [BioPython] BLAST subprocess problem with a GUI References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> Message-ID: <001e01c9971d$7a8d5be0$1022a8c0@ipkgatersleben.de> I tried this but after compilation/installation Primer3 gives no output, only a return code of -1073741515 (but no errors or messages)... Regards Stefanie ----- Original Message ----- From: "Peter" To: "Stefanie L?ck" Cc: Sent: Monday, February 09, 2009 5:06 PM Subject: Re: [BioPython] BLAST subprocess problem with a GUI On Mon, Feb 9, 2009 at 3:21 PM, Stefanie L?ck wrote: > > Never ending story... > > After compilation and changing in the > Application/__init__.py file, unfortunatly Primer3 don't work and gives > this > Error: > > Traceback (most recent call last): > File "primer3.pyc", line 208, in get_2 > File "Bio\Application\__init__.pyc", line 29, in generic_run > File "subprocess.pyc", line 593, in __init__ > File "subprocess.pyc", line 793, in _execute_child > > WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden In English that's something like "The system cannot find the indicated file", which suggests that you don't have the primer3 path specified correctly (and this this isn't the pipe problem we had before with BLAST). Try adding check on the primer3 executable filename: import os primer3_exe = r"C:\Program Files\EMBOSS\primer3.exe" assert os.path.isfile(primer3_exe) cline = Primer3Commandline(primer3_exe) ... Note that you can create the Primer3Commandline object without specifying the location of the executable file. On Unix, this will then try and locate the tool from the path environment variable. On Windows, I find it best to always be explicit and provide the full path to the filename. Peter From biopython at maubp.freeserve.co.uk Wed Feb 25 08:59:29 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Wed, 25 Feb 2009 08:59:29 +0000 Subject: [BioPython] BLAST subprocess problem with a GUI In-Reply-To: <001e01c9971d$7a8d5be0$1022a8c0@ipkgatersleben.de> References: <320fb6e00901280945p32eff05by64d8a42d576f76cc@mail.gmail.com> <002d01c98509$1dc1cd90$1022a8c0@ipkgatersleben.de> <320fb6e00902020216v231729dcm5d7e3ccdd3459ad4@mail.gmail.com> <007301c98aca$0a2084e0$1022a8c0@ipkgatersleben.de> <320fb6e00902090806k3ed4f286r5f2208801ca207ec@mail.gmail.com> <001e01c9971d$7a8d5be0$1022a8c0@ipkgatersleben.de> Message-ID: <320fb6e00902250059v1afd152ex51bc4439a34441c4@mail.gmail.com> On Wed, Feb 25, 2009 at 7:48 AM, Stefanie L?ck wrote: > I tried this but after compilation/installation Primer3 gives no output, > only a return code of -1073741515 (but no errors or messages)... The error number -1073741515 can be regarded as the hex representation 0xc0000135, which could be "The application failed to initialize properly" (try searching both in Google). Without more information this would be hard to resolve as this seems to be a rather generic error code. Is this problem showing up on your own machine or someone elses? If it works on some computers and not others, this would suggest its could be a problem with the primer3 installation rather than your code. Does it work if you run the code directly in Python rather than via py2exe? I would suggest you add a message box or print statement to show the actual command line string to the user just before trying to run the program. Make a note of this, then also try running this command by hand. It could be something missing in your EMBOSS setup (e.g. it can't find certain data files). Peter From mjldehoon at yahoo.com Thu Feb 26 14:52:13 2009 From: mjldehoon at yahoo.com (Michiel de Hoon) Date: Thu, 26 Feb 2009 06:52:13 -0800 (PST) Subject: [BioPython] Bio.Prosite Dictionary, index_file Message-ID: <996228.286.qm@web62402.mail.re1.yahoo.com> Hi everybody, Does anybody use the Dictionary class or index_file function in Bio.Prosite? As far as I can tell these functions are broken. If there are no users, I suggest we deprecate the Dictionary class and the index_file function in Bio.Prosite. --Michiel From biopython at maubp.freeserve.co.uk Thu Feb 26 22:00:39 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Thu, 26 Feb 2009 22:00:39 +0000 Subject: [BioPython] [Biopython-dev] library to create gel image In-Reply-To: <1235675865.49a6ead98bc24@webmail.upv.es> References: <200902261612.54306.jblanca@btc.upv.es> <320fb6e00902261051n62899098i86edd36ba00ee7d4@mail.gmail.com> <1235675865.49a6ead98bc24@webmail.upv.es> Message-ID: <320fb6e00902261400v22af3c52ob1a8cb80113f6756@mail.gmail.com> On Thu, Feb 26, 2009 at 7:17 PM, Blanca Postigo Jose Miguel wrote: > >> Do you want to recreate the hexagonal grid, or would a simplified >> rectangular grid do? > > I don't understand that. I just want to recreate an electroforesis gel using the > raw or the analyzed data provided by the Applied Biosystem software. Each > chromatogram would be a lane in this virtual gel. The example was a bit small - so I had guessed a bit, and it sounds like my guess was wrong. Do you have a larger example picture? Peter From dschruth at gmail.com Fri Feb 27 07:26:15 2009 From: dschruth at gmail.com (David Michael Schruth) Date: Thu, 26 Feb 2009 23:26:15 -0800 Subject: [BioPython] Reading Fasta-like Qual Files Message-ID: Hello, This is my first post on the list. I'm enjoying using biopython but am running into some snags when trying to incorporate quality information into my analysis. Namely I can't quite read in qual files (output from 454, solid) the way I would like. Namely, the spaces between the two digit integer phred scores get squished indistinguishably together. I've actually fixed this in my own copy of the code by removing the .replace(" ","") call from ~58th line of FastaIO.py (in the FastaIterator class). Hopefully this doesn'thave any adverse effects that I might not have forseen. In the mean time, It would be nice to have some sort of more permanant solution to this.... some way to specify or to otherwise accomodate these fasta-like qual files in FastaIO and Biopython In general. Supporting the fastQ format would also be nice. The only mention of biopython and quality I've run across is on the Biopython-dev list: http://portal.open-bio.org/pipermail/biopython-dev/2007-October/003131.html The email is dated 2007 but I'm doubting that any progress on this front has been made. Perhaps there is a better way to search these lists that I don't know about but I've sure had a hard time finding any discussions about quality score handling. (Which brings up another idea: why don't we make this list and the list archive part of google groups?) Thanks, Dave From biopython at maubp.freeserve.co.uk Fri Feb 27 10:54:26 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 27 Feb 2009 10:54:26 +0000 Subject: [BioPython] Reading Fasta-like Qual Files In-Reply-To: References: Message-ID: <320fb6e00902270254q7dd23f5aj3ecacfb357aa1ddb@mail.gmail.com> On Fri, Feb 27, 2009 at 7:26 AM, David Michael Schruth wrote: > Hello, > > This is my first post on the list. ?I'm enjoying using biopython but am > running into some snags when trying to incorporate quality information into > my analysis. ?Namely I can't quite read in qual files (output from 454, > solid) ?the way I would like. ? Namely, the spaces between the two digit > integer phred scores get squished indistinguishably together. ? I've > actually fixed this in my own copy of the code by removing the > > .replace(" ","") > > call from ~58th line of FastaIO.py (in the FastaIterator class). > > Hopefully this doesn't have any adverse effects that I might not have > forseen. ?In the mean time, It would be nice to have some sort of more > permanant solution to this.... some way to specify or to otherwise > accomodate these fasta-like qual files in FastaIO and Biopython In > general. ? ?Supporting the fastQ format would also be nice. The Bio.SeqIO.FastaIO parser is intended for FASTA sequence files only, where any white space should be removed. Even with your suggested change, it doesn't make sense to stick a string of numbers into a Seq object. Basically that parser just isn't intended to be used with QUAL files. But there is some good news - your email is quite timely! > The only mention of biopython and quality I've run across is on the > Biopython-dev list: > http://portal.open-bio.org/pipermail/biopython-dev/2007-October/003131.html > The email is dated 2007 but I'm doubting that any progress on this front has > been made. Maybe the search engines haven't indexed the latest discussions, just this month: http://lists.open-bio.org/pipermail/biopython-dev/2009-February/005340.html Also searching our Bugzilla should have found a few hits for enhancements. There isn't any code checked into CVS yet, but things are happening and I hope we'll have built in support for reading (and probably writing) FASTQ and QUAL files in the next release of Biopython. If you are interested in the details, you might want to sign up to the dev mailing list, but I'm sure we'll have some announcement or discussion on this list too. Peter From bala.biophysics at gmail.com Fri Feb 27 15:16:09 2009 From: bala.biophysics at gmail.com (Bala subramanian) Date: Fri, 27 Feb 2009 16:16:09 +0100 Subject: [BioPython] SASA calculation Message-ID: <288df32a0902270716s1124d573q3b445d869f832e2@mail.gmail.com> Friends, I want to open a pdb file, calculate the solvent accessible surface area for each atom and write a new pdb with SASA as the last column of the pdb. Your inputs would be highly helpful for me. Thanks, Bala From biopython at maubp.freeserve.co.uk Fri Feb 27 15:30:12 2009 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 27 Feb 2009 15:30:12 +0000 Subject: [BioPython] SASA calculation In-Reply-To: <288df32a0902270716s1124d573q3b445d869f832e2@mail.gmail.com> References: <288df32a0902270716s1124d573q3b445d869f832e2@mail.gmail.com> Message-ID: <320fb6e00902270730k7f83e615nb659f080dfeaf564@mail.gmail.com> On Fri, Feb 27, 2009 at 3:16 PM, Bala subramanian wrote: > Friends, > > I want to open a pdb file, calculate the solvent accessible surface area for > each atom and write a new pdb with SASA as the last column of the pdb. Your > inputs would be highly helpful for me. Hi Bala, Have a look at the example script hsexpo to see if there is anything useful to you (e.g. writing out a PDB file containing extra data). This is the source code archive but there was a bug fixed since we released Biopython 1.49. You can just download the latest version from here: http://biopython.org/SRC/biopython/Scripts/Structure/hsexpo or: http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Scripts/Structure/hsexpo?cvsroot=biopython I would also look at the Bio.PDB.NACCESS module in Biopython - this acts as a wrapper for the command line tool NACCESS, http://www.bioinf.manchester.ac.uk/naccess/ Peter