Question: Biopython And Codeml Module. Error.
gravatar for Biojl
6.5 years ago by
Biojl1.6k wrote:

Hi, I'm trying to use the codeml biopython module. I tried with my own alignment and tree's files but since it was not working I decided to try the ones that come with PAML, lysozyme_small set.

Loading the .ctl file seems to work fine but when I actually run the model I get a subprocess error that I cannot understand. Any help will be appreciated.

>>> import subprocess
>>> from Bio.Phylo.PAML import codeml
>>> cml = codeml.Codeml()
>>> cml.read_ctl_file("codemlfreeratioMASTER.ctl")
>>> cml.print_options() verbose = 0 CodonFreq = 3 cleandata = 1 fix_blength = None NSsites = 0 fix_omega = 0 clock = 0 ncatG = 8 runmode = 0 fix_kappa = 0 fix_alpha = 1 Small_Diff = 5e-07 method = 0 fix_rho = None Malpha = 0 aaDist = 0 RateAncestor = 1 aaRatefile = dat/jones.dat icode = 0 rho = None alpha = 0.0 seqtype = 1 omega = 0.4 getSE = 0 noisy = 9 Mgene = 0 kappa = 2 model = 1 ndata = None
>>> cml.alignment 'output/lysozymeSmall.nuc'

Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/usr/local/lib/python2.7/dist-packages/biopython-1.60-py2.7-linux-x86_64.egg/Bio/Phylo/PAML/", line 190, in run
  , ctl_file, verbose, command)   File "/usr/local/lib/python2.7/dist-packages/biopython-1.60-py2.7-linux-x86_64.egg/Bio/Phylo/PAML/", line 139, in run
            stdout=subprocess.PIPE)   File "/usr/lib/python2.7/", line 493, in call
            return Popen(*popenargs, **kwargs).wait()   File "/usr/lib/python2.7/", line 679, in __init__
            errread, errwrite)   File "/usr/lib/python2.7/", line 1249, in _execute_child
            raise child_exception OSError: [Errno 2] No such file or directory
biopython codeml paml • 2.6k views
ADD COMMENTlink modified 6.5 years ago by David W4.7k • written 6.5 years ago by Biojl1.6k

There is something amiss with your example - the parameter setting part seems to be missing a whole load of commas or something.

ADD REPLYlink written 6.5 years ago by Peter5.8k
gravatar for David W
6.5 years ago by
David W4.7k
New Zealand
David W4.7k wrote:

From the trace, subprocess is telling you it can't find the file you want to run.

Is codeml on your $path? If not you can specify a path to the executable with the command argumentent of

ADD COMMENTlink written 6.5 years ago by David W4.7k

I had id exported, but there was an error there. Thanks!

ADD REPLYlink written 6.5 years ago by Biojl1.6k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1292 users visited in the last hour