Figure 2: WT maximum amplitudes and decay rate constants

Manuscript figure 2 uses three subfigures to show WT maximum amplitude and decay rate constant variation over LPR5, LPR10, and LPR50 for the H2O condition (figure 2B); WT maximum amplitude variation over LPR5 for H2O, D2O, and H2O>D2O conditions (figure 2D); and WT maximum amplitude and decay rate constant variation over LPR5, LPR10, and LPR50 for D2O experiments (figure 2F).

The Dataset

We process the NeRh50_Table_S1_raw_data_used_in_figures.csv dataset to obtain the data for this analysis (Table 1).

Show the code
# Show interactive tables of data
DT::datatable(dfms$dfm_fig2_amp)
DT::datatable(dfms$dfm_fig2_k)
# Write datasets to file (commented out for website)
#readr::write_csv(dfms$dfm_fig2_amp, "assets/data/01_fig2_amplitude.csv")
#readr::write_csv(dfms$dfm_fig2_k, "assets/data/01_fig2_rate.csv")
Table 1: Measurements for WT across H2O, D2O and D2O>H2O conditions at varying levels of LPR
(a) Maximum amplitude
(b) Decay rate

We visualise the datasets in the style of manuscript figure 2 in Figure 1.

Show the code
p1b_amp <- ggplot2::ggplot(dfms$dfm_fig2_amp |> dplyr::filter(Condition == "H2O"), 
                           ggplot2::aes(x=LPR, y=Value, color=LPR)) +
  ggplot2::geom_boxplot(outlier.shape = NA) +
  ggplot2::geom_jitter() +
  ggplot2::labs(y="Maximum amplitude (nA)") +
  ggplot2::ylim(0, 3.5) +
  ggplot2::theme_minimal()

p1b_k <- ggplot2::ggplot(dfms$dfm_fig2_k |> dplyr::filter(Condition == "H2O"), 
                         ggplot2::aes(x=LPR, y=Value, color=LPR)) +
  ggplot2::geom_boxplot(outlier.shape = NA) +
  ggplot2::geom_jitter() +
  ggplot2::labs(y="Decay rate constant k (/s)") +
  ggplot2::ylim(0, 105) +
  ggplot2::theme_minimal()

p1d_amp <- ggplot2::ggplot(dfms$dfm_fig2_amp |> dplyr::filter(LPR == "LPR5"), 
                           ggplot2::aes(x=Condition, y=Value, color=Condition)) +
  ggplot2::geom_boxplot(outlier.shape = NA) +
  ggplot2::geom_jitter() +
  ggplot2::labs(y="Maximum amplitude (nA)") +
  ggplot2::ylim(0, 3.5) +
  ggplot2::theme_minimal() +
  ggplot2::facet_wrap(~LPR)

p1d_k <- ggplot2::ggplot(dfms$dfm_fig2_k |> dplyr::filter(LPR == "LPR5"), 
                         ggplot2::aes(x=Condition, y=Value, color=Condition)) +
  ggplot2::geom_boxplot(outlier.shape = NA) +
  ggplot2::geom_jitter() +
  ggplot2::labs(y="Decay rate constant k (/s)") +
  ggplot2::ylim(0, 105) +
  ggplot2::theme_minimal() +
  ggplot2::facet_wrap(~LPR)

p1f_amp <- ggplot2::ggplot(dfms$dfm_fig2_amp |> dplyr::filter(Condition == "D2O"), 
                           ggplot2::aes(x=LPR, y=Value, color=LPR)) +
  ggplot2::geom_boxplot(outlier.shape = NA) +
  ggplot2::geom_jitter() +
  ggplot2::labs(y="Maximum amplitude (nA)") +
  ggplot2::ylim(0, 3.5) +
  ggplot2::theme_minimal()

p1f_k <- ggplot2::ggplot(dfms$dfm_fig2_k |> dplyr::filter(Condition == "D2O"), 
                         ggplot2::aes(x=LPR, y=Value, color=LPR)) +
  ggplot2::geom_boxplot(outlier.shape = NA) +
  ggplot2::geom_jitter() +
  ggplot2::labs(y="Decay rate constant k (/s)") +
  ggplot2::ylim(0, 105) +
  ggplot2::theme_minimal()

ggpubr::ggarrange(p1b_amp, p1b_k, p1d_amp, p1d_k, p1f_amp, p1f_k,
                  ncol=2, nrow=3,
                  labels=c("B", "", "D", "", "F", ""),
                  legend="none")
Figure 1: WT measurements across three LPRs and three experimental conditions, representing figures 2B, 2D, and 2F from the draft manuscript.

Downloads

The Questions

We have multiple questions for this dataset. Within each of the six plots we wish to present the effects of the parameters plotted along the x-axis, for each measurement.

The Models

We address these questions using a separate linear model for each set of figure data. For figures 2B and 2F we treat maximum amplitude and decay rate constant as dependent variables, and fit these to the LPR explanatory variable (Value ~ LPR). For figure 2D we proceed in a similar way, but fit to the Condition explanatory variable (Value ~ Condition).

Show the code
model1b_amp_lm <- lm(Value ~ LPR, data=dfms$dfm_fig2_amp |> dplyr::filter(Condition == "H2O"))
model1b_k_lm <- lm(Value ~ LPR, data=dfms$dfm_fig2_k |> dplyr::filter(Condition == "H2O"))

model1d_lpr5_amp_lm <- lm(Value ~ Condition, data=dfms$dfm_fig2_amp |> dplyr::filter(LPR == "LPR5"))
model1d_lpr5_k_lm <- lm(Value ~ Condition, data=dfms$dfm_fig2_k |> dplyr::filter(LPR == "LPR5"))

model1f_amp_lm <- lm(Value ~ LPR, data=dfms$dfm_fig2_amp |> dplyr::filter(Condition == "D2O"))
model1f_k_lm <- lm(Value ~ LPR, data=dfms$dfm_fig2_k |> dplyr::filter(Condition == "D2O"))

performance::check_model(model1b_amp_lm, size_title=6)
performance::check_model(model1b_k_lm, size_title=6)
performance::check_model(model1d_lpr5_amp_lm, size_title=6)
performance::check_model(model1d_lpr5_k_lm, size_title=6)
performance::check_model(model1f_amp_lm, size_title=6)
performance::check_model(model1f_k_lm, size_title=6)
(a) Figure 2B(i)
(b) Figure 2B(ii)
(c) Figure 2D(i)
(d) Figure 2D(ii)
(e) Figure 2F(i)
(f) Figure 2F(ii)
Figure 2: Diagnostic plots for linear model fits of Value ~ LPR and Max_amplitude ~ Condition

There are no obvious departures from assumptions in Figure 2, although some of the diagnostic plots do have odd spline fits. We extract the contrasts in Table 2.

Show the code
EMM <- emmeans::emmeans(model1b_amp_lm, ~ LPR)
confint(emmeans::contrast(EMM, "pairwise", adjust="sidak")) |>
  kableExtra::kbl(digits=3) |>
  kableExtra::kable_styling(
    bootstrap_options = c("hover", "responsive")
  )
EMM <- emmeans::emmeans(model1b_k_lm, ~ LPR)
confint(emmeans::contrast(EMM, "pairwise", adjust="sidak")) |>
  kableExtra::kbl(digits=3) |>
  kableExtra::kable_styling(
    bootstrap_options = c("hover", "responsive")
  )
EMM <- emmeans::emmeans(model1d_lpr5_amp_lm, ~ Condition)
confint(emmeans::contrast(EMM, "pairwise", adjust="sidak")) |>
  kableExtra::kbl(digits=3) |>
  kableExtra::kable_styling(
    bootstrap_options = c("hover", "responsive")
  )
EMM <- emmeans::emmeans(model1d_lpr5_k_lm, ~ Condition)
confint(emmeans::contrast(EMM, "pairwise", adjust="sidak")) |>
  kableExtra::kbl(digits=3) |>
  kableExtra::kable_styling(
    bootstrap_options = c("hover", "responsive")
  )
EMM <- emmeans::emmeans(model1f_amp_lm, ~ LPR)
confint(emmeans::contrast(EMM, "pairwise", adjust="sidak")) |>
  kableExtra::kbl(digits=3) |>
  kableExtra::kable_styling(
    bootstrap_options = c("hover", "responsive")
  )
EMM <- emmeans::emmeans(model1f_k_lm, ~ LPR)
confint(emmeans::contrast(EMM, "pairwise", adjust="sidak")) |>
  kableExtra::kbl(digits=3) |>
  kableExtra::kable_styling(
    bootstrap_options = c("hover", "responsive")
  )
Table 2: Contrasts for model fits, with Sidak adjustment.
(a) Figure 2B(i): Maximum amplitude, H2O
contrast estimate SE df lower.CL upper.CL
LPR5 - LPR10 0.762 0.157 12 0.328 1.197
LPR5 - LPR50 1.410 0.167 12 0.947 1.873
LPR10 - LPR50 0.648 0.174 12 0.166 1.129
(b) Figure 2B(ii): Decay rate, H2O
contrast estimate SE df lower.CL upper.CL
LPR5 - LPR10 23.482 7.882 12 1.646 45.317
LPR5 - LPR50 43.994 8.402 12 20.718 67.271
LPR10 - LPR50 20.512 8.732 12 -3.677 44.702
(c) Figure 2D(i): Maximum amplitude, LPR5
contrast estimate SE df lower.CL upper.CL
H2O - D2O 0.832 0.140 14 0.454 1.210
H2O - D2O>H2O 0.147 0.162 14 -0.292 0.585
D2O - D2O>H2O -0.685 0.157 14 -1.111 -0.259
(d) Figure 2D(ii): Decay rate, LPR5
contrast estimate SE df lower.CL upper.CL
H2O - D2O -2.128 6.675 14 -20.210 15.954
H2O - D2O>H2O 10.351 7.744 14 -10.628 31.331
D2O - D2O>H2O 12.479 7.520 14 -7.892 32.851
(e) Figure 2F(i): Maximum amplitude, D2O
contrast estimate SE df lower.CL upper.CL
LPR5 - LPR10 0.232 0.084 14 0.006 0.458
LPR5 - LPR50 0.713 0.094 14 0.458 0.968
LPR10 - LPR50 0.481 0.097 14 0.218 0.743
(f) Figure 2F(ii): Decay rate, D2O
contrast estimate SE df lower.CL upper.CL
LPR5 - LPR10 33.607 4.709 14 20.849 46.366
LPR5 - LPR50 51.345 5.306 14 36.972 65.718
LPR10 - LPR50 17.738 5.464 14 2.935 32.540

The following contrasts are indicated not to include zero in their 95% confidence interval (estimates in Table 2), which we interpret as indicating an effect due to differing lipid-protein ratio, or differing solvent condition:

  • WT Maximum amplitude, H2O: LPR5-LPR10 (0.762nA [0.328,1.20]), LPR10-LPR50 (0.648nA [0.166, 1.13]), LPR5-LPR50 (1.41nA [0.947,1.87])
  • WT Decay rate, H2O: LPR5-LPR10 (23.5.s [1.65,45.3]), LPR5-LPR50 (44.0/s [20.7,67.3])
  • WT Maximum amplitude, LPR5: H2O-D2O (0.832nA [0.454,1.21]), D2O-D2O>H2O (-0.685nA [-1.11,-0.259])
  • WT Decay rate, LPR5: no contrasts show significant difference
  • WT Maximum amplitude, D2O: LPR5-LPR10 (0.232nA [0.006,0.458]), LPR10-LPR50 (0.481nA [0.218,0.743]), LPR5-LPR50 (0.713nA [0.458,0.968])
  • WT Decay rate, D2O: LPR5-LPR10 (33.6/s [20.8,46.4]), LPR5-LPR50 (51.3/s [37.0,65.7]), LPR10-LPR50 (17.7/s [2.94,32.5])

Figure

We can plot these differences in the style of the manuscript as in Figure 3

Show the code
# Get p-values, accounting for heteroscedasticity and multiple testing
# Also generate group1 and group2 columns
EMM_amp_b <- as.data.frame(pairs(emmeans::emmeans(model1b_amp_lm, ~ LPR),
                               adjust="sidak")) |>
  tidyr::separate(contrast, into=c("group1", "group2"), sep=" - ") |>
  dplyr::mutate(y.position=2.5) |>
  rstatix::add_significance()

EMM_k_b <- as.data.frame(pairs(emmeans::emmeans(model1b_k_lm, ~ LPR),
                               adjust="sidak")) |>
  tidyr::separate(contrast, into=c("group1", "group2"), sep=" - ") |>
  dplyr::mutate(y.position=85) |>
  rstatix::add_significance()

EMM_lpr5_amp_d <- as.data.frame(pairs(emmeans::emmeans(model1d_lpr5_amp_lm, ~ Condition),
                               adjust="sidak")) |>
  tidyr::separate(contrast, into=c("group1", "group2"), sep=" - ") |>
  dplyr::mutate(y.position=2.5) |>
  rstatix::add_significance() |>
  dplyr::mutate(LPR="LPR5")

EMM_lpr5_k_d <- as.data.frame(pairs(emmeans::emmeans(model1d_lpr5_k_lm, ~ Condition),
                               adjust="sidak")) |>
  tidyr::separate(contrast, into=c("group1", "group2"), sep=" - ") |>
  dplyr::mutate(y.position=85) |>
  rstatix::add_significance() |>
  dplyr::mutate(LPR="LPR5")

EMM_amp_f <- as.data.frame(pairs(emmeans::emmeans(model1f_amp_lm, ~ LPR),
                               adjust="sidak")) |>
  tidyr::separate(contrast, into=c("group1", "group2"), sep=" - ") |>
  dplyr::mutate(y.position=2.5) |>
  rstatix::add_significance()

EMM_k_f <- as.data.frame(pairs(emmeans::emmeans(model1f_k_lm, ~ LPR),
                               adjust="sidak")) |>
  tidyr::separate(contrast, into=c("group1", "group2"), sep=" - ") |>
  dplyr::mutate(y.position=85) |>
  rstatix::add_significance()

p1b_amp_annot <- p1b_amp +
  ggpubr::stat_pvalue_manual(EMM_amp_b,
                             label="p = {scales::pvalue(p.value)}",
                             size=3, step.increase=0.1)

p1b_k_annot <- p1b_k +
  ggpubr::stat_pvalue_manual(EMM_k_b, 
                             label="p = {scales::pvalue(p.value)}", 
                             size=3, step.increase=0.1)

p1d_amp_annot <- p1d_amp +
  ggpubr::stat_pvalue_manual(EMM_lpr5_amp_d,
                             label="p = {scales::pvalue(p.value)}",
                             size=3, step.increase=0.1)

p1d_k_annot <- p1d_k +
  ggpubr::stat_pvalue_manual(EMM_lpr5_k_d,
                             label="p = {scales::pvalue(p.value)}",
                             size=3, step.increase=0.1)

p1f_amp_annot <- p1f_amp +
  ggpubr::stat_pvalue_manual(EMM_amp_f,
                             label="p = {scales::pvalue(p.value)}",
                             size=3, step.increase=0.1)

p1f_k_annot <- p1f_k +
  ggpubr::stat_pvalue_manual(EMM_k_f, 
                             label="p = {scales::pvalue(p.value)}", 
                             size=3, step.increase=0.1)

p_comp <- ggpubr::ggarrange(p1b_amp_annot, p1b_k_annot, p1d_amp_annot,
                            p1d_k_annot, p1f_amp_annot, p1f_k_annot,
                            ncol=2, nrow=3,
                            labels=c("B", "", "D", "", "F", ""),
                            legend="none")
p_comp

# Write figures to file (commented out for webpage)
#ggplot2::ggsave("assets/images/fig02_WT_across_three_conditions_and_LPRs.pdf", p_comp)
#ggplot2::ggsave("assets/images/fig02_WT_across_three_conditions_and_LPRs.png", p_comp)
(a) Figure 2B(i)
Figure 3: WT measurements across three LPRs and three experimental conditions, representing figures 2B, 2D, and 2F from the draft manuscript. , with Sidak-adjusted p-values indicated

Downloads