Giter VIP home page Giter VIP logo

modeltbbcgengland's Introduction

Model Tuberculosis, including BCG vaccination, in England

ModelTBBCGEngland is an R package that contains models, summarised data, and fitting scripts for a model of TB, including BCG vaccination, fit to routine surveillance data in England.

Installation

You can install ModelTBBCGEngland directly from github with:

# install.packages("devtools")
devtools::install_github("seabbs/ModelTBBCGEngland")

Model development

For a discussion of the model development process please see here. For a discussion of the model fitting pipeline please see here.

Model fitting

Run the following code in the terminal after installing and building the package and opening the Rstudio project. The results (and logs) will be found at ./vignettes/results.

nohup Rscript inst/scripts/run-scenarios.R --sample_priors --fit --reports

To fit only the main scenario add --scenario baseline. If interested in rapid exploration or if using limited compute resources experiment with the --calib_run flag which uses point estimates for the initial conditions and process noise - reducing the number of particles required. Alternatively explore the other options available using --help. An example of a fitting run used for exploration is below.

nohup Rscript inst/scripts/run-scenarios.R --sample_priors --fit --reports --cores 16 --calib_run --scenario baseline

For more interactive testing see ./tests/manual-tests/test-rbi-fit.R. This script was used during pipeline development.

Using docker

This analysis was developed in a docker container based on the tidyverse docker image. To run the docker image run:

docker run -d -p 8787:8787 -e USER=ModelTBBCGEngland -e PASSWORD=ModelTBBCGEngland \
    --mount type=bind,source=$(pwd)/results/modeltbbcgengland,target=/home/rstudio/ModelTBBCGEngland/vignettes/results \
    --mount type=bind,source=$(pwd)/data/tb_data,target=/home/rstudio/ModelTBBCGEngland/data-raw/tb_data \
    --name modeltransvsdirect seabbs/modeltbbcgengland

This command expects both a data and results folder to be available to be mounted. Create them using the following (Mac/Linux).

mkdir -p results/modeltbbcgengland
mkdir -p data/tb_data

The rstudio client can be found on port :8787 at your local machines ip. The default username:password is seabbs:seabbs, set the user with -e USER=username, and the password with - e PASSWORD=newpasswordhere.

To run a plain R terminal use:

docker run --rm -it --user seabbs modeltbbcgengland /usr/bin/R

To run a plain bash session:

docker run --rm -it --user seabbs modeltbbcgengland /bin/bash

modeltbbcgengland's People

Contributors

seabbs avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.