[ensembl-dev] how to sort the GO objects hierarchically.

Kieron Taylor ktaylor at ebi.ac.uk
Mon Mar 31 16:04:37 BST 2014


Dear Pablo,

Ensembl is not necessarily the best codebase to be working with the Gene 
Ontology. We do not have exactly the code that you asking for. That 
said, the object Bio::EnsEMBL::DBSQL::OntologyTermAdaptor is able to 
fetch some of the information needed to build the tree you want.

The adaptor will give you the database interface, but you'll still have 
to compute your own ordering. You could conceivably build up a linear 
heritage for each term, by hijacking _fetch_ancestor_chart, then rank 
them by depth, or else crawl the hierarchy manually.

Our Compara team spend a lot more time playing with trees of things, so 
they might have more insight. You might also be better served by 
investigating the Ontology community, where more thorough graph-centric 
tools will exist.

Regards,

-- 
Kieron Taylor PhD.
Ensembl Core team
EBI


On 31/03/2014 15:11, Pablo Marin Garcia wrote:
>
> Hello,
>
> Is there arround in the API or tutorials a method that giving several
> GO terms it creates its hierarchical tree? I want to sort and print
> hierarchically the GO terms returned for a gene.
>
> Could anyone share code for doing that?
>
> Pablo
>
>
> _______________________________________________ Dev mailing list
> Dev at ensembl.org Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev Ensembl Blog:
> http://www.ensembl.info/
>





More information about the Dev mailing list