[Biopython] Primer3Commandline rookie question
Brad Chapman
chapmanb at 50mail.com
Wed Nov 3 19:38:08 UTC 2010
JP;
> Thanks Peter for the response.
>
> Though doing
>
> test = Primer3Commandline(sequence="sequence", auto=True, hybridprobe=True)
>
> doesn't fix the problem (no output is created). Other suggestions?
In addition to what Peter mentioned, your code here creates a
commandline object, but never actually runs it:
> test = Primer3Commandline(sequence = sequence_handle, auto=True, hybridprobe=True)
> test.explainflag = True
> test.oligosize=20
> test.psizeopt=200
> test.outfile = "output.pr3"
> print test
This is probably why you weren't seeing any error messages from passing in
a file handle, and explains why there is no output file. You can
either call your command line directly:
test()
or use the Python subprocess module:
subprocess.check_call(str(test))
[As an aside, it's good practice to use meaningful variable names.
At least a 'cl' for commandline would be nice here and may help
you spot these types of issues.]
Hope this helps,
Brad
More information about the Biopython
mailing list