emodpy_malaria.malaria_config module

emodpy_malaria.malaria_config.get_file_from_http(url)

Get data files from simple http server.

emodpy_malaria.malaria_config.set_team_defaults(config, manifest)

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

emodpy_malaria.malaria_config.set_team_drug_params(config, manifest)
emodpy_malaria.malaria_config.set_parasite_genetics_params(config, manifest, var_gene_randomness_type: str = 'ALL_RANDOM')

Sets up the default parameters for parasite genetics simulations Malaria_Model = “MALARIA_MECHANISTIC_MODEL_WITH_PARASITE_GENETICS”

Parameters
  • config

  • manifest – schema path container

  • var_gene_randomness_type – possible values are “FIXED_NEIGHBORHOOD”, “FIXED_MSP”, “ALL_RANDOM” (default)

Returns

configured config

emodpy_malaria.malaria_config.get_drug_params(cb, drug_name)
emodpy_malaria.malaria_config.set_drug_param(config, drug_name: str = None, parameter: str = None, value: any = None)

Set a drug parameter, by passing in drug name, parameter and the parameter value. Added to facilitate adding drug Resistances, Example:

artemether_drug_resistance = [{
   "Drug_Resistant_String": "A",
   "PKPD_C50_Modifier": 2.0,
   "Max_IRBC_Kill_Modifier": 0.9}]
set_drug_param(cb, drug_name='Artemether', parameter="Resistances", value=artemether_drug_resistance)
Parameters
  • config

  • drug_name – The drug that has a parameter to set

  • parameter – The parameter to set

  • value – The new value to set

Returns

Nothing or error if drug name is not found

emodpy_malaria.malaria_config.add_drug_resistance(config, manifest, drugname: str = None, drug_resistant_string: str = None, pkpd_c50_modifier: float = 1.0, max_irbc_kill_modifier: float = 1.0)

Adds drug resistances by drug name and parameters

Parameters
  • config

  • manifest

  • drugname – name of the drug for which to assign resistances

  • drug_resistant_string – A series of nucleotide base letters (A, C, G, T) that represent the drug resistant values at locations in the genome

  • pkpd_c50_modifier – If the parasite has this genome marker, this value will be multiplied times the ‘Drug_PKPD_C50’ value of the drug. Genomes with multiple markers will be simply multiplied together

  • max_irbc_kill_modifier – If the parasite has this genome marker, this value will be multiplied times the ‘Max_Drug_IRBC_Kill’ value of the drug. Genomes with multiple markers will be simply multiplied together

Returns

configured config

emodpy_malaria.malaria_config.set_species_param(config, species, parameter, value, overwrite=False)

Pass through for vector version of function.

emodpy_malaria.malaria_config.add_species(config, manifest, species_to_select)

Pass through for vector version of function.

emodpy_malaria.malaria_config.add_insecticide_resistance(config, manifest, insecticide_name: str = '', species: str = '', allele_combo: list = None, blocking: float = 1.0, killing: float = 1.0, repelling: float = 1.0, larval_killing: float = 1.0)

Pass through for vector version of function.

emodpy_malaria.malaria_config.get_species_params(config, species: str = None)

Pass through for vector version of function.

emodpy_malaria.malaria_config.set_max_larval_capacity(config, species_name: str, habitat_type: str, max_larval_capacity: int)

Set the Max_Larval_Capacity for a given species and habitat. Effectively doing something like: simulation.task.config.parameters.Vector_Species_Params[i][“Habitats”][j][“Max_Larval_Capacity”] = max_larval_capacity where i is index of species_name and j is index of habitat_type.

Parameters
  • config

  • species_name – string. Species_Name to target.

  • habitat_type – enum. Habitat_Type to target.

  • max_larval_capacity – integer. New value of Max_Larval_Capacity.

Returns

Nothing.