cellchat-analysis

Infer and compare cell-cell communication networks from single-cell RNA-seq data using CellChat.

Updated May 28, 2026
One-click install
npx skills add https://github.com/cpanse/skills --skill cellchat-analysis-cpanse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cellchat-analysis
Source: https://github.com/cpanse/skills/tree/main/single-cell-spatial-general/skills/cellchat-analysis
Command: npx skills add https://github.com/cpanse/skills --skill cellchat-analysis-cpanse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Inferring ligand-receptor communication between cell types from single-cell RNA-seq with CellChat involves many failure-prone steps: sparse cell-type groups, mergeCellChat dimension mismatches, unreadable dense bubble and NMF heatmaps, and rmarkdown renders that silently halt mid-chunk under SLURM. This Skill encodes 21 field-tested lessons from FGCZ projects so these pitfalls are avoided by default. ## Core Features & Use Cases - Single-sample and multi-sample workflows: Build per-condition CellChat objects, run computeCommunProb, and merge conditions with mergeCellChat using per-pair common-level subsetting that preserves dose-emergent clusters. - Visualization and reporting: Generate circle, chord, bubble, heatmap, river, and NMF pattern plots with dynamic figure sizing, plus a ready-to-use FGCZ R Markdown report template. - Troubleshooting playbook: Diagnose 21 documented issues including sapply/list errors, blank layout() composites, qs2 segfaults, and false-positive SLURM completion status. - Use Case: Compare M cell, dendritic cell, and neutrophil signaling across PBS and three dose timepoints, producing per-pair merged objects, pathway rank plots, and Excel exports of significant ligand-receptor pairs. ## Quick Start Ask the agent to run a CellChat analysis comparing cell-cell communication between conditions in your Seurat object and export the significant ligand-receptor pairs to Excel.

Frequently Asked Questions about cellchat-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compare cell-cell communication between conditions with CellChat?

Build a separate CellChat object per condition on its natural cell-type set, then for each pair compute common levels, subset with subsetCellChat, and merge with mergeCellChat. Use compareInteractions and rankNet on the merged object for differential analysis.

How to fix mergeCellChat errors about missing cell type groups?

mergeCellChat requires identical group sets across objects. Build per-condition objects without a global filter, then subset each to the common levels of that specific pair with subsetCellChat(idents.use = common) before merging.

Which CellChat database subset should I use for my analysis?

Use Secreted Signaling for paracrine immune signaling (the default), ECM-Receptor for fibroblast and matrix studies, or Cell-Cell Contact for juxtacrine pathways like Notch. The choice substantially changes results, so pick based on your biological question.

Why does my SLURM job show COMPLETED but the CellChat HTML report is incomplete?

rmarkdown::render can exit with status 0 even when a chunk fails mid-render, so sacct shows COMPLETED falsely. Verify the .log ends with 'Output created:', the .err lacks 'Execution halted', and the HTML mtime is newer than the job start.

Why are my CellChat bubble plot labels overlapping and unreadable?

Dense pathways produce hundreds of source-target columns that overflow fixed figure sizes. Pull data with return.data = TRUE, count unique columns and L-R pairs, then scale width and height dynamically (about 0.18 in per column, 0.35 in per L-R pair).

What is the minimum number of cells per cell type for CellChat?

CellChat's filterCommunication defaults to min.cells = 10 per group. For multi-condition comparisons, keep groups with at least 1 cell in both conditions and at least 10 in one, so sparse but biologically real groups are not silently dropped.