Skip to content

Instantly share code, notes, and snippets.

@scvnc
Last active August 29, 2015 14:03
Show Gist options
  • Save scvnc/f0dc7c2219838cfbc75f to your computer and use it in GitHub Desktop.
Save scvnc/f0dc7c2219838cfbc75f to your computer and use it in GitHub Desktop.
deltaG mfe brainstorm
class RNA_MFE_Calculator:
Sequence seq
BindSite[] bind_sites
float base_MFE()
float calcDeltaG(BindSite[])
##############
rna_calc = RNA_MFE_Calculator(rna_seq, bind_sites)
# For every combination in bind_sites
deldelGList = []
for site1 in rna_calc.bind_sites:
for site2 in rna_calc.bind_sites:
// logic to skip overlapping, the same, or whatever.
delDelG = rna_calc.calcDeltaG([site1, site2]) \
- rna_calc.calcDeltaG(site1) \
- rna_calc.calcDeltaG(site2)
deldelGList.append([site1, site2, delDelG])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment