{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Prior Knowledge"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"LIANA+ (typically) relies heavily on prior knowledge to infer intercellular communication and the intracellular signaling pathways that are activated in response to communication. This notebook provides a brief overview of the prior knowledge typically used by LIANA+. "
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:49.115825Z",
"iopub.status.busy": "2026-09-11T16:47:49.115667Z",
"iopub.status.idle": "2026-09-11T16:47:53.915413Z",
"shell.execute_reply": "2026-09-11T16:47:53.914917Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading data from `https://omnipathdb.org/queries/enzsub?format=json`\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading data from `https://omnipathdb.org/queries/interactions?format=json`\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading data from `https://omnipathdb.org/queries/complexes?format=json`\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading data from `https://omnipathdb.org/queries/annotations?format=json`\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading data from `https://omnipathdb.org/queries/intercell?format=json`\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading data from `https://omnipathdb.org/about?format=text`\n"
]
}
],
"source": [
"import liana as li\n",
"import omnipath as op\n",
"import decoupler as dc"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ligand-Receptor Interactions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the simplest case, for reproducibility purposes, LIANA+ provides a frozen set of interactions across resources. These are accessible through the `select_resource` function in the `resource` module. The resources that are currently supported are:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:53.918625Z",
"iopub.status.busy": "2026-09-11T16:47:53.918024Z",
"iopub.status.idle": "2026-09-11T16:47:53.964455Z",
"shell.execute_reply": "2026-09-11T16:47:53.964038Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"['baccin2019',\n",
" 'cellcall',\n",
" 'cellchatdb',\n",
" 'cellinker',\n",
" 'cellphonedb',\n",
" 'celltalkdb',\n",
" 'connectomedb2020',\n",
" 'consensus',\n",
" 'embrace',\n",
" 'guide2pharma',\n",
" 'hpmr',\n",
" 'icellnet',\n",
" 'italk',\n",
" 'kirouac2010',\n",
" 'lrdb',\n",
" 'mouseconsensus',\n",
" 'ramilowski2015']"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"li.rs.show_resources()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" \n",
"By default, `liana` uses the `consensus` resource, which is composed by multiple expert-curated ligand-receptor resources, including CellPhoneDB, CellChat, ICELLNET, connectomeDB2020, and CellTalkDB.\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:53.966732Z",
"iopub.status.busy": "2026-09-11T16:47:53.966524Z",
"iopub.status.idle": "2026-09-11T16:47:53.992845Z",
"shell.execute_reply": "2026-09-11T16:47:53.992426Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ligand | \n",
" receptor | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" LGALS9 | \n",
" PTPRC | \n",
"
\n",
" \n",
" | 1 | \n",
" LGALS9 | \n",
" MET | \n",
"
\n",
" \n",
" | 2 | \n",
" LGALS9 | \n",
" CD44 | \n",
"
\n",
" \n",
" | 3 | \n",
" LGALS9 | \n",
" LRP1 | \n",
"
\n",
" \n",
" | 4 | \n",
" LGALS9 | \n",
" CD47 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ligand receptor\n",
"0 LGALS9 PTPRC\n",
"1 LGALS9 MET\n",
"2 LGALS9 CD44\n",
"3 LGALS9 LRP1\n",
"4 LGALS9 CD47"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"resource = li.rs.select_resource('consensus')\n",
"resource.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"All of the ligand-receptor resource in LIANA+ were pre-generated using the [OmniPath](https://github.com/saezlab/omnipath) meta-database. Though any custom resource can also be passed, including those provided by the user or generated using the `omnipath` client package. \n",
"\n",
"Via this client, in addition to ligand-receptor interactions, users can obtain the PubMed IDs of the references (`references`) that were used support each interaction, as well as the database that reported the interaction in the first place. \n",
"\n",
"Users can also modify the resource according to their preferences, for example:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:53.994765Z",
"iopub.status.busy": "2026-09-11T16:47:53.994605Z",
"iopub.status.idle": "2026-09-11T16:47:55.435067Z",
"shell.execute_reply": "2026-09-11T16:47:55.434783Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ligand | \n",
" receptor | \n",
" references | \n",
" source | \n",
" target | \n",
" is_stimulation | \n",
" is_inhibition | \n",
" consensus_direction | \n",
" consensus_stimulation | \n",
" consensus_inhibition | \n",
" ... | \n",
" aspect_intercell_target | \n",
" category_source_intercell_target | \n",
" uniprot_intercell_target | \n",
" entity_type_intercell_target | \n",
" consensus_score_intercell_target | \n",
" transmitter_intercell_target | \n",
" receiver_intercell_target | \n",
" secreted_intercell_target | \n",
" plasma_membrane_transmembrane_intercell_target | \n",
" plasma_membrane_peripheral_intercell_target | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" JAG2 | \n",
" NOTCH1 | \n",
" CellChatDB:22353464;CellTalkDB:22353464;ICELLN... | \n",
" Q9Y219 | \n",
" P46531 | \n",
" True | \n",
" True | \n",
" True | \n",
" True | \n",
" False | \n",
" ... | \n",
" functional | \n",
" resource_specific | \n",
" P46531 | \n",
" protein | \n",
" 21 | \n",
" False | \n",
" True | \n",
" False | \n",
" True | \n",
" False | \n",
"
\n",
" \n",
" | 1 | \n",
" DLL1 | \n",
" NOTCH1 | \n",
" CellChatDB:22353464;CellTalkDB:22353464;ICELLN... | \n",
" O00548 | \n",
" P46531 | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" ... | \n",
" functional | \n",
" resource_specific | \n",
" P46531 | \n",
" protein | \n",
" 21 | \n",
" False | \n",
" True | \n",
" False | \n",
" True | \n",
" False | \n",
"
\n",
" \n",
" | 2 | \n",
" IGF1 | \n",
" IGF1R | \n",
" CA1:8408032;CellChatDB:14604834;CellTalkDB:287... | \n",
" P05019 | \n",
" P08069 | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" ... | \n",
" functional | \n",
" resource_specific | \n",
" P08069 | \n",
" protein | \n",
" 22 | \n",
" False | \n",
" True | \n",
" False | \n",
" True | \n",
" False | \n",
"
\n",
" \n",
" | 3 | \n",
" WNT1 | \n",
" NOTCH1 | \n",
" SPIKE:18495817;SPIKE_LC:18495817 | \n",
" P04628 | \n",
" P46531 | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" ... | \n",
" functional | \n",
" resource_specific | \n",
" P46531 | \n",
" protein | \n",
" 21 | \n",
" False | \n",
" True | \n",
" False | \n",
" True | \n",
" False | \n",
"
\n",
" \n",
" | 4 | \n",
" JAG1 | \n",
" NOTCH1 | \n",
" ACSN:22330899;ACSN:22363130;BioGRID:11006133;C... | \n",
" P78504 | \n",
" P46531 | \n",
" True | \n",
" True | \n",
" True | \n",
" True | \n",
" False | \n",
" ... | \n",
" functional | \n",
" resource_specific | \n",
" P46531 | \n",
" protein | \n",
" 21 | \n",
" False | \n",
" True | \n",
" False | \n",
" True | \n",
" False | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 45 columns
\n",
"
"
],
"text/plain": [
" ligand receptor references source \\\n",
"0 JAG2 NOTCH1 CellChatDB:22353464;CellTalkDB:22353464;ICELLN... Q9Y219 \n",
"1 DLL1 NOTCH1 CellChatDB:22353464;CellTalkDB:22353464;ICELLN... O00548 \n",
"2 IGF1 IGF1R CA1:8408032;CellChatDB:14604834;CellTalkDB:287... P05019 \n",
"3 WNT1 NOTCH1 SPIKE:18495817;SPIKE_LC:18495817 P04628 \n",
"4 JAG1 NOTCH1 ACSN:22330899;ACSN:22363130;BioGRID:11006133;C... P78504 \n",
"\n",
" target is_stimulation is_inhibition consensus_direction \\\n",
"0 P46531 True True True \n",
"1 P46531 True False True \n",
"2 P08069 True False True \n",
"3 P46531 True False True \n",
"4 P46531 True True True \n",
"\n",
" consensus_stimulation consensus_inhibition ... aspect_intercell_target \\\n",
"0 True False ... functional \n",
"1 True False ... functional \n",
"2 True False ... functional \n",
"3 True False ... functional \n",
"4 True False ... functional \n",
"\n",
" category_source_intercell_target uniprot_intercell_target \\\n",
"0 resource_specific P46531 \n",
"1 resource_specific P46531 \n",
"2 resource_specific P08069 \n",
"3 resource_specific P46531 \n",
"4 resource_specific P46531 \n",
"\n",
" entity_type_intercell_target consensus_score_intercell_target \\\n",
"0 protein 21 \n",
"1 protein 21 \n",
"2 protein 22 \n",
"3 protein 21 \n",
"4 protein 21 \n",
"\n",
" transmitter_intercell_target receiver_intercell_target \\\n",
"0 False True \n",
"1 False True \n",
"2 False True \n",
"3 False True \n",
"4 False True \n",
"\n",
" secreted_intercell_target plasma_membrane_transmembrane_intercell_target \\\n",
"0 False True \n",
"1 False True \n",
"2 False True \n",
"3 False True \n",
"4 False True \n",
"\n",
" plasma_membrane_peripheral_intercell_target \n",
"0 False \n",
"1 False \n",
"2 False \n",
"3 False \n",
"4 False \n",
"\n",
"[5 rows x 45 columns]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ligrec = op.interactions.import_intercell_network(\n",
" interactions_params = {'license':'commercial'},\n",
" transmitter_params = {'database':'CellChatDB'},\n",
" receiver_params = {'database':'CellChatDB'},\n",
" )\n",
"ligrec.head()\n",
"\n",
"ligrec = ligrec.rename(columns={'genesymbol_intercell_source':'ligand', 'genesymbol_intercell_target':'receptor'})\n",
"ligrec = ligrec[['ligand', 'receptor', 'references'] + [col for col in ligrec.columns if col not in ['ligand', 'receptor', 'references']]]\n",
"ligrec.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This function provides a rich list of annotations, such as the modes of action,inhibition or stimulation, the curation effort, types of signalling, etc.\n",
"For a more comprehensive overview of the information that is available, please refer to the [OmniPath documentation](https://omnipathdb.org/)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Homology Mapping\n",
"\n",
"Similarly, LIANA+ provides on demand homology mapping beyond mouse symbols. It utilises the [HCOP database](https://www.genenames.org/help/hcop/) to obtain homologous genes across species. Files are downloaded from the HGNC Google Cloud Storage bucket.\n",
"\n",
"The homology mapping is accessible through the `resource` module:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:55.436432Z",
"iopub.status.busy": "2026-09-11T16:47:55.436360Z",
"iopub.status.idle": "2026-09-11T16:47:55.761346Z",
"shell.execute_reply": "2026-09-11T16:47:55.760966Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/b260-admin/Repos/liana-py/src/liana/resource/_orthology.py:19: DtypeWarning: Columns (0: human_entrez_gene) have mixed types. Specify dtype option on import or set low_memory=False.\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" source | \n",
" target | \n",
"
\n",
" \n",
" \n",
" \n",
" | 132672 | \n",
" ZYG11B | \n",
" zyg11 | \n",
"
\n",
" \n",
" | 132673 | \n",
" ZYG11B | \n",
" zyg11l | \n",
"
\n",
" \n",
" | 132674 | \n",
" ZYX | \n",
" zyx | \n",
"
\n",
" \n",
" | 132676 | \n",
" ZZEF1 | \n",
" zzef1 | \n",
"
\n",
" \n",
" | 132677 | \n",
" ZZZ3 | \n",
" zzz3 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" source target\n",
"132672 ZYG11B zyg11\n",
"132673 ZYG11B zyg11l\n",
"132674 ZYX zyx\n",
"132676 ZZEF1 zzef1\n",
"132677 ZZZ3 zzz3"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# let's say we are interested in zebrafish homologs of human genes\n",
"map_df = li.rs.get_hcop_orthologs(target_organism='zebrafish',\n",
" columns=['human_symbol', 'zebrafish_symbol'],\n",
" # NOTE: HCOP integrates multiple resource, so we can filter out mappings in at least 3 of them for confidence\n",
" min_evidence=3\n",
" )\n",
"# rename the columns to source and target, respectively for the original organism and the target organism\n",
"map_df = map_df.rename(columns={'human_symbol':'source', 'zebrafish_symbol':'target'})\n",
"map_df.tail()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now that we've obtained the homologous genes, let's convert the resource to those genes:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:55.762704Z",
"iopub.status.busy": "2026-09-11T16:47:55.762624Z",
"iopub.status.idle": "2026-09-11T16:47:56.355654Z",
"shell.execute_reply": "2026-09-11T16:47:56.354772Z"
}
},
"outputs": [],
"source": [
"zfish = li.rs.translate_resource(resource,\n",
" map_df=map_df,\n",
" columns=['ligand', 'receptor'],\n",
" replace=True,\n",
" # NOTE that we need to define the threshold of redundancies for the mapping\n",
" # in this case, we would keep mappings as long as they don't map to more than 2 zebrafish genes\n",
" one_to_many=3\n",
" )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Obtain Mouse Homologs"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:56.360503Z",
"iopub.status.busy": "2026-09-11T16:47:56.360265Z",
"iopub.status.idle": "2026-09-11T16:47:57.305782Z",
"shell.execute_reply": "2026-09-11T16:47:57.305438Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/b260-admin/Repos/liana-py/src/liana/resource/_orthology.py:19: DtypeWarning: Columns (0: human_entrez_gene) have mixed types. Specify dtype option on import or set low_memory=False.\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ligand | \n",
" receptor | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" Lgals9 | \n",
" Ptprc | \n",
"
\n",
" \n",
" | 1 | \n",
" Lgals9 | \n",
" Met | \n",
"
\n",
" \n",
" | 2 | \n",
" Lgals9 | \n",
" Cd44 | \n",
"
\n",
" \n",
" | 3 | \n",
" Lgals9 | \n",
" Lrp1 | \n",
"
\n",
" \n",
" | 4 | \n",
" Lgals9 | \n",
" Cd47 | \n",
"
\n",
" \n",
" | ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" | 4615 | \n",
" Bmp2 | \n",
" Actr2 | \n",
"
\n",
" \n",
" | 4616 | \n",
" Bmp15 | \n",
" Actr2 | \n",
"
\n",
" \n",
" | 4617 | \n",
" Csf1 | \n",
" Csf3r | \n",
"
\n",
" \n",
" | 4618 | \n",
" Il36g | \n",
" Ifnar1 | \n",
"
\n",
" \n",
" | 4619 | \n",
" Il36g | \n",
" Ifnar2 | \n",
"
\n",
" \n",
"
\n",
"
4051 rows × 2 columns
\n",
"
"
],
"text/plain": [
" ligand receptor\n",
"0 Lgals9 Ptprc\n",
"1 Lgals9 Met\n",
"2 Lgals9 Cd44\n",
"3 Lgals9 Lrp1\n",
"4 Lgals9 Cd47\n",
"... ... ...\n",
"4615 Bmp2 Actr2\n",
"4616 Bmp15 Actr2\n",
"4617 Csf1 Csf3r\n",
"4618 Il36g Ifnar1\n",
"4619 Il36g Ifnar2\n",
"\n",
"[4051 rows x 2 columns]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"map_df = li.rs.get_hcop_orthologs(target_organism='mouse',\n",
" columns=['human_symbol', 'mouse_symbol'],\n",
" # NOTE: HCOP integrates multiple resource, so we can filter out mappings in at least 3 of them for confidence\n",
" min_evidence=3\n",
" )\n",
"# rename the columns to source and target, respectively for the original organism and the target organism\n",
"map_df = map_df.rename(columns={'human_symbol':'source', 'mouse_symbol':'target'})\n",
"\n",
"# We will then translate\n",
"mouse = li.rs.translate_resource(resource,\n",
" map_df=map_df,\n",
" columns=['ligand', 'receptor'],\n",
" replace=True,\n",
" # Here, we will be harsher and only keep mappings that don't map to more than 1 mouse gene\n",
" one_to_many=1\n",
" )\n",
"mouse"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you use HCOP function, please reference the original HCOP papers:\n",
"- Eyre, T.A., Wright, M.W., Lush, M.J. and Bruford, E.A., 2007. HCOP: a searchable database of human orthology predictions. Briefings in bioinformatics, 8(1), pp.2-5.\n",
"- Yates, B., Gray, K.A., Jones, T.E. and Bruford, E.A., 2021. Updates to HCOP: the HGNC comparison of orthology predictions tool. Briefings in Bioinformatics, 22(6), p.bbab155."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"All methods of LIANA+ accept a ``resource`` parameter that can be used to pass any custom resource, beyond such from homology conversion.\n",
"\n",
"
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Annotating Ligand-Receptors\n",
"\n",
"In addition to ligand-receptors, we can also obtain other annotations via [OmniPath](https://github.com/saezlab/omnipath). While these can be tissue locations, TF regulons, cytokine signatures, or other types of annotations, the most common use case is to obtain the pathways that are associated with each ligand-receptor interaction.\n",
"\n",
"### Pathway Annotations\n",
"\n",
"We use commonly [PROGENy](https://www.nature.com/articles/s41467-017-02391-6) pathway weights to assign interactions to certain canonical pathways, such that all members of the interactions (i.e. incl. complex subunits) are present in the same pathway with the same weight sign. This is done to ensure that the interaction is not only present in the same pathway, but also that it is likely to be active in the same direction."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:47:57.307180Z",
"iopub.status.busy": "2026-09-11T16:47:57.307104Z",
"iopub.status.idle": "2026-09-11T16:48:00.233276Z",
"shell.execute_reply": "2026-09-11T16:48:00.232923Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" source | \n",
" target | \n",
" weight | \n",
" padj | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" Androgen | \n",
" TMPRSS2 | \n",
" 11.490631 | \n",
" 2.384806e-47 | \n",
"
\n",
" \n",
" | 1 | \n",
" Androgen | \n",
" NKX3-1 | \n",
" 10.622551 | \n",
" 2.205102e-44 | \n",
"
\n",
" \n",
" | 2 | \n",
" Androgen | \n",
" MBOAT2 | \n",
" 10.472733 | \n",
" 4.632376e-44 | \n",
"
\n",
" \n",
" | 3 | \n",
" Androgen | \n",
" KLK2 | \n",
" 10.176186 | \n",
" 1.944410e-40 | \n",
"
\n",
" \n",
" | 4 | \n",
" Androgen | \n",
" SARG | \n",
" 11.386852 | \n",
" 2.790210e-40 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" source target weight padj\n",
"0 Androgen TMPRSS2 11.490631 2.384806e-47\n",
"1 Androgen NKX3-1 10.622551 2.205102e-44\n",
"2 Androgen MBOAT2 10.472733 4.632376e-44\n",
"3 Androgen KLK2 10.176186 1.944410e-40\n",
"4 Androgen SARG 11.386852 2.790210e-40"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# load PROGENy pathways, we use decoupler as a proxy as it formats the data in a more convenient way\n",
"progeny = dc.op.progeny(top=2500)\n",
"progeny.head()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:00.234564Z",
"iopub.status.busy": "2026-09-11T16:48:00.234492Z",
"iopub.status.idle": "2026-09-11T16:48:00.253708Z",
"shell.execute_reply": "2026-09-11T16:48:00.253502Z"
}
},
"outputs": [],
"source": [
"# load full list of ligand-receptor pairs\n",
"lr_pairs = li.rs.select_resource('consensus')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then we use the `generate_lr_geneset` function from liana to assign the interactions to pathways. This function takes the ligand-receptor interactions and the pathway annotations, and returns a dataframe with annotated interactions."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:00.255081Z",
"iopub.status.busy": "2026-09-11T16:48:00.255013Z",
"iopub.status.idle": "2026-09-11T16:48:00.669072Z",
"shell.execute_reply": "2026-09-11T16:48:00.668784Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" source | \n",
" interaction | \n",
" weight | \n",
"
\n",
" \n",
" \n",
" \n",
" | 4 | \n",
" JAK-STAT | \n",
" LGALS9^CD47 | \n",
" 2.054778 | \n",
"
\n",
" \n",
" | 15 | \n",
" JAK-STAT | \n",
" LGALS9^HAVCR2 | \n",
" 1.487678 | \n",
"
\n",
" \n",
" | 34 | \n",
" EGFR | \n",
" ADAM10^TSPAN12 | \n",
" -1.275034 | \n",
"
\n",
" \n",
" | 57 | \n",
" VEGF | \n",
" TNFSF11^TNFRSF11A | \n",
" 2.571622 | \n",
"
\n",
" \n",
" | 98 | \n",
" JAK-STAT | \n",
" TNFSF13^TNFRSF1A | \n",
" 0.788753 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" source interaction weight\n",
"4 JAK-STAT LGALS9^CD47 2.054778\n",
"15 JAK-STAT LGALS9^HAVCR2 1.487678\n",
"34 EGFR ADAM10^TSPAN12 -1.275034\n",
"57 VEGF TNFSF11^TNFRSF11A 2.571622\n",
"98 JAK-STAT TNFSF13^TNFRSF1A 0.788753"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# generate ligand-receptor geneset\n",
"lr_progeny = li.rs.generate_lr_geneset(lr_pairs, progeny, lr_sep=\"^\")\n",
"lr_progeny.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can additionally performed enrichment analysis of certain ligand-receptor scores using this newly-generated dataframe. For example, see the [application with Tensor-cell2cell](https://liana-py.readthedocs.io/en/latest/notebooks/liana_c2c.html#Downstream-Analysis)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Disease Annotations\n",
"As another example, we can also annotate ligand-receptors to diseases in which both the ligand and the receptor are involved."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:00.670582Z",
"iopub.status.busy": "2026-09-11T16:48:00.670499Z",
"iopub.status.idle": "2026-09-11T16:48:00.977909Z",
"shell.execute_reply": "2026-09-11T16:48:00.977662Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading annotations for all proteins from the following resources: `['DisGeNet']`\n"
]
}
],
"source": [
"diseases = op.requests.Annotations.get(\n",
" resources = ['DisGeNet']\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:00.979341Z",
"iopub.status.busy": "2026-09-11T16:48:00.979270Z",
"iopub.status.idle": "2026-09-11T16:48:06.150277Z",
"shell.execute_reply": "2026-09-11T16:48:06.149973Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" disease | \n",
" interaction | \n",
"
\n",
" \n",
" \n",
" \n",
" | 151306 | \n",
" Hereditary Diffuse Gastric Cancer | \n",
" ACE^AGTR2 | \n",
"
\n",
" \n",
" | 151322 | \n",
" Hypertensive disease | \n",
" ACE^AGTR2 | \n",
"
\n",
" \n",
" | 151428 | \n",
" Left Ventricular Hypertrophy | \n",
" ACE^AGTR2 | \n",
"
\n",
" \n",
" | 151595 | \n",
" Malignant neoplasm of stomach | \n",
" ACE^AGTR2 | \n",
"
\n",
" \n",
" | 151660 | \n",
" Neoplasm Metastasis | \n",
" ACE^AGTR2 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" disease interaction\n",
"151306 Hereditary Diffuse Gastric Cancer ACE^AGTR2\n",
"151322 Hypertensive disease ACE^AGTR2\n",
"151428 Left Ventricular Hypertrophy ACE^AGTR2\n",
"151595 Malignant neoplasm of stomach ACE^AGTR2\n",
"151660 Neoplasm Metastasis ACE^AGTR2"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"diseases = diseases[['genesymbol', 'label', 'value']]\n",
"diseases = diseases.pivot_table(index='genesymbol',\n",
" columns='label', values='value',\n",
" aggfunc=lambda x: '; '.join(x)).reset_index()\n",
"diseases = diseases[['genesymbol', 'disease']]\n",
"diseases['disease'] = diseases['disease'].str.split('; ')\n",
"diseases = diseases.explode('disease')\n",
"lr_diseases = li.rs.generate_lr_geneset(lr_pairs, diseases, source='disease', target='genesymbol', weight=None, lr_sep=\"^\")\n",
"lr_diseases.sort_values(\"interaction\").head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's check some protein of interest:"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:06.151536Z",
"iopub.status.busy": "2026-09-11T16:48:06.151467Z",
"iopub.status.idle": "2026-09-11T16:48:06.154588Z",
"shell.execute_reply": "2026-09-11T16:48:06.154397Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" disease | \n",
" interaction | \n",
"
\n",
" \n",
" \n",
" \n",
" | 835550 | \n",
" Cerebral Hemorrhage | \n",
" SPP1^ITGAV_ITGB3 | \n",
"
\n",
" \n",
" | 836215 | \n",
" Acute Kidney Insufficiency | \n",
" SPP1^CD44 | \n",
"
\n",
" \n",
" | 836250 | \n",
" Acute kidney injury | \n",
" SPP1^CD44 | \n",
"
\n",
" \n",
" | 837721 | \n",
" Kidney Failure, Acute | \n",
" SPP1^CD44 | \n",
"
\n",
" \n",
" | 838129 | \n",
" Mammary Neoplasms, Experimental | \n",
" SPP1^CD44 | \n",
"
\n",
" \n",
" | 838254 | \n",
" Neoplasm Metastasis | \n",
" SPP1^CD44 | \n",
"
\n",
" \n",
" | 1498508 | \n",
" Mammary Neoplasms, Experimental | \n",
" SPP1^S1PR1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" disease interaction\n",
"835550 Cerebral Hemorrhage SPP1^ITGAV_ITGB3\n",
"836215 Acute Kidney Insufficiency SPP1^CD44\n",
"836250 Acute kidney injury SPP1^CD44\n",
"837721 Kidney Failure, Acute SPP1^CD44\n",
"838129 Mammary Neoplasms, Experimental SPP1^CD44\n",
"838254 Neoplasm Metastasis SPP1^CD44\n",
"1498508 Mammary Neoplasms, Experimental SPP1^S1PR1"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lr_diseases[lr_diseases['interaction'].str.contains('SPP1')]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Following similar procedures, one may annotate ligand-receptors to any of the annotations available via OmniPath.\n",
"\n",
"See `op.requests.Annotations.resources()`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Intracellular Signaling\n",
"\n",
"While we can obtain the pathways that are associated with each ligand-receptor interaction, we can also obtain the intracellular signaling pathways that are activated in response to the interaction. This is again done using the `omnipath` client package, but this time in combination with [decoupler](https://decoupler-py.readthedocs.io/en/latest/), which enables the enrichment of pathways, transcription factors, and other annotations.\n",
"\n",
"One specific scenario, heavily reliant on OmniPath knowledge and enrichment analysis with decoupler is presented in the [Differential Analysis Vignette](https://liana-py.readthedocs.io/en/latest/notebooks/targeted.html).\n",
"\n",
"There, to find putative causal networks between deregulated CCC interactions and transcription factors (TFs) we use:\n",
"\n",
"### 1) a protein-protein interaction network"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:06.155790Z",
"iopub.status.busy": "2026-09-11T16:48:06.155730Z",
"iopub.status.idle": "2026-09-11T16:48:06.879573Z",
"shell.execute_reply": "2026-09-11T16:48:06.879244Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" source | \n",
" target | \n",
" source_genesymbol | \n",
" target_genesymbol | \n",
" is_directed | \n",
" is_stimulation | \n",
" is_inhibition | \n",
" consensus_direction | \n",
" consensus_stimulation | \n",
" consensus_inhibition | \n",
" curation_effort | \n",
" references | \n",
" sources | \n",
" n_sources | \n",
" n_primary_sources | \n",
" n_references | \n",
" references_stripped | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" P0DP23 | \n",
" P48995 | \n",
" CALM1 | \n",
" TRPC1 | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" True | \n",
" 3 | \n",
" TRIP:11290752;TRIP:11983166;TRIP:12601176 | \n",
" TRIP | \n",
" 1 | \n",
" 1 | \n",
" 3 | \n",
" 11290752;11983166;12601176 | \n",
"
\n",
" \n",
" | 1 | \n",
" P0DP25 | \n",
" P48995 | \n",
" CALM3 | \n",
" TRPC1 | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" True | \n",
" 3 | \n",
" TRIP:11290752;TRIP:11983166;TRIP:12601176 | \n",
" TRIP | \n",
" 1 | \n",
" 1 | \n",
" 3 | \n",
" 11290752;11983166;12601176 | \n",
"
\n",
" \n",
" | 2 | \n",
" P0DP24 | \n",
" P48995 | \n",
" CALM2 | \n",
" TRPC1 | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" True | \n",
" 3 | \n",
" TRIP:11290752;TRIP:11983166;TRIP:12601176 | \n",
" TRIP | \n",
" 1 | \n",
" 1 | \n",
" 3 | \n",
" 11290752;11983166;12601176 | \n",
"
\n",
" \n",
" | 3 | \n",
" Q03135 | \n",
" P48995 | \n",
" CAV1 | \n",
" TRPC1 | \n",
" True | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" 13 | \n",
" DIP:19897728;HPRD:12732636;IntAct:19897728;Lit... | \n",
" DIP;HPRD;IntAct;Lit-BM-17;TRIP | \n",
" 5 | \n",
" 5 | \n",
" 8 | \n",
" 10980191;12732636;14551243;16822931;18430726;1... | \n",
"
\n",
" \n",
" | 4 | \n",
" P14416 | \n",
" P48995 | \n",
" DRD2 | \n",
" TRPC1 | \n",
" True | \n",
" True | \n",
" False | \n",
" True | \n",
" True | \n",
" False | \n",
" 1 | \n",
" TRIP:18261457 | \n",
" TRIP | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 18261457 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" source target source_genesymbol target_genesymbol is_directed \\\n",
"0 P0DP23 P48995 CALM1 TRPC1 True \n",
"1 P0DP25 P48995 CALM3 TRPC1 True \n",
"2 P0DP24 P48995 CALM2 TRPC1 True \n",
"3 Q03135 P48995 CAV1 TRPC1 True \n",
"4 P14416 P48995 DRD2 TRPC1 True \n",
"\n",
" is_stimulation is_inhibition consensus_direction consensus_stimulation \\\n",
"0 False True True False \n",
"1 False True True False \n",
"2 False True True False \n",
"3 True False True True \n",
"4 True False True True \n",
"\n",
" consensus_inhibition curation_effort \\\n",
"0 True 3 \n",
"1 True 3 \n",
"2 True 3 \n",
"3 False 13 \n",
"4 False 1 \n",
"\n",
" references \\\n",
"0 TRIP:11290752;TRIP:11983166;TRIP:12601176 \n",
"1 TRIP:11290752;TRIP:11983166;TRIP:12601176 \n",
"2 TRIP:11290752;TRIP:11983166;TRIP:12601176 \n",
"3 DIP:19897728;HPRD:12732636;IntAct:19897728;Lit... \n",
"4 TRIP:18261457 \n",
"\n",
" sources n_sources n_primary_sources n_references \\\n",
"0 TRIP 1 1 3 \n",
"1 TRIP 1 1 3 \n",
"2 TRIP 1 1 3 \n",
"3 DIP;HPRD;IntAct;Lit-BM-17;TRIP 5 5 8 \n",
"4 TRIP 1 1 1 \n",
"\n",
" references_stripped \n",
"0 11290752;11983166;12601176 \n",
"1 11290752;11983166;12601176 \n",
"2 11290752;11983166;12601176 \n",
"3 10980191;12732636;14551243;16822931;18430726;1... \n",
"4 18261457 "
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ppis = op.interactions.OmniPath().get(genesymbols = True)\n",
"ppis.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 2) Transcription Factor Regulons\n",
"Provided via the [CollecTRI](https://academic.oup.com/nar/article/51/20/10934/7318114?login=false) resource:"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:06.880959Z",
"iopub.status.busy": "2026-09-11T16:48:06.880881Z",
"iopub.status.idle": "2026-09-11T16:48:07.497187Z",
"shell.execute_reply": "2026-09-11T16:48:07.496853Z"
}
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" source | \n",
" target | \n",
" weight | \n",
" resources | \n",
" references | \n",
" sign_decision | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" MYC | \n",
" TERT | \n",
" 1.0 | \n",
" DoRothEA-A;ExTRI;HTRI;NTNU.Curated;Pavlidis202... | \n",
" 10022128;10491298;10606235;10637317;10723141;1... | \n",
" PMID | \n",
"
\n",
" \n",
" | 1 | \n",
" SPI1 | \n",
" BGLAP | \n",
" 1.0 | \n",
" ExTRI | \n",
" 10022617 | \n",
" default activation | \n",
"
\n",
" \n",
" | 2 | \n",
" SMAD3 | \n",
" JUN | \n",
" 1.0 | \n",
" ExTRI;NTNU.Curated;TFactS;TRRUST | \n",
" 10022869;12374795 | \n",
" PMID | \n",
"
\n",
" \n",
" | 3 | \n",
" SMAD4 | \n",
" JUN | \n",
" 1.0 | \n",
" ExTRI;NTNU.Curated;TFactS;TRRUST | \n",
" 10022869;12374795 | \n",
" PMID | \n",
"
\n",
" \n",
" | 4 | \n",
" STAT5A | \n",
" IL2 | \n",
" 1.0 | \n",
" ExTRI | \n",
" 10022878;11435608;17182565;17911616;22854263;2... | \n",
" default activation | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" source target weight resources \\\n",
"0 MYC TERT 1.0 DoRothEA-A;ExTRI;HTRI;NTNU.Curated;Pavlidis202... \n",
"1 SPI1 BGLAP 1.0 ExTRI \n",
"2 SMAD3 JUN 1.0 ExTRI;NTNU.Curated;TFactS;TRRUST \n",
"3 SMAD4 JUN 1.0 ExTRI;NTNU.Curated;TFactS;TRRUST \n",
"4 STAT5A IL2 1.0 ExTRI \n",
"\n",
" references sign_decision \n",
"0 10022128;10491298;10606235;10637317;10723141;1... PMID \n",
"1 10022617 default activation \n",
"2 10022869;12374795 PMID \n",
"3 10022869;12374795 PMID \n",
"4 10022878;11435608;17182565;17911616;22854263;2... default activation "
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dc.op.collectri(organism='human', remove_complexes=False, license='academic', verbose=False).head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"These are then linked using the a modification of the ILP problem proposed in [CARNIVAL](https://www.nature.com/articles/s41540-019-0118-z), solved using [CORNETO](https://github.com/saezlab/corneto) - a Unified Omics-Driven Framework for Network Inference."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Metabolite-Receptor Interactions\n",
"\n",
"Via LIANA+ we also provide access to the [MetalinksDB knowledge graph - a customisable database](https://github.com/biocypher/metalinks) of metabolite-receptor interactions, part of the [BioCypher](https://biocypher.org/) ecosystem. For more information please refer to [Farr et al, 2023](https://www.biorxiv.org/content/10.1101/2023.12.30.573715v1.abstract).\n",
"\n",
"Specifically, to enable light-weight access, we have converted the MetalinksDB knowledge graph into a database.\n",
"\n",
"This database is queried using `sqllite3` and we provide basic queries to customize according to the user's needs - e.g. disease, pathway, location."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can check first the values within different tables of the database:"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:07.498641Z",
"iopub.status.busy": "2026-09-11T16:48:07.498569Z",
"iopub.status.idle": "2026-09-11T16:48:07.510959Z",
"shell.execute_reply": "2026-09-11T16:48:07.510742Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Retrieving database...\n"
]
},
{
"data": {
"text/plain": [
"['Molybdenum cofactor deficiency',\n",
" 'Metastatic melanoma',\n",
" 'Schizophrenia',\n",
" 'Anoxia',\n",
" 'Colorectal cancer']"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"li.rs.get_metalinks_values(table_name='disease', column_name='disease')[0:5]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then we can obtain metabolite-receptor interactions, the metabolites of which have been reported to be associated with certain locations or diseases:"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:07.512271Z",
"iopub.status.busy": "2026-09-11T16:48:07.512201Z",
"iopub.status.idle": "2026-09-11T16:48:07.529300Z",
"shell.execute_reply": "2026-09-11T16:48:07.529097Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Retrieving database...\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" hmdb | \n",
" uniprot | \n",
" gene_symbol | \n",
" metabolite | \n",
" mor | \n",
" transport_direction | \n",
" type | \n",
" source | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" HMDB0000234 | \n",
" P10275 | \n",
" AR | \n",
" Testosterone | \n",
" -1 | \n",
" None | \n",
" lr | \n",
" CellPhoneDB | \n",
"
\n",
" \n",
" | 1 | \n",
" HMDB0000234 | \n",
" P10275 | \n",
" AR | \n",
" Testosterone | \n",
" 0 | \n",
" None | \n",
" lr | \n",
" CellPhoneDB | \n",
"
\n",
" \n",
" | 2 | \n",
" HMDB0000234 | \n",
" P10275 | \n",
" AR | \n",
" Testosterone | \n",
" 1 | \n",
" None | \n",
" lr | \n",
" CellPhoneDB | \n",
"
\n",
" \n",
" | 3 | \n",
" HMDB0000073 | \n",
" A5X5Y0 | \n",
" HTR3E | \n",
" Dopamine | \n",
" 1 | \n",
" None | \n",
" lr | \n",
" CellPhoneDB | \n",
"
\n",
" \n",
" | 4 | \n",
" HMDB0000073 | \n",
" O95264 | \n",
" HTR3B | \n",
" Dopamine | \n",
" 1 | \n",
" None | \n",
" lr | \n",
" CellPhoneDB | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" hmdb uniprot gene_symbol metabolite mor transport_direction \\\n",
"0 HMDB0000234 P10275 AR Testosterone -1 None \n",
"1 HMDB0000234 P10275 AR Testosterone 0 None \n",
"2 HMDB0000234 P10275 AR Testosterone 1 None \n",
"3 HMDB0000073 A5X5Y0 HTR3E Dopamine 1 None \n",
"4 HMDB0000073 O95264 HTR3B Dopamine 1 None \n",
"\n",
" type source \n",
"0 lr CellPhoneDB \n",
"1 lr CellPhoneDB \n",
"2 lr CellPhoneDB \n",
"3 lr CellPhoneDB \n",
"4 lr CellPhoneDB "
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"li.rs.get_metalinks(source=['Stich', 'CellPhoneDB', 'NeuronChat'],\n",
" tissue_location='Brain',\n",
" biospecimen_location='Cerebrospinal Fluid (CSF)',\n",
" disease='Schizophrenia',\n",
" ).head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This database contains both ligand-receptor (lr) and production-degradation (pd) metabolite-protein interactions - note `type`. It can further be filtered according to the user's needs, and can be queried as any other standard RDBMS.\n",
"\n",
"For such cases, we also provide a utility function to print the database schema:"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"execution": {
"iopub.execute_input": "2026-09-11T16:48:07.530601Z",
"iopub.status.busy": "2026-09-11T16:48:07.530535Z",
"iopub.status.idle": "2026-09-11T16:48:07.539154Z",
"shell.execute_reply": "2026-09-11T16:48:07.538926Z"
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Retrieving database...\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Schema of table: metabolites\n",
"============================\n",
"Column ID: 0, Name: hmdb, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: metabolite, Type: TEXT, Primary Key: 0\n",
"Column ID: 2, Name: pubchem, Type: TEXT, Primary Key: 0\n",
"Column ID: 3, Name: metabolite_subclass, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"Schema of table: proteins\n",
"=========================\n",
"Column ID: 0, Name: uniprot, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: gene_symbol, Type: TEXT, Primary Key: 0\n",
"Column ID: 2, Name: protein_type, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"Schema of table: edges\n",
"======================\n",
"Column ID: 0, Name: hmdb, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: uniprot, Type: TEXT, Primary Key: 0\n",
"Column ID: 2, Name: source, Type: TEXT, Primary Key: 0\n",
"Column ID: 3, Name: db_score, Type: REAL, Primary Key: 0\n",
"Column ID: 4, Name: experiment_score, Type: REAL, Primary Key: 0\n",
"Column ID: 5, Name: combined_score, Type: REAL, Primary Key: 0\n",
"Column ID: 6, Name: mor, Type: INTEGER, Primary Key: 0\n",
"Column ID: 7, Name: type, Type: TEXT, Primary Key: 0\n",
"Column ID: 8, Name: transport_direction, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"Schema of table: cell_location\n",
"==============================\n",
"Column ID: 0, Name: hmdb, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: cell_location, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"Schema of table: tissue_location\n",
"================================\n",
"Column ID: 0, Name: hmdb, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: tissue_location, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"Schema of table: biospecimen_location\n",
"=====================================\n",
"Column ID: 0, Name: hmdb, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: biospecimen_location, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"Schema of table: disease\n",
"========================\n",
"Column ID: 0, Name: hmdb, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: disease, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"Schema of table: pathway\n",
"========================\n",
"Column ID: 0, Name: hmdb, Type: TEXT, Primary Key: 0\n",
"Column ID: 1, Name: pathway, Type: TEXT, Primary Key: 0\n",
"\n",
"No Foreign Keys.\n",
"----------------------------------------\n",
"\n"
]
}
],
"source": [
"li.rs.describe_metalinks()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}