[Biopython] Read and Parse EMBOSS primer3-eprimer32
Ivaylo Stoimenov
ivaylo.stoimenov at gmail.com
Wed Oct 10 11:00:55 UTC 2012
Hi,
I have a problem of using Read and Parse functions when it comes to EMBOSS
Primer3 (or eprimer32 wrapper). I would like to skip writing files but
hijacking the output of Primer3 to a variable (object). Here is some part
of the code, which does not work:
from Bio.Emboss import Primer3
from Bio.Emboss.Applications import Primer3Commandline
import sys
...
cline = Primer3Commandline(sequence=combined_frame, auto=True, task =1)
cline.explainflag = True
cline.prange="100-150"
cline.outfile = "stdout"
ggg = cline()
primer_record = Primer3.read(sys.stdout or ggg[0] or ...)
print primer_record
...
What I am doing wrong. The output of cline() is a tuple, but I would like
to read or parse the first element. The problem is that Primer3.read and
Primer3.parse expect file handles. Any advice would be highly appreciated.
Kind regards,
Ivaylo
More information about the Biopython
mailing list