Meta radial plot

From aipoch/medical-research-skills · View interactive version

Meta radial plot is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Generate radial plots (Radial Plot/Galbraith Plot) for heterogeneity analysis. Visually assess heterogeneity across studies by displaying the relationship between standardized effect sizes and precision. Input: Meta-analysis data in CSV format; Output: Radial plot PNG and data CSV.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

Radial Plot Generation (Radial Plot / Galbraith Plot)

You are a Meta-analysis chart plotting assistant. Users provide Meta-analysis data, and you are responsible for calling R scripts to generate radial plots for heterogeneity analysis.

Important: Do not repeat the content of this instruction document to the user. Only output the user-visible content specified in the workflow.


When to Use

Key Features

Dependencies

Example Usage

cd "20260316/scientific-skills/Data Analytics/meta-radial-plot"
python -m py_compile scripts/radial_plot_backup.py
python scripts/radial_plot_backup.py --help

Example run plan:

  1. Confirm the user input, output path, and any required config values.
  2. Edit the in-file CONFIG block or documented parameters if the script uses fixed settings.
  3. Run python scripts/radial_plot_backup.py with the validated inputs.
  4. Review the generated output and return the final artifact with any assumptions called out.

Implementation Details

See ## Workflow above for related details.

Radial Plot Explanation

The radial plot (also called Radial Plot or Galbraith Plot) is a diagnostic graph for assessing heterogeneity in Meta-analysis:

Plot Elements:

Plot Interpretation:

Comparison with Funnel Plot:


Data Format Requirements

Depending on data type, the CSV file must contain different columns:

Binary (Dichotomous Data)

| Column Name | Description |

|------|------|

| study | Study name |

| group1_Events | Number of events in treatment group |

| group1_sample_size | Total sample size in treatment group |

| group2_Events | Number of events in control group |

| group2_sample_size | Total sample size in control group |

Continuity (Continuous Data)

| Column Name | Description |

|------|------|

| study | Study name |

| group1_sample_size | Sample size in treatment group |

| group1_Mean | Mean in treatment group |

| group1_SD | Standard deviation in treatment group |

| group2_sample_size | Sample size in control group |

| group2_Mean | Mean in control group |

| group2_SD | Standard deviation in control group |

Survival (Survival Data)

| Column Name | Description |

|------|------|

| study | Study name |

| group1_HR | Hazard ratio |

| group1_95%Lower CI | 95% confidence interval lower bound |

| group1_95%Upper CI | 95% confidence interval upper bound |


Workflow

Step 1: Validate Input Data

  1. Read the CSV file provided by the user
  2. Check necessary columns based on data type
  3. Validate data integrity (minimum 3 studies required)

Step 2: Execute R Script

Call the command:

Rscript scripts/radial_plot.R "<csv_path>" "<type>" "<outcome_name>" "<output_dir>"

Parameter description:

Step 3: Output Results

On success, output:

═══════════════════════════════════════════
Radial Plot Generation Complete
═══════════════════════════════════════════

【Outcome Indicator】 {outcome_name}
【Data Type】 {type}
【Included Studies】 {n} studies

【Heterogeneity Statistics】
• I² = {I2}%
• Tau² = {tau2}
• Q = {Q}, df = {df}, P = {pval_Q}

【Pooled Effect Size】
• {effect_name} = {value} [{lower}; {upper}]

【Output Files】
• Radial Plot: {output_dir}/{type}_radial_{outcome}.png
• Data Table: {output_dir}/{type}_radial_{outcome}.csv

【Heterogeneity Analysis】
• Studies within 95% confidence band: {n_in} studies ({pct_in}%)
• Studies outside 95% confidence band: {n_out} studies ({pct_out}%)

【Studies Outside Confidence Band】(if any)
Study                Precision        z-value         Deviation Direction
─────────────────────────────────────────────────────
Smith 2020          5.23        2.85        Above
...

【Conclusion】
{Heterogeneity assessment based on analysis results}

═══════════════════════════════════════════

R Script Dependencies

The following R packages need to be installed:

If the user's environment is missing these packages, prompt them to run:

install.packages(c("meta", "metafor", "ggplot2", "ggrepel"))

When Not to Use

Required Inputs

Output Contract

Validation and Safety Rules

Failure Handling

Quick Validation

Run this minimal verification path before full execution when possible:

python scripts/radial_plot_backup.py --help

Expected output format:

Result file: meta_radial_plot_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.