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(),
...
)
Numeric for desired annual EIR. Default = 120
Vector of treatment frequency. Default = 0.4
Vector for ITN coverages that change at update_length intervals. Default = 0
Vector for IRS coverages that change at update_length intervals. Default = 0
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.
Mumeric for Default = 0.2
Mean for number of oocysts formed from a bite. Default=2.5
Shape parameter for oocysts formed. Default=1
# Spatial
Population Size. Default = 100000
Lenth of simulation. Default = 20
How long each update is run for in days. Default = 365
Character for country within which admin2 is in. Default = NULL
Character for admin region. Some fuzzy logic will be used to match. If not provided then no seasonality is introduced. Default = NULL
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 for humans, i.e. importation vector
Spatial mosquio FOI, i.e. importation to mosquitoes vector
# Genetic Params
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.
Number of loci. Default = 24
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.
Vector of population level allele frequencies for the barcode. Default = rep(0.5, num_loci)
Vector of probabilities for crossover events for the barcode. Default = rep(0.5, num_loci)
Starting IBD. Default = 0, which means that each infected individual at initialisation is given a unique ID for their parasites.
Probability of mutation occuring and fixing
Boolean for simulating mutations
# Saving Params
Multiplier for how much more likely mutations are to occur in treated individuals with respect to resistance. Default = 1, i.e no difference
Boolean detailing whether the entire simulation is saved. Default = FALSE
Boolean to save entire simualation at each update save. Default = FALSE
Boolean detailing whether just the human component of the simulation is saved within full_save. Default = FALSE
Boolean detailing whether the logging output is saved each update_length up to years. Default = FALSE
As opposed to having to provide arguments for the
update behaviour, you can pass in a function. See update_saves
for the default one.
Boolean detailing if the human state is also saved during each update_length. Default = FALSE
Boolean for returning just the
genetics data frame without summarising with COI_df_create
.
Default = FALSE
Boolean if summary tables about COI are saved within human yearly save only. Dataframes of age, clinical status binned COI.
Boolean for whether to return just the initialised simulation. Default = FALSE
Boolean for returning only the mean when summarising the population COI, COU etc. Default = TRUE
Boolean for whether we save the frequency of each strain
when summarising with genetics_df_without_summarising
=TRUE.
Default = FALSE
Full file path to a saved model state to be loaded and continued. Default = NULL, which will trigger initialisation
Random seed. Default is Random
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.
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.
What age breaks are used when summarising the population. Default is `c(-0.001, 5, 15, 100.1)`
Numeric for how many sample reps are done. Default = 1.
# Parameter Lists
List created by housekeeping_list_create
List created by drug_list_create
List created by vector_adaptation_list_create
Boolean for returning the summarised genetics (allele
frequencies and maybe strain frequencies) or the whole data frame produced
by pop_strains_df
. Default = TRUE
List created by nmf_list_create
Other parameters to model_param_list_create
pipeline
# Main Params