Skip to content

Commit

Permalink
Add alpha version shiny app
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard Grebe authored and Eduard Grebe committed Sep 11, 2020
1 parent 0192ac1 commit 3480d2d
Show file tree
Hide file tree
Showing 8 changed files with 504 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,10 @@ dmypy.json

# Rendered notebooks
*.html
*.pdf
*.pdf

# Shinyapps.io connection
rsconnect/

.Rproj.user
.Rhistory
11 changes: 11 additions & 0 deletions app/.Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ------------------------- Settings (Do not edit) -------------------------- #

if (Sys.info()[['user']] == 'shiny'){
VIRTUALENV_NAME = 'residualrisk'

# Running on shinyapps.io
Sys.setenv(PYTHON_PATH = 'python3')
Sys.setenv(VIRTUALENV_NAME = VIRTUALENV_NAME) # Installs into default shiny virtualenvs dir
Sys.setenv(RETICULATE_PYTHON = paste0('/home/shiny/.virtualenvs/', VIRTUALENV_NAME, '/bin/python'))

}
36 changes: 36 additions & 0 deletions app/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## About

This application implements a model for the infectious window period (IWP) with
NAT screening for a viral transfusion-transmissible infection. The default
parameters are appropriate for HIV, but with appropriate parameters the logic is
equally applicable to other infections like HBV and HCV. The infectious-but-
undetectable window period depends on:
* the probability of transfusion transmission as a function of viral
concentration in the transfused component
* the probability of non-detection as a function of viral concentration in the
screening sample (which depends on the sensitivity of the NAT screening assay,
minipool size and the retesting procedure)
* the viral growth rate (or doubling time) during early infection ("ramp-up
viremia")

The infectious window period is given by the area under the joint probability of
transfusion-transmission and non-detection.

The residual risk of transfusion transmission despite screening is given by the
probability that a random donation will be infection-positive and very recently
acquired -- i.e. incidence x infectious window period.

The model incorporates a "dose-response" model for the probability of
transfusion-transmission:
* Belov, AA et al. (2020) Transfusion. Submitted.

and an adaptation of the Weusten model for infectious window period:
* Weusten, J. et al. (2011) Transfusion.

Written by Eduard Grebe <[email protected]>.

This program is free software: you can redistribute it and/or modify
it under the terms of the [GNU Affero General Public License]
(https://www.gnu.org/licenses/agpl-3.0.en.html) as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
437 changes: 437 additions & 0 deletions app/app.R

Large diffs are not rendered by default.

Binary file added app/iwp_bs_default.rds
Binary file not shown.
File renamed without changes.
13 changes: 13 additions & 0 deletions app/residualriskapp.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX
Binary file added app/www/vri_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3480d2d

Please sign in to comment.