--- title: "Intercellular Communication Analysis with OmnipathR" author: - name: Zaoqu Liu email: liuzaoqu@163.com affiliation: Department of Interventional Radiology, The First Affiliated Hospital of Zhengzhou University - name: Dénes Türei email: turei.denes@gmail.com - name: Julio Saez-Rodriguez affiliation: Institute for Computational Biomedicine, Heidelberg University package: OmnipathR output: bookdown::html_document2: base_format: rmarkdown::html_vignette toc: true toc_depth: 3 number_sections: true fig_caption: true fig_width: 9 fig_height: 7 pkgdown: as_is: true vignette: | %\VignetteIndexEntry{Intercellular Communication Analysis with OmnipathR} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = TRUE, message = FALSE, warning = FALSE, fig.align = "center", collapse = TRUE, comment = "#>" ) ``` # Introduction Cell-cell communication is fundamental to multicellular organism function, coordinating processes from development to immune response. **OmnipathR** provides comprehensive access to ligand-receptor interactions and intercellular communication annotations, enabling systematic analysis of cellular crosstalk. ## Biological Context Intercellular signaling involves: 1. **Ligands**: Secreted or membrane-bound signaling molecules 2. **Receptors**: Cell surface proteins that receive signals 3. **Downstream signaling**: Intracellular cascades triggered by receptor activation ``` ┌─────────────────┐ ┌─────────────────┐ │ Sender Cell │ │ Receiver Cell │ │ │ │ │ │ ┌───────────┐ │ Ligand │ ┌───────────┐ │ │ │ Ligand │──┼───────────────────►│ │ Receptor │ │ │ │ Gene │ │ │ │ │ │ │ └───────────┘ │ │ └─────┬─────┘ │ │ │ │ │ │ │ │ │ ▼ │ │ │ │ ┌───────────┐ │ │ │ │ │ Signaling │ │ │ │ │ │ Cascade │ │ │ │ │ └───────────┘ │ └─────────────────┘ └─────────────────┘ ``` # Setup ```{r load-packages} library(OmnipathR) library(dplyr) library(tidyr) library(ggplot2) ``` # Intercellular Communication Database ## Overview of Intercell Categories OmnipathR organizes intercellular communication roles into a hierarchical system: ```{r intercell-categories} # Get all intercell categories categories <- intercell_categories() # View category summary cat("Total categories:", length(categories), "\n") # Show main categories cat("\nSample categories:\n") head(categories, 20) ``` ## Category Types | Category | Description | Examples | |----------|-------------|----------| | **Ligand** | Secreted signaling molecules | Cytokines, growth factors | | **Receptor** | Signal-receiving proteins | RTKs, GPCRs | | **ECM** | Extracellular matrix components | Collagens, laminins | | **Adhesion** | Cell adhesion molecules | Integrins, cadherins | | **Transporter** | Membrane transporters | Ion channels, ABC transporters | # Retrieving Intercell Data ## Basic Intercell Annotations ```{r intercell-basic} # Get intercell annotations intercell_data <- intercell() cat("Total intercell records:", nrow(intercell_data), "\n") # Summary of categories category_counts <- intercell_data %>% count(category, sort = TRUE) head(category_counts, 15) ``` ## Category Distribution Visualization ```{r category-dist, fig.cap="Distribution of proteins across major intercellular communication categories."} # Visualize top categories top_categories <- category_counts %>% head(12) ggplot(top_categories, aes(x = reorder(category, n), y = n, fill = category)) + geom_col(alpha = 0.8) + coord_flip() + scale_fill_viridis_d(guide = "none") + labs( title = "Intercellular Communication Categories", subtitle = "Number of annotated proteins per category", x = "Category", y = "Number of Proteins" ) + theme_minimal() + theme( plot.title = element_text(face = "bold", size = 14), axis.text.y = element_text(size = 9) ) ``` # Ligand-Receptor Interactions ## Curated Ligand-Receptor Database ```{r ligrec-curated} # Get curated ligand-receptor interactions lr_interactions <- tryCatch( curated_ligand_receptor_interactions(), error = function(e) { message("Note: Unable to fetch data from OmniPath server: ", e$message) # Return sample data structure for demonstration data.frame( source_genesymbol = c("TGFB1", "WNT3A", "FGF2", "EGF", "VEGFA"), target_genesymbol = c("TGFBR1", "FZD1", "FGFR1", "EGFR", "KDR"), sources = rep("CellPhoneDB", 5) ) } ) cat("Total L-R pairs:", nrow(lr_interactions), "\n") # View example interactions lr_interactions %>% select(source_genesymbol, target_genesymbol, sources) %>% head(10) ``` ## Ligand-Receptor Network Statistics ```{r lr-stats, fig.cap="Top ligands and receptors by number of interaction partners in the curated database."} # Count interactions per ligand ligand_counts <- lr_interactions %>% count(source_genesymbol, name = "n_receptors", sort = TRUE) %>% head(15) %>% mutate(type = "Ligand") # Count interactions per receptor receptor_counts <- lr_interactions %>% count(target_genesymbol, name = "n_ligands", sort = TRUE) %>% head(15) %>% mutate(type = "Receptor") # Combine for visualization combined_counts <- bind_rows( ligand_counts %>% rename(gene = source_genesymbol, count = n_receptors), receptor_counts %>% rename(gene = target_genesymbol, count = n_ligands) ) ggplot(combined_counts, aes(x = reorder(gene, count), y = count, fill = type)) + geom_col(alpha = 0.8) + coord_flip() + facet_wrap(~type, scales = "free_y") + scale_fill_manual(values = c("Ligand" = "#E74C3C", "Receptor" = "#3498DB")) + labs( title = "Top Ligands and Receptors", subtitle = "Ranked by number of interaction partners", x = "Gene", y = "Number of Partners" ) + theme_minimal() + theme( plot.title = element_text(face = "bold"), legend.position = "none", strip.text = element_text(face = "bold") ) ``` # Analysis Workflows ## Ligand Classification ```{r ligand-analysis} # Get all ligands ligands <- intercell_data %>% filter(category == "ligand" | grepl("ligand", category)) %>% pull(genesymbol) %>% unique() cat("Total ligands:", length(ligands), "\n") # Show sample ligands head(ligands, 20) ``` ## Receptor Classification ```{r receptor-analysis, fig.cap="Classification of receptors by subcategory showing the diversity of receptor types in the database."} # Get receptor annotations receptors <- intercell_data %>% filter(grepl("receptor", category, ignore.case = TRUE)) # Classify receptors by category receptor_types <- receptors %>% count(category, sort = TRUE) %>% head(10) ggplot(receptor_types, aes(x = reorder(category, n), y = n, fill = category)) + geom_col(alpha = 0.8) + coord_flip() + scale_fill_viridis_d(guide = "none") + labs( title = "Receptor Classification", subtitle = "Distribution across receptor subcategories", x = "Receptor Category", y = "Number of Proteins" ) + theme_minimal() + theme( plot.title = element_text(face = "bold"), axis.text.y = element_text(size = 9) ) ``` # Resource Comparison ```{r resource-comparison, fig.cap="Comparison of ligand-receptor interaction coverage across different resources integrated in OmniPath."} # Analyze resources contributing to L-R interactions if("sources" %in% colnames(lr_interactions)) { resource_counts <- lr_interactions %>% separate_rows(sources, sep = ";") %>% count(sources, sort = TRUE) %>% head(12) ggplot(resource_counts, aes(x = reorder(sources, n), y = n)) + geom_col(fill = "#007B7F", alpha = 0.8) + coord_flip() + labs( title = "Ligand-Receptor Resources", subtitle = "Number of interactions per resource", x = "Resource", y = "Interactions" ) + theme_minimal() + theme(plot.title = element_text(face = "bold")) } ``` # Session Information ```{r session-info} sessionInfo() ``` # References 1. Türei D, et al. Integrated intra- and intercellular signaling knowledge for multicellular omics analysis. *Molecular Systems Biology* 2021;17:e9923. 2. Efremova M, et al. CellPhoneDB: inferring cell–cell communication from combined expression of multi-subunit ligand–receptor complexes. *Nature Protocols* 2020;15:1484-1506. 3. Ramilowski JA, et al. A draft network of ligand–receptor-mediated multicellular signalling in human. *Nature Communications* 2015;6:7866.