Question: Go Terms In Ensembl
gravatar for Pi
9.9 years ago by
Pi520 wrote:


When using ensembl, database entries are linked to GO terms at the transcript level. According to the documentation in the Perl api, the GO terms listed are those associated with the Swiss Prot entry for the transcript. These GO terms are then linked directly to the transcript as xrefs via the appropriate tables in the database (object-xref and ontology_xref). However, as far as I can see, there is no method (using the database directly) of determining the category of a GO term(biological process/cellular component/ molecular function). There do not seem to be any fields in the database schema that capture this information

Please can you advise if there is a method of determining the GO term category.

EDIT: In response to the second answer, this code resides in the perl api for retrieving ontology terms

FROM    ontology
  JOIN  term USING (ontology_id)
  JOIN  synonym USING (term_id)
WHERE   ( LIKE ? OR LIKE ? ));

but where are these tables (term/ontology/synonym). They are not in the main databases and they are not in the ontology_mart database either on the biomart server

Thank-you for your time

gene ensembl • 3.5k views
ADD COMMENTlink modified 9.6 years ago by Travis2.8k • written 9.9 years ago by Pi520
gravatar for Travis
9.9 years ago by
Travis2.8k wrote:

If you're using the API, you need to set up an ontology adaptor:


my $goadaptor = $registry->get_adaptor('Multi', 'Ontology', 'GOTerm');

You then need to pull the dblinks for your transcript object


my $trandblinks = $transcript->get_all_DBLinks;
my @trandblinks = @{$trandblinks};
            while (my $trandblink = shift @trandblinks) {
                    my $tranprimid = $trandblink->primary_id;
                    my $trandispid = $trandblink->display_id;
                    my $trandb = $trandblink->dbname;

Then use the ontology adaptor to get the required details...

                     if ($trandb eq "GO") {

                            my $term = $goadaptor->fetch_by_accession($trandispid);
                            if ($term->namespace) {
                                    my $process = $term->namespace;


This will get you the process category...

Hope it helps!

ADD COMMENTlink modified 9.9 years ago by Neilfws49k • written 9.9 years ago by Travis2.8k

Thanks for your reply. Do you know where this information is stored in the underlying database? I prefer to work with the db directly if possible.

ADD REPLYlink written 9.9 years ago by Pi520
gravatar for Travis
9.8 years ago by
Travis2.8k wrote:

Are you doing this work with local copies of the databases?

The ontology information is stored in a database called ensembl_ontology_6*.

The naming convention is different from the other databases as it is species independent.

ADD COMMENTlink written 9.8 years ago by Travis2.8k

it would seem this is the missing link i was looking for!!

ADD REPLYlink written 9.8 years ago by Pi520
gravatar for Neilfws
9.9 years ago by
Sydney, Australia
Neilfws49k wrote:

You can go from a transcript ID to GO terms with categories using BioMart. Briefly:

  1. Click "MARTVIEW" (top menu)
  2. Select database (Ensembl genes 61) and dataset (e.g. Homo sapiens genes)
  3. Click "Filters" (left menu)
  4. Under GENE check "ID list limit" and either paste or upload Ensembl transcript IDs
  5. Click "Attributes" (left menu)
  6. Under EXTERNAL check "GO Term Accession (bp)", "GO Term Accession (cc)" and under go molecular function (mf), "GO Term Accession"
  7. Click "Results" (top left menu)

This will return a table with columns for BP, CC and MF and GO IDs where they exist for the transcript.

ADD COMMENTlink written 9.9 years ago by Neilfws49k

BioMart has updated for v62. I would like to point out the new 'GO domain' attribute which will tell you which of the three categories the GO term fits into (i.e. biological process, cellular component or molecular function).

ADD REPLYlink written 9.8 years ago by Giulietta - Ensembl Helpdesk1.2k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1566 users visited in the last hour