[Bioperl-l] Re: How to find 'is_a'/'part_of' relationship using GO::Termfinder
Siddhartha Basu
sidd.basu at gmail.com
Mon Mar 11 17:16:45 UTC 2013
Hi,
On Fri, 08 Mar 2013, witch.of.agnessi at gmail.com wrote:
> Hello All,
>
> I'm using Perl's GO::Termfinder to find parent/child nodes of a given
> node. I wonder How I can extract the type of relationship,
> like 'is_a', 'part_of' etc. relationship that connects two nodes? Is there
> any better way to do this in Bioperl?
You could use the Bioperl's ontology module in this case. For example, here is how
you could start with ...
1. Parse gene_ontology obo file with Bio::OntologyIO
https://metacpan.org/module/Bio::OntologyIO
2. Once you get the ontology object(Bio::Ontology::Ontology), you could
use the *find_terms*
https://metacpan.org/module/Bio::Ontology::Ontology#find_terms
to get your term objects.
3. Then use the graph lookup methods
such as *get_relationships*, get_child_terms, get_parent_terms,
get_ancestor_terms that takes a term and relationship objects to extract
whatever connection you are looking for.
Hope this helps,
-siddhartha
>
> Thanks in advance
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list