# How does DeepHF (a CRISPR sgRNA design tool) compute binding free energy?

I am looking at the code of DeepHF[1] that computes $$\Delta G_\text{binding}$$, and I see that it breaks a sequence into overlapping dimers 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 dimer come from? I couldn't find where these values in dG stem from.

### Reference

1. Wang, D.; Zhang, C.; Wang, B.; Li, B.; Wang, Q.; Liu, D.; Wang, H.; Zhou, Y.; Shi, L.; Lan, F.; Wang, Y. Optimized CRISPR Guide RNA Design for Two High-Fidelity Cas9 Variants by Deep Learning. Nat Commun 2019, 10 (1), 4284. DOI: 10.1038/s41467-019-12281-8.

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 rationale for the 4 deg vs. 2 deg rule of thumb for DNA duplex, i.e. the Wallace–Ikatura relation $$T_\mathrm{m}(\pu{°C}) = \mathrm{4(G+C) + 2(A+T)},$$ where G+C refers to the number of G/C base pairs and A+T to the number of A/T basepairs in the duplex DNA. 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.

• Are there some library that implemented all this simple models? biopython offers some melting temperature module biopython.org/docs/1.75/api/Bio.SeqUtils.MeltingTemp.html. Is there something with more options/models?
– 0x90
Nov 22, 2020 at 15:53
• @0x90 This might be a starting point: biology.stackexchange.com/questions/33032/…
– Karsten
Nov 22, 2020 at 15:59
• Here is a fairly new paper with an updated set of parameters. The supplementary material has a web-based calculator implementing these: academic.oup.com/nar/advance-article/doi/10.1093/nar/gkaa572/…
– Karsten
Nov 22, 2020 at 16:08