Relationships in the GO¶
Alex Warwick Vesztrocy, March 2016
For some analyses, it is possible to only use the is_a definitions given in the Gene Ontology.
However, it is important to remember that this isn’t always the case. As such, GOATOOLS includes the option to load the relationship definitions also.
Example use case¶
One example use case for the relationship terms, would be to look for all functions which regulate pseudohyphal growth (GO:0007124). That is:
A pattern of cell growth that occurs in conditions of nitrogen limitation and abundant fermentable carbon source. Cells become elongated, switch to a unipolar budding pattern, remain physically attached to each other, and invade the growth substrate.
Source: https://www.ebi.ac.uk/QuickGO/GTerm?id=GO:0007124#term=info&info=1
term_of_interest = go['GO:0007124']
First, find the relationship types which contain “regulates”:
regulates = frozenset([typedef
for typedef in go.typedefs.keys()
if 'regulates' in typedef])
print(regulates)
frozenset({'positively_regulates', 'regulates', 'negatively_regulates'})
Now, search through the terms in the tree for those with a relationship in this list and add them to a dictionary dependent on the type of regulation.
from collections import defaultdict
regulating_terms = defaultdict(list)
for t in go.values():
if hasattr(t, 'relationship'):
for typedef in regulates.intersection(t.relationship.keys()):
if term_of_interest in t.relationship[typedef]:
regulating_terms['{:s}d_by'.format(typedef[:-1])].append(t)
Now regulating_terms contains the GO terms which relate to regulating protein localisation to the nucleolus.
print('{:s} ({:s}) is:'.format(term_of_interest.name, term_of_interest.id))
for regulate_desc, goterms in regulating_terms.items():
print('\n - {:s}:'.format(regulate_desc))
for goterm in goterms:
print(' -- {:s} {:s}'.format(goterm.id, goterm.name))
for gochild in goterm.children:
print(' -- {:s} {:s}'.format(gochild.id, gochild.name))
pseudohyphal growth (GO:0007124) is:
- regulated_by:
-- GO:2000220 regulation of pseudohyphal growth
-- GO:2000222 positive regulation of pseudohyphal growth
-- GO:2000221 negative regulation of pseudohyphal growth
- negatively_regulated_by:
-- GO:2000221 negative regulation of pseudohyphal growth
-- GO:1900462 negative regulation of pseudohyphal growth by negative regulation of transcription from RNA polymerase II promoter
-- GO:0100042 negative regulation of pseudohyphal growth by transcription from RNA polymerase II promoter
- positively_regulated_by:
-- GO:2000222 positive regulation of pseudohyphal growth
-- GO:0100041 positive regulation of pseudohyphal growth by transcription from RNA polymerase II promoter
-- GO:1900461 positive regulation of pseudohyphal growth by positive regulation of transcription from RNA polymerase II promoter