Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bio-single-cell-cell-communication

БесплатноЗапускает вложенные скриптыНе проверен

Infer cell-cell communication networks from scRNA-seq data using CellChat, NicheNet, and LIANA for ligand-receptor interaction analysis. Use when inferring…

gabrielmoreiraот gabrielmoreira★ 23 звезды на GitHub

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

Version Compatibility

Reference examples tested with: ggplot2 3.5+, scanpy 1.10+

Before using code patterns, verify installed versions match. If versions differ:

  • Python: pip show <package> then help(module.function) to check signatures
  • R: packageVersion('<pkg>') then ?function_name to verify parameters

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

Cell-Cell Communication Analysis

"Infer cell-cell communication from my scRNA-seq data" → Predict ligand-receptor interactions between cell types and visualize intercellular signaling networks.

  • R: CellChat::createCellChat() → computeCommunProb() → netAnalysis()
  • Python: liana.method.cellchat() (LIANA framework)

CellChat (R)

Goal: Infer and quantify intercellular communication networks from scRNA-seq data using curated ligand-receptor databases.

Approach: Create a CellChat object from a Seurat object with cell type labels, select a signaling database subset, identify overexpressed ligands/receptors, compute communication probabilities using the trimean method, then aggregate into pathway-level networks.

library(CellChat)
library(Seurat)

# Create CellChat object from Seurat
cellchat <- createCellChat(object = seurat_obj, group.by = 'cell_type')

# Set ligand-receptor database
CellChatDB <- CellChatDB.human  # or CellChatDB.mouse
cellchat@DB <- CellChatDB

# Subset to secreted signaling (optional)
CellChatDB.use <- subsetDB(CellChatDB, search = 'Secreted Signaling')
cellchat@DB <- CellChatDB.use

# Preprocessing
cellchat <- subsetData(cellchat)
cellchat <- identifyOverExpressedGenes(cellchat)
cellchat <- identifyOverExpressedInteractions(cellchat)

# Compute communication probability
cellchat <- computeCommunProb(cellchat, type = 'triMean')
cellchat <- filterCommunication(cellchat, min.cells = 10)

# Infer signaling pathways
cellchat <- computeCommunProbPathway(cellchat)
cellchat <- aggregateNet(cellchat)

CellChat Visualization

# Network plots
netVisual_circle(cellchat@net$count, vertex.weight = groupSize, weight.scale = TRUE,
                 label.edge = FALSE, title.name = 'Number of interactions')

netVisual_circle(cellchat@net$weight, vertex.weight = groupSize, weight.scale = TRUE,
                 label.edge = FALSE, title.name = 'Interaction strength')

# Heatmap of interactions
netVisual_heatmap(cellchat, color.heatmap = 'Reds')

# Specific pathway visualization
netVisual_aggregate(cellchat, signaling = 'WNT', layout = 'circle')
netVisual_aggregate(cellchat, signaling = 'WNT', layout = 'chord')

# Bubble plot
netVisual_bubble(cellchat, sources.use = c(1, 2), targets.use = c(3, 4),
                 remove.isolate = FALSE)

# Chord diagram for ligand-receptor pairs
netVisual_chord_gene(cellchat, sources.use = 1, targets.use = c(2, 3, 4),
                     lab.cex = 0.5, legend.pos.x = 10)

CellChat Pathway Analysis

# Identify signaling roles
cellchat <- netAnalysis_computeCentrality(cellchat, slot.name = 'netP')

# Signaling role heatmap
netAnalysis_signalingRole_heatmap(cellchat, signaling = c('WNT', 'TGFb', 'BMP'))

# Dominant senders/receivers
netAnalysis_signalingRole_scatter(cellchat)

# Compare pathways
rankNet(cellchat, mode = 'comparison', stacked = TRUE, do.stat = TRUE)

Compare Conditions (CellChat)

# Create separate CellChat objects
cellchat_ctrl <- createCellChat(subset(seurat_obj, condition == 'control'), group.by = 'cell_type')
cellchat_treat <- createCellChat(subset(seurat_obj, condition == 'treatment'), group.by = 'cell_type')

# Process both (same steps as above)
# ...

# Merge for comparison
cellchat_list <- list(Control = cellchat_ctrl, Treatment = cellchat_treat)
cellchat_merged <- mergeCellChat(cellchat_list, add.names = names(cellchat_list))

# Compare interactions
compareInteractions(cellchat_merged, show.legend = FALSE)

# Differential interactions
netVisual_diffInteraction(cellchat_merged, weight.scale = TRUE)
netVisual_heatmap(cellchat_merged)

# Pathway comparison
rankNet(cellchat_merged, mode = 'comparison', stacked = TRUE)

NicheNet (R)

library(nichenetr)
library(Seurat)
library(tidyverse)

# Load NicheNet databases
ligand_target_matrix <- readRDS('ligand_target_matrix.rds')
lr_network <- readRDS('lr_network.rds')
weighted_networks <- readRDS('weighted_networks.rds')

# Define sender and receiver cells
sender_celltypes <- c('Macrophage', 'Dendritic')
receiver <- 'T_cell'

# Get expressed genes
expressed_genes_sender <- get_expressed_genes(sender_celltypes, seurat_obj, pct = 0.10)
expressed_genes_receiver <- get_expressed_genes(receiver, seurat_obj, pct = 0.10)

# Define gene set of interest (e.g., DE genes in receiver)
geneset_oi <- FindMarkers(seurat_obj, ident.1 = 'activated_T', ident.2 = 'naive_T') %>%
    filter(p_val_adj < 0.05, avg_log2FC > 0.5) %>% rownames()

# Background genes
background_genes <- expr
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

examples/cellchat_analysis.Rexamples/liana_analysis.pyusage-guide.md

FAQ

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

Infer cell-cell communication networks from scRNA-seq data using CellChat, NicheNet, and LIANA for ligand-receptor interaction analysis. Use when inferring ligand-receptor interactions between cell types.

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

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

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

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

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