Maqbool, Nauman | 4 Oct 03:44 2004

[BioPython] running primer3 with multiple sequences


I am trying to run eprimer3 using biopython and am not sure how to input
multiple options. E.g. if I am reading in a fasta file with hundreds of
sequences with different primer design parameters for each sequence, do
I have to hard code the parameters individually for each sequence?

In the example below:

from Bio.Emboss.Applications import Primer3Commandline
from Bio.Emboss.Primer import Primer3Parser
from Bio.Application import generic_run

def get_primers(fasta_record, start, end):
    open("in.pr3", "w").write(str(fasta_record) + "\n")
    primer_cl = Primer3Commandline()
    primer_cl.set_parameter("-sequence", "in.pr3")
    primer_cl.set_parameter("-outfile", "out.pr3")
    primer_cl.set_parameter("-productsizerange", "350,500")
    primer_cl.set_parameter("-target", "%s,%s" % (start, end))
    result, r, e = generic_run(primer_cl)
    parser = Primer3Parser()
    return parser.parse(open("out.pr3"))

def main(fasta_file, output_file):
    output_handle = open(output_file, "w")
    parser = Fasta.RecordParser()
    iterator = Fasta.Iterator(open(fasta_file), parser)
    while 1:
(Continue reading)

Karin Lagesen | 8 Oct 15:21 2004

[BioPython] genbank annotation


I have two genbank genome files, one of the old kind where each region is
noted twize, and one where they are unique. 

What I would like to extract from this is the feature information, in
this sort of format:

Type    start   stop    direction       name

In the first case, where almost all regions are noted twize, I'd like
to have only one of them included in the list.

You have a genbank parser thing in biopython which I'd like to use,
however, I cannot figure out how to use it to do this. 

The files:

The first:

     source          1..2944528
                     /organism="Listeria monocytogenes"
                     /mol_type="genomic DNA"
     gene            305..1673
     RBS             305..310
     CDS             318..1673
(Continue reading)

Sebastian Bassi | 8 Oct 19:49 2004

[BioPython] Bioinformatics mailing list

GenesDigitales presents 2 new bioinformatics mailing list. Bioinfo is
the name of a new mailing list hosted at This will be a
place to ask for help and give a helping hand regarding
bioinformatics. Topics included are: sequence analisis, software,
aligment, primer design, microarrays, and much more. If you work with
bioinformatics tools you are invited to join Bioinfo mailing list. The
other list is called BioinfoES has the same aims as above but it is
for Spanish speaking people.

English-only bioinformatics mailing list: Bionfo

Spanish bioinformatics mailing list: BioinfoES


Best regards,

//=\ Sebastian Bassi - Diplomado en Ciencia y Tecnologia, UNQ   //=\
\=// IT Manager Advanta Seeds - Balcarce Research Center -      \=//
//=\ Pro secretario ASALUP - - PGP key available //=\
\=// E-mail: sbassi <at> - ICQ UIN: 3356556 -     \=//


BioPython mailing list  -  BioPython <at>

(Continue reading)

Brandon King | 12 Oct 01:04 2004

[BioPython] Is BioPython thread safe?

Hi All,
    I'm trying to use BioPython within a thread of my main program and I 
end up getting this error. Is BioPython intended to be thread safe?

    from Bio.Blast import NCBIStandalone
  File "/usr/lib/python2.3/site-packages/Bio/", line 106, in ?
  File "/usr/lib/python2.3/site-packages/Bio/", line 98, in 
    module = __import__("Bio.config.%s" % module, {}, {}, ["Bio","config"])
  File "/usr/lib/python2.3/site-packages/Bio/config/", 
line 26, in ?
    import _support
  File "/usr/lib/python2.3/site-packages/Bio/config/", line 
26, in ?
    from Bio.MultiProc.copen import copen_fn
  File "/usr/lib/python2.3/site-packages/Bio/MultiProc/", line 
322, in ?    signal.signal(signal.SIGTERM, _handle_sigterm)
ValueError: signal only works in main thread

-Brandon King

BioPython mailing list  -  BioPython <at>

enrico curiotto | 12 Oct 12:52 2004

[BioPython] regular expression and filtering dna strings

Hello everybody,
I have the following problem:
A have a series of strings, some of them are DNA strings (so they
contain only ACGT), other not.
How can I filter out not DNA strings?
Maybe this can be properly done quickly with regular expression
in python, without using biopython.
Does anyone know how to do that with regular expression ?
Thank you very much,

Do you Yahoo!?
Declare Yourself - Register online to vote today!
BioPython mailing list  -  BioPython <at>

Leighton Pritchard | 12 Oct 13:58 2004

Re: [BioPython] regular expression and filtering dna strings

Hi Enrico,

If your DNA strings never contain anything other than ACGT, then a
result other than 'None' for'[^ACGT]', your_string) will be
diagnostic for non-DNA sequences.  A None result will not, however, be
diagnostic for DNA...

Python 2.3.2 (#1, Dec 12 2003, 11:27:04)
[GCC 3.3.2 20031022 (Red Hat Linux 3.3.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
|>> import re
|>> a = 'ACGTGTACGT'
|>> b = 'ACAGFTAGAT'
|>>'[^ACGT]', a)
|>> print'[^ACGT]', a)
|>> print'[^ACGT]', b)
<_sre.SRE_Match object at 0xbf511368>


enrico curiotto wrote:
| Hello everybody,
| I have the following problem:
| A have a series of strings, some of them are DNA strings (so they
| contain only ACGT), other not.
| How can I filter out not DNA strings?
| Maybe this can be properly done quickly with regular expression
| in python, without using biopython.
(Continue reading)

Sebastian Bassi | 14 Oct 18:17 2004

[BioPython] Transplanting Biopython to a live file system

Hello all,

I did copy Bio, mx and Numeric from a working linux installation to
another (under Site-Packages). Then I tried to "import Bio" from the new
system and I got there is no module named Bio.
I know this not a kosher way to install Biopython, but I have to do it
this way to make it available on DNALinux that it is a liveCD (a working
linux system from CD, like Knoppix).
Do you may know what went wrong?
I think I solved something like this 2 month ago when I transplanted
Biopython to the AMD64 (because it didnt compile on AMD64, so I
transplanted) and it worked. But this time, it doesnt :(
BioPython mailing list  -  BioPython <at>

Siddhartha Basu | 14 Oct 21:03 2004

[BioPython] flatfile index using OBDA registry system and biopython

I have just started using biopython and wants to use OBDA registry 
system to index the swissprot flat files. My goal is to access and make 
  indexed file using different language. I already searched through the 
biopython docs but couldn't really figure out how to call the registry 
system from biopython. I have already setup a a seqdatabase.ini file, 
now to use that from biopython.
Any idea, help will be highly appreciated.

Thanks in advance,
BioPython mailing list  -  BioPython <at>


[BioPython] *未承諾&承諾広告■3億円、5億円等の収入者続出・証拠で出来る■年金は8千万円貯金で不要■景気回復開始の時こそチャンス                                   

biopython <at>$BMM(B
 $B!!(B                                                            $B!!!!7P:QJ88K!!%a%k%^%,C4EvLpBt(B

$B!!!!(B--$B#6 <at> iK|1_$G4jK>$OC# <at> .!!(B----$B!!J}K!$O$"$j$^$9!*!!(B------$B!!#6 <at> iK|1_0J2<G/<}$NJ}$KBg4?7^$5$l$F$$$^$9(B--------
$B!!!!!!!!!!!!!!!!!!!!!!!!!!(B     $BK\F|$N(B[$B$a!<$k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≥Z5r$N$_$G;v<B3NG'!*(B

(Continue reading)

Walter Ash | 21 Oct 00:17 2004

[BioPython] Installation problems

When I attempt to build biopython using I get syntax errors 
that don't make any sense.  My python distribution appears to be working 
normally for all other applications and scripts.  I'm wondering if 
anybody else has encountered this and resolved it?

# ./ build
./ line 21: Distutils based setup script for Biopython.

[help and version info snipped]

: No such file or directory
./ line 26: syntax error near unexpected token `('
./ line 26: `if sys.version_info[:2] < (2, 2):'


There is a very long delay between the "no such file or directory" error 
and the syntax error message.  I'm using redhat enterprise 3 (Red Hat 
Enterprise Linux WS release 3 (Taroon Update 3)) with the following kernel:

Linux 2.4.21-20.ELsmp #1 SMP Wed Aug 18 20:46:40 
EDT 2004 i686 i686 i386 GNU/Linux

and this python version:

Python 2.2.3 (#1, Aug  8 2003, 08:44:02)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

(Continue reading)