| 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] (ORCID: <https://orcid.org/0000-0002-4613-3672>), Ali Haghiri [aut] (ORCID: <https://orcid.org/0000-0002-6008-3165>), Robert Moss [aut, cre] (ORCID: <https://orcid.org/0000-0002-4568-2012>) |
| Maintainer: | Robert Moss <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1 |
| Built: | 2026-09-17 08:07:31 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 steady-state values for high-level model outputs.
calculate_steady_state_outputs(results, average_over_days = 10)calculate_steady_state_outputs(results, average_over_days = 10)
results |
A dataframe of simulation results. |
average_over_days |
The window at the end of each simulation over which to calculate steady-state values. |
A dataframe that contains the following columns:
The circulating uRBC population.
The splenic uRBC population.
The circulating iRBC population.
The splenic iRBC population.
The splenic macrophage population.
The ratio of infected cell fractions in the spleen and circulation.
The ratio of iRBC counts in the spleen and circulation.
The ratio of uRBC loss (from the circulation) due to splenic retention and due to parasitisation.
The ratio of uRBC retention, relative to homeostasis.
Calculate the ratio of (a) the unparasitised RBC loss due to malaria (additional uRBC retention in the spleen); to (b) the parasitised RBC loss due to RBC infection.
calculate_urbc_loss_ratio(results)calculate_urbc_loss_ratio(results)
results |
A dataframe of simulation results. |
A dataframe that includes the following column, in addition to those in
results:
The ratio of uRBC loss (from the circulation) due to splenic retention and due to parasitisation.
t; to (b) the fraction of uRBCs retained in the spleen at
homeostasis.Calculate the ratio of (a) the fraction of uRBCs retained in the spleen at
time t; to (b) the fraction of uRBCs retained in the spleen at
homeostasis.
calculate_urbc_ratio(results)calculate_urbc_ratio(results)
reuslts |
A dataframe of simulation results. |
A dataframe that includes the following columns, in addition to those in
results:
The fraction of uRBCs retained in the spleen.
The ratio of uRBC retention, relative to homeostasis.
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_asymphhs_asymp
hhs_asympA 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 normoblasts and 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. |
Pf parameter values for each scenario.
parameters_pfparameters_pf
parameters_pfA data frame with 34 rows and 3 columns:
Parameter name
Baseline value
Pv parameter values for each scenario.
parameters_pvparameters_pv
parameters_pvA data frame with 34 rows and 3 columns:
Parameter name
Baseline value
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). |
Quantile function for the log-uniform distribution.
qlunif(p, min, max)qlunif(p, min, max)
p |
A vector of probabilities. |
min |
The lower limit of the distribution. |
max |
The upper limit of the distribution. |
For this conversion, we assume that the steady-state RBC count corresponds to 12.8 g/dL of haemoglobin (the mean haemoglobin of Papuans with no malaria infection, as reported by Pava et al., 2016).
rbc_counts_to_haemoglobin(rbc_counts)rbc_counts_to_haemoglobin(rbc_counts)
rbc_counts |
One or more RBC counts. |
Haemoglobin levels (g/dL).
hhs_asymp RBC counts from asymptomatic Papuans.
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_staterbc_steady_state
rbc_steady_stateA 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 production rate (gamma);
normoblast and 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.
This should be a named list that maps each parameter name to a quantile
function ( |
rbc_ss |
The red blood cell count at homeostasis. |
n_samples |
The number of scenarios. |
seed |
The seed for the random number generator. |
dists <- list( x = ~ qnorm(.x, mean = 5, sd = 1), y = ~ qexp(.x, rate = 0.2) ) samples <- sample_parameters(species = "Pf", dists = dists, n_samples = 10) mean(samples$x) #> 5.033116 sd(samples$x) #> 0.8708642 mean(samples$y) #> 4.587215 sd(samples$y) #> 3.996536dists <- list( x = ~ qnorm(.x, mean = 5, sd = 1), y = ~ qexp(.x, rate = 0.2) ) samples <- sample_parameters(species = "Pf", dists = dists, n_samples = 10) mean(samples$x) #> 5.033116 sd(samples$x) #> 0.8708642 mean(samples$y) #> 4.587215 sd(samples$y) #> 3.996536
See Kho et al., 2021 for details.
splenectomisedsplenectomised
splenectomisedA 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. |
Define uncertainty distributions for each parameter.
uncertainty_distributions(species, check_names = TRUE)uncertainty_distributions(species, check_names = TRUE)
species |
The malaria species: |
check_names |
Check whether each parameter has a distribution. |
Calculate uncertainty intervals for each column, except for "time" and "scenario".
uncertainty_intervals(results, pcnt = c(50, 60, 70, 80, 90, 95))uncertainty_intervals(results, pcnt = c(50, 60, 70, 80, 90, 95))
results |
A dataframe of simulation results. |
pcnt |
The uncertainty intervals to calculate, expressed as percentages. |
A dataframe with the following columns:
The statistic name (character)
The time (numeric, hours)
The interval (ordered factor, widest to narrowest)
The interval lower bound (numeric)
The interval upper bound (numeric)
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. |