Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Bioinformatics with Python Cookbook

You're reading from   Bioinformatics with Python Cookbook Learn how to use modern Python bioinformatics libraries and applications to do cutting-edge research in computational biology

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789344691
Length 360 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Tiago Antao Tiago Antao
Author Profile Icon Tiago Antao
Tiago Antao
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Python and the Surrounding Software Ecology 2. Next-Generation Sequencing FREE CHAPTER 3. Working with Genomes 4. Population Genetics 5. Population Genetics Simulation 6. Phylogenetics 7. Using the Protein Data Bank 8. Bioinformatics Pipelines 9. Python for Big Genomics Datasets 10. Other Topics in Bioinformatics 11. Advanced NGS Processing

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…

  1. Let's start with the usual imports:
%matplotlib inline

from collections import defaultdict
import gzip

import numpy as np
import matplotlib.pylab as plt
  1. 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)
  1. 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime