Introduction to bayesynergy
bayesynergy.Rmd
The bayesynergy
R package implements a Bayesian
semi-parametric regression model for estimating the dose-response
function of in-vitro drug combination experiments. The Bayesian
framework offers full uncertainty quantification of the dose response
function and any derived summary statistics, as well as natural handling
of replicates and missing data. The Bayesian model is implemented in RStan, taking
advantage of the efficient ‘No U-Turn Sampler’ as well as variational
Bayes for quick approximations of the true posterior.
The package is further equipped with plotting functions for summarizing a drug response experiment, parallel processing for large drug combination screen, as well as plotting tools for summarizing and comparing these.
Basic usage example
To get started, simply load the package with
We have included an example dataset from a large drug combination screening experiment on diffuse large B-cell lymphoma. To access it, simply run
## Viability ibrutinib ispinesib
## [1,] 1.2295618 0.0000 0
## [2,] 1.0376006 0.1954 0
## [3,] 1.1813851 0.7812 0
## [4,] 0.5882688 3.1250 0
## [5,] 0.4666700 12.5000 0
## [6,] 0.2869514 50.0000 0
where y
contains the measured post-treatment viability,
and x
the corresponding drug concentrations of the two
drugs.
To fit the model, simply run
fit <- bayesynergy(y,x)
and wait for the sampling process to complete.
The results can then be plotted to inspect the model fit e.g. for the monotherapies
plot(fit)
And similarly for the full dose-response surface in an interactive figure
Quantitative measures of drug response and synergy, alongside summaries of the model parameters can be extracted by running
summary(fit)
## mean se_mean sd 2.5% 50% 97.5% n_eff Rhat
## la_1[1] 0.3349 0.001656 0.0718 1.69e-01 3.45e-01 0.457 1878 1.000
## la_2[1] 0.3884 0.003316 0.0578 2.09e-01 3.97e-01 0.457 303 1.012
## log10_ec50_1 0.4795 0.003704 0.1524 2.37e-01 4.51e-01 0.841 1694 1.000
## log10_ec50_2 -1.0445 0.049508 1.2312 -3.30e+00 -8.85e-01 0.489 618 1.005
## slope_1 2.0171 0.017844 0.9022 8.81e-01 1.80e+00 4.330 2556 1.000
## slope_2 1.4840 0.021399 1.0806 1.32e-01 1.21e+00 4.329 2550 1.000
## ell 3.1276 0.040183 1.6303 1.24e+00 2.78e+00 7.015 1646 1.004
## sigma_f 0.8420 0.016650 0.8033 1.68e-01 6.10e-01 2.736 2327 1.001
## s 0.0971 0.000262 0.0152 7.24e-02 9.55e-02 0.132 3361 1.000
## dss_1 33.4873 0.044498 2.9601 2.77e+01 3.35e+01 39.352 4425 0.999
## dss_2 59.4708 0.041415 2.8112 5.36e+01 5.95e+01 64.932 4607 1.000
## rVUS_f 82.7361 0.012960 0.8749 8.09e+01 8.28e+01 84.381 4557 1.001
## rVUS_p0 73.0607 0.033201 2.2228 6.85e+01 7.31e+01 77.315 4482 1.000
## VUS_Delta -9.6754 0.037443 2.3948 -1.44e+01 -9.67e+00 -5.082 4091 1.000
## VUS_syn -9.7227 0.036766 2.3500 -1.45e+01 -9.69e+00 -5.332 4086 1.000
## VUS_ant 0.0474 0.001892 0.1125 4.39e-06 8.28e-05 0.384 3536 1.000
##
## log-Pseudo Marginal Likelihood (LPML) = 52.06799
For a more detailed look into the functionality of the package, please see the other vignettes.