Retrieving gene ontology information from Ensembl
In this recipe, we will introduce the usage of gene ontology information again by querying the Ensembl REST API. Gene ontologies are controlled vocabularies to annotate gene and gene products. These are made available as trees of concepts (with more general concepts near the top of the hierarchy). There are three domains for gene ontologies: cellular component, molecular function, and biological process.
Getting ready
As with the previous recipe, we do not require any predownloaded data, but as we are using web APIs, Internet access will be needed. The amount of data transferred will be limited.
As usual, you can find this content on the 02_Genomes/Gene_Ontology.ipynb
notebook.
We will make use of the do_request
function, which is defined in the first step of the previous recipe (Finding Orthologues with the REST Ensembl API).
To draw GO
trees, we will use pygraphviz
, a graph drawing library.
How to do it...
Let's take a look at the following steps...