Skip to content

mahmood726-cyber/metaforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metaforge

A powerful, dependency-free meta-analysis engine that does four kinds of analysis from one small JSON config — pairwise, single-arm proportions, network meta-analysis (with SUCRA), and dose-response — and writes a clean, offline HTML report with plots for each.

Built for low-bandwidth / low-API-quota settings: the whole statistical engine is pre-built, so an AI CLI (Gemini, Claude, …) on a free key only writes a ~15-line config. run.py is deterministic and makes zero network or API calls.

Three sibling tools, increasing power:

  1. meta-starter-kit — lightweight single-file pairwise page
  2. rapidmeta-kit — full interactive RapidMeta workbench
  3. metaforge (this) — multi-method engine: pairwise + NMA + dose-response + proportions

⬇️ Download (one click)

Download as ZIP » · or the Releases page. Unzip and go.

▶️ Use it in 3 steps

  1. Install Python (once): https://www.python.org/downloads/ — on Windows tick "Add Python to PATH".
  2. Run an example.
    • Windows: double-click RUN_EXAMPLES.bat (builds all four).
    • Mac/Linux: bash run_examples.sh.
    • One at a time: python run.py configs/example_nma.json
  3. Open the file it prints in output/ — a full report with forest / network / dose-response plots, working offline.

What it can do

Type "type" Output
Pairwise (OR/RR/RD/MD/SMD/effect+CI) pairwise forest plot, pooled effect, PI, I²
Single-arm proportion / prevalence proportion pooled %, forest, double-arcsine or logit
Network meta-analysis (3+ treatments) nma network diagram, SUCRA ranking, all pairwise effects
Dose-response doseresponse pooled trend, dose-response curve with CI band

All use random effects (Paule–Mandel τ² by default; DL/REML optional), Knapp–Hartung confidence intervals with a variance floor, and the Cochrane v6.5 t(k−1) prediction interval.

Make your own

  1. Copy the matching example, e.g. cp configs/example_nma.json configs/my_network.json
  2. Put your data in (see AGENTS.md for the field reference of each type).
  3. python run.py configs/my_network.jsonoutput/my_network.html.

The build prints a [CONFIG ERROR] naming exactly what to fix if a field is missing.

Methods (brief)

  • Pairwise: log-OR/RR with 0.5 continuity correction only when a cell is zero; Hedges' g for SMD; ratio measures pooled on the log scale.
  • Proportions: Freeman–Tukey double arcsine (variance-stabilising, handles 0/100%) back-transformed with the harmonic mean of n; or logit.
  • NMA: frequentist contrast-based random-effects model (consistency assumption); multi-arm correlation handled (shared-baseline covariance); τ² by a network Paule–Mandel solve; SUCRA via Monte-Carlo over the estimated multivariate normal; global network Q reported as the heterogeneity/inconsistency indicator.
  • Dose-response: approximate two-stage linear trend per study, pooled with random effects, plus a predicted dose-response curve.

Performance

Pure standard-library Python (no install). numpy is used automatically if already installed to speed up the NMA matrix algebra, but a pure-Python linear-algebra fallback handles typical networks (≤ ~30 treatments) with no dependency.

What NOT to edit

Only create/edit files in configs/. metaforge/ (engine + plots + report) and run.py are finished. output/ is regenerable.

Honesty

Every report is an auto-generated draft. metaforge does the arithmetic; it cannot judge clinical combinability, data-extraction errors, transitivity (for NMA), or publication bias. Verify inputs against source publications before using or citing any result. NMA inconsistency should be checked with node-splitting (not included here) before trusting a ranking.

About

Powerful dependency-free meta-analysis engine: pairwise + network MA (SUCRA) + dose-response + proportions from one small JSON config. Offline HTML reports with plots. Built for low-API-quota use (Gemini CLI free tier).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors