2
$\begingroup$

I am trying to figure out how to find the number of child terms associated with a specific Gene Ontology (GO) term using QuickGO, without just counting the amount of terms in a list. For example when I want to find the number of child terms associated with the GO term 'heart development'.

I could just click on the tab 'Child Terms' and count, but what if it would be a very long list, how can I find the correct amount? enter image description here

I assume there is some way to do this by going to Protein Annotation and applying a filter, but I do not know how to do this.

enter image description here

Any help?

$\endgroup$
2
  • $\begingroup$ Does it need to be done using QuickGO? Would you be open to downloading the ontology .obo file and parsing it? Do you only want direct child terms or all descendent terms (children, grandchildren etc)? $\endgroup$
    – terdon
    Commented Jun 13, 2015 at 11:31
  • $\begingroup$ I am only looking for direct child terms. I would like to find a way to do it in QuickGo if possible, but I am interested in any other methods possible! :-) $\endgroup$
    – Wolgast
    Commented Jun 13, 2015 at 11:35

1 Answer 1

5
$\begingroup$

I don't think it's possible to do this via QuickGO. You can, however, do it from GO's website, using their GOOSE tool. This offers an interface to the GO SQL database and lets you run queries. It also offers example searches, one of which ("Find descendants of the node 'nucleus'") can easily be modified to return what you are asking for:

SELECT COUNT(*)
FROM
 term
 INNER JOIN graph_path ON (term.id=graph_path.term1_id)
 INNER JOIN term AS descendant ON (descendant.id=graph_path.term2_id)
WHERE term.name='heart development' AND distance = 1 ;

In the query above, I modified the example and changed 'nucleus' to 'heart development' (GO:0007507) and changed distance <> 0 to distance = 1 to make it list only direct descendants. Finally, I also changed SELECT DISTINCT descendant.acc, descendant.name, descendant.term_type to simply SELECT COUNT(*) since all we are interested in is the number of descendants. If you also want their names, leave the SELECT line as is. That will show both the list of names and the total in the output.

The modified query shows us that this term has 30 descendants:

GO SQL query output

$\endgroup$
3
  • $\begingroup$ When I also tried running this query in HeidiSQL in UCSC MySQL (database 'go') I found 22 results instead. Any idea why? $\endgroup$
    – Wolgast
    Commented Jun 13, 2015 at 15:54
  • 1
    $\begingroup$ @Wolgast different ontology versions presumably. Or a completely different SQL schema. The ontology files are not static, They change quite a bit and quite often. What you need is the number found in the specific ontology file you happen to be using. Don't assume that different online versions will give you the same result. $\endgroup$
    – terdon
    Commented Jun 13, 2015 at 16:01
  • $\begingroup$ GOOSE is now deprecated :-( $\endgroup$
    – Josh
    Commented Jun 3, 2021 at 2:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .