From saccenti at cerm.unifi.it Wed Sep 13 13:22:46 2006 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Wed, 13 Sep 2006 19:22:46 +0200 Subject: [BioPython] help with NCBIWWW parser Message-ID: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> Hi Folks! I'm trying to parse the output of blast search done using the NCBIWWW qblast. To parse the reusults I use: import cStringIO blast_out = cStringIO.StringIO(blast_result) b_parser = NCBIWWW.BlastParser() b_record = b_parser.parse(blast_out) as shown in the Biopython cookbook but my program fails and I get the following warning from my editor (eric) "The program being debugged contains an unspecified syntax error." so I do not know how and what to look for. I suppose NCBI changed something in the html file format. Any idea?? ciao edoardo From biopython at maubp.freeserve.co.uk Wed Sep 13 15:18:14 2006 From: biopython at maubp.freeserve.co.uk (Peter (BioPython List)) Date: Wed, 13 Sep 2006 20:18:14 +0100 Subject: [BioPython] help with NCBIWWW parser In-Reply-To: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> References: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> Message-ID: <45085976.4020402@maubp.freeserve.co.uk> Edoardo Saccenti wrote: > Hi Folks! > > I'm trying to parse the output of blast search done using the NCBIWWW > qblast. > > To parse the reusults I use: > > import cStringIO > blast_out = cStringIO.StringIO(blast_result) > b_parser = NCBIWWW.BlastParser() > b_record = b_parser.parse(blast_out) > > as shown in the Biopython cookbook but my program fails and I get the > following warning from my editor (eric) > > "The program being debugged contains an unspecified syntax error." > > so I do not know how and what to look for. > > I suppose NCBI changed something in the html file format. > > Any idea?? Could you save the blast result to a file? Then other people could try and reproduce the problem. Ideally, could you file a bug and then attach the file to the bug. Please include the version of BioPython, Python and the OS you are using. Also, if you run the example in a python command prompt (or from IDLE) I would expect to see a python stack trace - these are very helpful for determining errors. Peter From biopython at maubp.freeserve.co.uk Fri Sep 15 05:14:38 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 15 Sep 2006 10:14:38 +0100 Subject: [BioPython] help with NCBIWWW parser In-Reply-To: <45085976.4020402@maubp.freeserve.co.uk> References: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> <45085976.4020402@maubp.freeserve.co.uk> Message-ID: <450A6EFE.2070104@maubp.freeserve.co.uk> Edoardo Saccenti wrote: >> Hi Folks! >> >> I'm trying to parse the output of blast search done using the NCBIWWW >> qblast. Thanks for sending me the file, it looks like you have got an XML file back from the NCBI using NCBIWWW.qblast but you are trying to use the HTML parser to read it. qblast takes an optional argument of format_type which now defaults to XML. You can also choose "HTML", "Text", "ASN.1" If you have plain text output, try NCBIStandalone.BlastParser() If you have HTML output, try NCBIWWW.BlastParser() If you have XML output, try NCBIXML.BlastParser() In theory, using XML should be the most reliable as it is a file format designed for computers to read. The HTML output also contains lots of formatting to make it look pretty on a web browser - and also changes fairly often. The plain text output is fairly simple, but again the NBCI makes minor changes every so often (and their standalone tools produce a slightly different format to the web tools). I can read your XML file using: from Bio.Blast import NCBIXML blast_out = open("my_blast","r") b_parser = NCBIXML.BlastParser() b_record = b_parser.parse(blast_out) print b_record.query I hope that helps, (If you are submitting multiple queries, then you will need to use an iterator... but that is another can of worms). Peter From saccenti at cerm.unifi.it Fri Sep 15 09:23:37 2006 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Fri, 15 Sep 2006 15:23:37 +0200 Subject: [BioPython] help with NCBIWWW parser In-Reply-To: <450A6EFE.2070104@maubp.freeserve.co.uk> References: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> <45085976.4020402@maubp.freeserve.co.uk> <450A6EFE.2070104@maubp.freeserve.co.uk> Message-ID: <1158326617.3915.5.camel@nbk17.cerm.unifi.it> I realised indeed it was an xml....my fault not to have read with more attention istructions.... thanks a lot for the time you waist Edoardo On Fri, 2006-09-15 at 10:14 +0100, Peter wrote: > Edoardo Saccenti wrote: > >> Hi Folks! > >> > >> I'm trying to parse the output of blast search done using the NCBIWWW > >> qblast. > > Thanks for sending me the file, it looks like you have got an XML file > back from the NCBI using NCBIWWW.qblast but you are trying to use the > HTML parser to read it. > > qblast takes an optional argument of format_type which now defaults to > XML. You can also choose "HTML", "Text", "ASN.1" > > If you have plain text output, try NCBIStandalone.BlastParser() > If you have HTML output, try NCBIWWW.BlastParser() > If you have XML output, try NCBIXML.BlastParser() > > In theory, using XML should be the most reliable as it is a file format > designed for computers to read. > > The HTML output also contains lots of formatting to make it look pretty > on a web browser - and also changes fairly often. > > The plain text output is fairly simple, but again the NBCI makes minor > changes every so often (and their standalone tools produce a slightly > different format to the web tools). > > I can read your XML file using: > > from Bio.Blast import NCBIXML > blast_out = open("my_blast","r") > b_parser = NCBIXML.BlastParser() > b_record = b_parser.parse(blast_out) > print b_record.query > > I hope that helps, > > (If you are submitting multiple queries, then you will need to use an > iterator... but that is another can of worms). > > Peter > > From biopython at maubp.freeserve.co.uk Sat Sep 16 19:31:50 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Sun, 17 Sep 2006 00:31:50 +0100 Subject: [BioPython] Bio.GenBank FeatureParser vs RecordParser Message-ID: <450C8966.3030106@maubp.freeserve.co.uk> I've been looking at some timings for parsing GenBank files, in particular FeatureParser vs RecordParser The test file I'm using is one of the largest bacterial genomes, the GenBank file is almost 24MB: ftp://ftp.ncbi.nlm.nih.gov/genomes/Bacteria/Streptomyces_coelicolor/NC_003888.gbk On my nice new desktop: RecordParser takes about 5s to return a Bio.GenBank.Record object. FeatureParser takes about 45 to 50s to return a SeqRecord object. Feature location parsing (and setting up associated sub feature objects) takes about 90% of that time. By commenting this out (*), the FeatureParser is actually faster than RecordParser. I personally am only very very rarely interested in the location objects, and indeed for some things actually prefer the raw location string. For the long term unification of BioPython's sequence input (something being discussed on the development list) a move to standardising on all sequence parsers returning SeqRecords has been proposed - so we should do something about the slowness of the GenBank feature parser. Right now I'd suggest a boolean option controlling if the location should be parsed and turned into a nice object orientated representation, or simply held as a raw string. Do people think this is a good idea or not? The other option (which I do plan to look into) is improving the location parser so that it doesn't cause such a slow down. Peter (*) = Just make the location function do an immediate return in class _FeatureConsumer in file Bio/GenBank/__init__.py From jeddahbioc at yahoo.com Sun Sep 17 02:30:04 2006 From: jeddahbioc at yahoo.com (FFFFF AAAAA) Date: Sat, 16 Sep 2006 23:30:04 -0700 (PDT) Subject: [BioPython] sequence Message-ID: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> Hi, I need to know the sequense for the motif I am searching for. Is it possible to make this via script. Thanks Fawzia --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. From biopython at maubp.freeserve.co.uk Sun Sep 17 06:39:29 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Sun, 17 Sep 2006 11:39:29 +0100 Subject: [BioPython] sequence In-Reply-To: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> References: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> Message-ID: <450D25E1.8000404@maubp.freeserve.co.uk> FFFFF AAAAA wrote: > Hi, > I need to know the sequense for the motif I am searching for. Is it possible to make this via script. > Thanks > Fawzia You really need to provide more information before we can even understand your question. Where did you get the motif from? For example, are you using Hidden Markov Models (HMM) like the NCBI's conserved domain database (CDD) and RPS-BLAST? Peter From bartek at rezolwenta.eu.org Sun Sep 17 06:49:16 2006 From: bartek at rezolwenta.eu.org (bartek wilczynski) Date: Sun, 17 Sep 2006 12:49:16 +0200 Subject: [BioPython] sequence In-Reply-To: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> References: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> Message-ID: <1158490156.450d282c75e23@imp.rezolwenta.eu.org> Citing FFFFF AAAAA : > Hi, > I need to know the sequense for the motif I am searching for. Is it > possible to make this via script. > Thanks > Fawzia Hi, Can you tell us more on what you are trying to do ? What kind of motif and sequence you have on your mind? What do you mean by "knowing the sequence" for a motif ? If you are looking for cis-motifs in dna sequences you can try the meme or AlignAce modules from biopython. -- regards Bartek Wilczynski From mark.x.brooks at gmail.com Sun Sep 17 12:09:46 2006 From: mark.x.brooks at gmail.com (Mark Brooks) Date: Sun, 17 Sep 2006 18:09:46 +0200 Subject: [BioPython] Remote PSI-Blast scripts Message-ID: <1ecaef000609170909k1723abbawf4c69062bc4b83c9@mail.gmail.com> Hi, has anyone got any example scripts going that use PSI-Blast for remote submission please? There is a version which does a local psi-blast search at the Pasteur Institute page (what a fabulous resource! http://www.pasteur.fr/recherche/unites/sis/formation/python/apas05.html#sol_local_psi_blast ), but from the API I don't see how remote jobs can be performed. Are there any good references in O'Reilly (or similar) books? Thanks in advance for any help, Mark -- Mark BROOKS Telephone: 0169157968 Fax: 0169853715 INSTITUT de BIOCHIMIE et de BIOPHYSIQUE MOLECULAIRE et CELLULAIRE UMR8619 - B?t 430 - Universit? de Paris-Sud 91405 ORSAY CEDEX From idoerg at burnham.org Mon Sep 18 18:09:08 2006 From: idoerg at burnham.org (Iddo Friedberg) Date: Mon, 18 Sep 2006 15:09:08 -0700 Subject: [BioPython] Biopython for Ubuntu Message-ID: <450F1904.3070601@burnham.org> Apparently we have a Debian / Ubuntu package for Biopython. If there was an announcement here then I am sorry, but it went past me. Anyhow, thanks very much to Philipp Benner for creating the Ubuntu package. Currently Biopython 1.41, and you need to add the universe repository to get it. It's in the universe/python section. I'll add something to the Wiki Iddo -- Iddo Friedberg, Ph.D. Burnham Institute for Medical Research 10901 N. Torrey Pines Rd. La Jolla, CA 92037, USA T: +1 858 646 3100 x3516 http://iddo-friedberg.org http://BioFunctionPrediction.org From saccenti at cerm.unifi.it Wed Sep 20 13:51:11 2006 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Wed, 20 Sep 2006 19:51:11 +0200 Subject: [BioPython] back translation Message-ID: <1158774671.3630.9.camel@nbk17.cerm.unifi.it> Hi Folks, I'm wondering if there is a way using biopython to get ALL the possible back translation of a given protein sequence. Following the example on the cookbook I only get one DNA sequence! I googled and I found this: """"" To get a list of all posible codons, replace for key in keys: back_table[table[key]] = key with for key in keys: back_table[table[key]] = back_table.get(table[key], []) + [key] """" I tried to modify but, of course, I get an error from the string package Does anybod had to deal with this problem before? Ciao Edoardo From dtomso at athenixcorp.com Wed Sep 20 14:01:16 2006 From: dtomso at athenixcorp.com (Daniel Tomso) Date: Wed, 20 Sep 2006 14:01:16 -0400 Subject: [BioPython] back translation In-Reply-To: <1158774671.3630.9.camel@nbk17.cerm.unifi.it> Message-ID: Hello-- Here are some code bits, not in BioPython, but they will generate degenerate nucleotide sequence from any amino acid sequence, given a back translation table. The first routine covers the degeneration, the second just describes how I built the back translation table, but of course you could use any similar structure. Hope this helps, especially if there isn't an existing BioPython method. Dan T. def degenerate(self, aasequence, prefixes = ['']): # this is recursive """ Returns a list containing degenerate nucleic acid sequences based on an amino acid sequence. """ if len(aasequence) == 0: return prefixes else: aa = aasequence[0] aasequence = aasequence[1:] newprefixes = [] for prefix in prefixes: for codon in self.btable[aa]: newprefixes.append(prefix + codon) return self.degenerate(aasequence, prefixes = newprefixes) def build_btable(self): """ Builds a back-translation table for degenerate sequence generation. """ btable = {} for codon in self.ttable.keys(): aa = self.aa(codon) if btable.has_key(aa): # single-letter aa btable[aa].append(codon) else: btable[aa] = [codon] return btable Daniel J. Tomso Senior Scientist, Bioinformatics Athenix Corporation 2202 Ellis Road Suite B Durham, NC 27703 919.281.0920 dtomso at athenixcorp.com www.athenixcorp.com -----Original Message----- From: biopython-bounces at lists.open-bio.org [mailto:biopython-bounces at lists.open-bio.org] On Behalf Of Edoardo Saccenti Sent: Wednesday, September 20, 2006 1:51 PM To: biopython at lists.open-bio.org Subject: [BioPython] back translation Hi Folks, I'm wondering if there is a way using biopython to get ALL the possible back translation of a given protein sequence. Following the example on the cookbook I only get one DNA sequence! I googled and I found this: """"" To get a list of all posible codons, replace for key in keys: back_table[table[key]] = key with for key in keys: back_table[table[key]] = back_table.get(table[key], []) + [key] """" I tried to modify but, of course, I get an error from the string package Does anybod had to deal with this problem before? Ciao Edoardo _______________________________________________ BioPython mailing list - BioPython at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/biopython From sbassi at gmail.com Thu Sep 28 10:37:45 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Thu, 28 Sep 2006 11:37:45 -0300 Subject: [BioPython] Problem following the Cookbook Message-ID: Hello, I found en a problem following the BLAST parser tutorial from the Biopython cookbook. To be in the safe side, I generated a XML output and tried to parse that from code extracted from the cookbook. Here is the code: blast_out = open('blastcasein.xml', 'r') from Bio.Blast import NCBIXML b_parser = NCBIXML.BlastParser() b_record = b_parser.parse(blast_out) E_VALUE_THRESH = 0.1 for alignment in b_record.alignments: for hsp in alignment.hsps: if hsp.expect < E_VALUE_THRESH: print 'length:', alignment.length print 'e value:', hsp.expect The error I get is: Traceback (most recent call last): File "/home/vicky/GENES/doctorado/nuevo/casein/evalue.py", line 6, in -toplevel- b_record = b_parser.parse(blast_out) File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIXML.py", line 111, in parse self._parser.parse(filename) NameError: global name 'filename' is not defined The path is OK, since both program and data is in the same directory. -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From mdehoon at c2b2.columbia.edu Thu Sep 28 10:59:52 2006 From: mdehoon at c2b2.columbia.edu (Michiel de Hoon) Date: Thu, 28 Sep 2006 10:59:52 -0400 Subject: [BioPython] Problem following the Cookbook In-Reply-To: References: Message-ID: <451BE368.3010001@c2b2.columbia.edu> Are you using the latest Biopython release? From CVS, it looks like this bug was fixed about two years ago. --Michiel. Sebastian Bassi wrote: > Hello, > > I found en a problem following the BLAST parser tutorial from the > Biopython cookbook. > To be in the safe side, I generated a XML output and tried to parse > that from code extracted from the cookbook. > Here is the code: > > blast_out = open('blastcasein.xml', 'r') > from Bio.Blast import NCBIXML > b_parser = NCBIXML.BlastParser() > b_record = b_parser.parse(blast_out) > E_VALUE_THRESH = 0.1 > for alignment in b_record.alignments: > for hsp in alignment.hsps: > if hsp.expect < E_VALUE_THRESH: > print 'length:', alignment.length > print 'e value:', hsp.expect > > The error I get is: > > Traceback (most recent call last): > File "/home/vicky/GENES/doctorado/nuevo/casein/evalue.py", line 6, > in -toplevel- > b_record = b_parser.parse(blast_out) > File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIXML.py", line > 111, in parse > self._parser.parse(filename) > NameError: global name 'filename' is not defined > > The path is OK, since both program and data is in the same directory. > > From sbassi at gmail.com Thu Sep 28 10:45:29 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Thu, 28 Sep 2006 11:45:29 -0300 Subject: [BioPython] Problem following the Cookbook, almost resolved :) Message-ID: Sorry, I think I know what the problem was. I was parsing the XML file produced by my local blast webserver, and I think that NCBIXML is for parsing the XML output from the NCBI webserver and I should use NCBIStandalone parser. Isn't it? -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From mdehoon at c2b2.columbia.edu Thu Sep 28 12:29:53 2006 From: mdehoon at c2b2.columbia.edu (Michiel Jan Laurens de Hoon) Date: Thu, 28 Sep 2006 12:29:53 -0400 Subject: [BioPython] Problem following the Cookbook, almost resolved :) In-Reply-To: References: Message-ID: <451BF881.4000304@c2b2.columbia.edu> It shouldn't matter who made the XML file; NCBIXML can parse either one. Check your Biopython version; most likely, the problem lies there. --Michiel. Sebastian Bassi wrote: > Sorry, I think I know what the problem was. I was parsing the XML file > produced by my local blast webserver, and I think that NCBIXML is for > parsing the XML output from the NCBI webserver and I should use > NCBIStandalone parser. Isn't it? > -- Michiel de Hoon Center for Computational Biology and Bioinformatics Columbia University 1130 St Nicholas Avenue New York, NY 10032 From sbassi at gmail.com Thu Sep 28 19:49:32 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Thu, 28 Sep 2006 20:49:32 -0300 Subject: [BioPython] Biopython in Freespire Message-ID: To avoid previous problems, I am trying to install Biopython under Freespire. Easy methods (CNR and apt-get) has only old packages. So I will do it "by hand". I have both python2.3 and 2.4 Fist I wanted to meet dependencies. I started with Numpy, downloaded it from Sourceforge and followed the INSTALL file: sbassi at hp:~/bioinfo/Numeric-24.2$ python2.4 setup.py build running build running build_py creating build creating build/lib.linux-i686-2.4 copying Lib/Matrix.py -> build/lib.linux-i686-2.4 copying Lib/UserArray.py -> build/lib.linux-i686-2.4 copying Lib/MLab.py -> build/lib.linux-i686-2.4 copying Lib/Precision.py -> build/lib.linux-i686-2.4 copying Lib/RandomArray.py -> build/lib.linux-i686-2.4 copying Lib/LinearAlgebra.py -> build/lib.linux-i686-2.4 copying Lib/numeric_version.py -> build/lib.linux-i686-2.4 copying Lib/ArrayPrinter.py -> build/lib.linux-i686-2.4 copying Lib/Numeric.py -> build/lib.linux-i686-2.4 creating build/lib.linux-i686-2.4/FFT copying Packages/FFT/Lib/FFT.py -> build/lib.linux-i686-2.4/FFT copying Packages/FFT/Lib/__init__.py -> build/lib.linux-i686-2.4/FFT creating build/lib.linux-i686-2.4/MA copying Packages/MA/Lib/MA.py -> build/lib.linux-i686-2.4/MA copying Packages/MA/Lib/MA_version.py -> build/lib.linux-i686-2.4/MA copying Packages/MA/Lib/__init__.py -> build/lib.linux-i686-2.4/MA creating build/lib.linux-i686-2.4/RNG copying Packages/RNG/Lib/Statistics.py -> build/lib.linux-i686-2.4/RNG copying Packages/RNG/Lib/__init__.py -> build/lib.linux-i686-2.4/RNG creating build/lib.linux-i686-2.4/Numeric_headers copying Include/__init__.py -> build/lib.linux-i686-2.4/Numeric_headers running build_ext error: invalid Python installation: unable to open /usr/lib/python2.4/config/Makefile (No such file or directory) I don't have a config directory under /usr/lib/python2.4/ Any help? -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From biopython at maubp.freeserve.co.uk Fri Sep 29 06:12:25 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 29 Sep 2006 11:12:25 +0100 Subject: [BioPython] Biopython in Freespire In-Reply-To: References: Message-ID: <451CF189.2020601@maubp.freeserve.co.uk> Sebastian Bassi wrote: > To avoid previous problems, I am trying to install Biopython under Freespire. > Easy methods (CNR and apt-get) has only old packages. So I will do it "by hand". > I have both python2.3 and 2.4 > Fist I wanted to meet dependencies. > I started with Numpy, downloaded it from Sourceforge and followed the > INSTALL file: > > sbassi at hp:~/bioinfo/Numeric-24.2$ python2.4 setup.py build > ... You seeming to be trying to install Numeric 24.2, rather than the newer array package Numpy as stated earlier in your email. http://numpy.scipy.org/ I have never installed either from source, so I can't help you there. Peter From robert.campbell at queensu.ca Fri Sep 29 09:31:17 2006 From: robert.campbell at queensu.ca (Robert Campbell) Date: Fri, 29 Sep 2006 09:31:17 -0400 Subject: [BioPython] Biopython in Freespire In-Reply-To: References: Message-ID: <20060929133117.GA2129@adelie.biochem.queensu.ca> Hi, On 2006-09-28 20:49 you wrote: > To avoid previous problems, I am trying to install Biopython under Freespire. > Easy methods (CNR and apt-get) has only old packages. So I will do it "by hand". > I have both python2.3 and 2.4 > Fist I wanted to meet dependencies. > I started with Numpy, downloaded it from Sourceforge and followed the > INSTALL file: > > sbassi at hp:~/bioinfo/Numeric-24.2$ python2.4 setup.py build > running build > running build_py > running build_ext > error: invalid Python installation: unable to open > /usr/lib/python2.4/config/Makefile (No such file or directory) > > I don't have a config directory under /usr/lib/python2.4/ > Any help? You need the python2.4 development package. I haven't used freespire, but since you use apt-get, perhaps it is like Debian. Under Debian the package you need is known as python2.4-dev. Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Department of Biochemistry, Queen's University Kingston, ON K7L 3N6 Canada Tel: 613-533-6821 Fax: 613-533-2497 http://adelie.biochem.queensu.ca/~rlc From sbassi at gmail.com Fri Sep 29 09:54:38 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Fri, 29 Sep 2006 10:54:38 -0300 Subject: [BioPython] Biopython in Freespire In-Reply-To: <20060929133117.GA2129@adelie.biochem.queensu.ca> References: <20060929133117.GA2129@adelie.biochem.queensu.ca> Message-ID: On 9/29/06, Robert Campbell wrote: > You need the python2.4 development package. I haven't used freespire, > but since you use apt-get, perhaps it is like Debian. Under Debian the > package you need is known as python2.4-dev. Yes, that was the problem. Thank :) -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From sbassi at gmail.com Fri Sep 29 09:10:33 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Fri, 29 Sep 2006 10:10:33 -0300 Subject: [BioPython] Biopython in Freespire In-Reply-To: <451CF189.2020601@maubp.freeserve.co.uk> References: <451CF189.2020601@maubp.freeserve.co.uk> Message-ID: On 9/29/06, Peter wrote: > You seeming to be trying to install Numeric 24.2, rather than the newer > array package Numpy as stated earlier in your email. > http://numpy.scipy.org/ > I have never installed either from source, so I can't help you there. The problem was that I didn?t have python2.4-dev packae installed. After installing it, I could install Numeric from source. I didn?t know about Numpy, I just followed the current online documentation in http://biopython.org/wiki/Download See here: Required Software * Python 2.3 or above * A C compiler -- you need a C compiler supported by distutils. gcc will work fine on UNIX-like platforms * mxTextTools * Numerical Python (version 24.2 recommended) What should I do now? Uninstall it? Or may I use Numeric? I am not in my computer right now, but then I will install mxText Tools and last biopython. -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From mdehoon at c2b2.columbia.edu Fri Sep 29 23:21:07 2006 From: mdehoon at c2b2.columbia.edu (Michiel de Hoon) Date: Fri, 29 Sep 2006 23:21:07 -0400 Subject: [BioPython] Biopython in Freespire In-Reply-To: References: <451CF189.2020601@maubp.freeserve.co.uk> Message-ID: <451DE2A3.6010409@c2b2.columbia.edu> Sebastian Bassi wrote: > What should I do now? Uninstall it? Or may I use Numeric? > I am not in my computer right now, but then I will install mxText > Tools and last biopython. > Use Numeric. As far as I know, Biopython won't work with numpy. --Michiel. From saccenti at cerm.unifi.it Wed Sep 13 17:22:46 2006 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Wed, 13 Sep 2006 19:22:46 +0200 Subject: [BioPython] help with NCBIWWW parser Message-ID: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> Hi Folks! I'm trying to parse the output of blast search done using the NCBIWWW qblast. To parse the reusults I use: import cStringIO blast_out = cStringIO.StringIO(blast_result) b_parser = NCBIWWW.BlastParser() b_record = b_parser.parse(blast_out) as shown in the Biopython cookbook but my program fails and I get the following warning from my editor (eric) "The program being debugged contains an unspecified syntax error." so I do not know how and what to look for. I suppose NCBI changed something in the html file format. Any idea?? ciao edoardo From biopython at maubp.freeserve.co.uk Wed Sep 13 19:18:14 2006 From: biopython at maubp.freeserve.co.uk (Peter (BioPython List)) Date: Wed, 13 Sep 2006 20:18:14 +0100 Subject: [BioPython] help with NCBIWWW parser In-Reply-To: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> References: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> Message-ID: <45085976.4020402@maubp.freeserve.co.uk> Edoardo Saccenti wrote: > Hi Folks! > > I'm trying to parse the output of blast search done using the NCBIWWW > qblast. > > To parse the reusults I use: > > import cStringIO > blast_out = cStringIO.StringIO(blast_result) > b_parser = NCBIWWW.BlastParser() > b_record = b_parser.parse(blast_out) > > as shown in the Biopython cookbook but my program fails and I get the > following warning from my editor (eric) > > "The program being debugged contains an unspecified syntax error." > > so I do not know how and what to look for. > > I suppose NCBI changed something in the html file format. > > Any idea?? Could you save the blast result to a file? Then other people could try and reproduce the problem. Ideally, could you file a bug and then attach the file to the bug. Please include the version of BioPython, Python and the OS you are using. Also, if you run the example in a python command prompt (or from IDLE) I would expect to see a python stack trace - these are very helpful for determining errors. Peter From biopython at maubp.freeserve.co.uk Fri Sep 15 09:14:38 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 15 Sep 2006 10:14:38 +0100 Subject: [BioPython] help with NCBIWWW parser In-Reply-To: <45085976.4020402@maubp.freeserve.co.uk> References: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> <45085976.4020402@maubp.freeserve.co.uk> Message-ID: <450A6EFE.2070104@maubp.freeserve.co.uk> Edoardo Saccenti wrote: >> Hi Folks! >> >> I'm trying to parse the output of blast search done using the NCBIWWW >> qblast. Thanks for sending me the file, it looks like you have got an XML file back from the NCBI using NCBIWWW.qblast but you are trying to use the HTML parser to read it. qblast takes an optional argument of format_type which now defaults to XML. You can also choose "HTML", "Text", "ASN.1" If you have plain text output, try NCBIStandalone.BlastParser() If you have HTML output, try NCBIWWW.BlastParser() If you have XML output, try NCBIXML.BlastParser() In theory, using XML should be the most reliable as it is a file format designed for computers to read. The HTML output also contains lots of formatting to make it look pretty on a web browser - and also changes fairly often. The plain text output is fairly simple, but again the NBCI makes minor changes every so often (and their standalone tools produce a slightly different format to the web tools). I can read your XML file using: from Bio.Blast import NCBIXML blast_out = open("my_blast","r") b_parser = NCBIXML.BlastParser() b_record = b_parser.parse(blast_out) print b_record.query I hope that helps, (If you are submitting multiple queries, then you will need to use an iterator... but that is another can of worms). Peter From saccenti at cerm.unifi.it Fri Sep 15 13:23:37 2006 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Fri, 15 Sep 2006 15:23:37 +0200 Subject: [BioPython] help with NCBIWWW parser In-Reply-To: <450A6EFE.2070104@maubp.freeserve.co.uk> References: <1158168166.10994.5.camel@nbk17.cerm.unifi.it> <45085976.4020402@maubp.freeserve.co.uk> <450A6EFE.2070104@maubp.freeserve.co.uk> Message-ID: <1158326617.3915.5.camel@nbk17.cerm.unifi.it> I realised indeed it was an xml....my fault not to have read with more attention istructions.... thanks a lot for the time you waist Edoardo On Fri, 2006-09-15 at 10:14 +0100, Peter wrote: > Edoardo Saccenti wrote: > >> Hi Folks! > >> > >> I'm trying to parse the output of blast search done using the NCBIWWW > >> qblast. > > Thanks for sending me the file, it looks like you have got an XML file > back from the NCBI using NCBIWWW.qblast but you are trying to use the > HTML parser to read it. > > qblast takes an optional argument of format_type which now defaults to > XML. You can also choose "HTML", "Text", "ASN.1" > > If you have plain text output, try NCBIStandalone.BlastParser() > If you have HTML output, try NCBIWWW.BlastParser() > If you have XML output, try NCBIXML.BlastParser() > > In theory, using XML should be the most reliable as it is a file format > designed for computers to read. > > The HTML output also contains lots of formatting to make it look pretty > on a web browser - and also changes fairly often. > > The plain text output is fairly simple, but again the NBCI makes minor > changes every so often (and their standalone tools produce a slightly > different format to the web tools). > > I can read your XML file using: > > from Bio.Blast import NCBIXML > blast_out = open("my_blast","r") > b_parser = NCBIXML.BlastParser() > b_record = b_parser.parse(blast_out) > print b_record.query > > I hope that helps, > > (If you are submitting multiple queries, then you will need to use an > iterator... but that is another can of worms). > > Peter > > From biopython at maubp.freeserve.co.uk Sat Sep 16 23:31:50 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Sun, 17 Sep 2006 00:31:50 +0100 Subject: [BioPython] Bio.GenBank FeatureParser vs RecordParser Message-ID: <450C8966.3030106@maubp.freeserve.co.uk> I've been looking at some timings for parsing GenBank files, in particular FeatureParser vs RecordParser The test file I'm using is one of the largest bacterial genomes, the GenBank file is almost 24MB: ftp://ftp.ncbi.nlm.nih.gov/genomes/Bacteria/Streptomyces_coelicolor/NC_003888.gbk On my nice new desktop: RecordParser takes about 5s to return a Bio.GenBank.Record object. FeatureParser takes about 45 to 50s to return a SeqRecord object. Feature location parsing (and setting up associated sub feature objects) takes about 90% of that time. By commenting this out (*), the FeatureParser is actually faster than RecordParser. I personally am only very very rarely interested in the location objects, and indeed for some things actually prefer the raw location string. For the long term unification of BioPython's sequence input (something being discussed on the development list) a move to standardising on all sequence parsers returning SeqRecords has been proposed - so we should do something about the slowness of the GenBank feature parser. Right now I'd suggest a boolean option controlling if the location should be parsed and turned into a nice object orientated representation, or simply held as a raw string. Do people think this is a good idea or not? The other option (which I do plan to look into) is improving the location parser so that it doesn't cause such a slow down. Peter (*) = Just make the location function do an immediate return in class _FeatureConsumer in file Bio/GenBank/__init__.py From jeddahbioc at yahoo.com Sun Sep 17 06:30:04 2006 From: jeddahbioc at yahoo.com (FFFFF AAAAA) Date: Sat, 16 Sep 2006 23:30:04 -0700 (PDT) Subject: [BioPython] sequence Message-ID: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> Hi, I need to know the sequense for the motif I am searching for. Is it possible to make this via script. Thanks Fawzia --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. From biopython at maubp.freeserve.co.uk Sun Sep 17 10:39:29 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Sun, 17 Sep 2006 11:39:29 +0100 Subject: [BioPython] sequence In-Reply-To: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> References: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> Message-ID: <450D25E1.8000404@maubp.freeserve.co.uk> FFFFF AAAAA wrote: > Hi, > I need to know the sequense for the motif I am searching for. Is it possible to make this via script. > Thanks > Fawzia You really need to provide more information before we can even understand your question. Where did you get the motif from? For example, are you using Hidden Markov Models (HMM) like the NCBI's conserved domain database (CDD) and RPS-BLAST? Peter From bartek at rezolwenta.eu.org Sun Sep 17 10:49:16 2006 From: bartek at rezolwenta.eu.org (bartek wilczynski) Date: Sun, 17 Sep 2006 12:49:16 +0200 Subject: [BioPython] sequence In-Reply-To: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> References: <20060917063004.58143.qmail@web30504.mail.mud.yahoo.com> Message-ID: <1158490156.450d282c75e23@imp.rezolwenta.eu.org> Citing FFFFF AAAAA : > Hi, > I need to know the sequense for the motif I am searching for. Is it > possible to make this via script. > Thanks > Fawzia Hi, Can you tell us more on what you are trying to do ? What kind of motif and sequence you have on your mind? What do you mean by "knowing the sequence" for a motif ? If you are looking for cis-motifs in dna sequences you can try the meme or AlignAce modules from biopython. -- regards Bartek Wilczynski From mark.x.brooks at gmail.com Sun Sep 17 16:09:46 2006 From: mark.x.brooks at gmail.com (Mark Brooks) Date: Sun, 17 Sep 2006 18:09:46 +0200 Subject: [BioPython] Remote PSI-Blast scripts Message-ID: <1ecaef000609170909k1723abbawf4c69062bc4b83c9@mail.gmail.com> Hi, has anyone got any example scripts going that use PSI-Blast for remote submission please? There is a version which does a local psi-blast search at the Pasteur Institute page (what a fabulous resource! http://www.pasteur.fr/recherche/unites/sis/formation/python/apas05.html#sol_local_psi_blast ), but from the API I don't see how remote jobs can be performed. Are there any good references in O'Reilly (or similar) books? Thanks in advance for any help, Mark -- Mark BROOKS Telephone: 0169157968 Fax: 0169853715 INSTITUT de BIOCHIMIE et de BIOPHYSIQUE MOLECULAIRE et CELLULAIRE UMR8619 - B?t 430 - Universit? de Paris-Sud 91405 ORSAY CEDEX From idoerg at burnham.org Mon Sep 18 22:09:08 2006 From: idoerg at burnham.org (Iddo Friedberg) Date: Mon, 18 Sep 2006 15:09:08 -0700 Subject: [BioPython] Biopython for Ubuntu Message-ID: <450F1904.3070601@burnham.org> Apparently we have a Debian / Ubuntu package for Biopython. If there was an announcement here then I am sorry, but it went past me. Anyhow, thanks very much to Philipp Benner for creating the Ubuntu package. Currently Biopython 1.41, and you need to add the universe repository to get it. It's in the universe/python section. I'll add something to the Wiki Iddo -- Iddo Friedberg, Ph.D. Burnham Institute for Medical Research 10901 N. Torrey Pines Rd. La Jolla, CA 92037, USA T: +1 858 646 3100 x3516 http://iddo-friedberg.org http://BioFunctionPrediction.org From saccenti at cerm.unifi.it Wed Sep 20 17:51:11 2006 From: saccenti at cerm.unifi.it (Edoardo Saccenti) Date: Wed, 20 Sep 2006 19:51:11 +0200 Subject: [BioPython] back translation Message-ID: <1158774671.3630.9.camel@nbk17.cerm.unifi.it> Hi Folks, I'm wondering if there is a way using biopython to get ALL the possible back translation of a given protein sequence. Following the example on the cookbook I only get one DNA sequence! I googled and I found this: """"" To get a list of all posible codons, replace for key in keys: back_table[table[key]] = key with for key in keys: back_table[table[key]] = back_table.get(table[key], []) + [key] """" I tried to modify but, of course, I get an error from the string package Does anybod had to deal with this problem before? Ciao Edoardo From dtomso at athenixcorp.com Wed Sep 20 18:01:16 2006 From: dtomso at athenixcorp.com (Daniel Tomso) Date: Wed, 20 Sep 2006 14:01:16 -0400 Subject: [BioPython] back translation In-Reply-To: <1158774671.3630.9.camel@nbk17.cerm.unifi.it> Message-ID: Hello-- Here are some code bits, not in BioPython, but they will generate degenerate nucleotide sequence from any amino acid sequence, given a back translation table. The first routine covers the degeneration, the second just describes how I built the back translation table, but of course you could use any similar structure. Hope this helps, especially if there isn't an existing BioPython method. Dan T. def degenerate(self, aasequence, prefixes = ['']): # this is recursive """ Returns a list containing degenerate nucleic acid sequences based on an amino acid sequence. """ if len(aasequence) == 0: return prefixes else: aa = aasequence[0] aasequence = aasequence[1:] newprefixes = [] for prefix in prefixes: for codon in self.btable[aa]: newprefixes.append(prefix + codon) return self.degenerate(aasequence, prefixes = newprefixes) def build_btable(self): """ Builds a back-translation table for degenerate sequence generation. """ btable = {} for codon in self.ttable.keys(): aa = self.aa(codon) if btable.has_key(aa): # single-letter aa btable[aa].append(codon) else: btable[aa] = [codon] return btable Daniel J. Tomso Senior Scientist, Bioinformatics Athenix Corporation 2202 Ellis Road Suite B Durham, NC 27703 919.281.0920 dtomso at athenixcorp.com www.athenixcorp.com -----Original Message----- From: biopython-bounces at lists.open-bio.org [mailto:biopython-bounces at lists.open-bio.org] On Behalf Of Edoardo Saccenti Sent: Wednesday, September 20, 2006 1:51 PM To: biopython at lists.open-bio.org Subject: [BioPython] back translation Hi Folks, I'm wondering if there is a way using biopython to get ALL the possible back translation of a given protein sequence. Following the example on the cookbook I only get one DNA sequence! I googled and I found this: """"" To get a list of all posible codons, replace for key in keys: back_table[table[key]] = key with for key in keys: back_table[table[key]] = back_table.get(table[key], []) + [key] """" I tried to modify but, of course, I get an error from the string package Does anybod had to deal with this problem before? Ciao Edoardo _______________________________________________ BioPython mailing list - BioPython at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/biopython From sbassi at gmail.com Thu Sep 28 14:37:45 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Thu, 28 Sep 2006 11:37:45 -0300 Subject: [BioPython] Problem following the Cookbook Message-ID: Hello, I found en a problem following the BLAST parser tutorial from the Biopython cookbook. To be in the safe side, I generated a XML output and tried to parse that from code extracted from the cookbook. Here is the code: blast_out = open('blastcasein.xml', 'r') from Bio.Blast import NCBIXML b_parser = NCBIXML.BlastParser() b_record = b_parser.parse(blast_out) E_VALUE_THRESH = 0.1 for alignment in b_record.alignments: for hsp in alignment.hsps: if hsp.expect < E_VALUE_THRESH: print 'length:', alignment.length print 'e value:', hsp.expect The error I get is: Traceback (most recent call last): File "/home/vicky/GENES/doctorado/nuevo/casein/evalue.py", line 6, in -toplevel- b_record = b_parser.parse(blast_out) File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIXML.py", line 111, in parse self._parser.parse(filename) NameError: global name 'filename' is not defined The path is OK, since both program and data is in the same directory. -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From mdehoon at c2b2.columbia.edu Thu Sep 28 14:59:52 2006 From: mdehoon at c2b2.columbia.edu (Michiel de Hoon) Date: Thu, 28 Sep 2006 10:59:52 -0400 Subject: [BioPython] Problem following the Cookbook In-Reply-To: References: Message-ID: <451BE368.3010001@c2b2.columbia.edu> Are you using the latest Biopython release? From CVS, it looks like this bug was fixed about two years ago. --Michiel. Sebastian Bassi wrote: > Hello, > > I found en a problem following the BLAST parser tutorial from the > Biopython cookbook. > To be in the safe side, I generated a XML output and tried to parse > that from code extracted from the cookbook. > Here is the code: > > blast_out = open('blastcasein.xml', 'r') > from Bio.Blast import NCBIXML > b_parser = NCBIXML.BlastParser() > b_record = b_parser.parse(blast_out) > E_VALUE_THRESH = 0.1 > for alignment in b_record.alignments: > for hsp in alignment.hsps: > if hsp.expect < E_VALUE_THRESH: > print 'length:', alignment.length > print 'e value:', hsp.expect > > The error I get is: > > Traceback (most recent call last): > File "/home/vicky/GENES/doctorado/nuevo/casein/evalue.py", line 6, > in -toplevel- > b_record = b_parser.parse(blast_out) > File "/usr/lib/python2.4/site-packages/Bio/Blast/NCBIXML.py", line > 111, in parse > self._parser.parse(filename) > NameError: global name 'filename' is not defined > > The path is OK, since both program and data is in the same directory. > > From sbassi at gmail.com Thu Sep 28 14:45:29 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Thu, 28 Sep 2006 11:45:29 -0300 Subject: [BioPython] Problem following the Cookbook, almost resolved :) Message-ID: Sorry, I think I know what the problem was. I was parsing the XML file produced by my local blast webserver, and I think that NCBIXML is for parsing the XML output from the NCBI webserver and I should use NCBIStandalone parser. Isn't it? -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From mdehoon at c2b2.columbia.edu Thu Sep 28 16:29:53 2006 From: mdehoon at c2b2.columbia.edu (Michiel Jan Laurens de Hoon) Date: Thu, 28 Sep 2006 12:29:53 -0400 Subject: [BioPython] Problem following the Cookbook, almost resolved :) In-Reply-To: References: Message-ID: <451BF881.4000304@c2b2.columbia.edu> It shouldn't matter who made the XML file; NCBIXML can parse either one. Check your Biopython version; most likely, the problem lies there. --Michiel. Sebastian Bassi wrote: > Sorry, I think I know what the problem was. I was parsing the XML file > produced by my local blast webserver, and I think that NCBIXML is for > parsing the XML output from the NCBI webserver and I should use > NCBIStandalone parser. Isn't it? > -- Michiel de Hoon Center for Computational Biology and Bioinformatics Columbia University 1130 St Nicholas Avenue New York, NY 10032 From sbassi at gmail.com Thu Sep 28 23:49:32 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Thu, 28 Sep 2006 20:49:32 -0300 Subject: [BioPython] Biopython in Freespire Message-ID: To avoid previous problems, I am trying to install Biopython under Freespire. Easy methods (CNR and apt-get) has only old packages. So I will do it "by hand". I have both python2.3 and 2.4 Fist I wanted to meet dependencies. I started with Numpy, downloaded it from Sourceforge and followed the INSTALL file: sbassi at hp:~/bioinfo/Numeric-24.2$ python2.4 setup.py build running build running build_py creating build creating build/lib.linux-i686-2.4 copying Lib/Matrix.py -> build/lib.linux-i686-2.4 copying Lib/UserArray.py -> build/lib.linux-i686-2.4 copying Lib/MLab.py -> build/lib.linux-i686-2.4 copying Lib/Precision.py -> build/lib.linux-i686-2.4 copying Lib/RandomArray.py -> build/lib.linux-i686-2.4 copying Lib/LinearAlgebra.py -> build/lib.linux-i686-2.4 copying Lib/numeric_version.py -> build/lib.linux-i686-2.4 copying Lib/ArrayPrinter.py -> build/lib.linux-i686-2.4 copying Lib/Numeric.py -> build/lib.linux-i686-2.4 creating build/lib.linux-i686-2.4/FFT copying Packages/FFT/Lib/FFT.py -> build/lib.linux-i686-2.4/FFT copying Packages/FFT/Lib/__init__.py -> build/lib.linux-i686-2.4/FFT creating build/lib.linux-i686-2.4/MA copying Packages/MA/Lib/MA.py -> build/lib.linux-i686-2.4/MA copying Packages/MA/Lib/MA_version.py -> build/lib.linux-i686-2.4/MA copying Packages/MA/Lib/__init__.py -> build/lib.linux-i686-2.4/MA creating build/lib.linux-i686-2.4/RNG copying Packages/RNG/Lib/Statistics.py -> build/lib.linux-i686-2.4/RNG copying Packages/RNG/Lib/__init__.py -> build/lib.linux-i686-2.4/RNG creating build/lib.linux-i686-2.4/Numeric_headers copying Include/__init__.py -> build/lib.linux-i686-2.4/Numeric_headers running build_ext error: invalid Python installation: unable to open /usr/lib/python2.4/config/Makefile (No such file or directory) I don't have a config directory under /usr/lib/python2.4/ Any help? -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From biopython at maubp.freeserve.co.uk Fri Sep 29 10:12:25 2006 From: biopython at maubp.freeserve.co.uk (Peter) Date: Fri, 29 Sep 2006 11:12:25 +0100 Subject: [BioPython] Biopython in Freespire In-Reply-To: References: Message-ID: <451CF189.2020601@maubp.freeserve.co.uk> Sebastian Bassi wrote: > To avoid previous problems, I am trying to install Biopython under Freespire. > Easy methods (CNR and apt-get) has only old packages. So I will do it "by hand". > I have both python2.3 and 2.4 > Fist I wanted to meet dependencies. > I started with Numpy, downloaded it from Sourceforge and followed the > INSTALL file: > > sbassi at hp:~/bioinfo/Numeric-24.2$ python2.4 setup.py build > ... You seeming to be trying to install Numeric 24.2, rather than the newer array package Numpy as stated earlier in your email. http://numpy.scipy.org/ I have never installed either from source, so I can't help you there. Peter From robert.campbell at queensu.ca Fri Sep 29 13:31:17 2006 From: robert.campbell at queensu.ca (Robert Campbell) Date: Fri, 29 Sep 2006 09:31:17 -0400 Subject: [BioPython] Biopython in Freespire In-Reply-To: References: Message-ID: <20060929133117.GA2129@adelie.biochem.queensu.ca> Hi, On 2006-09-28 20:49 you wrote: > To avoid previous problems, I am trying to install Biopython under Freespire. > Easy methods (CNR and apt-get) has only old packages. So I will do it "by hand". > I have both python2.3 and 2.4 > Fist I wanted to meet dependencies. > I started with Numpy, downloaded it from Sourceforge and followed the > INSTALL file: > > sbassi at hp:~/bioinfo/Numeric-24.2$ python2.4 setup.py build > running build > running build_py > running build_ext > error: invalid Python installation: unable to open > /usr/lib/python2.4/config/Makefile (No such file or directory) > > I don't have a config directory under /usr/lib/python2.4/ > Any help? You need the python2.4 development package. I haven't used freespire, but since you use apt-get, perhaps it is like Debian. Under Debian the package you need is known as python2.4-dev. Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Department of Biochemistry, Queen's University Kingston, ON K7L 3N6 Canada Tel: 613-533-6821 Fax: 613-533-2497 http://adelie.biochem.queensu.ca/~rlc From sbassi at gmail.com Fri Sep 29 13:54:38 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Fri, 29 Sep 2006 10:54:38 -0300 Subject: [BioPython] Biopython in Freespire In-Reply-To: <20060929133117.GA2129@adelie.biochem.queensu.ca> References: <20060929133117.GA2129@adelie.biochem.queensu.ca> Message-ID: On 9/29/06, Robert Campbell wrote: > You need the python2.4 development package. I haven't used freespire, > but since you use apt-get, perhaps it is like Debian. Under Debian the > package you need is known as python2.4-dev. Yes, that was the problem. Thank :) -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From sbassi at gmail.com Fri Sep 29 13:10:33 2006 From: sbassi at gmail.com (Sebastian Bassi) Date: Fri, 29 Sep 2006 10:10:33 -0300 Subject: [BioPython] Biopython in Freespire In-Reply-To: <451CF189.2020601@maubp.freeserve.co.uk> References: <451CF189.2020601@maubp.freeserve.co.uk> Message-ID: On 9/29/06, Peter wrote: > You seeming to be trying to install Numeric 24.2, rather than the newer > array package Numpy as stated earlier in your email. > http://numpy.scipy.org/ > I have never installed either from source, so I can't help you there. The problem was that I didn?t have python2.4-dev packae installed. After installing it, I could install Numeric from source. I didn?t know about Numpy, I just followed the current online documentation in http://biopython.org/wiki/Download See here: Required Software * Python 2.3 or above * A C compiler -- you need a C compiler supported by distutils. gcc will work fine on UNIX-like platforms * mxTextTools * Numerical Python (version 24.2 recommended) What should I do now? Uninstall it? Or may I use Numeric? I am not in my computer right now, but then I will install mxText Tools and last biopython. -- Bioinformatics news: http://www.bioinformatica.info Lriser: http://www.linspire.com/lraiser_success.php?serial=318 From mdehoon at c2b2.columbia.edu Sat Sep 30 03:21:07 2006 From: mdehoon at c2b2.columbia.edu (Michiel de Hoon) Date: Fri, 29 Sep 2006 23:21:07 -0400 Subject: [BioPython] Biopython in Freespire In-Reply-To: References: <451CF189.2020601@maubp.freeserve.co.uk> Message-ID: <451DE2A3.6010409@c2b2.columbia.edu> Sebastian Bassi wrote: > What should I do now? Uninstall it? Or may I use Numeric? > I am not in my computer right now, but then I will install mxText > Tools and last biopython. > Use Numeric. As far as I know, Biopython won't work with numpy. --Michiel.