Skip to content

Conversation

@IntegerLimit
Copy link
Collaborator

This PR adds support for exporting Protein, Binary and Morphological Data Analysis to MrBayes, completing another section of #195.

Codon support will either be implemented or scrapped (due to the large inconsistencies between MrBayes and IQTree Codon handling) on Monday.

This PR also largely refactors the logic for the MrBayes Block File. Specifically:

  • Moves core functions to phyloanalysis (from phylotree and phylosupertree), to avoid clogging up phylotree
  • Moves model functions to individual models, therefore using polymorphism to call the relevant model function instead of a switch statement

This has the side effect of causing runs with Mixture Models or Lie Markov Models to not return a block file. This may be changed in the future to output files with GTR as the model.

Finally, this PR also changes +R from remapping to +G, to remapping to +G+I.

Fallbacks:

  • Since MrBayes has just JC/F81, K80/HKY, and SYM/GTR for DNA, the output block file will default to GTR, with the specific rate matrix and substitution rates specified in the _model file.
  • Since MrBayes does not have all IQTree Supported Protein Models, it will fallback to GTR20. If the IQTree Protein Model was not GTR20, the rates will be fixed, but if it was GTR20, the rates will be variable (with dirichlet)

Excluded Factors:

  • MrBayes Binary Data does not support +I, that has been ignored, with warning printed to log and file
  • Morphological Data:
    • MrBayes does not support states {A-Z}, warning has been printed to log and file
    • MrBayes does not support +I, that has been ignored, with warning printed to log and file

Tests conducted:

  • Binary Data Set, with and without partitions, with and without +G, +I, +R
  • Morphological Data Set, with and without partitions, with and without ordering, with and without +G, +I, +R
  • Protein Data Set, with and without partitions, with and without +G, +I, +R, with GTR20, MrBayes supported models, and non-MrBayes supported models

@thomaskf thomaskf merged commit 02df654 into iqtree:MrBayesSupport Jul 5, 2024
IntegerLimit added a commit to IntegerLimit/iqtree2 that referenced this pull request Jul 8, 2024
…qtree#264)

* Protein Model

* Morphological Models Support

* Cleanup

Move Model Specific Functions to each model class
Move other functions from phylotree and phylosupertree to phyloanalysis

* Cleanup Imports

* Binary Model Support

* Misc Cleanup

Misc Cleanup

* Output Files Readability, Default Warning & Help Message

* Fix Edge Case: Importing Values < 0.01 into MrBayes

* Fix Edge Case: Extra Characters in Charset

* Fix +G+I or +R Inputs

* Fix Issues with Binary Model

* Fix Issues with Morphology Model
IntegerLimit added a commit to IntegerLimit/iqtree2 that referenced this pull request Apr 23, 2025
…qtree#264)

* Protein Model

* Morphological Models Support

* Cleanup

Move Model Specific Functions to each model class
Move other functions from phylotree and phylosupertree to phyloanalysis

* Cleanup Imports

* Binary Model Support

* Misc Cleanup

Misc Cleanup

* Output Files Readability, Default Warning & Help Message

* Fix Edge Case: Importing Values < 0.01 into MrBayes

* Fix Edge Case: Extra Characters in Charset

* Fix +G+I or +R Inputs

* Fix Issues with Binary Model

* Fix Issues with Morphology Model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants