pipeline steps through creating the parameter list, the equilibrium initialisation and steady state creation before checking and passing suitable parameters to the simulation. This is then saved. If a path to a savedState is provided then this state is loaded and continued.

pipeline(
  EIR = 120,
  ft = 0.4,
  itn_cov = 0,
  irs_cov = 0,
  use_historic_interventions = FALSE,
  survival_percentage = 0.2,
  oocyst_mean = 2.5,
  oocyst_shape = 1,
  N = 1e+05,
  years = 20,
  update_length = 365,
  country = NULL,
  admin = NULL,
  spatial_type = NULL,
  spatial_incidence_matrix = NULL,
  spatial_mosquitoFOI_matrix = NULL,
  island_imports_plaf_linked_flag = FALSE,
  num_loci = 24,
  ibd_length = 1,
  plaf = rep(0.5, num_loci),
  prob_crossover = rep(0.5, num_loci),
  starting_ibd = 0,
  mutation_rate = rep(1e-07, num_loci),
  mutation_flag = FALSE,
  mutation_treated_modifier = 1,
  full_save = FALSE,
  full_update_save = FALSE,
  human_only_full_save = FALSE,
  update_save = FALSE,
  update_save_func = NULL,
  human_update_save = FALSE,
  genetics_df_without_summarising = FALSE,
  summary_saves_only = FALSE,
  set_up_only = FALSE,
  mean_only = TRUE,
  save_lineages = FALSE,
  saved_state_path = NULL,
  seed = as.integer(runif(1, 1, 1e+09)),
  sample_size = Inf,
  sample_states = 0:5,
  age_breaks = c(-0.001, 5, 15, 100.1),
  sample_reps = 1,
  housekeeping_list = housekeeping_list_create(),
  drug_list = drug_list_create(),
  vector_adaptation_list = vector_adaptation_list_create(num_loci),
  only_allele_freqs = TRUE,
  nmf_list = nmf_list_create(),
  ...
)

Arguments

EIR

Numeric for desired annual EIR. Default = 120

ft

Vector of treatment frequency. Default = 0.4

itn_cov

Vector for ITN coverages that change at update_length intervals. Default = 0

irs_cov

Vector for IRS coverages that change at update_length intervals. Default = 0

use_historic_interventions

Boolean as to whether to use interventions on file for the admin and country specified. If TRUE then provide the years as a year range, e.g. 2000:2015. WARNING - Best to have this as FALSE and manually specify the itn_cov, irs_cov and ft.

survival_percentage

Mumeric for Default = 0.2

oocyst_mean

Mean for number of oocysts formed from a bite. Default=2.5

oocyst_shape

Shape parameter for oocysts formed. Default=1

# Spatial

N

Population Size. Default = 100000

years

Lenth of simulation. Default = 20

update_length

How long each update is run for in days. Default = 365

country

Character for country within which admin2 is in. Default = NULL

admin

Character for admin region. Some fuzzy logic will be used to match. If not provided then no seasonality is introduced. Default = NULL

spatial_type

Default = NULL. If spatial is wanted then provide a character describing the type of spatial simulation, which must be one of "island" or "metapop".

spatial_incidence_matrix

Spatial incidence for humans, i.e. importation vector

spatial_mosquitoFOI_matrix

Spatial mosquio FOI, i.e. importation to mosquitoes vector

# Genetic Params

island_imports_plaf_linked_flag

Boolean. Whether imported barcodes for island model are drawn dependent on other sites. Currently, if TRUE, imported barcodes will either be all 0 or will be 1 at all loci where plaf > 0, if rbinom(1, 1, plaf[plaf>0][1]) is TRUE. I.e. the first loci greater than 0 is used to determine if the incoming barcode is 1 at all sites where plaf is greater than 0.

num_loci

Number of loci. Default = 24

ibd_length

If we are simulating IBD dynamics, each loci is now represented by a bitset of ibd_length. Thus ibd_length needs to be long enough to ensure that as new identity relationships occur, i.e. an importation barcode will be a new identity. e.g. If are population is 1000, we may expect at 80 2400 different identities, i.e. 2^ibd_length > 2400. However, keep in mind importations as these need to be continually new, i.e. if we are simulating for 30 years, with 3 importations a day, then we will need at least length to ensure that 2^ibd_length > 2400 + (30*365*3). This will probably be automatically calculated in the future. If we are not ding IBD, then this should be 1, which is the defalt.

plaf

Vector of population level allele frequencies for the barcode. Default = rep(0.5, num_loci)

prob_crossover

Vector of probabilities for crossover events for the barcode. Default = rep(0.5, num_loci)

starting_ibd

Starting IBD. Default = 0, which means that each infected individual at initialisation is given a unique ID for their parasites.

mutation_rate

Probability of mutation occuring and fixing

mutation_flag

Boolean for simulating mutations

# Saving Params

mutation_treated_modifier

Multiplier for how much more likely mutations are to occur in treated individuals with respect to resistance. Default = 1, i.e no difference

full_save

Boolean detailing whether the entire simulation is saved. Default = FALSE

full_update_save

Boolean to save entire simualation at each update save. Default = FALSE

human_only_full_save

Boolean detailing whether just the human component of the simulation is saved within full_save. Default = FALSE

update_save

Boolean detailing whether the logging output is saved each update_length up to years. Default = FALSE

update_save_func

As opposed to having to provide arguments for the update behaviour, you can pass in a function. See update_saves for the default one.

human_update_save

Boolean detailing if the human state is also saved during each update_length. Default = FALSE

genetics_df_without_summarising

Boolean for returning just the genetics data frame without summarising with COI_df_create. Default = FALSE

summary_saves_only

Boolean if summary tables about COI are saved within human yearly save only. Dataframes of age, clinical status binned COI.

set_up_only

Boolean for whether to return just the initialised simulation. Default = FALSE

mean_only

Boolean for returning only the mean when summarising the population COI, COU etc. Default = TRUE

save_lineages

Boolean for whether we save the frequency of each strain when summarising with genetics_df_without_summarising=TRUE. Default = FALSE

saved_state_path

Full file path to a saved model state to be loaded and continued. Default = NULL, which will trigger initialisation

seed

Random seed. Default is Random

sample_size

Numeric for number of individuals to be sampled at the end of each update. Default = Inf, which samples everyone. If you provide a vector of sample sizes it will sample at each specified sample size.

sample_states

Numeric for which sample infection states are to be included in sampling. Default = 0:5 (i.e. all states). 1:4 for example would ensure only infected individuals are included.

age_breaks

What age breaks are used when summarising the population. Default is `c(-0.001, 5, 15, 100.1)`

sample_reps

Numeric for how many sample reps are done. Default = 1.

# Parameter Lists

housekeeping_list

List created by housekeeping_list_create

drug_list

List created by drug_list_create

vector_adaptation_list

List created by vector_adaptation_list_create

only_allele_freqs

Boolean for returning the summarised genetics (allele frequencies and maybe strain frequencies) or the whole data frame produced by pop_strains_df. Default = TRUE

nmf_list

List created by nmf_list_create

...

Other parameters to model_param_list_create

pipeline

Details

# Main Params