Dear Cafe5 authors,
Greetings!
I want to use cafe5 to test whether the global model is better than a local model with three lambda in different parts of the tree. It's quite similar to this thread
https://groups.google.com/g/hahnlabcafe/c/yqwm5G1klLs, but I don't know how to do this in cafe5. I didn't find a complete tutorial for this purpose, or I missed something.
1. Cafe5 introduces gamma rate categories (-k) and poisson distribution (-p). Can I set these parameters in the model comparison? In my case, the best k of global model is 5 according to lnL, while the best k of the local model is 4.
2. Instead of simulation, can I use the lnL in the output of cafe5 directly in the likelihood ratio test? In an old paper (
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2147951/), they used -lnL values in the output of global and local models to do a simple likelihood ratio test. Assume -2(lnL(global) - lnL(local)) follows χ2-distributed with degrees of freedom equal to the number of excess parameters. If I understand right, here the number of excess parameters should be 2 (two additional lambda in the local model) plus -1 (smaller k in the local model).
3. I also tried to do a simulation in cafe5 using the following cmd. It gives me an error and works fine withour -s100. The data are in the attachment.
cafe5 -i filtered.cafe.input.tsv -t r8s_ultrametric_mychange.txt -y separate_lambda.txt -l 0.0015 -s100 -o simulate_pk2.
================Error==========================
Filtering families not present at the root from: 18468 to 7802
No root family size distribution specified, using uniform distribution
Simulating with 1 model(s)
Simulating 100 families for model Base
cafe5: src/matrix_cache.cpp:62: int matrix::select_random_y(int, int) const: Assertion `max < _size' failed.
Aborted (core dumped)
====================================================
Thanks for your help!