Entering edit mode
7.8 years ago
friveroll
▴
60
Hi,
How can I get the Internal Stability graph or short oligonutides, like this one for B1 (1993 Rychlik)
Also I don't know why the last nucleotides does not match with any value of the graph
I try to get the graph using nearest neighbor dG values, but I cant get a similar graph with the python 2.7 code below, using this approach I can get every value exept for the last nucleotide.
def calc_dG(seq):
NearPairsPlus = ['AA','AC','AG','AT',
'CA','CC','CG','CT',
'GA','GC','GG','GT',
'TA','TC','TG','TT']
DeltaG = [-1.9, -1.3, -1.6, -1.5,
-1.9, -3.1, -3.6, -1.6,
-1.6, -3.1, -3.1, -1.3,
-1.0, -1.6, -1.9, -1.9 ]
c = []
seq = seq+ ' '
a = 0
while a < len(seq):
b = 0
nuc = []
while b < len(NearPairsPlus):
if seq[a-2:a] == NearPairsPlus[b]:
c.append(DeltaG[b])
b = b + 1
a = a + 1
return c
sequence = "ACTTGGGATTGGGCT"
dG_values = calc_dG(sequence)
y = dG_values
x = list(sequence)[:-1]
import matplotlib.pyplot as plt
plt.plot(dG_values)
plt.gca().invert_yaxis()
plt.ylabel(r'$\Delta$ G $\left(\frac{kcal}{mol}\right)$')
plt.show()