Functions
Functions included in the Schistoxpkg.
Schistoxpkg.Human
— TypeHuman
This struct contains the information about a human individual. This contains age, the pre determined age of death, community they are in, their gender, predisposition to picking up cercariae, the number of larvae, female and male worms and eggs in the individual along with a count of total lifetime eggs. Also it has their age dependent contact rate, adherence and access to interventions.
Schistoxpkg.Parameters
— TypeParameters
This struct containing all of the parameters for a given simulation.
Schistoxpkg.mda_information
— Typemda_information
This struct contains the information for the mda, storing the coverage, minimum and maximum age targeted, gender, drug efficacy and the time for the mda to be done
Schistoxpkg.out
— Typeout
This struct contains the different outputs we are interested in recording. This is the overall population burden, with categories for low, moderate and heavy burdens, along with separate categories for the school age children and adults. Along with these, the time of each result is recorded, so we can subsequently see the prevalence of the otubreak over time.
Schistoxpkg.vaccine_information
— Typevaccine_information
This struct contains the information for the vaccine, storing the coverage, minimum and maximum age targeted, gender, drug efficacy and the time for the vaccine to be done along with how long the vaccine provides protection for
Schistoxpkg.administer_drug
— Methodadminister_drug(humans, indices, drug_effectiveness)
administer mda drugs to chosen individuals in the population. If they adhere to the drugs, then they reduce male and female worms with a given efficacy alongside removing eggs
Schistoxpkg.administer_vaccine
— Methodadminister_vaccine(humans, indices, vaccine_effectiveness, vaccine_duration)
administer vaccine to chosen individuals in the population. reduce male and female worms with a given efficacy alongside removing eggs and adding to their vaccine status signifying that they will have increased immunity for a chosen period of time
Schistoxpkg.birth_of_human
— Methodbirth_of_human(humans, pars)
add an individual to the population
Schistoxpkg.calculate_worm_pairs
— Methodcalculate_worm_pairs(female_worms, male_worms)
calculate how many pairs of worms there are in each human host
Schistoxpkg.cercariae_death!
— Methodcercariae_death!(miracidia, pars)
Kill a chosen proportion of cercariae in the environment governed by the cercariae_survival parameter in the pars struct
Schistoxpkg.cercariae_uptake!
— Methodcercariae_uptake(humans, cercariae, miracidia, pars)
uptake cercariae into humans, whilst updating cercariae with miracidia. Uptaken cercariae immediately become worms in this formulation
Schistoxpkg.cercariae_uptake_with_human_larvae!
— Methodcercariae_uptake_human_larvae!(humans, cercariae, miracidia, pars)
uptake cercariae into humans, whilst updating cercariae with matured miracidia. Uptaken cercariae become larvae within humans, rather than immmediately into worms with this function.
Schistoxpkg.collect_prevs
— Methodcollect_prevs(times, prev, sac_prev, high_burden, high_burden_sac, adult_prev, high_adult_burden, record, run)
collect multiple prevalences within the population and store in appropriate arrays
Schistoxpkg.count_eggs
— Methodcount_eggs(humans)
count the total number of eggs in the human population
Schistoxpkg.create_contact_settings
— Methodcreate_contact_settings(scenario)
This will create age dependent contact rates based on the scenario for simulation which is input. This is either "low adult", "moderate adult" or "high adult"
Schistoxpkg.create_mda
— Methodcreate_mda(pre_SAC_prop, SAC_prop, adult_prop, first_mda_time,
last_mda_time, regularity, pre_SAC_gender, SAC_gender, adult_gender, mda_effectiveness)
function to create a set of mda's which will be performed regularly firstmdatime specifies when this will first occur in years, lastmdatime is the final mda in this block regularity is how often to perform the mda in years. specify the proportion of pre SAC, SAC and adults at each of these time points also specify genders for these differect age groups, along with the effectiveness of mda
Schistoxpkg.create_population
— Methodcreate_population(pars)
This will create the initial human population with randomly chosen age, and gender. Predisposition is taken to be gamma distributed There is also a male and female adjustment to predisposition adjusting for gender specific behaviour In addition to this, it will create the initial miracidia environment vector
Schistoxpkg.create_population_specified_ages
— Methodcreate_population_specified_ages(pars)
This will create the initial human population with an age distribution specified by the spec_ages variable Predisposition is taken to be gamma distributed. There is also a male and female adjustment to predisposition adjusting for gender specific behaviour In addition to this, it will create the initial miracidia environment vector
Schistoxpkg.death_of_human
— Methoddeath_of_human(humans)
remove individuals from the population whose age is greater than their death age
Schistoxpkg.egg_production!
— Methodegg_production!(humans, pars)
function to produce eggs for individuals, dependent on how many worms they have and the max fecundity and density dependent fecundity of the population
Schistoxpkg.egg_production_increasing!
— Methodegg_production_increasing!(humans, pars)
function to produce eggs for individuals, dependent on how many worms they have and the max fecundity and density dependent fecundity of the population
Schistoxpkg.generate_age_distribution
— Methodgenerate_age_distribution(pars)
generate population numbers for each age in
Schistoxpkg.generate_ages_and_deaths
— Methodgenerate_ages_and_deaths(num_steps, humans, pars)
Step forward the population by a number of steps, where we will go through aging and removing individuals when they pass their age of death. This will generate an age distribution in the population which corresponds to the deathprobbyage and agesfor_deaths parameters, which specify the probability of dying at each age.
Schistoxpkg.get_death_age
— Methodcreate_population(pars)
This will create the initial human population with randomly chosen age, and gender. Predisposition is taken to be gamma distributed There is also a male and female adjustment to predisposition adjusting for gender specific behaviour In addition to this, it will create the initial miracidia environment vector
Schistoxpkg.get_prevalences!
— Methodget_prevalences!(humans, time, pars)
calculate the desired prevalences in the human population, and store them in an out struct
Schistoxpkg.human_larvae_maturity
— Methodhuman_larvae_maturity(humans, pars)
This will mature the human larvae into worms after a chosen number of days, which is specified by the humanlarvaematurity_time parameter in the pars struct
Schistoxpkg.kato_katz
— Methodkato_katz(eggs, gamma_k)
calculate number of eggs using kato katz method. Gammak is a gamma distribution with shape and scale defined by pars.katokatz_par
Schistoxpkg.load_population_from_file
— Methodload_population_from_file(filename)
load the environmental variables saved in the specified file
Schistoxpkg.make_age_contact_rate_array
— Methodmake_age_contact_rate_array(pars, scenario, input_ages, input_contact_rates)
This will make the contact rate array for each age of individual in the population, based either on a scenario basis ("low adult", "moderate adult" or "high adult"), through the createcontactsettings function, or through specifying an array of age breaks and the desired contact rates for the ages specified by the ages, using the inputages and inputcontactrates variables. For example: inputcontactrates = [0.02,0.61, 1,0.06], inputages= [4,9,15,100] will make 0-4 year olds have contact rate 0.02, 5-9 will have rate 0.61, 10-15 rate 1 and 16+ 0.06
Schistoxpkg.mda
— Methodmda(humans, mda_coverage, min_age_mda, max_age_mda, mda_effectiveness, mda_gender)
administer mda in the population. This includes choosing individuals between specified ages, having a certain level of coverage and taking access and adherence into consideration
Schistoxpkg.miracidia_death!
— Methodmiracidia_death!(miracidia, pars)
Kill a chosen proportion of miracidia in the environment governed by the miracidia_survival parameter in the pars struct
Schistoxpkg.miracidia_production!
— Methodmiracidia_production!(humans)
release eggs from individuals into the environment as miracidia. Release is relative to the contact rate with the environment for each individual.
Schistoxpkg.run_repeated_sims_no_births_deaths
— Methodrun_repeated_sims_no_births_deaths(filename, num_time_steps, mda_info, vaccine_info, num_repeats)
run multiple simulations where aging of the population is not included and larvae are uptaken by humans as worms
Schistoxpkg.run_repeated_sims_no_births_deaths_human_larvae
— Methodrun_repeated_sims_no_births_deaths_human_larvae(filename, num_time_steps, mda_info, vaccine_info, num_repeats)
run multiple simulations where aging of the population is not included and larvae are uptaken by humans as larvae
Schistoxpkg.run_repeated_sims_no_births_deaths_increasing
— Methodrun_repeated_sims_no_births_deaths_human_larvae(filename, num_time_steps, mda_info, vaccine_info, num_repeats)
run multiple simulations where aging of the population is not included and larvae are uptaken by humans as worms, and egg production is monotonically increasing
Schistoxpkg.run_repeated_sims_no_population_change
— Methodrun_repeated_sims_no_population_change(filename, num_time_steps, mda_info, vaccine_info, num_repeats)
run multiple simulations where aging of the population is aged, but each death is replaced by a birth and larvae are uptaken by humans as worms`
Schistoxpkg.run_repeated_sims_no_population_change_human_larvae
— Methodrun_repeated_sims_no_population_change_human_larvae(filename, num_time_steps, mda_info, vaccine_info, num_repeats)
run multiple simulations where the population is aged, but each death is replaced by a birth and larvae are uptaken by humans as larvae
Schistoxpkg.run_repeated_sims_no_population_change_increasing
— Methodrun_repeated_sims_no_population_change(filename, num_time_steps, mda_info, vaccine_info, num_repeats)
run multiple simulations where aging of the population is not included, larvae are uptaken by humans as worms
Schistoxpkg.save_population_to_file
— Methodsave_population_to_file(filename, humans, miracidia, cercariae, pars)
save the enironment variables in a specified file
Schistoxpkg.specified_age_distribution
— Methodspecified_age_distribution(pars)
output ages according to a specified age distribution
Schistoxpkg.update_contact_rate
— Methodupdate_contact_rate(humans, pars)
function to update the contact rate of individuals in the population. This is necessary as over time when people age, they will move through different age groups which have different contact rates
Schistoxpkg.update_env_constant_population
— Methodupdate_env_constant_population(num_time_steps, humans, miracidia, cercariae, pars, mda_info, vaccine_info)
update the population for a given length of time. Here we include deaths and for each death an individual is immediately born. Interventions are included in this function and larvae are immediately uptaken as worms
Schistoxpkg.update_env_constant_population_human_larvae
— Methodupdate_env_constant_population_human_larvae(num_time_steps, humans, miracidia, cercariae, pars, mda_info, vaccine_info)
update the population for a given length of time. Here we include deaths and for each death an individual is immediately born. Interventions are included in this function and larvae are uptaken as larvae in the humans.
Schistoxpkg.update_env_constant_population_increasing
— Methodupdate_env_constant_population_increasing(num_time_steps, humans, miracidia, cercariae, pars, mda_info, vaccine_info)
update the population for a given length of time. Here we include deaths and for each death an individual is immediately born. Interventions are included in this function and larvae are uptaken immediately as worms and egg production follows a monotonically increasing function
Schistoxpkg.update_env_no_births_deaths
— Methodupdate_env_no_births_deaths(num_time_steps, humans, miracidia, cercariae, pars, mda_info, vaccine_info)
update the population for a given length of time. Here we do not include births or deaths and individuals do not age Interventions are included in this function and larvae are uptaken immediately as worms
Schistoxpkg.update_env_no_births_deaths_human_larvae
— Methodupdate_env_no_births_deaths_human_larvae(num_time_steps, humans, miracidia, cercariae, pars, mda_info, vaccine_info)
update the population for a given length of time. Here we do not include births or deaths and individuals do not age Interventions are included in this function and larvae are uptaken as larvae in humans
Schistoxpkg.update_env_no_births_deaths_increasing
— Methodupdate_env_no_births_deaths_increasing(num_time_steps, humans, miracidia, cercariae, pars, mda_info, vaccine_info)
update the population for a given length of time. Here we do not include births or deaths and individuals do not age Interventions are included in this function and larvae are uptaken as immediately as worms and egg production is monotonically increasing
Schistoxpkg.update_env_to_equilibrium
— Methodupdate_env_to_equilibrium(num_time_steps, humans, miracidia, cercariae, pars)
update the population for a given length of time. Here we do not age the population or include birth, deaths or interventions.
Schistoxpkg.update_env_to_equilibrium_human_larvae
— Methodupdate_env_to_equilibrium_human_larvae(num_time_steps, humans, miracidia, cercariae, pars)
update the population for a given length of time. Here we do not age the population or include birth, deaths or interventions and for this function larvae are uptaken from the environment into a larvae category in the humans, rather than immediately becoming worms
Schistoxpkg.update_env_to_equilibrium_increasing
— Methodupdate_env_to_equilibrium_increasing(num_time_steps, humans, miracidia, cercariae, pars)
update the population for a given length of time. Here we do not age the population or include birth, deaths or interventions and for this function larvae are uptaken from the environment immediately to worms and eggs are produced using a monotonically increasing function
Schistoxpkg.update_mda
— Methodupdate_mda(mda_info, mda_round)
update when the next mda will take place
Schistoxpkg.vac_decay!
— Methodvac_decay!(humans, pars)
decrease vaccination status for each person by 1 each day
Schistoxpkg.worm_maturity!
— Methodworm_maturity!(humans, pars)
function to kill worms within human hosts, and if there is more than one stage for worm life, to update how many worms are in each stage