JoRussell-IDM / updated_infection_and_immunity

malaria_two_pt_oh
0 stars 0 forks source link

Subcompartmentalization of parasite density #9

Open JoRussell-IDM opened 5 years ago

JoRussell-IDM commented 5 years ago

Related to Gametocytemia #5, asexual and gametocyte stage parasites should be apportioned into stage bins that are linked via temporal progression (2 day lags) and are acted on by different classes of drugs.

Gametocytes should progress through each of 6 stages at a fixed rate with a configurable rate of survival between stages. stages 0-2 are immature gametocytes, stage 3-4 are intermediate gametocytes, and stage 5 are mature gametocytes, each impacted by a configurable drug effect kill rate.

Mature gametocytes (stage 5) should be apportioned into male and female compartments.

RESEARCH NOTE: Asexual parasites could be divided into peripheral and circulating populations with different accessibility to immune/drug effects? I think this is likely too much detail but logging this idea for future. Do we need to track the fraction of asexual parasites at a given time that are cicrulating as exposed merozoites?

DGoes-IDM commented 5 years ago

Should this be in the Structural Release since it blocks Drug Effects, which is in Structural Release?

JoRussell-IDM commented 5 years ago

Yes just hadnt finished adding the Milestone tags throughout

JoRussell-IDM commented 5 years ago

Asexual density is retained by individuals as tabular list of peak indices and values.

During Update() asexual density is reported as a number of IRBCs.

Then for the respective stages (0 to 5) of gametocyte differentiation, we want the general function for gametocytes of stage n at timestep dt to be:

gametocytes_n = z(dt) x (asexuals(dt- lag2n))) x r^n x Dn with the condition that gametcoytes_n = 0 when lag2n >= dt

where z(dt) is a fraction of differentiation specific to each antigenic wave (a product of PfEMP1 functionality) such that z is drawn from a distribution of differentiation rates (for mean and std see Gametocytemia issue #5) for each wave, and that during Update() we query the z value for the nearest wave index that precedes dt.

and lag should for now be 8 days as currently implemented in the model and is specific to each wave as well.

NOTE: we need to append a z value and a lag value to each index of the waves object that defines an infection.

r is a fraction of survival from one stage to the next and is a configurable parameter akin to Gametocyte_Stage_Survival_Rate (range 0:1, default value 1)

and Dn is a joint product of the drug effects acting on the stages of parasite that preceded the current stage being calculated at dt:

Dn = Asexuals(dt-6) x (Drugeffects_stages02)(dt-4) x (Drugeffects_stages34)(dt-2) x (Drugeffects_stage5)(dt) where Drugeffects_stagen is a look up/evaluation of PK/PD driven drug concentrations at any time dt relative to administration of drugs.

DGoes-IDM commented 5 years ago

@JoRussell-IDM, right now asexual density is retained not by individuals but by infections, so individuals are aware only of present density contributions from all active infections. I'm thinking that we'll want to push this calculation into each infection instead of at the individual level. What do you think? Would it be OK if the densities exposed to the individual already take drug effects into account?

DGoes-IDM commented 5 years ago

OK, based on a little more research, it's looking like this part might be very difficult or not possible: "Drugeffects_stagen is a look up/evaluation of PK/PD driven drug concentrations at any time dt relative to administration of drugs." Looking at the interface, I think what we have easiest access to without cutting on any interfaces is the magnitude of effect of each drug class at the present time. I'm wondering if we can refactor the above equations (and whether it's sufficient) to keep each compartment persistent and move parasites between the 6 stages each update. So, still no history recorded, but drug effects are polled and then take effect each update. What do you think?

JoRussell-IDM commented 5 years ago

Based on discussion of reducing complexity of the Drug Model we will try to reduce the number of parasite stage/developmental compartments. This may reduce our fidelity to the action of particular drug classes, but its a simplifying assumption I'm willing to take for the time being!

We will draw the shape of gametocytemia as we draw asexual density trajectories as a tabular list of indices, conversion probabilities and peak densities.

The function to go from asexual to gametocytes for each of these fields is

index_gametocyte = index_asexuals + lag(8 days) conversion_fraction_gametocytes = conversion_probability(random variable, drawn from a lognormal distribution who's mean is a configurable parameter (default value of 1.8)) value_gametoctye = value_asexuals*conversion_gametocytes

At every Update we will by default report each density evaluated at dt given the set of Gaussian peak indices.

If a drug effect is present:

if that drug acts on asexuals, filter the reported asexual density by a fraction determined from the C50 of the drug, the ending concentration as reported from the DrugModel.cpp for all waves during the time period at which the drug has appreciable concentration in the body. IN ADDITION: revise down the gametocyte values at each index of waves that were affected by the asexual acting drug.

if the drug acts on any stage of gametocyte development, filter the reported gametocyte density by a fraction determined from the C50 of the drug, the ending concentration as reported from the DrugModel.cpp for all waves during the time period at which the drug has appreciable concentration in the body.

if the drug acts on infected hepatocytes, reduce the number of infected hepatocytes by a fraction determined from the C50 of the drug, the ending concentration as reported from the DrugModel.cpp for all waves during the time period at which the drug has appreciable concentration in the body.

JoRussell-IDM commented 5 years ago

To clarify: the subcompartments we are currently interested in implementing are asexuals and gametocytes (with a separate count of hepatoyctes determined at infection initialization).

DGoes-IDM commented 5 years ago

An attempt at clarifying the drug part for code translation purposes:

For each infection for each cycle, query the present C50 and ending concentration of the asexual-affecting drugs and transform them together with TBD transformation and multiply by that asexual density to report final drug-affected asexual density (no permanent change to the table, just filtered value). Additionally, multiply all values in the gametocyte table with factor determined through TBD transformation * TBD time constant fraction < 1. and permanently alter the values in the table by that amount Note that this is for each cycle, so while there is a non-zero drug effect we will permanently revise downward all entries in the gametocyte table, which is why we need a TBD time constant fraction. This is because we don't know how long a drug has been in effect for or will last, or whether it's the same drug or a new drug taking effect

Then, gametocyte-affecting drugs will only filter the gametocyte density by TBD transformation, not permanently alter the table.

DGoes-IDM commented 5 years ago

We spoke more about this on Friday and came up with this image: 20190510_162629.jpg

JoRussell-IDM commented 5 years ago

// get all drug effects

// attenuate asexual by asexual drug efficacy, today

(pass all drug efficacies to the gametocyte calculation)

// attentuation at +lag days is [log(gametocyte_density)-asexual_drug_efficacy] (fill circular buffer array of values projected into future, only needed lag days long)

log_final_gametocyte_density = log(gametocyte_density)-asexual_drug_efficacy final_gametocyte_density = 10^(log_final_gametocyte_density)

// present attenuation is gametocytes today * attenuation today