返回顶部
w

western-blot-quantifierWestern Blot定量器

Automatically identify Western Blot gel bands, perform densitometric

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
223
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

western-blot-quantifier

技能名称: western-blot-quantifier

详细描述:

Western Blot 定量分析工具

自动识别 Western Blot 凝胶条带,进行光密度分析,并计算相对于内参的归一化值。

功能特点

  • - 自动条带检测:检测凝胶图像中的蛋白条带位置
  • 光密度分析:计算每个条带的灰度/光密度值
  • 归一化处理:相对于内参蛋白(如 GAPDH、β-actin、Tubulin)进行归一化
  • 数据导出:以 CSV 格式输出定量结果

使用方法

基本用法

python

在 Python 中调用


from skills.westernblotquantifier.scripts.main import WesternBlotQuantifier

创建分析器

analyzer = WesternBlotQuantifier()

分析单张图像

result = analyzer.analyze( imagepath=path/to/wbimage.png, reference_bands=[GAPDH], # 内参条带名称 target_bands=[p53, Bcl-2], # 目标蛋白条带名称 lane_positions=[0.2, 0.4, 0.6, 0.8] # 泳道位置(相对于图像宽度) )

print(result.summary())
result.save(output/quantification_results.csv)

命令行使用

bash
python -m skills.westernblotquantifier.scripts.main \
--input path/to/wb_image.png \
--reference GAPDH \
--targets p53,Bcl-2 \
--lanes 4 \
--output results.csv

参数说明

参数说明默认值
imagepath凝胶图像路径必填
referencebands
内参蛋白名称列表 | [GAPDH] | | target_bands | 目标蛋白名称列表 | [] | | lane_positions | 泳道位置列表 | 自动检测 | | threshold | 条带检测阈值 | 0.1 | | backgroundcorrection | 背景校正方法 | rollingball |

输出格式

CSV 输出示例

csv
Lane,Protein,RawIntensity,Background,CorrectedIntensity,NormalizedtoReference
1,GAPDH,125000.5,5000.2,120000.3,1.00
1,p53,85000.2,3000.1,82000.1,0.68
1,Bcl-2,62000.8,2500.5,59500.3,0.50
2,GAPDH,118000.3,4800.2,113200.1,1.00
...

返回对象

python
{
raw_data: DataFrame, # 原始光密度数据
normalized_data: DataFrame, # 归一化后的数据
band_regions: List[Dict], # 检测到的条带区域坐标
statistics: Dict, # 统计分析结果
figures: Dict # 可视化图表路径
}

依赖项

numpy>=1.21.0
opencv-python>=4.5.0
pandas>=1.3.0
matplotlib>=3.4.0
scipy>=1.7.0
scikit-image>=0.18.0

安装

bash
pip install -r requirements.txt

注意事项

  1. 1. 图像质量:建议使用高分辨率、对比度良好的灰度或黑白凝胶图像
  2. 内参选择:常用内参包括 GAPDH、β-actin、Tubulin,选择取决于实验条件
  3. 背景校正:支持 rolling_ball、median、none 三种背景校正方法
  4. 泳道标记:如果自动检测不准确,可以手动指定泳道位置

示例

示例 1:基础分析

python
from skills.westernblotquantifier.scripts.main import WesternBlotQuantifier

analyzer = WesternBlotQuantifier()

分析 4 泳道 Western Blot 结果

result = analyzer.analyze( imagepath=experimentdata/wb_gel.png, reference_bands=[GAPDH], target_bands=[p53, p21], lane_count=4 )

查看归一化结果

print(result.normalized_data)

保存图表

result.save_figures(output/)

示例 2:批量处理

python
import glob

analyzer = WesternBlotQuantifier()

for image_path in glob.glob(experiments/*.png):
result = analyzer.analyze(
imagepath=imagepath,
reference_bands=[β-actin],
targetbands=[TargetProtein],
lane_count=6
)
result.save(foutput/{Path(imagepath).stem}results.csv)

算法说明

  1. 1. 图像预处理:灰度转换 → 背景校正 → 去噪
  2. 泳道检测:基于垂直投影分析自动识别泳道边界
  3. 条带检测:使用一维高斯拟合或峰值检测算法定位条带
  4. 光密度计算:积分条带区域灰度值,减去背景
  5. 归一化处理:目标蛋白值 / 内参蛋白值

作者

OpenClaw Skills

风险评估

风险指标评估等级
代码执行本地执行 Python/R 脚本
网络访问
无外部 API 调用 | 低 | | 文件系统访问 | 读取输入文件,写入输出文件 | 中 | | 指令篡改 | 标准提示词指南 | 低 | | 数据泄露 | 输出文件保存到工作区 | 低 |

安全检查清单

  • - [ ] 无硬编码的凭据或 API 密钥
  • [ ] 无未经授权的文件系统访问(../)
  • [ ] 输出不泄露敏感信息
  • [ ] 已实施提示注入保护
  • [ ] 输入文件路径已验证(无 ../ 遍历)
  • [ ] 输出目录限制在工作区内
  • [ ] 脚本在沙盒环境中执行
  • [ ] 错误消息已清理(不暴露堆栈跟踪)
  • [ ] 依赖项已审计

前置条件

bash

Python 依赖项


pip install -r requirements.txt

评估标准

成功指标

  • - [ ] 成功执行主要功能
  • [ ] 输出符合质量标准
  • [ ] 优雅处理边缘情况
  • [ ] 性能可接受

测试用例

  1. 1. 基本功能:标准输入 → 预期输出
  2. 边缘情况:无效输入 → 优雅的错误处理
  3. 性能:大数据集 → 可接受的处理时间

生命周期状态

  • - 当前阶段:草稿
  • 下次审查日期:2026-03-06
  • 已知问题:无
  • 计划改进
- 性能优化 - 增加更多功能支持

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 western-blot-quantifier-1775876402 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 western-blot-quantifier-1775876402 技能

通过命令行安装

skillhub install western-blot-quantifier-1775876402

下载

⬇ 下载 western-blot-quantifier v0.1.0(免费)

文件大小: 4.91 KB | 发布时间: 2026-4-12 11:57

v0.1.0 最新 2026-4-12 11:57
Initial release: Automated tool for quantifying and normalizing Western Blot gel bands.

- Automatically detects bands and lanes in Western Blot images.
- Performs densitometric analysis and background correction.
- Supports normalization to loading controls (GAPDH, β-actin, Tubulin).
- Exports quantitative results in CSV format.
- Includes Python API and command line usage.
- Batch analysis and various background correction methods supported.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部