Skip to content

Commit

Permalink
First addition of antibody kinetics vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshay218 committed Dec 14, 2023
1 parent f22ef5b commit 909248f
Show file tree
Hide file tree
Showing 13 changed files with 317 additions and 121 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ BugReports: https://github.com/seroanalytics/seroepirecipes/issues
Imports:
methods,
ggplot2,
dplyr,
Rcpp (>= 1.0.11),
RcppParallel (>= 5.0.1),
rstan (>= 2.18.1),
Expand All @@ -41,8 +42,7 @@ VignetteBuilder: knitr
Suggests:
knitr,
rmarkdown,
cowplot,
dplyr,
patchwork,
magrittr,
tidyr,
lubridate
Expand Down
4 changes: 3 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ All of the tutorials use either simulated datasets from the [serosim](https://se
* (WIP) [Fitting a hierarchical antibody kinetics model to longitudinal antibody measurements]((https://seroanalytics.github.io/seroepirecipes/articles/antibody_kinetics_models.html))
* (WIP) Using mixture models to classify serostatus
* [Estimating the force of infection using serocatalytic models](https://seroanalytics.github.io/seroepirecipes/articles/serocatalytic_model.html)
* (WIP) Inferring infection histories using _serosolver_

Upcoming vignettes:
* (WIP) Estimating the force of infection using antibody acquisition models
* (WIP) Infection times using reversible jump MCMC
* (WIP) Inferring infection histories using _serosolver_
* (WIP) Time-since-infection machine learning classifier

## Installation
Expand Down
156 changes: 156 additions & 0 deletions docs/articles/antibody_kinetics_models.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
218 changes: 104 additions & 114 deletions docs/articles/serocatalytic_model.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ pkgdown_sha: ~
articles:
antibody_kinetics_models: antibody_kinetics_models.html
serocatalytic_model: serocatalytic_model.html
last_built: 2023-12-14T13:32Z
last_built: 2023-12-14T13:38Z

Binary file modified docs/reference/kinetics_power_function-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<url>
<loc>/LICENSE-text.html</loc>
</url>
<url>
<loc>/articles/antibody_kinetics_models.html</loc>
</url>
<url>
<loc>/articles/index.html</loc>
</url>
Expand All @@ -18,13 +21,55 @@
<url>
<loc>/index.html</loc>
</url>
<url>
<loc>/reference/Fast-observation-error-function-continuous.html</loc>
</url>
<url>
<loc>/reference/boost_function.html</loc>
</url>
<url>
<loc>/reference/f_rise.html</loc>
</url>
<url>
<loc>/reference/f_wane.html</loc>
</url>
<url>
<loc>/reference/hello.html</loc>
</url>
<url>
<loc>/reference/index.html</loc>
</url>
<url>
<loc>/reference/kinetics_ceiling.html</loc>
</url>
<url>
<loc>/reference/kinetics_gamma.html</loc>
</url>
<url>
<loc>/reference/kinetics_piecewise.html</loc>
</url>
<url>
<loc>/reference/kinetics_power_function.html</loc>
</url>
<url>
<loc>/reference/kinetics_power_function_cpp.html</loc>
</url>
<url>
<loc>/reference/kinetics_simple.html</loc>
</url>
<url>
<loc>/reference/kinetics_simple_ode.html</loc>
</url>
<url>
<loc>/reference/rcpp_hello.html</loc>
</url>
<url>
<loc>/reference/seroepirecipes-package.html</loc>
</url>
<url>
<loc>/reference/wane_function.html</loc>
</url>
<url>
<loc>/reference/wane_function_asymptote.html</loc>
</url>
</urlset>
7 changes: 5 additions & 2 deletions vignettes/antibody_kinetics_models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ knitr::opts_chunk$set(

```{r setup}
library(seroepirecipes)
library(cowplot)
library(ggplot2)
library(patchwork)
library(dplyr)
times <- seq(0,365,by=0.1)
Expand All @@ -28,8 +30,9 @@ y2 <- data.frame(y=kinetics_simple(times,pars_simple),t=times,ver="Simple model
pars_ranjeva <- c(y0=1,peak=80,k=0,t_peak=28,w=0.008,frac=0.5)
y3 <- data.frame(y=kinetics_ceiling(times,pars_ranjeva),t=times,ver="Biphasic model (Ranjeva et al. 2019)")
pars_ode <- c("A"=0,"beta"=100,"rho"=0.25,"c_s"=0.15,"c_l"=0.0075,"delta"=0,"r"=0.001)
pars_ode <- c("A"=0,"beta"=100,"rho"=0.25,"c_s"=0.25,"c_l"=0.1,"delta"=0,"r"=0.001)
y4 <- data.frame(y=kinetics_simple_ode(times,pars_ode),t=times,ver="ODE model (Pelleau et al. 2021)")
ggplot(y4) + geom_line(aes(x=t,y=y))
pars_gamma <- c("y0"=0,"peak"=300,"shape"=1.2,"scale"=50)
y5 <- data.frame(y=kinetics_gamma(times,pars_gamma),t=times,ver="Gamma function (Zhao et al. 2018)")
Expand Down

0 comments on commit 909248f

Please sign in to comment.