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. First, let's access the PSICQUIC service (its version of the UniProt database) via its REST interface, as shown in the following code:
import requestsdef get_psiquic_uniprot(query, **kwargs):    kwargs['format'] = kwargs.get('format', 'tab27')    server = 'http://www.ebi.ac.uk/Tools/webservices/psicquic/uniprot/webservices/current/search/query'    req = requests.get('%s/%s' % (server, query), params=kwargs)    return req.content.decode('utf-8')
  1. Then, get all the genes referred to (along with their respective species) and the interactions:
from collections import defaultdictgenes_species = defaultdict(set)interactions = {}def get_gene_name(my_id, alt_names):    toks = alt_names.split('|') for ...
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