Skip to main content

Installable Streamlit GUI for R-backed Python meta-analysis runners.

Project description

Meta-Analysis Streamlit App

An installable Streamlit GUI for the R-backed Python meta-analysis runners in /Volumes/Firecuda-4TB/R-code_to-python.

The original source directory is treated as read-only. The runner files were copied into this package under meta_analysis_streamlit/runners/ so the app can be installed and launched without editing the source folder.

What It Runs

  • Workbook-level auto routing through the original main.py
  • Binary pairwise meta-analysis
  • Continuous pairwise meta-analysis
  • Single-arm proportion and mean meta-analysis
  • Diagnostic accuracy meta-analysis
  • Frequentist and Bayesian network meta-analysis
  • LM Studio model detection, with manual study-characteristic controls when LM Studio is not reachable

Install

From PyPI after the first release:

python3 -m pip install ams-meta_analysis
ams-meta_analysis

From this folder:

python3 -m pip install -e ".[dev]"

For a normal local wheel install:

python3 -m pip install .

Launch the GUI:

ams-meta_analysis

Run the original workbook orchestrator from the installed package:

meta-analysis-runner "/path/to/workbook.xlsx" --yes

Check the local environment:

meta-analysis-doctor

External Requirements

Python dependencies are installed by pip, but the statistical analyses still need R and the R packages used by the original generated scripts.

Install R, make sure Rscript is on PATH, then install the common R packages:

install.packages(c(
  "meta",
  "metafor",
  "readxl",
  "dplyr",
  "ggplot2",
  "netmeta",
  "gemtc",
  "rjags",
  "RTSA"
))

Bayesian network meta-analysis also needs JAGS installed on the system.

Trial sequential analysis can use the external TSA engine expected by the original code. If needed, point to it with:

export TSA_ANALYSIS_PY="/path/to/tsa_analysis.py"

LLM Provider Behavior

By default, the app checks http://localhost:1234/v1 for LM Studio. If LM Studio is not available, it can use OpenAI-compatible hosted APIs instead.

Supported GUI options:

  • LM Studio: http://localhost:1234/v1
  • OpenAI: https://api.openai.com/v1
  • Gemini through Google's OpenAI-compatible endpoint: https://generativelanguage.googleapis.com/v1beta/openai
  • Custom OpenAI-compatible endpoint
  • Manual/no LLM

The app auto-selects the first available option in this order: LM Studio, OPENAI_API_KEY, GEMINI_API_KEY or GOOGLE_API_KEY, META_ANALYSIS_LLM_API_KEY, then manual mode.

For command-line runs, hosted APIs can also be used with the original --lmstudio-url option because the packaged runners now support OpenAI-compatible authentication headers:

export META_ANALYSIS_LLM_API_KEY="$OPENAI_API_KEY"
meta-analysis-runner "/path/to/workbook.xlsx" \
  --lmstudio-url "https://api.openai.com/v1" \
  --model "your-model" \
  --yes

For Gemini:

export META_ANALYSIS_LLM_API_KEY="$GEMINI_API_KEY"
meta-analysis-runner "/path/to/workbook.xlsx" \
  --lmstudio-url "https://generativelanguage.googleapis.com/v1beta/openai" \
  --model "your-gemini-model" \
  --yes

When no provider is reachable, the GUI still works: it passes --no-lmstudio and asks you to choose basic study characteristics such as analysis route, binary effect size, single-arm outcome type, diagnostic mode, and network model settings.

Output Location

Uploaded workbooks and generated outputs are staged under:

~/.meta_analysis_streamlit/runs/

The app writes a run log and offers a zip download for completed outputs.

Development

Run the tests:

pytest

Build a wheel:

python3 -m build
python3 -m twine check dist/*

See PUBLISHING.md for PyPI release steps, including Trusted Publishing through GitHub Actions.

The project is ready to commit and push from /Volumes/Firecuda-4TB/meta-streamlit-app.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ams_meta_analysis-0.1.3.tar.gz (180.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ams_meta_analysis-0.1.3-py3-none-any.whl (185.7 kB view details)

Uploaded Python 3

File details

Details for the file ams_meta_analysis-0.1.3.tar.gz.

File metadata

  • Download URL: ams_meta_analysis-0.1.3.tar.gz
  • Upload date:
  • Size: 180.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for ams_meta_analysis-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d5cfdcdb0d5a8518dc994533a7e3c9fe94420f7d22a110b75423003ea9fb4405
MD5 eafdbbb2ca75a46296f1fdf12bb40868
BLAKE2b-256 d99e6e10cbd8b62f7bdd6287a1e8872dcfecddbce025e350b00466b1bca986c7

See more details on using hashes here.

File details

Details for the file ams_meta_analysis-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ams_meta_analysis-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 98e9532680b744a5a984492ba429fff88e90c99aa6a1d0284c7b9d70ea3a7204
MD5 f7ccd398ed8161a05e4a331bb6118494
BLAKE2b-256 60d79ccea04baebb94f98786bb01c1bb36ffa266c6a2dd237971dcf36501ce3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page