Customize intercellular networks

Marton Olbei

10/12/2020

In this tutorial we show you how to query interactions from the intercellular interactions in OmniPath, and go over the various attributes accompanying them.

We'll start by importing libraries, first omnipath, and pandas for data wrangling.

In [94]:
import omnipath as op
import pandas as pd

The intercellular interactions in OmniPath are collated from a number of sources. When putting together a query, you can select all of these, or just a preferred subset of them. The requests.Intercell.resources function returns the list of datasets included in the database.

In [95]:
op.requests.Intercell.resources()
Out[95]:
('Adhesome',
 'Almen2009',
 'Baccin2019',
 'CSPA',
 'CellCellInteractions',
 'CellPhoneDB',
 'ComPPI',
 'DGIdb',
 'EMBRACE',
 'GO_Intercell',
 'GPCRdb',
 'Guide2Pharma',
 'HGNC',
 'HPA_secretome',
 'HPMR',
 'ICELLNET',
 'Integrins',
 'Kirouac2010',
 'LOCATE',
 'LRdb',
 'MCAM',
 'Matrisome',
 'MatrixDB',
 'Membranome',
 'OPM',
 'OmniPath',
 'Phobius',
 'Ramilowski2015',
 'Ramilowski_location',
 'SignaLink_function',
 'Surfaceome',
 'TopDB',
 'UniProt_keyword',
 'UniProt_location',
 'UniProt_topology',
 'Zhong2015',
 'iTALK')

These resources contain a large variety of actors we can use to build intercellular interactions. Take a peek at a generalized list of these categories by using the requests.Intercell.generic_categories() function.

This list is also accessible from the browser, at https://omnipathdb.org/intercell_summary. Using the requests.Intercell.categories() command returns the complete list.

In [96]:
op.requests.Intercell.generic_categories()
Out[96]:
('adherens_junction',
 'adhesion',
 'cell_adhesion',
 'cell_surface',
 'cell_surface_enzyme',
 'cell_surface_ligand',
 'cell_surface_peptidase',
 'desmosome',
 'ecm',
 'ecm_regulator',
 'extracellular',
 'extracellular_peptidase',
 'gap_junction',
 'intracellular',
 'intracellular_intercellular_related',
 'ion_channel',
 'ion_channel_regulator',
 'ligand',
 'ligand_regulator',
 'matrix_adhesion',
 'matrix_adhesion_regulator',
 'peripheral',
 'plasma_membrane',
 'plasma_membrane_peripheral',
 'plasma_membrane_regulator',
 'plasma_membrane_transmembrane',
 'receptor',
 'receptor_regulator',
 'secreted',
 'secreted_enyzme',
 'secreted_enzyme',
 'secreted_peptidase',
 'secreted_peptidase_inhibitor',
 'secreted_receptor',
 'sparc_ecm_regulator',
 'tight_junction',
 'transmembrane',
 'transmembrane_predicted',
 'transporter')

Now that we have seen the resources and categories, we have to go over a few definitions related to them to make sure everything is clear going forward.

definitions

To import an intercellular network we call the interactions.import_intercell_network() function.

In this example below we generate a large intercellular network, where we are attempting to connect ligands to receptors.

  • first, we define the datasets to import from include
  • following that, we will specify the qualities of the transmitting proteins, such as which categories they should belong to, what should be their scope, source, aspect and so on under transmitter_param
  • once we are done with that, we should specify the same for the receiving molecules under receiver_param

These steps can be individually traced back through URLs:

  1. interaction parameters: https://omnipathdb.org/interactions?genesymbols=yes&datasets=omnipath,pathwayextra,ligrecextra&organisms=9606&fields=sources,references,curation_effort&license=academic
  2. transmitter parameters: https://omnipathdb.org/intercell?scope=generic&categories=ligand&causality=trans&license=academic
  3. receiver parameters: https://omnipathdb.org/intercell?scope=generic&categories=receptor&causality=rec&license=academic
In [97]:
intercell = op.interactions.import_intercell_network(
    include=['omnipath', 'pathwayextra', 'ligrecextra'] # define categories
)
In [98]:
intercell_filtered = intercell[
    (intercell['category_intercell_source'] == 'ligand') & # set transmitters to be ligands
    (intercell['category_intercell_target'] == 'receptor') # set receivers to be receptors
]
intercell_filtered
Out[98]:
source target is_stimulation is_inhibition consensus_direction consensus_stimulation consensus_inhibition dip_url curation_effort references ... category_source_intercell_target uniprot_intercell_target genesymbol_intercell_target entity_type_intercell_target consensus_score_intercell_target transmitter_intercell_target receiver_intercell_target secreted_intercell_target plasma_membrane_transmembrane_intercell_target plasma_membrane_peripheral_intercell_target
9 P23560 P48995 True False True True False None 0 NaN ... resource_specific P48995 TRPC1 protein 1 False True False False False
17 P48061 P04899 True False True True False None 0 NaN ... resource_specific P04899 GNAI2 protein 1 False True False False False
21 P02776 P04899 True False True True False None 0 NaN ... resource_specific P04899 GNAI2 protein 1 False True False False False
90 P19235 Q13507 True False True True False None 3 TRIP:18276585;TRIP:19074769;TRIP:21757714 ... resource_specific Q13507 TRPC3 protein 1 False True False False False
96 P19235 P01588 False True False False False http://dip.doe-mbi.ucla.edu/dip/DIPview.cgi?IK... 21 BioGRID:10318834;BioGRID:15358619;BioGRID:1732... ... resource_specific P01588 EPO protein 1 False True True False False
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
30113 Q8NFY4 Q9NZC2 False False False False False None 2 LRdb:16715077;Ramilowski2015:16715077 ... resource_specific Q9NZC2 TREM2 protein 9 False True True True False
30117 Q5SRR4 Q9HCN3 False False False False False None 0 NaN ... resource_specific Q9HCN3 TMEM8A protein 1 False True False True False
30118 P35247 P11226 True False True True False None 0 NaN ... resource_specific P11226 MBL2 protein 1 False True True False False
30148 P24001 P34995 True False True True False None 0 NaN ... resource_specific P34995 PTGER1 protein 5 False True False True False
30150 Q8NHL6 Q8IYS5 False True True False True None 0 NaN ... resource_specific Q8IYS5 OSCAR protein 1 False True True False False

7604 rows × 46 columns

This results in 7604 interactions. Let's narrow it down by restricting it with some of the categorical data outlined above.

In [99]:
intercell_filtered = intercell_filtered[
    (intercell_filtered['category_source_intercell_target'] == 'resource_specific')    
]
intercell_filtered
Out[99]:
source target is_stimulation is_inhibition consensus_direction consensus_stimulation consensus_inhibition dip_url curation_effort references ... category_source_intercell_target uniprot_intercell_target genesymbol_intercell_target entity_type_intercell_target consensus_score_intercell_target transmitter_intercell_target receiver_intercell_target secreted_intercell_target plasma_membrane_transmembrane_intercell_target plasma_membrane_peripheral_intercell_target
9 P23560 P48995 True False True True False None 0 NaN ... resource_specific P48995 TRPC1 protein 1 False True False False False
17 P48061 P04899 True False True True False None 0 NaN ... resource_specific P04899 GNAI2 protein 1 False True False False False
21 P02776 P04899 True False True True False None 0 NaN ... resource_specific P04899 GNAI2 protein 1 False True False False False
90 P19235 Q13507 True False True True False None 3 TRIP:18276585;TRIP:19074769;TRIP:21757714 ... resource_specific Q13507 TRPC3 protein 1 False True False False False
96 P19235 P01588 False True False False False http://dip.doe-mbi.ucla.edu/dip/DIPview.cgi?IK... 21 BioGRID:10318834;BioGRID:15358619;BioGRID:1732... ... resource_specific P01588 EPO protein 1 False True True False False
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
30113 Q8NFY4 Q9NZC2 False False False False False None 2 LRdb:16715077;Ramilowski2015:16715077 ... resource_specific Q9NZC2 TREM2 protein 9 False True True True False
30117 Q5SRR4 Q9HCN3 False False False False False None 0 NaN ... resource_specific Q9HCN3 TMEM8A protein 1 False True False True False
30118 P35247 P11226 True False True True False None 0 NaN ... resource_specific P11226 MBL2 protein 1 False True True False False
30148 P24001 P34995 True False True True False None 0 NaN ... resource_specific P34995 PTGER1 protein 5 False True False True False
30150 Q8NHL6 Q8IYS5 False True True False True None 0 NaN ... resource_specific Q8IYS5 OSCAR protein 1 False True True False False

7589 rows × 46 columns

In this tutorial we learned:

  • the data sources used to generate intercellular interactions
  • the qualities of intercellular interactors
  • the functions to generate and specify intercellular interactions