I am looking at the code of DeepHF that computes $\Delta G_{\text{binding}}$, and I see that it breaks a sequence into overlapping 2-mers and compute a weighted sum according to a dictionary with 16 key values:

def dG_binding(seq):
    seq = seq.lower()
    dG = {'aa': -0.2, 'tt': -1, 'at': -0.9,
          'ta': -0.6, 'ca': -1.6, 'tg': -0.9,
          'ct': -1.8, 'ag': -0.9, 'ga': -1.5,
          'tc': -1.3, 'gt': -2.1, 'ac': -1.1,
          'cg': -1.7, 'gc': -2.7, 'gg': -2.1, 'cc': -2.9}

    seq = seq.replace( 'u', 't' )
    binding_dG = 0
    dGi = 3.1
    for i in range( 0, len( seq ) - 1 ):
        key = seq[i:i + 2]
        binding_dG += dG[key]
    binding_dG += dGi
    return binding_dG

Where do the values of each 2-mer come from? I couldn't find where these values in dG stem from.


The simplest model for estimating binding energies (or melting temperatures) is to consider each base pair individually, without regard to sequence context. This is the basis of the 4 deg / 2 deg rule of thumb for DNA duplex. You can refine this model by considering the effect of ionic strength. More sophisticated models go beyond just considering the composition to include sequence information.

The nearest-neighbor model for binding is the simplest of these more sophisticated models, and it looks like that's what is used here. For DNA:DNA duplexes, you can find parameters on Wikipedia. The DNA:DNA model has less parameters because of symmetry lacking for the RNA:DNA hybrids (i.e. AG/CT is the same as TC/GA for the former, but AG/CU is different from TC/GA).

The code does not indicate the units, which might be kJ/mol or kcal/mol. The parameters are usually derived from experimental data and some fitting algorithm, see e.g. https://pubs.acs.org/doi/abs/10.1021/bi00035a029

Missing in this implementation is the contribution of the first and the last base pair.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.