Map tissue expression

This notebook explores how you can explore whether the nodes in your network are expressed in a tissue of interest. The annotations are accessed from the Annotation object of Omnipath, and are based on expression data from the Human Protein Atlas.

[1]:
%%time
from neko.core.network import Network
from neko._visual.visualize_network import NetworkVisualizer
from neko._inputs.resources import Resources
from neko._annotations.gene_ontology import Ontology
import omnipath as op
/home/eirini/anaconda3/envs/omniflow_env/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
CPU times: user 1.73 s, sys: 438 ms, total: 2.17 s
Wall time: 2.18 s

1. Import genes as network nodes

[2]:
genes = ["SRC", "NOTCH1", "FAK", "CDH1", "CDH2", "VIM", "MAP4K4", "LATS1", "LATS2", "PTK2B"]
[3]:
new_net1 = Network(genes)
Loading deafault omnipath all interactions
[4]:
#Print node dataframe
new_net1.nodes
[4]:
Genesymbol Uniprot Type
0 SRC P12931 NaN
1 NOTCH1 P46531 NaN
2 PTK2 Q05397 NaN
3 CDH1 P12830 NaN
4 CDH2 P19022 NaN
5 VIM P08670 NaN
6 MAP4K4 O95819 NaN
7 LATS1 O95835 NaN
8 LATS2 Q9NRM7 NaN
9 PTK2B Q14289 NaN

2. Check if the genes are annotated in the tissue of interest (e.g., in colorectal cancer)

[5]:
annot = Ontology()
results_df = annot.check_tissue_annotations(genes_df = new_net1.nodes, tissue = 'colorectal cancer')
print(results_df)
228kB [00:00, 14.2MB/s]
316kB [00:00, 16.3MB/s]
156kB [00:00, 44.1MB/s]
222kB [00:00, 52.6MB/s]
176kB [00:00, 47.4MB/s]
184kB [00:00, 40.4MB/s]
136kB [00:00, 48.8MB/s]
113kB [00:00, 41.6MB/s]
110kB [00:00, 44.9MB/s]
185kB [00:00, 96.9MB/s]
  Genesymbol  in_tissue
0        SRC       True
1     NOTCH1       True
2       PTK2       True
3       CDH1       True
4       CDH2       True
5        VIM       True
6     MAP4K4       True
7      LATS1       True
8      LATS2       True
9      PTK2B       True

3. Color nodes based on their presence/absence in the tissue of interest

The tissue_mapping functions highligts as light blue all the nodes of the network that are expressed in the used-defined system.

[6]:
network_visualizer = NetworkVisualizer(new_net1)
network_visualizer.tissue_mapping(results_df)
network_visualizer.render()
../_images/notebooks_6_tissue_mapping_9_0.svg