- Let's start with the usual imports:
%matplotlib inlinefrom collections import defaultdictimport gzipimport numpy as npimport matplotlib.pylab as plt
- Let's load the data that we saved on the first recipe:
num_parents = 8dp_2L = np.load(gzip.open('DP_2L.npy.gz', 'rb'))print(dp_2L.shape)
- And let's print median DP for the whole chromosome arm, and a part of it in the middle for all parents:
for i in range(num_parents): print(np.median(dp_2L[:,i]), np.median(dp_2L[50000:150000,i]))
Interestingly, the median for the whole chromosome sometimes does not hold for that big region in the middle, so let's dig further.
- We will print the median DP for 200,000 kbp windows across the chromosome arm. Let's start with the window code: ...