I have playing with scripts that calculate pairing probabilities in an effort to find strategies other than free energy delta minimization when it occurred to me that most engines will return the same array for a mispairing sequence regardless of whether the given secstruct is a given target structure or the natural structure. As far as I can tell, NuPACK, Contrafold, Eternafold, EFTK, and all linearfold engines do this. I suspect the given array corresponds to the natural structure’s pairing probabilities.
However, Vienna 1 and 2 will return different probabilities if a natural or target structure is given, which is more intuitive to me since if an engine could predict parameters such as energy for any given structure, then I’d think it could give another parameter such as its pairing probability.
So my question is whether this behavior is intended or a result of the engine at a fundamental level, or is this due to an error in the pairing_probabilities function for non-vienna engines or of the implementation of my own amateurish scripts?
Yeah this behavior is a bit weird. Technically what the pairing_probabilities function is designed to return is actually the entire dot plot, which is both:
The computed pairing probabilities (ie, for this sequence, what is the probability that bases x and y will be paired?) - for pairs with bases i,j where i>j
The base pair “matrix” of either the secondary structure you give it or, if none is provided, the MFE (natural) structure. IE, all of those pairs set to a probability of 1, with all other pairs as probability 0 - for pairs with bases i,j where i<j
Also in case it’s useful to clarify, pairing probabilities themselves are not relative to a given structure. It’s based on what’s called the partition function. The idea is that all possible structures for a given sequence have a probability relative to their free energy (and thermodynamically, that they will theoretically actually exist that portion of the time!), and so the probability of a given base pairing is the sum of the probabilities of all structures that include said base pair.
Note that this is NOT true for RNet-SS, which isn’t doing free energy calculations - it’s actually predicting the liklihood that any to pairs will be present, assuming a single static secondary structure, based on what it’s seen in prior examples.