agentleFS
cafferychen777cafferychen777/ChatSpatial/.agents/skills/cell-interaction/SKILL.md

cell-interaction

Skill45 starsChanged 3 months agoMITView on GitHub

Analyze cell-cell communication patterns and ligand-receptor interactions in spatial context. Use when user wants to understand how cells communicate, signaling pathways, or intercellular interactions. Triggers: "cell communication", "ligand receptor", "cell-cell interaction", "signaling", "how do cells talk", "communication analysis", "CellChat", "LIANA".

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before running cell communication analysis:

    line 26
  2. Very specific:

    Use analyze_cell_communication tool with:

    line 82
  3. Very specific:

    Use visualize_data with plot_type="communication":

    line 97
  4. Distinctive:

    Pre-filter by spatial neighbors: Only consider cells that are spatially adjacent

    line 108
  5. Distinctive:

    Do interaction hotspots correspond to specific tissue regions?

    line 115

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cell-Cell Interaction Analysis

Overview

This skill answers: How do cells communicate with each other in this tissue?

Cell communication fundamentally requires:

  1. A sender cell expressing a ligand
  2. A receiver cell expressing a receptor
  3. Spatial proximity enabling the interaction

Prerequisites

Before running cell communication analysis:

  • Cell type annotations available (from deconvolution or direct annotation)
  • Species identified (human or mouse)
  • Biological question defined (specific pathways? global patterns?)

Method Selection

Decision Framework

Q: What level of analysis do you need?
│
├─ Ligand-receptor pairs only
│   └─ LIANA+ (Python) - Multi-method consensus, recommended default
│
├─ Signaling pathway analysis
│   └─ CellChat (R) - Pathway-level insights, communication networks
│
├─ Fast computation needed
│   └─ FastCCC (C++) - Human only, very fast
│
└─ Classic/benchmark comparison
    └─ CellPhoneDB - Original method, good for comparisons

Method Comparison

AspectLIANA+CellChatCellPhoneDBFastCCC
LanguagePythonRPythonC++
SpeedFastModerateModerateVery Fast
OutputLR pairsPathways + NetworksLR pairsLR pairs
SpeciesHuman/MouseHuman/MouseHumanHuman
StrengthMulti-method consensusPathway interpretationLiterature standardScale

Workflow

Step 1: Verify Cell Type Annotations

Required in adata.obs:
- Cell type column (e.g., 'cell_type', 'annotation')
- Clean labels (no "unknown", "unassigned")
- Biologically meaningful categories

Step 2: Configure Species

Species-specific databases:
- Human: liana_resource="consensus" (default)
- Mouse: liana_resource="mouseconsensus"

Step 3: Run Analysis

Use analyze_cell_communication tool with:

  • cell_type_key: Column name for cell type annotations
  • species: "human" or "mouse"
  • method: Selected from decision framework

Step 4: Interpret Results

Key outputs:

  • Ligand-receptor pairs: Specific molecular interactions
  • Interaction scores: Strength/significance of communication
  • Cell type pairs: Which cells are talking to which
  • Pathways (CellChat): Grouped signaling pathways

Step 5: Visualize

Use visualize_data with plot_type="communication":

  • subtype="dotplot": Overview of all interactions
  • subtype="circle_plot": Network of cell type communication
  • subtype="tileplot": Heatmap of interaction strength

Spatial Considerations

Adding Spatial Context

Standard cell communication ignores distance. To incorporate spatial proximity:

  1. Pre-filter by spatial neighbors: Only consider cells that are spatially adjacent
  2. Use spatial statistics: Correlate communication scores with co-localization

Interpreting Spatial Patterns

Questions to consider:

  • Are communicating cell types spatially co-localized?
  • Do interaction hotspots correspond to specific tissue regions?
  • How does communication differ across spatial domains?

Common Analysis Scenarios

Scenario 1: Tumor Microenvironment

Focus on:
- Tumor-immune interactions
- CAF-tumor communication
- Immune checkpoint pathways (PD-1/PD-L1)

Scenario 2: Development/Differentiation

Focus on:
- Signaling gradients (Wnt, BMP, Notch)
- Niche-stem cell interactions
- Temporal progression of communication

Scenario 3: Tissue Architecture

Focus on:
- ECM-cell interactions
- Structural organization signals
- Regional communication patterns

Output Interpretation Guide

Significant Interactions

Look for:

  • High specificity scores (interaction specific to certain cell pairs)
  • Biological relevance (known pathways in tissue type)
  • Spatial coherence (co-localization of interacting cells)

Common Patterns

PatternInterpretation
Hub cell typeCentral coordinator of tissue communication
Reciprocal pairsBidirectional signaling between cell types
Pathway enrichmentDominant signaling mechanism
Spatial clusteringLocalized communication zones

Troubleshooting

IssueSolution
No significant interactionsLower threshold, check cell type balance
Too many interactionsIncrease stringency, focus on specific pathways
CellChat R errorsVerify rpy2 installation, check R packages
Species mismatchEnsure correct database for species

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.