cellprofiler
它能做什么
这个工具可以自动、可重复地在显微镜图像中统计和测量细胞核。它会处理图像,识别细胞核,数出数量,并测量亮度等特征。
适用场景
- ✓需要在大量显微镜图像中统计细胞核数量时。
- ✓想测量每个细胞核内的荧光强度(即发光量)时。
- ✓需要保证每次运行的分析结果完全一致时。
技能链接
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/cellprofiler/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“分析这些显微镜图像,统计每张图中的细胞核数量,并测量它们的亮度。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要提供图像和一套指令(即流程)。工具会调用 CellProfiler 程序按照这些指令执行,找到细胞核、计数,并提取你要求的测量数据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
CellProfiler quantitative microscopy
Use this skill when a user needs a repeatable CellProfiler .cppipe, nuclear counts, nuclear
fluorescence, or batch microscopy measurements. The bundled assay accepts one 2D grayscale
TIFF nuclear channel per field, with black-is-zero (MINISBLACK) pixels and bright nuclei on a
dark background. Palette and white-is-zero TIFFs need an explicit conversion. For volumetric
segmentation, multichannel cell painting, or tissue-specific models, design a separate pipeline
and validate those assumptions rather than silently projecting or splitting the images.
The official application and manual remain 4.2.8. PyPI publishes 4.2.8.1; its seven modules used here and embedded Threshold module match the 4.2.8 source, but this review did not execute that native distribution. Keep the helper environment separate from CellProfiler's older dependency stack; see the runtime reference for the verification boundary.
Workflow
- Establish the acquisition unit: plate, well, site, time point if present, pixel size, nuclear channel identity, camera bit depth, exposure, and biological replicate. Keep original image intensities. Convert proprietary formats explicitly with Bio-Formats before using this helper.
- Create the CSV manifest below.
image_pathis absolute or relative to the manifest; sample IDs use letters, digits, dots, dashes, or underscores; sample IDs and plate/well/site combinations are unique. Use a nonnumeric sample ID such assample_001: LoadData infers column types and can otherwise turn001into1. Avoid surrounding whitespace in identifiers. TIFFs must be uint8 or uint16, single plane/series/resolution, and nonconstant. The helper rejects RGB, z-stacks, and float images rather than guessing channels. - Use assets/nuclei.cppipe as a starting pipeline: LoadData → IdentifyPrimaryObjects → intensity/size measurements → outline overlay → CSV export. The initial diameter range is 8–80 pixels, with global Otsu thresholding, no threshold smoothing, and border objects excluded. Calibrate this range from representative images and acquisition pixel size before comparing conditions.
- Run a small pilot spanning controls, low/high density, dim images, and plate edges. Inspect
saved overlays for missed nuclei, splits, merges, and edge exclusions. Adjust thresholding
and declumping in CellProfiler, export the tuned
.cppipe, and pass--pipelineto preserve it. Do not choose settings separately for each treatment to make their counts agree. - Freeze the tuned pipeline and analyze the batch. Review input saturation warnings, zero counts, count/area distributions, and control behavior. Aggregation for inference belongs at the biological replicate level; thousands of cells from one well are not independent wells.
Run the bounded assay
From this skill directory, create images.csv:
sample_id,image_path,plate,well,site
control_A01_1,images/control_A01_1_DAPI.tif,Plate1,A01,1
python scripts/nuclei_assay.py prepare images.csv load_data.csv
python scripts/nuclei_assay.py run images.csv results --executable cellprofiler
python scripts/nuclei_assay.py summarize results
run requires a fresh/empty output directory and executes CellProfiler with -c -r, a saved
pipeline copy, --data-file, output folder, and --done-file. Success requires exit code zero,
a Complete marker, and valid measurement tables. It records the command, pipeline checksum,
input image checksums, and sample QC in assay_qc.json before execution, retaining failed
status and the error if execution or output validation fails. CellProfiler output goes to
cellprofiler.log. Rerun in a new output folder. summarize checks CSV contents independently;
it does not prove an engine run completed.
Custom pipelines must preserve DNA, Nuclei, Metadata_Sample, integer-dtype scaling, and
the unprefixed single-object Image.csv/Nuclei.csv export contract. Keep the required
intensity/area measurements. A renamed object set or different intensity scale needs a
corresponding helper adaptation, not an unchecked --pipeline substitution.
The executable can also be the CellProfiler application launcher or a local container launcher; see references/runtime-and-qc.md for the container target,
…
常见问题
什么样的图像效果最好?
最适合只显示细胞核、背景较暗、细胞核较亮的灰度显微镜图像(TIFF 格式)。
什么是“流程”(pipeline)?
流程是一个分步骤的指令文件,告诉 CellProfiler 具体要对图像做什么,比如去哪里寻找细胞核、要进行哪些测量。
我能使用彩色或三维图像吗?
这个工具专为二维灰度图像设计。如果是彩色、三维或更复杂的图像,你需要使用不同的流程。
详情
作者的原始描述
Runs reproducible CellProfiler microscopy pipelines for nuclear segmentation, cell counts, and per-object fluorescence measurements. Supports image/channel manifests, headless batch execution, segmentation overlays, and measurement QC for 2D fluorescence assays.
热度
- GitHub 星标
- 51k
- 排名
- #3436
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …