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...

Let's take a look at the following steps:

  1. Let's start by retrieving the annotation information for our gene:
import gzipfrom Bio import Alphabet, Seq, SeqIOgene_id = 'AGAP004707'gene = db[gene_id]print(gene)print(gene.seqid, gene.strand)

The gene_id was retrieved from VectorBase, an online database of the genomics of disease vectors. For other specific cases, you will need to know the ID of your gene (which will be dependent on species and database). The output will be as follows:

2L VectorBase gene 2358158 2431617 . + . ID=AGAP004707;biotype=protein_coding 2L +

Note that the gene is on the 2L chromosome arm and coded in the positive direction (+ strand).

  1. Let's hold the sequence for the 2L chromosome arm in memory (it's ...
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