Forest Plot Styler — 森林图样式设计器
v0.1.0使用可自定义的比值比点和置信区间来美化meta-analysis森林图
运行时依赖
安装命令
点击复制技能文档
Forest Plot Styler
ID: 157
Beautifies Meta-analysis or subgroup analysis forest plots, customizes Odds Ratio point sizes and confidence interval line styles.
Features Reads Meta-analysis data (CSV/Excel 格式化) Draws high-质量 forest plots Customizes Odds Ratio point sizes, colors, and shapes Customizes confidence interval line styles (color, thickness, 端点 style) Supports subgroup analysis display Automatically calculates and displays pooled effect values 输出s to PNG, PDF, or SVG 格式化 Usage python scripts/mAIn.py --输入 [options]
Parameters Parameter Type Default Required Description --输入, -i string - Yes 输入 data file (CSV or Excel) --输出, -o string forest_plot.png No 输出 file path --格式化, -f string png No 输出 格式化 (png/pdf/svg) --point-size int 8 No OR point size --point-color string #2E86AB No OR point color --ci-color string #2E86AB No Confidence interval line color --ci-linewidth int 2 No Confidence interval line thickness --ci-capwidth int 5 No Confidence interval 端点 width --summary-color string #A23B72 No Pooled effect point color --summary-shape string diamond No Pooled effect point shape --subgroup string - No Subgroup analysis column name --title, -t string Forest Plot No 图表 title --xlabel, -x string Odds Ratio (95% CI) No X-axis label --reference-line float 1.0 No Reference line position --width, -W int 12 No Image width (inches) --height, -H int auto No Image height (inches) --dpi int 300 No Image resolution --font-size int 10 No Font size --style, -s string default No Pre设置 style (default/minimal/dark) 输入 Data 格式化
CSV/Excel files must contAIn the following columns:
Column Name Description Type study Study name Text or Odds Ratio value Numeric ci_lower Confidence interval lower bound Numeric ci_upper Confidence interval upper bound Numeric weight Weight (optional, for point size) Numeric subgroup Subgroup label (optional) Text Sample Data study,or,ci_lower,ci_upper,weight,subgroup Study A,0.85,0.65,1.12,15.2,Drug A Study B,0.72,0.55,0.94,18.5,Drug A Study C,1.15,0.88,1.50,12.3,Drug B Study D,0.95,0.75,1.20,14.8,Drug B
Examples Basic Usage python scripts/mAIn.py -i meta_data.csv
Custom Style python scripts/mAIn.py -i meta_data.csv \ --point-color="#E63946" \ --ci-color="#457B9D" \ --point-size=10 \ --ci-linewidth=3 \ -t "Meta-Analysis of Treatment Effects"
Subgroup Analysis python scripts/mAIn.py -i meta_data.csv \ --subgroup subgroup_column \ --summary-color="#F4A261" \ -o subgroup_forest.png
输出 PDF Vector Graphic python scripts/mAIn.py -i meta_data.csv \ -f pdf \ -o forest_plot.pdf
Pre设置 Styles default Blue color scheme Standard font size White background minimal 清理 lines Gray扩展 color scheme No grid lines dark Dark background Bright data points Suitable for dark theme presentations Dependencies Python >= 3.8 matplotlib >= 3.5.0 pandas >= 1.3.0 numpy >= 1.20.0 openpyxl >= 3.0.0 (for reading Excel) 输出 Example
生成d forest plot contAIns:
Left side: Study name 列出 Middle: OR values and confidence intervals Right side: Weight percentage (if avAIlable) 机器人tom: Pooled effect value (diamond marker) Reference line (OR=1) Notes Ensure 输入 file encoding is UTF-8 OR values are automatically converted when 记录 扩展 is suggested Studies with confidence intervals crossing 1 are not statistically 签名ificant Weight values are used to adjust point size, reflecting study contribution Risk Assessment Risk Indicator Assessment Level Code Execution Python/R scripts 执行d locally Medium Network 访问 No external API calls Low File 系统 访问 Read 输入 files, write 输出 files Medium Instruction Tampering Standard prompt 图形界面delines Low Data Exposure 输出 files saved to workspace Low Security 检查列出 No hardcoded 凭证s or API keys No un授权d file 系统 访问 (../) 输出 does not expose sensitive in格式化ion Prompt injection 保护ions in place 输入 file paths 验证d (no ../ traversal) 输出 directory restricted to workspace Script execution in sandboxed 环境 Error messages sanitized (no stack 追踪s exposed) Dependencies 审计ed Prerequisites # Python dependencies pip 安装 -r requirements.txt
Evaluation Criteria 成功 指标 成功fully 执行s mAIn functionality 输出 meets 质量 standards Handles edge cases gracefully Performance is acceptable Test Cases Basic Functionality: Standard 输入 → Expected 输出 Edge Case: Invalid 输入 → Graceful error handling Performance: Large data设置 → Acceptable processing time Lifecycle 状态 Current Stage: Draft Next Review Date: 2026-03-06 Known Issues: None Planned Improvements: Performance optimization 添加itional feature support