Exercise

Exercise 6

Retrieve a list of GO term IDs and term names linked to the gene with stable id ‘ENSG00000139618’.

  • Use get_all_DBLinks with an external database name argument to restrict the number of xrefs returned.
  • Ontology term data such as term name and definition are stored outside of the core database. Create an OntologyTerm Adaptor with the help of the Registry method get_adaptor using arguments: ‘Multi’ (species), ‘Ontology’ (database type), ‘OntologyTerm’ (adaptor type).
  • For all xrefs returned by get_all_DBLinks use the OntologyTerm Adaptor to fetch the relevant term and print its accession and name (xref display_id is the same as term accession).

 

Answer

Magali explains the answers to these questions in this 3 min video. You can download her sample script and output