Abundant contribution of short tandem repeats to gene expression variation in humans - Figure 5


In [2]:
%pylab inline

# Libraries
import matplotlib.pyplot as plt
import os
import pandas as pd

# path to raw data files - EDIT depending on where the data is
DATAPATH = "data/"

##### Data file names #####
CROHNSDATA = os.path.join(DATAPATH, "chrons.counts.txt")


Populating the interactive namespace from numpy and matplotlib

In [5]:
dat = pd.read_csv(CROHNSDATA, names=["test","count"])

fig = plt.figure()
fig.set_size_inches((10, 5))
ax = fig.add_subplot(111)
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
ax.get_xaxis().tick_bottom()
ax.get_yaxis().tick_left()
ax.hist(list(dat[dat["test"]=="ctrl"]["count"]), color="gray", edgecolor="white");
ax.axvline(x=dat[dat["test"]=="estr"]["count"].values[0], linestyle="dashed", color="red", lw=2)
ax.set_xlabel("Number of genes")
ax.set_ylabel("Number of permutations");