Inconsistent dot plot/pairing probabilities behavior between Vienna/Vienna2 and everything else
Opened this issue · 0 comments
luxaritas commented
Two issues here:
- Vienna/Vienna2 dot plot probabilities are sqrt of the actual values (see #291). This leads to extra work in EternaJS to make sure we square when we need to, but also liable to cause confusion for eternascript authors
- Vienna/Vienna2 include the target structure, but other engines do not. This means that the dot plot has an empty lower triangle for most engines, but also this is a point of confusion for script authors, who (particularly given the current documentation and naming) would expect the output of the
pairing_probabilities
API to not include the "lower triangle". There also appears to be some cases in our code (eg for expectedAccuracy, pUnp, etc) where we also don't do this correctly!
The issue with just fixing it outright is that by this point, a number of eternascript authors have implemented workarounds in their own scripts, which means that scripts that currently behave correctly because of a custom patch (or other reliance on the current behavior) will then behave incorrectly - and script authors who do this may not realize it has been fixed, so continue to rely on the incorrect behavior
We've decided to fix this by:
- Renaming
pairing_probabilities
topairing_probabilities_incorrect
, which will continue to have the current behavior. - In all existing eternascripts, replace calls to
pairing_probabilities
withpairing_probabilities_incorrect
- Introduce a new corrected function. This should have a different name, so that if an existing script author goes to use
pairing_probabilities
with the expectation of the old behavior, they find it no longer exists, looks at the docs, and sees there's a new function that behaves differently. I propose calling thisbase_pairing_probabilities
.