output: github_document

imprinting

Overview

imprinting is an R package to reconstruct birth year-specific probabilities of imprinting to influenza A. Reconstructions are done following the methods of Gostic et al. (2016).

By default the package calculates subtype-specific probabilities of imprinting to H1N1, H2N2, and H3N2, but it is possible to calculate other kinds of imprinting probabilities (e.g. clade-level, strain-level, vaccination) using user-provided circulation frequencies. We may consider including influenza B-specific probabilities in future updates if there is demand. Please submit an issue to let us know if you need influenza B-specific functionality.

The generated probabilities may be modified, plotted, and used in independent research. Please cite Gostic et al. (2016), and this package (citation("imprinting")).

Installation

imprinting is not yet available on CRAN, but the development version can be installed from github, using the devtools package:

# Install devtools
install.packages("devtools")
# Use devtools to install impritning from github
devtools::install_github("cobeylab/imprinting") 

Usage

library(imprinting)


## Get imprinting probabilities
probs = get_imprinting_probabilities(observation_years = c(2000, 2022),
                             countries = c('United States', 'Brazil', 'Vietnam', 'Indonesia'))
probs
#> # A tibble: 3,360 × 5
#>    year country       birth_year subtype imprinting_prob
#>   <dbl> <chr>              <dbl> <chr>             <dbl>
#> 1  2000 United States       2022 A/H1N1        0.297    
#> 2  2022 United States       2022 A/H1N1        0.0000297
#> 3  2000 Brazil              2022 A/H1N1        0.331    
#> 4  2022 Brazil              2022 A/H1N1        0        
#> 5  2000 Vietnam             2022 A/H1N1        0.267    
#> # … with 3,355 more rows
## Plot imprinting probabilities 
##  - up to five countries
##  - show aging of birth cohorts from first to last observation year
plot_many_country_years(probs)
plot of chunk unnamed-chunk-3
## Plot imprinting probabilities
##  - select the first country year in the probs tibble by default
plot_one_country_year(probs)
plot of chunk unnamed-chunk-4

Data

There are two main kinds of data used to reconstruct birth year-specific imprinting probailities. Because there is no single epidemiological data source that documents the entire circulation history of influenza from 1918-present, we pull from various sources.

1. Cocirculation data

Cocirculation data describes the relative dominance of each influenza A subtype (H1N1, H2N2, H3N2) in circulation each year. It is informed by the following data:

2. Intensity data

Children are more likely to imprint in years with high levels of influenza A circulation. We define an annual intensity score to characterize annual circulation intensity, and to scale the annual probability of primary infection. By definition, a circulation intensity of 1 indicates average levels of influenza ciruclation. We use three kinds of data to characterize annual circulation intensity:

Funding

Development of this R package was supported by the NIH Centers of Excellence in Influenza Research and Response (CEIRR) Network of the National Institutes of Health under contract number 75N93021C00015. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

Bugs

To report bugs, please file an issue with a reproducible example at github.com/cobeylab/imprinting.