-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge cabp_install into GH-191/longleaf-batch-submission
- Loading branch information
Showing
20 changed files
with
159 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
|
||
# FlepiMoP | ||
|
||
The *Fle*xible *Epi*demic *Mo*deling *P*ipeline, `FlepiMoP`, makes it easy to build an infectious disease model, infer that model's parameters, and project scenario outcomes. | ||
|
||
# Quickstart | ||
|
||
```bash | ||
mkdir myflepimopworkspace && cd $_ | ||
git clone [email protected]:HopkinsIDD/flepiMoP.git --depth 1 | ||
./flepiMop/install_ubuntu.sh | ||
cp -r ./flepiMoP/examples/tutorial_two_subpops test_model && cd $_ | ||
gempyor-simulate -c config_sample_2pop.yml | ||
flepimop-inference-main -c config_sample_2pop_inference.yml | ||
``` | ||
|
||
# flepiMoP | ||
|
||
Welcome to the Johns Hopkins University Infectious Disease Dynamics COVID-19 Working Group's `Flexible Epidemic Modeling Pipeline`(“FlepiMoP”, formerly the COVID Scenario Pipeline, “CSP”), a flexible modeling framework that projects epidemic trajectories and healthcare impacts under different suites of interventions in order to aid in scenario planning. The model is generic enough to be applied to different spatial scales given shapefiles, population data, and COVID-19 confirmed case data. There are multiple components to the pipeline, which may be characterized as follows: 1) epidemic seeding; 2) disease transmission and non-pharmaceutical intervention scenarios; 3) calculation of health outcomes (hospital and ICU admissions and bed use, ventilator use, and deaths); and 4) summarization of model outputs. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env Rscript | ||
|
||
.args <- commandArgs(trailingOnly = TRUE) | ||
|
||
if (length(.args) != 1) { | ||
stop("Usage: setup.R <flepimop-path>") | ||
} | ||
|
||
# TODO sniff for upgrade mode | ||
|
||
if (!require(remotes)) { | ||
install.packages("remotes", repos = c(getOption("repos"), "http://cran.r-project.org")); | ||
stopifnot("Could not load `remotes` package." = require(remotes)) | ||
} | ||
|
||
rpkgs <- list.files(file.path(.args[1], "flepimop", "R_packages"), full.names = TRUE) | ||
|
||
for (pkg in rpkgs) { | ||
install.packages(pkg, repos = NULL, type = "source") | ||
} | ||
|
||
# other dependencies for analysis scripts | ||
for (pkg in c("ggfortify", "flextable", "optparse", "cowplot")) { | ||
if (!requireNamespace(pkg, quietly = TRUE)) { | ||
install.packages(pkg, repos = c(getOption("repos"), "http://cran.r-project.org")); | ||
if (!requireNamespace(pkg)) { | ||
stop(sprintf("Could not install and/or load `%s` package.", pkg)) | ||
} | ||
} | ||
} | ||
|
||
# install the R scripts as executables | ||
inference::install_cli() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,6 @@ Imports: | |
reticulate, | ||
truncnorm, | ||
arrow | ||
RoxygenNote: 7.2.3 | ||
RoxygenNote: 7.3.2 | ||
Suggests: | ||
testthat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
#' @title Install Inference Scripts | ||
#' | ||
#' @description | ||
#' Installs the scripts for R-based FlepiMoP inference. | ||
#' | ||
#' @param path The path to install the scripts to. Default is `usr/local/bin` (unix-like). | ||
#' | ||
#' @param overwrite Whether to overwrite existing scripts. Default is `TRUE`. see [base::file.copy()]. | ||
#' | ||
#' @export | ||
install_cli <- function( | ||
path = if (.Platform$OS.type == "unix") normalizePath(file.path("/usr", "local", "bin")) else stop("Unsupported OS") | ||
) { | ||
scriptfiles <- list.files( | ||
system.file("scripts", package = utils::packageName()), pattern = "flepimop-.*", full.names = TRUE | ||
) | ||
from <- scriptfiles | ||
to <- file.path(path, gsub("\\.R$", "", basename(scriptfiles))) | ||
file.symlink(from, to) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.