Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/lshtm-tbmg/tbmod-pub-aTBvaccines
23 February 2026, 09:39:33 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    No releases to show
  • 1a586a8
  • /
  • 1c_GenEpiOutput_no-new-vaccine.R
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:7d427e6898bc00efe7f18358ad650035ff79ce6b
origin badgedirectory badge
swh:1:dir:1a586a871098f12f81209577f48b3ee4b816619d
origin badgerevision badge
swh:1:rev:053ca109710a4d2792027a0e95a660f68c81e7a5
origin badgesnapshot badge
swh:1:snp:8ccd21bde57b8a0593af606bf10b8b38a4db291f

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 053ca109710a4d2792027a0e95a660f68c81e7a5 authored by Rebecca Clark on 15 December 2025, 16:57:33 UTC
updates: files to run aTB and vaccines model
Tip revision: 053ca10
1c_GenEpiOutput_no-new-vaccine.R
#-----------------------------------------------
# Run no-new-vaccine model and output epi trends
# Rebecca Clark
# Last updated: 16 September 2025
#-----------------------------------------------

rm(list=ls())

# Set-up: Load in the required packages
suppressPackageStartupMessages({
  require(tbmod)
  library(here)
  library(data.table)
  library(ggplot2)
  library(cowplot)
  library(patchwork)
  #source(here("R", "run_param_set.R"))
  source(here("R", "run_param_set_zero.R"))
  source(here("R", "run_baseline_uncertainty.R"))
  theme_set(theme_minimal_grid() + panel_border(color = "black"))
  
})


######## Set the country code, parameters
cc <- "IND"

# can replace with baseline/high/med/low instead of zero
parameters <- fread("./processing_files/param_sets/zero_plot.csv")


######## Set-up and generate the output ######
total_counts <- list()
total_pops <- list()

for (j in 1:nrow(parameters)) {
  
  print(paste0("parameter set = ", j))
  
  params     <- parameters[j, ]
  params_uid <- params[, uid]
  params     <- params[, !c("uid", "nhits")]
  params     <- unlist(params)
  
  # Run the model with the parameter set
  param_output <- run_param_set_zero(params, params_uid)
  
  total_counts[[j]] <- param_output[["counts"]]
  total_pops[[j]] <- param_output[["pops"]]

}

cc_counts <- rbindlist(total_counts)
cc_pops <- rbindlist(total_pops)


######## Subset the data to get the variables to plot ######## 
n_epi <- run_baseline_uncertainty(cc_counts, cc_pops)

n_epi_long <- melt(n_epi, id.vars = c("Country", "Year", "AgeGrp", "UID", "Runtype"),
                   variable.name = "Indicator")

n_epi_long <- n_epi_long[, `:=`(medval = median(value),
                                lowval = quantile(value, 0.025),
                                highval = quantile(value, 0.975)),
                         by = .(Year, AgeGrp, Indicator, Runtype)]

fwrite(n_epi_long, paste0("./epi_output/no-new-vaccine_output/", cc, "_n_epi_zero.csv"))


######## 



back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API