Skip to content

Commit

Permalink
updated vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
dchodge committed Oct 14, 2024
1 parent 8829352 commit 521634e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 16 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# serojump

![plot](./images/schematic_A.png)
![Schematic of the methods behind the `serojump` package](./images/schematic_A.png)

## Overview

The `serojump` package provides tools for fitting serological models to antibody kinetics data using reversible-jump Markov Chain Monte Carlo (RJ-MCMC). It enables researchers to model the dynamics of antibody levels in response to infections, incorporating both observational and antibody kinetics models. The package supports the inclusion of priors and various exposure scenarios, making it highly flexible for serological data analysis.

This package is ideal for researchers looking to:

- Model antibody kinetics over time.
- Estimate infection rates and antibody waning using serological data.
- Perform MCMC inference on serological models.
- Model antibody kinetics over time
- Estimate infection rates and antibody waning using serological data
- Perform MCMC inference on serological models

The best place to get started with serojump is our preprint. In this repo, ceveral model templates are provided to simplify usage, while also allowing users to customize models for specific research questions.
The best place to get started with serojump is our preprint (coming soon). In this repo, ceveral model templates are provided to simplify usage, while also allowing users to customize models for specific research questions.

## Installation

Expand All @@ -26,7 +26,8 @@ Make sure you have R installed on your system. You can download R from [https://

You can install the development version of `serojump` from GitHub using the `devtools` package. If you don't already have `devtools` installed, you can install it with:

```{r}

```
install.packages("devtools")
devtools::install_github("seroanalytics/serojump")
Expand All @@ -36,7 +37,8 @@ devtools::install_github("seroanalytics/serojump")
### Step 3: Load `serojump` from GitHub
After installation, you can load the serojump package into your R session with:

```{r}

```
library(serojump)
Expand All @@ -46,12 +48,12 @@ library(serojump)

For detailed usage instructions, please refer to the package vignettes and examples. These vignettes explain:

- The format of the data require for serojump to work, click [here](vignette("data_format.Rmd")).
- How to define observational models and antibody kinetics models and run the serojump sampler, click [here](vignette("model_define")).
- The format of the data require for serojump to work, click [here](https://seroanalytics.org/serojump/articles/data_format.html).
- How to define observational models and antibody kinetics models and run the serojump sampler, click [here](https://seroanalytics.org/serojump/articles/model_define.html).
- Specify priors for your models and integrate empirical data [coming soon]

In addition we have several worked examples of `serojump` on:
- Simulated data [here](vignette("sim_recovery")).
- Simulated data click [here](https://seroanalytics.org/serojump/articles/sim_recovery.html).

---

Expand Down
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.
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.
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 vignettes/data_format.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Intro 1: Data format for input files"
author: "David Hodgspon"
author: "David Hodgson"
date: "`r Sys.Date()`"
output: html_document
---
Expand Down
6 changes: 3 additions & 3 deletions vignettes/model_define.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This document explains two critical parts of the model defined in the provided R

## 0. The Observational Model

```{r}
```{r, echo=FALSE, message=FALSE, warning=FALSE, results='hide'}
library(devtools)
library(tidyr)
Expand Down Expand Up @@ -204,7 +204,7 @@ seroModel <- createSeroJumpModel(data_sero, NULL, modeldefinition)

## 4. Run the model!

```{r}
```{r, echo=FALSE, message=FALSE, warning=FALSE, results='hide'}
save_info <- list(
file_name = "simple",
Expand All @@ -224,7 +224,7 @@ model_summary <- runInfRJMCMC(seroModel, rj_settings, save_info = save_info)

## 5. Plot the outputs

```{r}
```{r, echo=FALSE, message=FALSE, warning=FALSE, results='hide'}
# Need to have save_info model_summary to run these
plotMCMCDiagnosis(model_summary, save_info = save_info) # plots the convergence diagnosis
Expand Down
4 changes: 2 additions & 2 deletions vignettes/sim_recovery.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This document describes the steps and components of the provided R code for crea
---

## Step 1: Load Required Libraries
```{r}
```{r, echo=FALSE, message=FALSE, warning=FALSE, results='hide'}
library(devtools)
library(tidyr)
Expand Down Expand Up @@ -224,7 +224,7 @@ model_no_cop <- createSeroJumpModel(data_titre_model, NULL, modeldefinition_no_c
```


```{r}
```{r, echo=FALSE, message=FALSE, warning=FALSE, results='hide'}
rj_settings <- list(
numberChainRuns = 4,
Expand Down

0 comments on commit 521634e

Please sign in to comment.