emodpy_malaria.config module

emodpy_malaria.config.get_file_from_http(url)

Get data files from simple http server.

emodpy_malaria.config.set_team_defaults(config, mani)

Set configuration defaults using team-wide values, including drugs and vector species.

emodpy_malaria.config.set_team_vs_params(config, mani)
emodpy_malaria.config.get_species_params(cb, species)
emodpy_malaria.config.set_team_drug_params(config, mani)
emodpy_malaria.config.get_drug_params(cb, drug_name)
emodpy_malaria.config.set_species(config, species_to_select)

Use this function to specify which mosquito species to use in the simulation.

Parameters
  • config – schema-backed config smart dict

  • species_to_list – list of 1 or more strings.

Returns

None

emodpy_malaria.config.set_resistances(config)

Use this function after you’re done calling add_resistance. config is the input and the output

emodpy_malaria.config.add_alleles(allele_names_in, allele_inits_in)

This is public API function for user to add alleles. User specifies the list of alleles and corresponding initial distribution.

emodpy_malaria.config.add_mutation(from_allele, to_allele, rate)

Public API function for user to add mutations as part of vector genetics configuration. A mutation is specified with a source allele, a destination allele, and a rate

emodpy_malaria.config.add_trait(manifest, sex_genes, allele_pair, trait_name, trait_value)

Use this function to add traits as part of vector genetics configuration. Should produce something like:

{
   "Allele_Combinations": [["X", "X"],["a0", "a1"]],
   "Trait_Modifiers": {"INFECTED_BY_HUMAN": 0}
},
emodpy_malaria.config.add_resistance(manifest, insecticide_name, species, combo, blocking=1.0, killing=1.0)

Use this function to add insecticide resistances. An insecticide can have a list of resistances. Add each resistance separately with the same name:

Insecticides = [
{
  "Name": "pyrethroid",
  "Resistances": [
    {
      "Allele_Combinations": [
      [
        "a1",
        "a1"
      ]
     ],
    "Blocking_Modifier": 1.0,
    "Killing_Modifier": pyrethroid_killing,
    "Species": "gambiae"
  }
 ]
},
emodpy_malaria.config.set_genetics(vsp, manifest)

Don’t need to pass these anymore since they are module variables. But actually need to try with more than one set and see where I end up in terms of design.