Finding genomic features from sequencing annotations
We will finalize this chapter and this book with a simple recipe that suggests that sometimes you can learn important things from simple unexpected results, and that apparent quality issues might mask important biological questions.
We will plot read depth (DP) across chromosome arm 2L for all the parents on our crosses. The recipe can be found on Chapter11/2L.ipynb
.
How to do it…
- Let's start with the usual imports:
%matplotlib inline from collections import defaultdict import gzip import numpy as np import matplotlib.pylab as plt
- Let's load the data that we saved on the first recipe:
num_parents = 8 dp_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...