Skills 週期表
← 回到週期表

ELEMENT 041 · 生物資訊

CellProfiler

以可重現的 CellProfiler 流程分析顯微影像:細胞核分割、細胞計數、單一物件螢光量測與批次執行。

來源
K-Dense
授權
MIT
上游路徑
skills/cellprofiler
同步
5f2bc03

開始之前

原始內容已更新,以下中文介紹待複核。請同時查看最新收錄版本。

適合的任務
拿每視野一張 2D 灰階核染 TIFF 的清單,以 CellProfiler 批次分割細胞核並輸出計數與疊圖。
使用前確認
需本機或容器版 CellProfiler;只接受單平面 uint8/uint16 灰階 TIFF,RGB、z-stack、浮點影像會被拒;專有格式先用 Bio-Formats 轉檔;未做照明校正與背景扣除;直徑範圍需依像素大小校準。

起手提示:裝好後貼給你的 agent,替換「」或 <> 裡的內容

用 CellProfiler skill 依 <images.csv> 跑細胞核分割,先挑 <對照與高密度孔> 做 pilot,輸出計數與疊圖。

依原始 SKILL.md 整理,本站尚未進行任務實測。

安裝這個 skill

來源文件宣告支援此平台;本站尚未進行安裝與任務實測。

安裝指令(需要 Node.js)
npx skills add K-Dense-AI/scientific-agent-skills --skill cellprofiler -g -a claude-code
手動安裝(不使用 npx)
clone 後複製到 skills 目錄
(
  skill_checkout=$(mktemp -d) &&
  git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills.git "$skill_checkout" &&
  mkdir -p ~/.claude/skills/cellprofiler &&
  cp -R "$skill_checkout/skills/cellprofiler/." ~/.claude/skills/cellprofiler
)

實心圓點表示來源文件宣告支援該平台。安裝會取得來源的當前版本,可能與本站收錄版本不同;請先閱讀原始文件,確認執行權限與依賴需求。

收錄依據與使用條件

尚未進行任務實測
來源與依據
K-Dense 維護的技能目錄,依原始文件整理用途。查看本次收錄版本
來源文件宣告的平台
Claude Code、Codex、Gemini CLI、Cursor來源說明
作者標示的環境需求
Python 3.12+ with numpy and tifffile for current helper-only dependencies; a separate CellProfiler 4.2.8 application/container for segmentation. Full CellProfiler has older native dependencies. Network access is needed for installation only. No credentials required.

資料觀察:2026-11-02 · 中文介紹整理:2026-10-02 · 整個來源專案有 55,726 顆 GitHub stars(非此 skill 的評分或使用人數) · 中文介紹依據的原始版本

同族元素 · 生物資訊

使用教學

以下為上游 SKILL.md 原文:常見段落標題譯為中文,其餘保留英文。原文中的「工具本身的安裝」是指 skill 所用的套件或程式;把 skill 加進 agent 請看上方「安裝這個 skill」。

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.

工作流程

  1. 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.
  2. Create the CSV manifest below. image_path is 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 as sample_001: LoadData infers column types and can otherwise turn 001 into 1. 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.
  3. 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.
  4. 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 --pipeline to preserve it. Do not choose settings separately for each treatment to make their counts agree.
  5. 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, filesystem mapping, and verification evidence. prepare and summarize work without CellProfiler.

Interpret the outputs

  • Image.csv: one image/field row, including Count_Nuclei and acquisition metadata.
  • Nuclei.csv: one accepted object per row, with mean/integrated DNA intensity, area, and shape.
  • *_nuclei.png: green nuclear boundaries over the input image for visual QC.
  • pipeline.cppipe and cellprofiler.done: the exact pipeline copy and engine completion marker.
  • assay_qc.json: run status, unique image/object keys, exact counts, finite mean/integrated intensity and positive area checks, field mean area in pixels, and storage saturation flags.

LoadData ignores camera metadata for scaling in this asset and divides by the integer storage maximum: uint8 → 255, uint16 → 65535. A 12-bit camera stored in uint16 therefore has a maximum near 0.0625. Do not compare intensities across different bit depths, exposures, gains, or staining batches without an explicit calibration. A saturated image can pass segmentation while its intensity measurement is unusable. Illumination correction and background subtraction are assay-specific additions; this starter does neither.

The saturation fraction only counts pixels at the storage maximum. A 12-bit detector may saturate at 4095 while the uint16 storage maximum is 65535; inspect the known acquisition ceiling separately. Integrated intensity sums pixel values and may exceed 1; only per-pixel mean intensity is constrained to 0–1. The field's mean nuclear intensity weights each nucleus equally, rather than weighting each pixel equally.

A count check cannot prove correct segmentation. Inspect overlays and independently annotated fields; report boundary exclusions and segmentation errors alongside the biological result. The optional synthetic engine test targets a known three-nucleus example, not assay performance on unseen cell types. It was skipped in the current review because no engine was configured.

Sources

↑ 回到頁首
來源與授權資訊
Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/5f2bc0341354fd5590aef76a533ada1e1e5b4e62/skills/cellprofiler
Commit: 5f2bc0341354fd5590aef76a533ada1e1e5b4e62
Declared license: MIT
Mirror decision: recognized-open-license

--- LICENSE.md ---
MIT License

Copyright (c) 2025 K-Dense Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.