In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
from pylab import rcParams
# a couple changes to make the matplotlib figures bigger
rcParams['figure.figsize'] = 12, 8
rcParams['font.size'] = 20
import numpy as np
import pyna
In [2]:
periodic = pyna.CurvesAnalysis('../curves_output.data')
In [3]:
minor = pyna.StrandStatistics(periodic.panels['groupE']['w12'])
major = pyna.StrandStatistics(periodic.panels['groupE']['w21'])
In [4]:
minor_means = minor.mean(per_location=True)
major_means = major.mean(per_location=True)
minor_stds = minor.std(per_location=True)
major_stds = major.std(per_location=True)
xvals = minor.df.columns.values
In [5]:
plt.figure()
plt.errorbar(xvals, minor_means, yerr=minor_stds)
plt.errorbar(xvals, major_means, yerr=major_stds)
plt.xlabel("Base pair number")
plt.ylabel("Groove width")
plt.gca().set_ylim(ymin=0); # force the yaxis to go to 0
Out[5]:
In [6]:
pyna.AnimatedDataFrame(minor.df).show()
Out[6]:
In [7]:
minor_hist = minor.hist(per_location=True, bins=28, range=(0.0, 14.0))
In [8]:
plt.pcolor(minor_hist)
plt.yticks(np.arange(0.5, len(minor_hist.index), 2), minor_hist.index[::2])
plt.xticks(np.arange(0.5, len(minor_hist.columns), 5), minor_hist.columns[::5])
plt.xlabel("Base pair number")
plt.ylabel("Minor groove width")
plt.show()
In [9]:
plt.plot(minor_hist.index, minor_hist[19.0])
plt.plot(minor_hist.index, minor_hist[20.5])
Out[9]:
In [ ]: