ONE-TIME SETUP - Run once per machine
cd /Users/htlin/meta-pipe
# 1. Run automated setup
bash setup.sh
# 2. Verify installation
bash verify_environment.shExpected: All checks ✅
- ✅ Python 3.12+ - Data processing
- ✅ uv - Python package manager (fast)
- ✅ R 4.3+ - Statistical analysis
- ✅ cmake - Required for building R packages (e.g.,
fs) on macOS ARM ⚠️ JAGS - Optional (only for Network Meta-Analysis)⚠️ Quarto - Optional (for manuscript rendering)
bibtexparser # BibTeX parsing
biopython # PubMed API
pandas # Data frames
pdfplumber # PDF extraction
pyyaml # YAML files
requests # HTTP requests
# Core (always needed)
meta, metafor # Meta-analysis
dplyr, tidyr # Data wrangling
ggplot2 # Plots
gt, flextable # Tables
# NMA only (optional)
gemtc, rjags # Bayesian NMA
netmeta # Frequentist NMAcd tooling/python
# Create environment
uv venv
# Install packages
uv sync
# Verify
uv run python -c "import pandas; print('✅ OK')"# Run R setup script
Rscript tooling/setup/setup_r_environment.R
# Or manually:
RIn R console:
install.packages("renv")
renv::init()
install.packages(c("meta", "metafor", "ggplot2", "dplyr", "gt"))
renv::snapshot()bash verify_environment.shCheck for:
- ✅ All system tools found
- ✅ Python packages installed
- ✅ R packages installed
⚠️ Optional warnings OK
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add to PATH
export PATH="$HOME/.cargo/bin:$PATH"
# Restart terminalcd tooling/python
rm -rf .venv
uv venv
uv syncmacOS:
xcode-select --install
brew install cmake # Required for packages like 'fs' on ARM MacsLinux:
sudo apt install build-essential libcurl4-openssl-dev cmakeOnly needed for Network Meta-Analysis
# macOS
brew install jags
# Linux
sudo apt install jagsuv run tooling/python/init_project.py --name my-meta-analysisOpen Claude Code and say: "start project my-meta-analysis"
If you cloned this repo on a new machine, restore the environment:
cd tooling/python
uv sync # Restore from pyproject.toml# In R console
renv::restore() # Restore from renv.lockcd tooling/python
uv sync --upgrade# In R console
renv::update()
renv::snapshot()Setup time: 30-60 minutes (first time)
Verification: 2 minutes
Status: Run bash verify_environment.sh anytime