bio-workflows-cytometry-pipeline
БесплатноБез исполняемых скриптовНе проверенEnd-to-end flow cytometry workflow from FCS files to differential analysis. Orchestrates compensation, transformation, gating/clustering, and statistical…
от gabrielmoreira★ 23 звезды на GitHubОб этом скилле
Version Compatibility
Reference examples tested with: FlowSOM 2.10+, edgeR 4.0+, flowCore 2.14+, ggplot2 3.5+, limma 3.58+, numpy 1.26+, pandas 2.2+, scanpy 1.10+, scikit-learn 1.4+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - R:
packageVersion('<pkg>')then?function_nameto 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.
Flow Cytometry Pipeline
"Process my flow cytometry data from FCS to differential analysis" → Orchestrate compensation, transformation, doublet removal, FlowSOM clustering, phenotype annotation, and diffcyt differential testing across conditions.
Pipeline Overview
FCS Files ──> Compensation ──> Transformation ──> Gated/Clustered Data
│
▼
┌─────────────────────────────────────────────────┐
│ cytometry-pipeline │
├─────────────────────────────────────────────────┤
│ 1. Load FCS Files │
│ 2. Compensation & Transformation │
│ 3. QC & Filtering │
│ 4. Clustering (FlowSOM) or Gating │
│ 5. Dimensionality Reduction (UMAP) │
│ 6. Differential Abundance/State Analysis │
│ 7. Visualization │
└─────────────────────────────────────────────────┘
│
▼
Differential Cell Populations + Markers
Complete R Workflow (CATALYST)
library(CATALYST)
library(diffcyt)
library(SingleCellExperiment)
library(flowCore)
library(ggplot2)
# === 1. SETUP PANEL AND METADATA ===
# Panel definition
panel <- data.frame(
fcs_colname = c('FSC-A', 'SSC-A', 'CD45', 'CD3', 'CD4', 'CD8', 'CD19',
'CD14', 'CD56', 'HLA-DR', 'Ki67', 'IFNg'),
antigen = c('FSC', 'SSC', 'CD45', 'CD3', 'CD4', 'CD8', 'CD19',
'CD14', 'CD56', 'HLA-DR', 'Ki67', 'IFNg'),
marker_class = c('none', 'none', 'type', 'type', 'type', 'type', 'type',
'type', 'type', 'type', 'state', 'state')
)
# Sample metadata
md <- data.frame(
file_name = list.files('data/', pattern = '\\.fcs$'),
sample_id = paste0('Sample', 1:8),
condition = rep(c('Control', 'Treatment'), each = 4),
patient_id = rep(paste0('Patient', 1:4), 2)
)
cat('Loading', nrow(md), 'FCS files...\n')
# === 2. LOAD AND PREPARE DATA ===
fcs_files <- file.path('data', md$file_name)
fs <- read.flowSet(fcs_files)
# Apply compensation if stored in FCS
fs_comp <- compensate(fs, spillover(fs1))
# Prepare SingleCellExperiment with CATALYST
sce <- prepData(fs_comp, panel, md,
transform = TRUE,
cofactor = 5, # For CyTOF use 5, flow cytometry use 150
FACS = TRUE)
cat('Loaded', ncol(sce), 'cells\n')
# === 3. QC ===
# Per-sample cell counts
table(sce$sample_id)
# Expression distributions
plotExprs(sce, color_by = 'condition')
ggsave('qc_expression_distributions.png', width = 12, height = 8)
# MDS plot for sample similarity
plotMDS(sce, color_by = 'condition')
ggsave('qc_mds.png', width = 8, height = 6)
# === 4. CLUSTERING ===
cat('Clustering...\n')
sce <- cluster(sce,
features = 'type', # Use lineage markers
xdim = 10, ydim = 10,
maxK = 20,
seed = 42)
# Metaclustering at different resolutions
table(cluster_ids(sce, 'meta20'))
# === 5. DIMENSIONALITY REDUCTION ===
cat('Running UMAP...\n')
sce <- runDR(sce, dr = 'UMAP', features = 'type')
# Plot UMAP
plotDR(sce, dr = 'UMAP', color_by = 'meta20')
ggsave('umap_clusters.png', width = 8, height = 6)
plotDR(sce, dr = 'UMAP', color_by = 'condition')
ggsave('umap_condition.png', width = 8, height = 6)
# === 6. CLUSTER ANNOTATION ===
# Heatmap of marker expression
plotExprHeatmap(sce, features = 'type', k = 'meta20',
by = 'cluster_id', scale = 'last', bars = TRUE)
ggsave('heatmap_clusters.png', width = 12, height = 8)
# Manual annotation based on markers
cluster_annotations <- c(
'1' = 'CD4 T cells',
'2' = 'CD8 T cells',
'3' = 'B cells',
'4' = 'Monocytes',
'5' = 'NK cells'
# ... continue for all clusters
)
sce$cell_type <- cluster_annotations[cluster_ids(sce, 'meta20')]
# === 7. DIFFERENTIAL ANALYSIS ===
cat('Running differential analysis...\n')
# Create design matrix
design <- createDesignMatrix(ei(sce), cols_design = 'condition')
# Contrast
c
Установить bio-workflows-cytometry-pipeline в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bio-workflows-cytometry-pipeline?
End-to-end flow cytometry workflow from FCS files to differential analysis. Orchestrates compensation, transformation, gating/clustering, and statistical testing with CATALYST/diffcyt. Use when processing flow or mass cytometry data end-to-end.
Как установить скилл bio-workflows-cytometry-pipeline?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-workflows-cytometry-pipeline запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic