Package: COMMOTR 1.0.0

COMMOTR: Screening Cell-Cell Communication in Spatial Transcriptomics via Collective Optimal Transport

Infers cell-cell communication in spatial transcriptomics data using collective optimal transport. The method models ligand-receptor interactions as optimal transport problems with spatial distance constraints, providing communication direction inference, cluster-level analysis, and comprehensive visualization. This is an R implementation based on the COMMOT algorithm (Cang et al., Nature Methods, 2023).

Authors:Zaoqu Liu [aut, cre], Zixian Cang [ctb]

COMMOTR_1.0.0.tar.gz
COMMOTR_1.0.0.zip(r-4.7-x86_64)COMMOTR_1.0.0.zip(r-4.7-arm64)COMMOTR_1.0.0.zip(r-4.6-x86_64)COMMOTR_1.0.0.zip(r-4.6-arm64)
COMMOTR_1.0.0.tgz(r-4.6-x86_64)COMMOTR_1.0.0.tgz(r-4.6-arm64)
COMMOTR_1.0.0.tar.gz(r-4.7-arm64)COMMOTR_1.0.0.tar.gz(r-4.7-x86_64)COMMOTR_1.0.0.tar.gz(r-4.6-arm64)COMMOTR_1.0.0.tar.gz(r-4.6-x86_64)
COMMOTR_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
COMMOTR/json (API)

# Install 'COMMOTR' in R:
install.packages('COMMOTR', repos = c('https://zaoqu-liu.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/zaoqu-liu/commotr/issues

Pkgdown/docs site:https://zaoqu-liu.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

openblascppopenmp

3.30 score 1 stars 4 scripts 40 exports 143 dependencies

Last updated from:d201e54493 (on main). Checks:10 ERROR, 2 OK, 3 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64ERROR169
linux-devel-x86_64ERROR202
source / vignettesOK268
linux-release-arm64ERROR162
linux-release-x86_64ERROR188
macos-release-arm64ERROR105
macos-release-x86_64ERROR242
macos-oldrel-arm64FAIL118
macos-oldrel-x86_64FAIL240
windows-devel-arm64ERROR262
windows-devel-x86_64ERROR185
windows-release-arm64ERROR261
windows-release-x86_64ERROR152
windows-oldrel-x86_64FAIL82
wasm-releaseOK171

Exports:binarize_sparse_matrixcluster_communicationcluster_communication_spatial_permutationcluster_positioncommunication_deg_clusteringcommunication_deg_detectioncommunication_directioncommunication_impactcommunication_spatial_autocorrelationd_graph_global_structured_graph_local_jaccardd_graph_local_jaccard_weightedfilter_lr_databaseget_communication_matrixget_communication_resultsget_sender_receiver_dfgroup_cell_communicationgroup_cluster_communicationgroup_communication_directionheat_kernel_embeddingleiden_clusteringligand_receptor_databasemoranI_vector_globalpartial_corrplot_cell_communicationplot_chord_diagramplot_cluster_communicationplot_communication_degplot_communication_dotplotplot_communication_groupsplot_communication_heatmapplot_communication_impactplot_spatial_autocorrelationsemipartial_corrspatial_communicationspectral_embeddingtreebased_scoretreebased_score_multifeaturewasserstein_barycenterwasserstein_barycenter_balanced

Dependencies:abindaskpassbase64encBHbitopsbslibcachemcaToolscliclustercodetoolscommonmarkcowplotcpp11crosstalkcurldata.tabledeldirdigestdotCall64dplyrdqrngevaluatefarverfastDummiesfastmapfitdistrplusFNNfontawesomefsfuturefuture.applygenericsggplot2ggrepelggridgesglobalsgluegoftestgplotsgridExtragtablegtoolsherehighrhtmltoolshtmlwidgetshttpuvhttricaigraphirlbaisobandjquerylibjsonliteKernSmoothknitrlabelinglaterlatticelazyevallifecyclelistenvlmtestmagrittrMASSMatrixmatrixStatsmemoisemimeminiUInlmeopensslotelparallellypatchworkpbapplypillarpkgconfigplotlyplyrpngpolyclipprogressrpromisespurrrR6RANNrappdirsRColorBrewerRcppRcppAnnoyRcppArmadilloRcppEigenRcppHNSWRcppProgressRcppThreadRcppTOMLreshape2reticulaterlangrmarkdownROCRrprojrootRSpectraRtsneS7sassscalesscattermoresctransformSeuratSeuratObjectshinysitmosourcetoolsspspamspatstat.dataspatstat.explorespatstat.geomspatstat.randomspatstat.sparsespatstat.univarspatstat.utilsstringistringrsurvivalsystensortibbletidyrtidyselecttinytexutf8uwotvctrsviridisLitewithrxfunxtableyamlzoo

COMMOTR: Algorithm Theory and Mathematical Foundation
Introduction | The Cell-Cell Communication Problem | Traditional Approaches | The Optimal Transport Formulation | Mathematical Formulation | Classical Optimal Transport (Kantorovich Problem) | Entropy-Regularized OT | Unbalanced Optimal Transport | The Sinkhorn Algorithm | Dual Formulation | Iterative Updates | Numerical Stability | Collective Optimal Transport | The Collective Framework | COT Strategies | Spatial Distance Cost | Distance Threshold | Biological Interpretation | Communication Direction | Vector Field Computation | Spatial Coherence (Moran's I) | Visualization Example | Parameter Selection Guide | Recommended Settings | References

Last update: 2026-01-24
Started: 2026-01-24

Quick Start Guide
Overview | Installation | Setup | Create Demo Data | Step 1: Load LR Database | Step 2: Infer Spatial Communication | Step 3: Communication Direction | Step 4: Cluster Communication | Step 5: Visualization | Spatial Communication Plot | Vector Field Visualization | Cluster Communication Heatmap | Summary | Next Steps

Last update: 2026-01-24
Started: 2026-01-24

COMMOTR: Visualization Gallery
Introduction | Demo Data Setup | 1. Spatial Distribution Plots | 1.1 Cell Type Distribution | 1.2 Communication Signal Heatmap | 2. Vector Field Visualizations | 2.1 Communication Direction Arrows | 2.2 Streamline-Style Visualization | 3. Cluster Communication Plots | 3.1 Communication Heatmap | 3.2 Network Diagram | 4. Multi-Pathway Comparisons | 4.1 Dot Plot | 4.2 Bar Plot Comparison | 5. Publication-Ready Combined Figure | Customization Tips | Color Palettes | Export Settings

Last update: 2026-01-24
Started: 2026-01-24

COMMOTR: Cell-Cell Communication Analysis in Spatial Transcriptomics
Introduction | Key Features | Installation | Quick Start | Step 1: Load Ligand-Receptor Database | Filter LR Pairs by Expression | Step 2: Infer Spatial Communication | Access Results | Step 3: Communication Direction Analysis | Spatial Autocorrelation of Direction | Step 4: Cluster-Level Analysis | Visualize Cluster Communication | Dotplot for Multiple Pathways | Step 5: Downstream Analysis | Communication-Dependent Gene Detection | Communication Impact Analysis | Group Cells by Communication Patterns | Parameters Guide | Key Parameters for spatial_communication() | COT Strategies | Citation | Session Info

Last update: 2026-01-24
Started: 2026-01-24

Readme and manuals

Help Manual

Help pageTopics
COMMOTR: Cell-Cell Communication via Collective Optimal TransportCOMMOTR-package COMMOTR
Cluster-Level Communication Analysiscluster_communication
Cluster communication with spatial permutationcluster_communication_spatial_permutation
Compute cluster centroid positionscluster_position
Cluster communication-dependent genescommunication_deg_clustering
Detect communication-dependent genescommunication_deg_detection
Communication Direction Analysiscommunication_direction
Analyze communication impact on gene expressioncommunication_impact
Compute spatial autocorrelation of communication directioncommunication_spatial_autocorrelation
Built-in Ligand-Receptor Database Informationdatabase_info
Downstream Analysis Functionsdownstream_analysis
Filter ligand-receptor database by expressionfilter_lr_database
Get communication matrix from resultsget_communication_matrix
Get COMMOTR results from Seurat objectget_communication_results
Get sender/receiver summary data frameget_sender_receiver_df
Group cell-level communication patternsgroup_cell_communication
Group cluster communicationsgroup_cluster_communication
Group communication direction patternsgroup_communication_direction
Get ligand-receptor databaseligand_receptor_database
Ligand-Receptor Database Functionslr_database
Plot cell-level communicationplot_cell_communication
Plot chord diagramplot_chord_diagram
Plot cluster-level communication networkplot_cluster_communication
Plot communication-dependent genesplot_communication_deg
Plot communication dotplotplot_communication_dotplot
Plot grouping resultsplot_communication_groups
Plot communication heatmapplot_communication_heatmap
Plot communication impactplot_communication_impact
Plot spatial autocorrelation resultsplot_spatial_autocorrelation
Visualization Functionsplotting
Print method for COMMOTR resultsprint.commotr_results
Spatial Communication Inferencespatial_communication
Summary method for COMMOTR resultssummary.commotr_results
Compute Wasserstein barycenter with L1 penaltywasserstein_barycenter
Compute regular Wasserstein barycenterwasserstein_barycenter_balanced