Skip to main content

tombolo

Python interface to R statistics via Docker.

Requirements

Docker must be installed and running, and the tombolo image must be pulled:

docker pull ethandavisecd/tombolo:latest

Installation

pip install tombolo

Usage

Network meta-analysis

nma expects pairwise contrast data. Each row is a comparison between two treatments within one study, expressed as a mean difference and its standard error:

import tombolo

data = [
    {"studlab": "Study A", "treat1": "X", "treat2": "Y", "TE": 0.32, "seTE": 0.12},
    {"studlab": "Study A", "treat1": "X", "treat2": "Z", "TE": 0.48, "seTE": 0.14},
    {"studlab": "Study B", "treat1": "X", "treat2": "Z", "TE": 0.51, "seTE": 0.18},
    {"studlab": "Study C", "treat1": "Y", "treat2": "Z", "TE": 0.19, "seTE": 0.15},
]

result = tombolo.nma(data, greater_is_better=True)

Bayesian network meta-analysis

bnma expects arm-level summary statistics:

data = [
    {"study": "Study A", "treatment": "X", "mean": 0.82, "std.dev": 0.21, "sampleSize": 30},
    {"study": "Study A", "treatment": "Y", "mean": 0.74, "std.dev": 0.19, "sampleSize": 30},
    {"study": "Study B", "treatment": "X", "mean": 0.79, "std.dev": 0.23, "sampleSize": 25},
    {"study": "Study B", "treatment": "Z", "mean": 0.61, "std.dev": 0.25, "sampleSize": 25},
]

result = tombolo.bnma(data, greater_is_better=True)

greater_is_better controls the direction of ranking. Set to False when lower values are preferable (e.g. error rates).

Plots

from tombolo.plots import (
    ranking_plot,
    league_table,
    forest_plot,
    heterogeneity_table,
    prediction_table,  # nma only
    convergence_table, # bnma only
)

ranking_plot(result)
league_table(result)
forest_plot(result, reference="X")
heterogeneity_table(result)

Each function returns a matplotlib.figure.Figure.

Configuration

By default tombolo uses the ethandavisecd/tombolo:latest Docker image. To use a different image:

export TOMBOLO=myorg/tombolo:v1.0

Metadata

Release files for tombolo 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tombolo 0.2.3
File Size Uploaded
tombolo-0.2.3.tar.gz 118.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tombolo 0.2.3
File Interpreter ABI Platform
tombolo-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 127.2 kB

Release files / tombolo-0.2.3.tar.gz

Download URL tombolo-0.2.3.tar.gz
Size 118.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6e849000ccd5a5351d0619bd25178f5124f0b9932e184c788f26886743905fd1
BLAKE2b-256 checksum
How to use checksums
a4ae240a01c2fb822b39fc00cf7b66dddcb6238418d6170d5c23f987972c78d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / tombolo-0.2.3-py3-none-any.whl

Download URL tombolo-0.2.3-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd2b7fab3dadc1b971125186f9145cdbcbc2fa3cd00e20dd0e6fd00e195d8f6c
BLAKE2b-256 checksum
How to use checksums
3f96182eda0bbb4c78b68ffc5c2b7de9dad491c673af3f5b981d41036f4a0b70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page