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 all GO terms associated with the LCT gene (you can find out how to retrieve the Ensembl ID in the previous recipe). Remember that you will need the do_request function from the previous recipe:
lct_id = 'ENSG00000115850'refs = do_request(ensembl_server, 'xrefs/id', lct_id,external_db='GO', all_levels='1')print(len(refs))print(refs[0].keys())for ref in refs:    go_id = ref['primary_id']    details = do_request(ensembl_server, 'ontology/id', go_id)    print('%s %s %s' % (go_id, details['namespace'], ref['description']))    print('%s\n' % details['definition'])

Note the free-form definition and the varying namespace for each term. The first two of the eleven reported items ...

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