Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing error thrown when running beagle on a substitution model with complex eigenvalues #1168

Closed
jordandouglas opened this issue Sep 23, 2024 · 1 comment

Comments

@jordandouglas
Copy link
Member

The loop in this class currently says:

if (substitutionModel.canReturnComplexDiagonalization()) {
    for (int i = 0; i < m_siteModel.getCategoryCount(); i++) {
          ...

but it should say

if (substitutionModel.canReturnComplexDiagonalization()) {
    for (int i = 0; i < this.categoryCount; i++) {
       ...

because the invariant category counts as a category according to the site model, which will cause an indexing error on this class.

https://github.com/CompEvol/beast2/blob/master/src/beast/base/evolution/likelihood/BeagleTreeLikelihood.java

jordandouglas added a commit that referenced this issue Sep 24, 2024
@jordandouglas
Copy link
Member Author

After further testing, I realise that the invariant category index should be skipped, not the last category

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

No branches or pull requests

1 participant