Trying to run SpeciesRax but keep having error reading alignments?

205 views
Skip to first unread message

Mario Alberto Cerón Romero

unread,
Apr 5, 2021, 7:15:55 AM4/5/21
to GeneRax
Hello, 

I have two species tree and a set of gene trees and I'm  trying to see which species tree has the best likelihood score using the SpeciesRax method with the strategy EVAL. However, I keep having the error below. I have tried reformatting the alignments several times but I have not figure out what is causing the error. I have also attached a small sample of my database (including a couple of alignments). I hope somebody can help me with this issue. 

error...

[00:00:00] GeneRax 2.0.1
Logs will also be printed into GeneRax/generax.log
GeneRax was called as follow:
./generax -f forGeneRax/famFileTest -s forGeneRax/spsTreeOp.newick --si-strategy EVAL 

General information:
- Output prefix: GeneRax
- Families information: forGeneRax/famFileTest
- Species tree: forGeneRax/spsTreeOp.newick
- You are running GeneRax without MPI (no parallelization)
- Random seed: 123
- Reconciliation model: UndatedDTL
- DTL rates: global rates
- Infer ML reconciliation: ON
- Unrooted reconciliation likelihood: OFF
- Prune species tree mode: OFF

Species tree inference information:
- Species tree Strategy: EVAL
- Quartet branch supports estimation: OFF
- Branch length estimationOFF
- SPR radius: 1

Gene tree correction information:
- Gene tree strategy: SPR
- Max gene SPR radius: 5

[00:00:00] Filtering invalid families...

Error in family OG5149884: Cannot read alignment file (file exists but is invalid)
Error in family OG5160170: Cannot read alignment file (file exists but is invalid)
Error in family OG5171679: Cannot read alignment file (file exists but is invalid)
Error in family OG5172482: Cannot read alignment file (file exists but is invalid)
WARNING!!! Found 4 invalid families (they will be discarded from the analysis)
[00:00:00] Starting species tree initialization...
libc++abi.dylib: terminating with uncaught exception of type LibpllException: Error while reading rooted tree from file GeneRax/species_trees/starting_species_tree.newick.
Error name: FILE_DOES_NOT_EXISTS.
Error help message: File does not exist.
The parsing error was detected at character 1.
Abort trap: 6

Files...


Best regards, 

Mario


Benoit Morel

unread,
Apr 6, 2021, 3:47:48 AM4/6/21
to GeneRax

Hi Mario,

I think the error comes from the substitution model that you are using (PROTGAMMALG) in the family file. You are using the syntax of the "old" raxml, but GeneRax uses the new raxml syntax. See https://github.com/amkozlov/raxml-ng/wiki/Input-data#evolutionary-model.
"PROTGAMMALG" should be replaced with "LG+G".

Now regarding what you intend to do, and because you have the alignments, I would rather not use SpeciesRax but only the standard GeneRax (--si-strategy SKIP):
- GeneRax optimizes the gene trees and outputs the joint likelihood score, that account for the alignments, the gene trees and the species tree. I think this is the best score in your case.
- SpeciesRax does not account for the alignments and outputs the reconciliation likelihood only (which is one of the two components of the joint likelihood).
With your command line, the following will happen:
- gene trees are optimized and the joint likelihood is outputed (standard GeneRax)
- SpeciesRax evaluates the phylogenetic likelihood from the optimized gene trees.
I would skip this second step and only look at the joint likelihood score, because it's mathematically more relevant than just the reconciliation likelihood score.

Sorry if this is confusing. I am currently working on clarifying this on the wiki and on adding examples for the relevant use cases. Please let me know if this is not clear :-)

Best,
Benoit

Mario Alberto Cerón Romero

unread,
Apr 7, 2021, 11:04:07 AM4/7/21
to GeneRax
Hello Benoit, 

Thank you very much for your response and for your explanation. In fact, it is very clear and useful. Yes, I think the optimization of the trees would be better to have a more relevant score. I already corrected  the names of the models of evolution as you suggested and it stoped producing the error about the alignments. However, I'm now running into another problem and I would highly appreciate if you can give me some feedback....

[00:00:00] GeneRax 2.0.1
Logs will also be printed into GeneRax/generax.log
GeneRax was called as follow:
./generax -f forGeneRax/famFileTest -s forGeneRax/spsTreeOp.newick --si-strategy SKIP 

General information:
- Output prefix: GeneRax
- Families information: forGeneRax/famFileTest
- Species tree: forGeneRax/spsTreeOp.newick
- You are running GeneRax without MPI (no parallelization)
- Random seed: 123
- Reconciliation model: UndatedDTL
- DTL rates: global rates
- Infer ML reconciliation: ON
- Unrooted reconciliation likelihood: OFF
- Prune species tree mode: OFF

Gene tree correction information:
- Gene tree strategy: SPR
- Max gene SPR radius: 5

[00:00:00] Filtering invalid families...

[00:00:00] Starting species tree initialization...
libc++abi.dylib: terminating with uncaught exception of type LibpllException: Error while reading rooted tree from file GeneRax/species_trees/starting_species_tree.newick.
Error name: FILE_DOES_NOT_EXISTS.
Error help message: File does not exist.
The parsing error was detected at character 1.
Abort trap: 6

Thank you, 

Mario

Benoit Morel

unread,
Apr 7, 2021, 3:12:02 PM4/7/21
to GeneRax
Hi Mario,

I tried running this command on your dataset and it seemed to work. Have you changed anything else than the substitution model name? If yes, can you send me the new dataset, such that I can try to reproduce this issue?
Just to be on the safe side, have you removed the output directory ("GeneRax" if you haven't used the --prefix argument) before restarting GeneRax?

Benoit

Mario Alberto Cerón Romero

unread,
Apr 7, 2021, 3:48:45 PM4/7/21
to GeneRax
Hi Benoit, 

Yes. The only thing that I changed was the model of evolution. But, it actually works if I specify a prefix (-p)!!

Thank you very much for your help. 

Mario

Reply all
Reply to author
Forward
0 new messages