Skip to content

Conversation

@laduplessis
Copy link

Current behaviour when running a sampled ancestors analysis without using sampled ancestor tree operators is to print an error message stating the analysis is not valid and continue running. The error message is printed in between other initialisation output and will probably not be noticed by many users. If the analysis is not valid the error should be fatal and the program should refuse to run.

@tgvaughan
Copy link
Contributor

This is actually a bit dangerous, as the test method only checks whether any members of an operator blacklist are present in the analysis. This ignores the possibility that there are multiple trees in the analysis, only some of which are SA trees, and would prevent these more complicated analyses from running.

Furthermore, it's possible that someone might design an operator which extends one of these blacklisted operators but is compatible with SA trees. This check would prevent use of such an operator.

Also, nothing's to stop someone from using an operator not on this list that is similarly incompatible with SA trees. In that case the check would pass, but the analysis would actually be invalid.

I think a better approach here would be to 1. tighten up the conditions that cause the warning to appear, and to 2. make this warning harder to ignore, for instance by prompting the user to decide whether to continue.

Sadly none of this would be a problem if SATrees were a class/interface of their own, or we had an interface like BinaryTree: the operators could then specify exactly what kind of tree they are applicable to.

@laduplessis
Copy link
Author

I agree. This is a little tricky, because it puts the responsibility of checking operator validity on the package designer. I think this is actually an issue that should be fixed in the core, since sampled ancestor trees are now supported in the core. I'm opening up an issue in the beast2 core about this. Anyway, just flagging the issue, I don't think it has a very high priority.

@tgvaughan
Copy link
Contributor

Thanks Louis, just read through your issue - looks great!

@gavryushkina
Copy link
Contributor

gavryushkina commented Sep 9, 2018 via email

@laduplessis
Copy link
Author

Here is the issue I posted on the beast2 core repo: CompEvol/beast2#807

@tgvaughan
Copy link
Contributor

I definitely agree with Sasha that the SA operators should be in the core.

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.

3 participants