[Biopython] Primer3Commandline rookie question

Jukka-Pekka Verta jp.verta at gmail.com
Wed Nov 3 18:58:18 UTC 2010


Hi all,

I'm just starting with Python so mine's a rookie question.

I'm trying to write a little program that would do primer design with Primer3Commandline, yet I can't figure out how to access the output. For example, when I try the same example as in the Application.py file under Primer3Commandline function
 
######

from Bio.Emboss.Applications import Primer3Commandline
from Bio.Emboss import Primer3

sequence_handle = open("sequence", "w").write(">test\nCGGTCGCCGGACTATCAAATGGCCAGCGCTGAATTGTAGTACATTTCTCTGTCCTTTAATTCACAGGATTCTGTCATGTAAGATGCGCGATTACAGGTTTAACTGATCCAAACTTCTGCAAAACCGATAAAGAACCTAAATAAAGGAAAGGGACACTGCATAGATACAAACAAACGAAACGTTATCTCAGCAGGATTCATGGCTTCTGAAATTCAACTCATCACTATTGGACCTTCTCATTTTTGTGAAAAGGCACGATGGGGTTTGGACCGTGCTGGAATTTCTTATAAGGAGTCAAAGCATGCTCCTGTATTTCACATGTTATACACAAGGGGTTTGGGACAGGGAACCAGCTGTCCCAAGCTTGTACTAGGTGAGGGCAAAAATAAAGTGGTGTTGCATGAATCATCAGATATCTTGAAGTTTGCTGATGAGAACATCATGTCTGAAGAGGATCGCTTGTATCCATCGAACCTTGAGCAGTCTGTGCAAGAGTGGGGGCTGCATTCAAGGGAAAGGTTGTTAACTTGGTGTTTAATGCCATTGTTAAAGCCTCTCGTATATAGAACAGTTGGTTGCAACATGCCTGCAGCAAAAGATCATTCTCTTGATAAGATTCGTTGTATATTTTCAAGAGGTAGATAATGTGCTTGCTGATGGCCGGCCTTTCCTTTGTGGCAACGAGTTTACTGCAGCTGACTTGACATTTGCTTCACTTGCTGGTCCTGTACTATGCCCAGTGGGATATGGCACCTATCTAGTACCAACAGAGGAACTTCCATCAGAGATGTCTGAAGTTACCCTTTCTTTAAGAGAGACACTAGCAGGGAAGCATGCATTGAGGATGTACGAAACTGAAAGACACAGGAAAGTGGCTTCGAAGGTGCTAGTGACCTGACTCAGTGCATTTACACCGTGGCCTTTGTGTTCTGTCATATTATTGGCAACTAATATTGATTTACGTAAACTGCATACAGCTTTTCTTTCTTGGGAGTGAATCTTTTGAGCAATTTGCTGTCTTCATATAGCAATAATTTGAGAAAGGACCAAGATTTATTAAACTTCGTATTTTGTTTTTTGAATGTTGATATCTTTGTTGTTATTTGAGCAAGCTTAAGCTGCCTAGAACTATAATTCGGTTATGGCATGGGCATGTATCATTCAACCTTGATCTTTGTGCCTTTTTAACTAGAACCCATTTTTTTCAAAAAA\n")

test = Primer3Commandline(sequence = sequence_handle, auto=True, hybridprobe=True)
test.explainflag = True
test.oligosize=20
test.psizeopt=200
test.outfile = "output.pr3"
print test

#######

from here on I've understood that I have to parse the output with Primer3.read(), but an error message tells me that the output.pr3 file doesn't exist.

#######

test1 = Primer3.read(open("output.pr3", "r"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory: 'output.pr3'

#######

What would be the proper way to proceed?

Thanks in advance!

JP Verta





More information about the Biopython mailing list