Command Palette

Search for a command to run...

Назад к скиллам
скилл № 11889

single-cell-cellphonedb-communication-mapping

CellPhoneDB v5 ligand-receptor analysis, CellChatViz plots, and the newer ccc_heatmap / ccc_network_plot / ccc_stat_plot communication visualizations in…

БесплатноБез исполняемых скриптов
omicverseот omicverse★ 1 402 звезды на GitHub17 установок в других каталогах

Установить single-cell-cellphonedb-communication-mapping в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Single-cell CellPhoneDB communication mapping

Overview

Apply this skill when a user wants to quantify ligand-receptor communication between annotated single-cell populations and visualize the result with OmicVerse's CellPhoneDB plotting stack. This skill now covers both the original low-level ov.pl.CellChatViz workflow and the newer public plotting APIs:

  • ov.pl.ccc_heatmap(...)
  • ov.pl.ccc_network_plot(...)
  • ov.pl.ccc_stat_plot(...)

Use the ccc_* functions by default when the goal is to quickly generate publication-ready plots with a stable public API. Drop down to CellChatViz when the user needs method-level control or wants to combine several custom visualizations in one notebook.

Instructions

  1. Prepare the environment
    • Use an environment with omicverse>=0.2, scanpy, anndata, pandas, matplotlib, seaborn, and CellPhoneDB resources.
    • For the newer visualizations, also ensure these optional plotting dependencies are available when needed:
      • marsilea for heatmap and bubble matrix plotters.
      • mpl-chord-diagram for chord diagrams.
      • networkx for diffusion and network-style plots.
      • adjustText if the user wants improved automatic label repulsion.
    • Activate OmicVerse plotting defaults with ov.plot_set().
  2. Load and validate the annotated AnnData
    • Read the normalized expression matrix with ov.read(...).
    • Keep the communication grouping column clean, categorical, and aligned with the intended identities.
    • Recommended checks:
      celltype_key = "cell_labels"
      assert celltype_key in adata.obs.columns, f"{celltype_key} missing from adata.obs"
      adata.obs[celltype_key] = adata.obs[celltype_key].astype("category").cat.remove_unused_categories()
      assert not adata.obs[celltype_key].isna().any(), f"NaN values found in {celltype_key}"
      min_per_group = adata.obs[celltype_key].value_counts().min()
      if min_per_group < 10:
          print(f"WARNING: smallest group has {min_per_group} cells; sparse groups may destabilize permutations")
      
    • Confirm the matrix is log-normalized before running CellPhoneDB. Raw counts can distort permutation-based significance.
  3. Run CellPhoneDB through OmicVerse
    • Use ov.single.run_cellphonedb_v5(...) and persist the outputs:
      cpdb_results, adata_cpdb = ov.single.run_cellphonedb_v5(
          adata,
          cpdb_file_path="./cellphonedb.zip",
          celltype_key="cell_labels",
          min_cell_fraction=0.005,
          min_genes=200,
          min_cells=3,
          iterations=1000,
          threshold=0.1,
          pvalue=0.05,
          threads=10,
          output_dir="./cpdb_results",
          cleanup_temp=True,
      )
      
    • Save cpdb_results and adata_cpdb so downstream plotting can be repeated without rerunning permutations.
    • CellChat alternative (no R, no extra install beyond PyTorch): ov.single.run_cellchat reproduces R CellChat 2.2 (identical over-expressed genes/LR pairs, probabilities to ~1e-15) and stores adata.uns['cellchat_res'], which every ov.pl.ccc_* call reads directly:
      ov.single.run_cellchat(adata, groupby="cell_labels", species="human")  # log-normalised X
      comm = ov.single.format_cellchat_results(adata)                         # optional explicit comm AnnData
      df = ov.single.cellchat_subset_communication(adata, signaling=["TGFb"])  # significant LR table
      centr = ov.single.cellchat_centrality(adata)                             # sender/receiver/mediator/influencer
      
      CellChat scores are probabilities (~1e-3), not expression; pathway summaries pick scale-aware thresholds automatically. Groups with <= min_cells (default 10) cells are removed, as in R filterCommunication.
    • Unified entry point / several methods at once: ov.single.run_ccc runs any registered method (ov.single.available_ccc_methods(): cellchat, cellphonedb, liana, fastccc, secact, and the spatial cytosignal / commot) and always returns the same communication AnnData:
      comm = ov.single.run_ccc(adata, "cell_labels", method="cellchat")
      comm = ov.single.run_ccc(adata, "cell_labels", method=["cellchat", "cellphonedb", "liana"],
                               consensus="rra",                     # or "vote" (min_methods=...)
                               method_kwargs={"cellphonedb": {"cpdb_file_path": "./cellphonedb.zip"}})
      res = ov.single.compare_ccc(adata)                          # Jaccard / recall / rank correlations on shared-DB LR pairs
      ov.pl.ccc_compare(res, plot_type="upset")                   # also "jaccard", "recall", "score_corr", "top_lr", "cellpair"
      cp = ov.single.get_ccc(adata, method="cellphonedb")          # any single method's comm AnnData
      comm = ov.space.run_ccc(adata, "cell_type", method="cytosignal")  # spatial (needs obsm['spatial'])
      
      Interactions are matched across databases o
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • reference.md

FAQ

Что делает скилл single-cell-cellphonedb-communication-mapping?

CellPhoneDB v5 ligand-receptor analysis, CellChatViz plots, and the newer ccc_heatmap / ccc_network_plot / ccc_stat_plot communication visualizations in OmicVerse.

Как установить скилл single-cell-cellphonedb-communication-mapping?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл single-cell-cellphonedb-communication-mapping запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить single-cell-cellphonedb-communication-mapping с