Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • rgmoss/malaria-spleen-rbc-loss
1 result
Select Git revision
Show changes
Commits on Source (3)
  • Rob Moss's avatar
    Limit infections to available uRBC counts · 8432684c
    Rob Moss authored
    This ensures that the RBC population is conserved when the number of RBC
    infections exceeds the available uRBC count. Without this restriction,
    chronic infections with low phagocytosis rates can yield exponential
    growth in total-body RBC counts.
    8432684c
  • Rob Moss's avatar
    Record uRBC loss ratios in sensitivity analyses · b8c99c7a
    Rob Moss authored
    This is the ratio of uRBC loss (from circulation) to due (a) retention
    in the spleen caused by the presence of a malarian infection; to (b)
    parasitisation of uRBCs.
    b8c99c7a
  • Rob Moss's avatar
    Update baseline parameters and outputs · ae84da7f
    Rob Moss authored
    Based on the results of a parameter sweep for delta_iR and lambdaI.sel,
    we have decreased lambdaI.sel from 1.778e-11 to 1.5e-11, and use the
    same iRBC removal rates for Pf and Pv (delta_iR = 0.562). The baseline
    outputs and sensitivity analysis results have been updated.
    ae84da7f
Showing
with 4496 additions and 4417 deletions
......@@ -5,6 +5,7 @@ export(alpha_r)
export(baseline_parameters)
export(beta)
export(calculate_irbc_ratio)
export(calculate_urbc_loss_ratio)
export(credible_intervals)
export(define_derived_parameters)
export(delta_i)
......
......@@ -135,6 +135,36 @@ infection_flows_and_loss <- function(results) {
}
#' 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.
#'
#' @param results A dataframe of simulation results.
#'
#' @return
#' A dataframe that includes the following column, in addition to those in
#' `results`:
#'
#' \describe{
#' \item{uRBC_Loss_Ratio}{The ratio of uRBC loss (from the circulation) due
#' to splenic retention and due to parasitisation.}
#' }
#'
#' @export
calculate_urbc_loss_ratio <- function(results) {
results |> dplyr::mutate(
flow_uc_to_r_inf = flow_uc_to_r - flow_uc_to_r_no_inf,
inf_total = inf_from_ic + inf_from_iq + inf_from_ir,
uRBC_Loss_Ratio = dplyr::case_when(
inf_total > 0 ~ flow_uc_to_r_inf / inf_total,
.default = 0
),
flow_uc_to_r_inf,
inf_total = NULL
)
}
#' 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.
#'
......
......@@ -344,6 +344,24 @@ step_spleenrbc_model <- function(p, s, t) {
* (1 - exp_lambda_i)
)
# Limit RBC infections in the spleen to the spleen uRBC population.
Drr_t_1[2:p$T_urbc] <- pmin(Drr_t_1[2:p$T_urbc], U_r_to_r + U_c_to_r)
# Limit RBC infections in the circulation to the circulating uRBC population.
# Calculate the difference between the intended RBC infections and the
# circulating uRC population.
net_Dc <- Dc_t_1[2:p$T_urbc] + Dq_t_1[2:p$T_urbc] + Drc_t_1[2:p$T_urbc]
net_Uc <- U_c_to_c + U_r_to_c
# Calculate the number of possible RBC infections in the circulation.
actual_Dc <- pmin(net_Dc, net_Uc)
# Down-scale the infections from each source (circulation, microvasculature,
# and spleen) where intended infections exceed available uRBCs.
frac_Dc <- actual_Dc / net_Dc
frac_Dc[net_Dc == 0] <- 0
Dc_t_1[2:p$T_urbc] <- frac_Dc * Dc_t_1[2:p$T_urbc]
Dq_t_1[2:p$T_urbc] <- frac_Dc * Dq_t_1[2:p$T_urbc]
Drc_t_1[2:p$T_urbc] <- frac_Dc * Drc_t_1[2:p$T_urbc]
# Update reticulocyte population in the bone marrow.
r_at <- numeric(p$T_R)
r_at[1] <- s$n_at_1[p$T_n]
......
......@@ -17,7 +17,7 @@ delta_iS_scale,2,removal rate of infected schizonts from circulation by the sple
zeta_sl,10,related to calculating sequestered iRBC in the microvasculature
zeta_a50,26,related to calculating sequestered iRBC in the microvasculature
kM,0.01,Parameters for macrophages dynamics
lambdaI.sel,1.778E-11,for determining Phagocytosis rate of the iRBCs retained in the spleen by macrophages
lambdaI.sel,1.5E-11,for determining Phagocytosis rate of the iRBCs retained in the spleen by macrophages
lambdaU.sel,5.00E-07,for determining Phagocytosis rate of the uRBCs retained in the spleen by macrophages
w_rc,0.1,Proportion of merozoites released from retained retics that infect circulating uRBCs
PMF,8,Parasite multiplication factor
......
......@@ -71,17 +71,7 @@ parameters_pf <- dplyr::left_join(ordered_names, parameters_pf, by = "name")
usethis::use_data(parameters_pf, overwrite = TRUE)
# For Pv, we increase delta_iR and preserve the values of delta_i{R,S}_prime
# by adjusting the scaling parameters k_i{R,S}.
pv_scale <- 0.4 / 0.15
parameters_pv <- parameters_pf |>
dplyr::mutate(
baseline = dplyr::case_when(
name == "delta_iR" ~ baseline * pv_scale,
name == "k_iR" ~ baseline / pv_scale,
name == "k_iS" ~ baseline / pv_scale,
.default = baseline
)
)
# We use the same parameter values for Pv.
parameters_pv <- parameters_pf
usethis::use_data(parameters_pv, overwrite = TRUE)
No preview for this file type
No preview for this file type
This diff is collapsed.
This diff is collapsed.
outputs/sensitivity-analysis-pf-all-clinical.png

672 KiB | W: 0px | H: 0px

outputs/sensitivity-analysis-pf-all-clinical.png

670 KiB | W: 0px | H: 0px

outputs/sensitivity-analysis-pf-all-clinical.png
outputs/sensitivity-analysis-pf-all-clinical.png
outputs/sensitivity-analysis-pf-all-clinical.png
outputs/sensitivity-analysis-pf-all-clinical.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
outputs/sensitivity-analysis-pv-all-clinical.png

686 KiB | W: 0px | H: 0px

outputs/sensitivity-analysis-pv-all-clinical.png

684 KiB | W: 0px | H: 0px

outputs/sensitivity-analysis-pv-all-clinical.png
outputs/sensitivity-analysis-pv-all-clinical.png
outputs/sensitivity-analysis-pv-all-clinical.png
outputs/sensitivity-analysis-pv-all-clinical.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
......@@ -46,9 +46,23 @@ run_sensitivity_analysis <- function(species, days = 150, n_samples = 1000) {
# Save the credible intervals for all simulations.
cint_all_file <- file.path("outputs", paste0(prefix, "-rbc-cints-all.rds"))
cint_all <- results |>
select(scenario, time, U_t, Ur_t, I_t, Iq_t, Ir_t) |>
select(
scenario, time,
U_t, Ur_t, I_t, Iq_t, Ir_t,
flow_uc_to_r, flow_uc_to_r_no_inf,
inf_from_ic, inf_from_iq, inf_from_ir
) |>
# Calculate ratio of iRBC % in the spleen to iRBC % in the circulation.
calculate_irbc_ratio() |>
# Calculate ratio of unparasitised uRBC loss to parasitised uRBC loss.
calculate_urbc_loss_ratio() |>
# Drop intermediate values.
select(
scenario, time,
U_t, Ur_t, I_t, Iq_t, Ir_t,
iRBC_Ratio,
uRBC_Loss_Ratio
) |>
credible_intervals() |>
mutate(Species = !!species)
saveRDS(cint_all, cint_all_file)
......@@ -61,9 +75,23 @@ run_sensitivity_analysis <- function(species, days = 150, n_samples = 1000) {
cint_nonz_file <- file.path("outputs", paste0(prefix, "-rbc-cints-nonz.rds"))
cint_nonz <- results |>
filter(! scenario %in% zero_scenarios) |>
select(scenario, time, U_t, Ur_t, I_t, Iq_t, Ir_t) |>
select(
scenario, time,
U_t, Ur_t, I_t, Iq_t, Ir_t,
flow_uc_to_r, flow_uc_to_r_no_inf,
inf_from_ic, inf_from_iq, inf_from_ir
) |>
# Calculate ratio of iRBC % in the spleen to iRBC % in the circulation.
calculate_irbc_ratio() |>
# Calculate ratio of unparasitised uRBC loss to parasitised uRBC loss.
calculate_urbc_loss_ratio() |>
# Drop intermediate values.
select(
scenario, time,
U_t, Ur_t, I_t, Iq_t, Ir_t,
iRBC_Ratio,
uRBC_Loss_Ratio
) |>
credible_intervals() |>
mutate(Species = !!species)
saveRDS(cint_nonz, cint_nonz_file)
......@@ -72,9 +100,23 @@ run_sensitivity_analysis <- function(species, days = 150, n_samples = 1000) {
cint_zero_file <- file.path("outputs", paste0(prefix, "-rbc-cints-zero.rds"))
cint_zero <- results |>
filter(scenario %in% zero_scenarios) |>
select(scenario, time, U_t, Ur_t, I_t, Iq_t, Ir_t) |>
select(
scenario, time,
U_t, Ur_t, I_t, Iq_t, Ir_t,
flow_uc_to_r, flow_uc_to_r_no_inf,
inf_from_ic, inf_from_iq, inf_from_ir
) |>
# Calculate ratio of iRBC % in the spleen to iRBC % in the circulation.
calculate_irbc_ratio() |>
# Calculate ratio of unparasitised uRBC loss to parasitised uRBC loss.
calculate_urbc_loss_ratio() |>
# Drop intermediate values.
select(
scenario, time,
U_t, Ur_t, I_t, Iq_t, Ir_t,
iRBC_Ratio,
uRBC_Loss_Ratio
) |>
credible_intervals() |>
mutate(Species = !!species)
saveRDS(cint_zero, cint_zero_file)
......
......@@ -795,8 +795,6 @@ Table: Model parameters for RBC destruction and macrophage populations.
- The two species have different age-dependent merozoite preferences for uninfected RBCs; see [RBC infection] for details.
- Infected RBCs are removed from the circulation at a higher rate for Pv; see [Infected RBC removal from circulation] for details.
- Pf-infected RBCs can become sequestered in the microvasculature; see [Infected RBC sequestration] for details.
\clearpage
......