Skip to Content
Bioinformatics with Python Cookbook - Second Edition
book

Bioinformatics with Python Cookbook - Second Edition

by Tiago Antao
November 2018
Intermediate to advanced
360 pages
9h 36m
English
Packt Publishing
Content preview from Bioinformatics with Python Cookbook - Second Edition

How to do it...

Take a look at the following steps:

  1. First, let's compute F-statistics (FST, FIS, and FIT ) for our dataset with all 11 populations, as follows:
from Bio.PopGen.GenePop import Controller as gpcmy_pops = [l.rstrip() for l in open('hapmap10_auto_noofs_2.pops')]num_pops = len(my_pops)ctrl = gpc.GenePopController()(multi_fis, multi_fst, multi_fit), f_iter = ctrl.calc_fst_all('hapmap10_auto_noofs_2.gp')print(multi_fis, multi_fst, multi_fit)

As with the previous recipe, we will first load population names and initialize a controller to interact with the Genepop application. Then, we will calculate various F-statistics.

The function will return a loci iterator that returns several F-statistics per loci as the last parameter. You ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Bioinformatics with Python Cookbook

Bioinformatics with Python Cookbook

Tiago Antao

Publisher Resources

ISBN: 9781789344691Supplemental Content