Analyzing monoculture growth summary

Author

Shane Hogle

Published

July 22, 2025

Abstract
In the prior step we imported, smoothed, and calculated summary statistics for the species growth on Biolog Ecoplates. Here we will do some simple plots and analysis of the growth data on different carbon sources from the ecoplates.

1 Setup

1.1 Libraries

Show/hide code
library(tidyverse)
library(here)
library(fs)
library(scales)
source(here::here("R", "utils_gcurves.R"))

1.2 Global variables

Show/hide code
data_raw <- here::here("_data_raw", "biolog_ecoplates")
data <- here::here("data", "biolog_ecoplates")

# make processed data directory if it doesn't exist
fs::dir_create(data)

1.3 Read growth summary data

Show/hide code
gcurves <- readr::read_tsv(here::here(data, "ecoplate_gcurves_smooth.tsv"))
many_auc_res <- readr::read_tsv(here::here(data, "ecoplate_gcurve_auc_results.tsv"))
many_spline_res <- readr::read_tsv(here::here(data, "ecoplate_gcurve_spline_results.tsv"))

2 Plot growth curves

Figure 1: Growth of Citrobacter koseri HAMBI_1287 on 31 different carbon substrates and water in Biolog Ecoplates. Absorbance is measured at 590 nm.

Figure 2: Growth of Pseudomonas chlororaphis HAMBI_1977 on 31 different carbon substrates and water in Biolog Ecoplates. Absorbance is measured at 590 nm.

3 Plot maximum observed absorbance

Some clustering to plot by more similar responses

Show/hide code
df2clust <- many_auc_res %>% 
  mutate(strainID2 = paste0(toupper(evolution), "_", strain)) %>% 
  summarize(y = min(max_od), .by=c(strainID2, `carbon source`)) %>% 
  pivot_wider(names_from = "carbon source", values_from = "y") %>% 
  pivot_longer(c(-strainID2, -water)) %>% 
  mutate(value_norm = value - water) %>% 
  pivot_wider(id_cols = c(-water, -value), names_from = "strainID2", values_from = "value_norm") %>% 
  as.data.frame() %>% 
  column_to_rownames(var = "name")

# scale the dataframe for clustering
df2clust_scaled <- scale(df2clust)

# perform the hierarchcical clustering using euclidean distance and Ward's D
hc <- hclust(dist(df2clust_scaled, method = "euclidean"), method = "ward.D2" )

# plot
df2clust %>% 
  rownames_to_column(var = "carbon") %>% 
  pivot_longer(cols = -carbon) %>% 
  mutate(carbon = factor(carbon, levels = hc$labels[hc$order]),
         name = factor(name, levels = c("ANC_1287", "EVO_1287", "ANC_1977", "EVO_1977"))) %>% 
  ggplot(aes(x = name, y = carbon)) +
  geom_tile(aes(fill = value)) +
  scale_x_discrete(guide = guide_axis(angle = 90)) +
  scale_fill_viridis_c() +
  scale_color_manual(values = c("white", "black"), guide = "none") +
  labs(y = "Carbon substrate", fill = "Maximum\nabsorbance", x = "") +
  coord_fixed() + 
  ggplot2::theme(panel.grid = element_blank(),
                 panel.background = element_blank(), 
                 strip.background = element_blank(),
                 panel.border = element_blank())

Figure 3: Mean maximum absorbance (590 nm, fill) over 2 replicates for the 4 strains (x-axis) grown on 31 carbon substrates and water (y-axis).

4 Plot AUC

Figure 4: As in Figure 3 but for total area under the growth curve.

5 Plot growth rate

Figure 5: As in Figure 3 but for growth rate (hr-1)

6 Save

Show/hide code
ggsave(
  here::here("figs", "monoculture_auc_filtrate.svg"),
  auc_filtrate,
  width = 8,
  height = 8,
  units = "in",
  device = "svg"
)