Title: | The role of the spleen in red blood cell loss due to malaria |
---|---|
Description: | A mathematical model of red blood cell (RBC) dynamics in a malaria infection, which includes the spleen as a separate model compartment that can retain large amounts of infected and uninfected RBCs. |
Authors: | Saber Dini [aut] , Ali Haghiri [aut] , Robert Moss [aut, cre] |
Maintainer: | Robert Moss <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2024-11-26 06:35:39 UTC |
Source: | https://gitlab.unimelb.edu.au/rgmoss/malaria-spleen-rbc-loss |
a
) in the circulation.Age-structured parasite multiplication rates (the number of released
merozoites that successfully invade uRBCS of age a
) in the circulation.
alpha_c(u_rbc, pmf, beta)
alpha_c(u_rbc, pmf, beta)
u_rbc |
The RBC count. |
pmf |
The parasite multiplication factor. |
beta |
The (age-dependent) merozoite preference for uninfected RBCs. |
a
) in the spleen.Age-structured parasite multiplication rates (the number of released
merozoites that successfully invade uRBCS of age a
) in the spleen.
alpha_r(u_rbc, pmf, beta)
alpha_r(u_rbc, pmf, beta)
u_rbc |
The RBC count. |
pmf |
The parasite multiplication factor. |
beta |
The (age-dependent) merozoite preference for uninfected RBCs. |
Return the baseline parameter values, including all derived parameters.
baseline_parameters(species = c("Pf", "Pv"), nospleen = FALSE, derived = TRUE)
baseline_parameters(species = c("Pf", "Pv"), nospleen = FALSE, derived = TRUE)
species |
The malaria species: |
nospleen |
Whether the spleen has been removed. |
derived |
Whether to define parameters whose values are derived from other parameters. |
Age-dependent merozoite preference for uninfected RBCs.
beta(p, age)
beta(p, age)
p |
The parameter values for the scenario. |
age |
The RBC age. |
Calculate the ratio of (a) the fraction of RBCs in the spleen that are infected; to (b) the fraction of RBCs in the circulation that are infected.
calculate_irbc_ratio(results)
calculate_irbc_ratio(results)
results |
A dataframe of simulation results. |
A dataframe that includes the following columns, in addition those in
results
:
The ratio of infected cell fractions in the spleen and circulation.
Calculate credible intervals for each column, except "time" and "scenario".
credible_intervals(results, pcnt = c(50, 60, 70, 80, 90, 95))
credible_intervals(results, pcnt = c(50, 60, 70, 80, 90, 95))
results |
A dataframe of simulation results. |
pcnt |
The credible intervals to calculate, expressed as percentages. |
A dataframe with the following columns:
The statistic name (character)
The time (numeric, hours)
The credible interval (ordered factor, widest to narrowest)
The credible interval lower bound (numeric)
The credible interval upper bound (numeric)
Define parameters whose values are derived from other parameters.
define_derived_parameters(p)
define_derived_parameters(p)
p |
The parameter values for the scenario. |
Rate of infected RBC removal from the circulation into the spleen.
delta_i(p, age)
delta_i(p, age)
p |
The parameter values for the scenario. |
age |
The RBC age. |
Increase in infected RBC removal into the spleen due to RBC congestion.
delta_i_fold(p, net_u_rbc, net_i_rbc)
delta_i_fold(p, net_u_rbc, net_i_rbc)
p |
The parameter values for the scenario. |
net_u_rbc |
The total number of uninfected RBCs in the circulation. |
net_i_rbc |
The total number of infected RBCs in the circulation. |
Rate of infected RBC reentry into the circulation from the spleen.
delta_i_prime(p, age)
delta_i_prime(p, age)
p |
The parameter values for the scenario. |
age |
The infected RBC age(s). |
Rate of uninfected RBC removal from the circulation into the spleen.
delta_u(p, age)
delta_u(p, age)
p |
The parameter values for the scenario. |
age |
The RBC age. |
Increase in uninfected RBC removal into the spleen due to RBC congestion.
delta_u_fold(p, net_u_rbc, net_i_rbc)
delta_u_fold(p, net_u_rbc, net_i_rbc)
p |
The parameter values for the scenario. |
net_u_rbc |
The total number of uninfected RBCs in the circulation. |
net_i_rbc |
The total number of infected RBCs in the circulation. |
Rate of uninfected RBC reentry into the circulation from the spleen.
delta_u_prime(p, age)
delta_u_prime(p, age)
p |
The parameter values for the scenario. |
age |
The RBC age. |
Rate of RBC production.
erythropoiesis(p, u_rbc)
erythropoiesis(p, u_rbc)
p |
The parameter values for the scenario. |
u_rbc |
The RBC count. |
See Pava et al., 2016 for details.
hhs_asymp
hhs_asymp
hhs_asymp
A data frame with 803 rows and the following columns:
One of "Pf"
, "Pv"
, or "neg"
The red blood cell count
Record key outputs for a single scenario.
individual_results(p, keep)
individual_results(p, keep)
p |
The scenario parameters. |
keep |
The model state at each of the relevant time-steps. |
A data frame that includes the following columns:
The scenario number
The simulation time (hours)
The number of uRBCs in the circulation
The number of uRBCs in the spleen
The number of reticulocytes in the circulation
The number of reticulocytes in the spleen
The number of iRBCs in the circulation
The number of iRBCs in the spleen
The number of iRBCs in the microvasculature
The number of macrophages in the spleen
The erythropoiesis rate
The number of reticulocytes in the bone marrow
The number of merozoites released in the circulation
The number of merozoites released in the spleen
The number of reticulocytes released from the bone marrow
The number of uRBCs removed from the circulation into the spleen
The number of uRBCs that would have been removed from the circulation into the spleen, in the absence of a malaria infection
The number of uRBCs released from the spleen into the circulation
The number of uRBCs phagocytised in the spleen
The number of iRBCs removed from the circulation into the spleen
The number of iRBCs sequestered into the microvasculature
The number of iRBCs released from the spleen into the circulation
The number of iRBCs phagocytised in the spleen
The number of uRBCs in the circulation that became infected
The number of uRBCs in the spleen that became infected
The number of RBCs infected from iRBCs in the circulation
The number of RBCs infected from iRBCs in the microvasculature
The number of RBCs infected from iRBCs in the spleen
The release rate of the youngest reticulocytes
The fold increase in uRBC removal from the circulation
The fold increase in iRBC removal from the circulation
The fraction of RBCs in the spleen that become infected
Calculate quantities related to uRBC infection and retention in the spleen due to malaria infection.
infection_flows_and_loss(results)
infection_flows_and_loss(results)
results |
A dataframe of simulation results. |
A dataframe that includes the following columns, in addition those in
results
:
The value of
the fraction of uRBCs that are retained in the spleen
The retention of uRBCs due to malaria infection
The rate of uRBC retention that is due to malaria infection, relative to baseline uRBC retention
The ratio of uRBC retention due to malaria loss, relative to the infection of uRBCs in the circulation
The ratio of uRBC retention due to malaria loss, relative to the infection of uRBCs in the circulation and the spleen
The number of uRBC infections in the circulation and spleen
The number of uRBC infection in the circulation due to merozoites released in the circulation and microvasculature
Construct the initial model state.
initial_spleenrbc_state(p)
initial_spleenrbc_state(p)
p |
The parameter values for the scenario. |
Phagocytosis rate of infected RBCs in the spleen.
lambda_i(p, macrophages)
lambda_i(p, macrophages)
p |
The parameter values for the scenario. |
macrophages |
The macrophage count. |
Phagocytosis rate of uninfected RBCs in the spleen.
lambda_u(p, macrophages, age)
lambda_u(p, macrophages, age)
p |
The parameter values for the scenario. |
macrophages |
The macrophage count. |
age |
The RBC age. |
Define the distributions from which to sample values for each parameter.
lhs_distributions(params, lower = 0.8, upper = 1.2)
lhs_distributions(params, lower = 0.8, upper = 1.2)
params |
A data frame that defines the parameters to be sampled. |
lower |
The lower bound for triangle distributions, relative to the baseline values. |
upper |
The upper bound for triangle distributions, relative to the baseline values. |
Pf parameter values for each scenario.
parameters_pf
parameters_pf
parameters_pf
A data frame with 34 rows and 3 columns:
Parameter name
Baseline value
Sampling distribution: 'constant'
or 'triangle'
Pv parameter values for each scenario.
parameters_pv
parameters_pv
parameters_pv
A data frame with 34 rows and 3 columns:
Parameter name
Baseline value
Sampling distribution: 'constant'
or 'triangle'
Construct a list that will record the model state over time.
prepare_spleenrbc_snapshot(p, time_steps)
prepare_spleenrbc_snapshot(p, time_steps)
p |
The parameter values for the scenario. |
time_steps |
The number of time-steps (hours). |
For this conversion, we assume that 15 g/dL of haemoglobin corresponds to
RBCs.
rbc_counts_to_haemoglobin(rbc_counts)
rbc_counts_to_haemoglobin(rbc_counts)
rbc_counts |
One or more RBC counts. |
Haemoglobin levels (g/dL).
rbc_counts_to_haemoglobin(1e15 * c(2.3, 2.4, 2.5, 2.6, 2.7))
rbc_counts_to_haemoglobin(1e15 * c(2.3, 2.4, 2.5, 2.6, 2.7))
Defined as the median red blood cell count for uninfected Papuans in the hhs_asymp data set.
rbc_steady_state
rbc_steady_state
rbc_steady_state
A scalar value.
Subtract negative U values from other (positive) U values.
resolve_negative_rbcs(u, t_urbc, pmf, beta_a, alpha_fun)
resolve_negative_rbcs(u, t_urbc, pmf, beta_a, alpha_fun)
u |
A population of red blood cells. |
t_urbc |
The RBC lifetime. |
pmf |
The parasite multiplication factor. |
beta_a |
The (age-dependent) merozoite preference for uninfected RBCs. |
alpha_fun |
The function that calculates RBC infections. |
Returns the steady-state values for:
normoblast population (gamma
);
reticulocyte population in the bone marrow (r_a
);
reticulocyte population in the circulation (R_a
);
normoctye population in the circulation (N_a
);
RBC population in the spleen (Ur_a
); and
circulating RBC imbalance wrt homeostasis (difference
).
retic_steady_state(p)
retic_steady_state(p)
p |
The parameter values for the scenario. |
The reticulocyte production rate for the given normoblast population.
reticulocyte_prod(p, rho_ss, lambdaU, deltaU_a, gamma, z = 0)
reticulocyte_prod(p, rho_ss, lambdaU, deltaU_a, gamma, z = 0)
p |
The parameter values for the scenario. |
rho_ss |
The release rate of reticulocytes from the bone marrow into the circulation at homeostasis. |
lambdaU |
The phagocytosis rate of uninfected RBCs in the spleen. |
deltaU_a |
The rate of uninfected RBC removal from the circulation into the spleen. |
gamma |
The normoblast population in the bone marrow. |
z |
The initial number of circulating reticulocytes (age of 1 hour). |
Age-structured release rate of reticulocytes from the bone marrow into the circulation.
rho(p, age, u_rbc)
rho(p, age, u_rbc)
p |
The parameter values for the scenario. |
age |
The reticulocyte age. |
u_rbc |
The RBC count (must be a scalar). |
The minimum age at which reticulocytes are released from the bone marrow into the circulation.
rho_release_age(p, u_rbc)
rho_release_age(p, u_rbc)
p |
The parameter values for the scenario. |
u_rbc |
The RBC count (must be a scalar). |
Run model scenarios.
run_spleenrbc( scenarios = NULL, days = 50, time_steps = days * 24, verbose = FALSE )
run_spleenrbc( scenarios = NULL, days = 50, time_steps = days * 24, verbose = FALSE )
scenarios |
A dataframe of parameter combinations for each scenario. |
days |
The number of days to simulate. |
time_steps |
The number of time-steps (hours). |
verbose |
Whether to print a message when starting each scenario. |
A data frame whose columns capture model state variables at each time-step.
individual_results()
for a description of the returned data
frame.
Run a single scenario and return the model state history.
run_spleenrbc_model(p, time_steps, debug = FALSE)
run_spleenrbc_model(p, time_steps, debug = FALSE)
p |
The parameter values for the scenario. |
time_steps |
The number of time-steps (hours). |
debug |
Whether to check invariant properties after each time-step. |
A data frame whose columns capture model state variables at each time-step.
individual_results()
for a description of the returned data
frame.
Create parameter samples for each scenario.
sample_parameters( species = c("Pf", "Pv"), nospleen = FALSE, dists = NULL, rbc_ss = NULL, n_samples = 1000, seed = 1691987 )
sample_parameters( species = c("Pf", "Pv"), nospleen = FALSE, dists = NULL, rbc_ss = NULL, n_samples = 1000, seed = 1691987 )
species |
The malaria species: |
nospleen |
Whether the spleen has been removed. |
dists |
The parameter distributions from which to draw samples. |
rbc_ss |
The red blood cell count at homeostasis. |
n_samples |
The number of scenarios. |
seed |
The seed for the random number generator. |
See Kho et al., 2021 for details.
splenectomised
splenectomised
splenectomised
A data frame with 17 rows and the following columns:
Patient identifier
One of "Pf"
, "Pv"
, or "neg"
Infected RBC count in the peripheral circulation
Infected RBC count in the spleen
Uninfected RBC count in the peripheral circulation
Uninfected RBC count in the spleen
Update the model state by simulating forward one time-step.
step_spleenrbc_model(p, s, t)
step_spleenrbc_model(p, s, t)
p |
The parameter values for the scenario. |
s |
The current model state. |
t |
The time for which to calculate the model state. |
Age-structured rate of RBC sequestration into the microvasculature.
zeta(p, age)
zeta(p, age)
p |
The parameter values for the scenario. |
age |
The RBC age. |