From d6ad16e2d4631098b34392ef535947614b1b0905 Mon Sep 17 00:00:00 2001 From: "alex.hill@gmail.com" Date: Thu, 3 Oct 2024 22:53:18 +0100 Subject: [PATCH] update vignette and readme --- README.md | 18 ++++++++++++++++-- vignettes/data.Rmd | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a901f1..ec6b7a1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,22 @@ # epikinetics [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![R-CMD-check](https://github.com/seroanalytics/epikinetics/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/seroanalytics/epikinetics/actions/workflows/check-standard.yaml) [![codecov](https://codecov.io/gh/seroanalytics/epikinetics/graph/badge.svg?token=5MZYYDUZYH)](https://codecov.io/gh/seroanalytics/epikinetics) -`epikinetics` is an R package for Bayesian hierarchical modelling of antibody kinetics. +`epikinetics` is an R package for Bayesian hierarchical modelling of antibody kinetics. The underlying model is taken from [Russell TW et al., Real-time estimation of immunological responses against emerging SARS-CoV-2 variants in the UK: a mathematical modelling study.](#References) +See the [case study vignette](https://seroanalytics.org/epikinetics/articles/biokinetics.html) for a replication of some key figures from the paper using `epikinetics`. + +Three publicly available datasets from the above paper are also installed with the package and +can be used as test input data: + +```{r} +delta <- data.table::fread(system.file("delta_full.rds", package = "epikinetics")) +ba2 <- data.table::fread(system.file("ba2_full.rds", package = "epikinetics")) +xbb <- data.table::fread(system.file("xbb_full.rds", package = "epikinetics")) +``` + +If running the model with your own data, see the [data vignette](https://seroanalytics.org/epikinetics/articles/data.html) for +an explanation of the input format. # Installing @@ -24,7 +37,8 @@ remotes::install_github("seroanalytics/epikinetics") Alternatively, you can run `epikinetics` via a Docker image, mounting a working directory which contains your input data files: ``` -docker run -v /workdir:/ -it seroanalytics/epikinetics:main +docker pull seroanalytics/epikinetics:main +docker run -v /path/to/local/workdir:/workdir -it seroanalytics/epikinetics:main ``` # Developing diff --git a/vignettes/data.Rmd b/vignettes/data.Rmd index a911260..443dac8 100644 --- a/vignettes/data.Rmd +++ b/vignettes/data.Rmd @@ -20,14 +20,19 @@ The model requires a data table containing the following columns: ### pid A unique numeric id to identify a person across observations + ### date The date of the observation + ### last_exp_date The last date on which the person was exposed + ### titre_type The name of the titre + ### value The value of the titre + ### censored Whether this observation should be censored: -1 for lower, 1 for upper, 0 for none