[BioPython] [Correction!] Emboss eprimer3-Product Size Range

Peter biopython at maubp.freeserve.co.uk
Mon Dec 1 17:07:51 UTC 2008


> primer_cl.set_parameter("-productsizerange", "100-200 250-300")
> Causes no output and not
> primer_cl.set_parameter("-productsizerange", "100-200")
> as I wrote!

OK - that helps :)

This will fail at the command line:

eprimer3 -sequence in.txt -outfile out.pr3 -target 50,100
-productsizerange 100-200 250-300

Based on my experience of unix command lines and how arguments are
parsed, this should work:

eprimer3 -sequence in.txt -outfile out.pr3 -target 50,100
-productsizerange "100-200 250-300"

If so, then in python you need to include the quotes yourself, e.g.

primer_cl.set_parameter('-productsizerange', '"100-200 250-300"')

That is single quotes to delimit the string in python, with double
quotes as part of the string itself.  You could also use double quotes
by escaping them with a slash:

primer_cl.set_parameter("-productsizerange", "\"100-200 250-300\"")

To try and explain the python syntax here, try the following examples
at the python prompt:

>>> print "100-200 250-300"
100-200 250-300
>>> print '100-200 250-300'
100-200 250-300
>>> print '"100-200 250-300"'
"100-200 250-300"
>>> print "\"100-200 250-300\""
"100-200 250-300"

Peter



More information about the Biopython mailing list