KeyError ''lnL'

19 views
Skip to first unread message

Arafat Rahman

unread,
Mar 24, 2022, 5:53:29 PM3/24/22
to The ETE toolkit
Hello All,

I'm using ete3 version 3.1.2 and trying to run ete3 using the following command:

`ete3 evol -t tree/filterPy.partition.rxml.treefile.nwk --alg genes/395747_yycF.dedup.fna --models M0 M1 -o data/ --slr_binary ~/Slr/ --clear_all --cpu 2 -i data/hp.png --histface bar +-curve bar +-bar `

However, I'm getting following error in Jupyter notebook:

`
Error: EOF?.
Error: EOF?. Traceback (most recent call last): File "/Users/arafat/anaconda3/lib/python3.9/site-packages/ete3/tools/ete_evol.py", line 694, in load_model tree.link_to_evol_model(path, model_obj) File "/Users/arafat/anaconda3/lib/python3.9/site-packages/ete3/evol/evoltree.py", line 436, in link_to_evol_model model._load(path) File "/Users/arafat/anaconda3/lib/python3.9/site-packages/ete3/evol/model.py", line 171, in _load vars(self) ['lnL'] = self.stats ['lnL'] KeyError: 'lnL' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/arafat/anaconda3/bin/ete3", line 8, in <module> sys.exit(main()) File "/Users/arafat/anaconda3/lib/python3.9/site-packages/ete3/tools/ete.py", line 95, in main _main(sys.argv) File "/Users/arafat/anaconda3/lib/python3.9/site-packages/ete3/tools/ete.py", line 269, in _main args.func(args) File "/Users/arafat/anaconda3/lib/python3.9/site-packages/ete3/tools/ete_evol.py", line 905, in run load_model(model, tree, models[model], **params) File "/Users/arafat/anaconda3/lib/python3.9/site-packages/ete3/tools/ete_evol.py", line 696, in load_model raise(Exception('ERROR: model %s failed, problem with outfile:\n%s' % ( Exception: ERROR: model M0 failed, problem with outfile: data/M0~c5da31063d238e2d35824946807f7334/out /Users/arafat/anaconda3/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 6 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '
--------------------------------------------------------------------------- CalledProcessError Traceback (most recent call last) /var/folders/mq/p8_d0tn97_l79lvqk3q0cg700000gn/T/ipykernel_72613/443945942.py in <module> ----> 1 get_ipython().run_cell_magic('bash', '', '\nete3 evol -t tree/filterPy.partition.rxml.treefile.nwk --alg genes/398947_rplP.dedup.fna --models M0 M1 -o data/ --slr_binary ~/Slr/ --clear_all --cpu 2 -i data/hp.png --histface bar +-curve bar +-bar \n') ~/anaconda3/lib/python3.9/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell) 2404 themacro : str or Macro 2405 The action to do upon invoking the macro. If a string, a new -> 2406 Macro object is created by passing the string to it. 2407 """ 2408 ~/anaconda3/lib/python3.9/site-packages/IPython/core/magics/script.py in named_script_magic(line, cell) 140 def _make_script_magic(self, name): 141 """make a named magic, that calls %%script with a particular program""" --> 142 # expand to explicit path if necessary: 143 script = self.script_paths.get(name, name) 144 ~/anaconda3/lib/python3.9/site-packages/decorator.py in fun(*args, **kw) 230 if not kwsyntax: 231 args, kw = fix(args, kw, sig) --> 232 return caller(func, *(extras + args), **kw) 233 fun.__name__ = func.__name__ 234 fun.__doc__ = func.__doc__ ~/anaconda3/lib/python3.9/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k) 185 func = arg 186 name = func.__name__ --> 187 retval = arg 188 record_magic(magics, magic_kind, name, name) 189 elif isinstance(arg, str): ~/anaconda3/lib/python3.9/site-packages/IPython/core/magics/script.py in shebang(self, line, cell) 243 stdin=asyncio.subprocess.PIPE, 244 ) --> 245 ) 246 except OSError as e: 247 if e.errno == errno.ENOENT:
CalledProcessError: Command 'b'\nete3 evol -t tree/filterPy.partition.rxml.treefile.nwk --alg genes/398947_rplP.dedup.fna --models M0 M1 -o data/ --slr_binary ~/Slr/ --clear_all --cpu 2 -i data/hp.png --histface bar +-curve bar +-bar \n'' returned non-zero exit status 1.`

I have attached the tree and alignment file. 

Best,
Arafat

395747_yycF.dedup.fna
filterPy.partition.rxml.treefile.nwk

fransua

unread,
Mar 24, 2022, 6:00:09 PM3/24/22
to The ETE toolkit
Hi Arafat,
I would say that codeML is throwing the error "EOL?" and than ete3 breaks searching "lnL" in the output (we should fix this). 
But my bet is that the error is in the codeml part, probably because of the alignment or tree input file: wrong format or truncated file?).
let me know if this helps
cheers

francois

Arafat Rahman

unread,
Mar 24, 2022, 6:13:19 PM3/24/22
to The ETE toolkit
Hello Francois,

Thanks for your reply. The example files from ete3 tutorial works, so I also assume that problems are probably with alignment/tree files. But I could not find the issue!

Best,
arafat

Arafat Rahman

unread,
Mar 24, 2022, 6:16:22 PM3/24/22
to The ETE toolkit
These are the files I'm using:
yycF_dummy.fna
filterPy.partition.rxml.treefile.nwk

François Serrra

unread,
Mar 24, 2022, 9:28:19 PM3/24/22
to eteto...@googlegroups.com
I honestly have no idea of what is happening, everything seems fine (names match between sequence and tree, sequences are ok), but codeml does not like it.
I tried removing dots and dashes from names, also tried to shorten sequences but nothing.
I recommend you try with completely new names, or with subsets.

--
You received this message because you are subscribed to the Google Groups "The ETE toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etetoolkit+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/etetoolkit/c8ddc9b3-14d1-4254-a6e3-f73c0603a8a0n%40googlegroups.com.


--

francois

Arafat Rahman

unread,
Mar 25, 2022, 1:55:09 PM3/25/22
to The ETE toolkit
Thank you. I changed the sequence labels and then it run, however it's still running overnight. I suppose single gene analysis should not take this amount of time!

- Arafat

François Serrra

unread,
Mar 25, 2022, 2:59:02 PM3/25/22
to eteto...@googlegroups.com
Great, this was it than.
And yes you have really a lot pf sequences for codeml... And you can not parallelize inside a single model.


Arafat Rahman

unread,
Mar 25, 2022, 3:16:05 PM3/25/22
to The ETE toolkit
Thanks for you help!

Wow! I wonder how people then do genome wide selection analysis for a large dataset! There must me some other way.

François Serrra

unread,
Mar 25, 2022, 5:08:06 PM3/25/22
to eteto...@googlegroups.com
the number of sequences costs more than their length, and you have 264... I personally never tried over ~50 sequences
Perhaps you can use the phylogeny to define a subset of representative sequences, or use something simpler like GERP

You received this message because you are subscribed to a topic in the Google Groups "The ETE toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/etetoolkit/tg7Zdy7uCn8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to etetoolkit+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/etetoolkit/f70ce500-915c-46bf-a745-5843e774ceben%40googlegroups.com.


--

francois

Reply all
Reply to author
Forward
0 new messages