Connect to downstream Gene Ontology terms.

This notebook showcases the functionality of Omniflow that connects the existing nodes of a network to a phenotype of interest.

[1]:
%%time
from neko.core.network import Network
from neko._visual.visualize_network import NetworkVisualizer
from neko.inputs import Universe
from neko._annotations.gene_ontology import Ontology
import omnipath as op
CPU times: user 5.88 s, sys: 1.59 s, total: 7.46 s
Wall time: 5.06 s

1. Build network

Please see the Network building tutorial for detailed explanations of each step.

[2]:
genes = ["SRC", "NOTCH1", "FAK"]
[3]:
new_net1 = Network(genes, resources = 'omnipath')
[4]:
%%time
new_net1.connect_nodes(only_signed=True, consensus_only=True)
CPU times: user 19.7 ms, sys: 123 µs, total: 19.8 ms
Wall time: 19.6 ms

2. Connect to Gene Ontology (GO) term

Connect the nodes of the Network with markers of a certain phenotype, from Gene Ontology.

The connect_genes_to_phenotype function will look for interactions between the nodes of the network and genes annotated with a GO term of interest. The argument compress replaces the individual phenotype-specific genes into one phenotype node.

Note

We suggest to the users to choose gene ontology terms lower in the hierarcy (e.g., execution phase of apoptosis versus apoptosis) to avoid the inclusion of too many genes.

[5]:
%%time
new_net1.connect_genes_to_phenotype(id_accession="GO:0001837", phenotype="epithelial to mesenchymal transition", only_signed=True, compress=True, maxlen=1)
Start requesting genes from Gene Ontology
Fetching from:  https://golr-aux.geneontology.io/solr/select?defType=edismax&qt=standard&indent=on&wt=csv&rows=100000&start=0&fl=bioentity_label&facet=true&facet.mincount=1&facet.sort=count&json.nl=arrarr&facet.limit=25&hl=true&hl.simple.pre=%3Cem%20class=%22hilite%22%3E&hl.snippets=1000&csv.encapsulator=&csv.separator=%09&csv.header=false&csv.mv.separator=%7C&fq=document_category:%22annotation%22&fq=isa_partof_closure:%22GO:0001837%22&fq=taxon_subset_closure_label:%22Homo%20sapiens%22&fq=type:%22protein%22&fq=annotation_class_label:%22epithelial%20to%20mesenchymal%20transition%22&facet.field=aspect&facet.field=taxon_subset_closure_label&facet.field=type&facet.field=evidence_subset_closure_label&facet.field=regulates_closure_label&facet.field=isa_partof_closure_label&facet.field=annotation_class_label&facet.field=qualifier&facet.field=annotation_extension_class_closure_label&facet.field=assigned_by&facet.field=panther_family_label&q=*:*
Done
Starting connecting network's nodes to:  ['DACT3', 'SNAI1', 'RBPJ', 'ROCK2', 'TGFBR2', 'RFLNB', 'AKNA', 'GSK3B', 'WNT5A', 'NOTCH1', 'LOXL3', 'BMP7', 'FLNA', 'FAM83D', 'TRIM28', 'AMELX', 'EPB41L5', 'SLC39A6', 'DLG5', 'ROCK1', 'SOX9', 'ENG', 'SP6', 'SLC39A10', 'FOXF2', 'FGFR1', 'WNT11', 'NCAM1', 'BMP2', 'HNRNPAB', 'HMGA2', 'LIMS1', 'IGF1', 'CTNNB1', 'DDX5', 'TGFB1', 'TGFB2', 'TGFBR3L', 'SMAD4', 'PPP3R1', 'S100A4', 'FGFR2', 'NOG', 'CUL7', 'HGF', 'NOTCH4', 'WNT4', 'TGFBR3', 'TGFBR1', 'LEF1', 'HIF1A', 'DDX17', 'SNAI2', 'LOXL2']
CPU times: user 414 ms, sys: 4.23 ms, total: 419 ms
Wall time: 1.44 s
[6]:
#Visualize network
visualizer1 = NetworkVisualizer(new_net1, color_by='effect')
visualizer1.render()
../_images/notebooks_6_ontology_8_0.svg
[7]:
new_net1.edges
[7]:
source target Type Effect References
0 P12931 Q05397 stimulation Adhesome:10085298;Adhesome:10592173;Adhesome:1...
1 P12931 epithelial_to_mesenchymal_transition inhibition ACSN:10593980;ACSN:12123611;ACSN:15782139;ACSN...
2 P46531 epithelial_to_mesenchymal_transition stimulation BioGRID:12644465;BioGRID:22143792;BioGRID:3096...
3 Q05397 epithelial_to_mesenchymal_transition bimodal nan
4 P46531 epithelial_to_mesenchymal_transition NaN stimulation Gene Ontology
[ ]: