emodlib.malaria package

Module contents

class emodlib.malaria.Infection

Bases: pybind11_object

__init__(*args, **kwargs)
static create(susceptibility: emodlib._emodlib_py.malaria.Susceptibility, config: emodlib._emodlib_py.malaria.MalariaConfig, hepatocytes: SupportsInt = 1) emodlib._emodlib_py.malaria.Infection

Create an Infection object with pointer to Susceptibility and configuration

property msp_antibody
property msp_type
property pfemp1_major_types
update(self: emodlib._emodlib_py.malaria.Infection, dt: SupportsFloat) None

Update the infection state by dt

class emodlib.malaria.IntrahostComponent

Bases: pybind11_object

__init__(*args, **kwargs)
challenge(self: emodlib._emodlib_py.malaria.IntrahostComponent) None

Challenge with a new infection

static create(config: emodlib._emodlib_py.malaria.MalariaConfig) emodlib._emodlib_py.malaria.IntrahostComponent

Create an IntrahostComponent with the given configuration

default_params = {'Base_Gametocyte_Mosquito_Survival_Rate': 0.002011099, 'Cytokine_Gametocyte_Inactivation': 0.01667, 'Falciparum_MSP_Variants': 32, 'Falciparum_Nonspecific_Types': 76, 'Falciparum_PfEMP1_Variants': 1070, 'Max_Individual_Infections': 5, 'Run_Number': 12345, 'infection_params': {'Antibody_IRBC_Kill_Rate': 1.596, 'Antigen_Switch_Rate': 7.645570124964182e-10, 'Base_Gametocyte_Fraction_Male': 0.2, 'Base_Gametocyte_Production_Rate': 0.06150582, 'Base_Incubation_Period': 7, 'Gametocyte_Stage_Survival_Rate': 0.588569307, 'MSP1_Merozoite_Kill_Fraction': 0.511735322, 'Merozoites_Per_Hepatocyte': 15000, 'Merozoites_Per_Schizont': 16, 'Nonspecific_Antigenicity_Factor': 0.415111634, 'Number_Of_Asexual_Cycles_Without_Gametocytes': 1, 'RBC_Destruction_Multiplier': 3.29}, 'susceptibility_params': {'Antibody_CSP_Decay_Days': 90, 'Antibody_Capacity_Growth_Rate': 0.09, 'Antibody_Memory_Level': 0.34, 'Antibody_Stimulation_C50': 30, 'Erythropoiesis_Anemia_Effect': 3.5, 'Fever_IRBC_Kill_Rate': 1.4, 'Maternal_Antibody_Decay_Rate': 0.01, 'Max_MSP1_Antibody_Growthrate': 0.045, 'Min_Adapted_Response': 0.05, 'Nonspecific_Antibody_Growth_Rate_Factor': 0.5, 'Pyrogenic_Threshold': 15000.0}}
property fever_temperature
property gametocyte_density
property infections
property infectiousness
property n_infections
property parasite_density
property susceptibility
treat(self: emodlib._emodlib_py.malaria.IntrahostComponent) None

Treat and clear all infections

update(self: emodlib._emodlib_py.malaria.IntrahostComponent, dt: SupportsFloat) None

Update the intrahost model state by dt

class emodlib.malaria.MalariaConfig

Bases: pybind11_object

property MSP1_antibody_growthrate
property MSP1_merozoite_kill
property RBC_destruction_multiplier
__init__(self: emodlib._emodlib_py.malaria.MalariaConfig) None
property antibody_IRBC_killrate
property antibody_capacity_growthrate
property antibody_csp_decay_days
property antibody_stimulation_c50
property antigen_switch_rate
property base_gametocyte_mosquito_survival
property base_gametocyte_production
property base_gametocyte_sexratio
configure(self: emodlib._emodlib_py.malaria.MalariaConfig, pset: dict) None

Configure from a ParamSet dictionary

property cytokine_gametocyte_inactivation
property erythropoiesis_anemia_effect
property falciparum_MSP_variants
property falciparum_PfEMP1_variants
property falciparum_nonspecific_types
property fever_IRBC_killrate
static from_params(pset: dict) emodlib._emodlib_py.malaria.MalariaConfig

Create a configured MalariaConfig from a ParamSet dictionary

property gametocyte_stage_survival
property hyperimmune_decay_rate
property incubation_period
property maternal_antibody_decay_rate
property max_ind_inf
property memory_level
property merozoites_per_hepatocyte
property merozoites_per_schizont
property minimum_adapted_response
property n_asexual_cycles_wo_gametocytes
property non_specific_antigenicity
property non_specific_growth
property pyrogenic_threshold
property random_seed
update(params)

Update this config with new parameters (nested merge on top of current).

This is the instance-based equivalent of the old update_params() method. Modifies the config in-place and returns self for chaining.

Args:
params: Dict of parameters to merge on top of current config.

Can be nested dict matching config.yml structure.

Returns:

self (for method chaining)

Example:

config = create_config({‘Run_Number’: 1}) config.update({‘infection_params’: {‘Antigen_Switch_Rate’: 1e-8}})

property yaml

Return YAML string representation of the config’s source params.

class emodlib.malaria.Susceptibility

Bases: pybind11_object

__init__(*args, **kwargs)
property age
static create(config: emodlib._emodlib_py.malaria.MalariaConfig) emodlib._emodlib_py.malaria.Susceptibility

Create a Susceptibility with the given configuration

property fever_kill_rate
property maternal_antibody_strength
property pyrogenic_threshold
update(self: emodlib._emodlib_py.malaria.Susceptibility, dt: SupportsFloat) None

Update the susceptibility state by dt

emodlib.malaria.create_config(params=None)[source]

Create a new MalariaConfig instance.

Args:
params: Optional dict of parameters to override defaults.

Can be a flat dict or nested dict matching config.yml structure.

Returns:

A configured MalariaConfig instance.

Example:

config = create_config({‘Run_Number’: 42}) ic = IntrahostComponent.create(config)