All Children, Grand Children Of Go Id
3
3
Entering edit mode
12.6 years ago
Sheila ▴ 280

Given a GO ID (e.g. GO:0004872) I want to find out all the GO ids which are (in the tree) bellow this ID.(in other words I want to find out all Children, grand children and so on up-to the last node). I am looking for an solution in R or Python.

gene ontology tree python • 7.5k views
ADD COMMENT
6
Entering edit mode
12.6 years ago
Martin Morgan ★ 1.6k

Install Bioconductor GO.db

source("http://bioconductor.org/biocLite.R")
biocLite("GO.db")

and then

library(GO.db)
offspring = GOMFOFFSPRING[["GO:0004872"]]
ADD COMMENT
3
Entering edit mode
12.6 years ago

using a mysql library for R, you can query the GO database. See http://wiki.geneontology.org/index.php/Example_Queries#Find_descendants_of_the_node_.27nucleus.27 for some examples. e.g;:

$ mysql -h mysql.ebi.ac.uk -u go_select --password=amigo -P 4085 -D go_latest \
  -e 'SELECT DISTINCT  descendant.name, descendant.term_type,descendant.acc
      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.acc="GO:0004872" AND distance!=0'

+----------------------------------------------------------------+--------------------+------------+
| name                                                           | term_type          | acc        |
+----------------------------------------------------------------+--------------------+------------+
| interleukin-21 receptor activity                               | molecular_function | GO:0001532 |
| phorbol ester receptor activity                                | molecular_function | GO:0001565 |
| non-kinase phorbol ester receptor activity                     | molecular_function | GO:0001566 |
| non-tyrosine kinase fibroblast growth factor receptor activity | molecular_function | GO:0001571 |
| 5-HT1 receptor activity                                        | molecular_function | GO:0001586 |
| 5-HT2 receptor activity                                        | molecular_function | GO:0001587 |
| dopamine receptor activity, coupled via Gs                     | molecular_function | GO:0001588 |
| dopamine D5 receptor activity                                  | molecular_function | GO:0001589 |
| dopamine D1 receptor activity                                  | molecular_function | GO:0001590 |
| dopamine receptor activity, coupled via Gi/Go                  | molecular_function | GO:0001591 |
 (...)
ADD COMMENT
0
Entering edit mode
9.5 years ago

If I have many many terminal GOs like thousands how can I reache the level one GO (below root: MF, BP and CC)?

ADD COMMENT
0
Entering edit mode

Please delete this answer and create a new post with your question. You are more likely to get answers that way.

ADD REPLY

Login before adding your answer.

Traffic: 1094 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6