library(knitr)
# Use pngquant to reduce size of PNG images
knit_hooks$set(pngquant = hook_pngquant)
pngquant <- "--speed=1 --quality=0-25"
# In case pngquant isn't available
if (!nzchar(Sys.which("pngquant"))) pngquant <- NULL 
options(width = 80)
Zc <- "<i>Z</i><sub>C</sub>"
# https://stackoverflow.com/questions/595365/how-to-render-narrow-non-breaking-spaces-in-html-for-windows
logaH2 <- "log&#x202F;<i>a</i>H<sub>2</sub>"
logfH2 <- "log&#x202F;<i>f</i>H<sub>2</sub>"
logfO2 <- "log&#x202F;<i>f</i>O<sub>2</sub>"
pH2 <- "<i>p</i><sub>H<sub>2</sub></sub>"

This vignette runs the code to make the plots from the following paper:

Dick JM, Boyer GM, Canovas PA III, Shock EL. 2023. Using thermodynamics to obtain geochemical information from genomes. Geobiology 21(2): 262--273 doi: 10.1111/gbi.12532

Click here for full-text access to a view-only version of the paper.

On 2024-01-09, Figure 4 was modified from the original publication to show percentages of average affinity rankings of groups. This does not change the crossover points of the lines (on the x axis), but does make the absolute positions of the lines (on the y axis) not depend on the number of genomes in each group.

This vignette was compiled on r Sys.Date() with JMDplots r packageDescription("JMDplots")$Version and CHNOSZ r packageDescription("CHNOSZ")$Version.

library(JMDplots)

Chemical analysis of reference proteomes of methanogens reveals adaptation to redox conditions (Figure 1)

utogig1()

Data sources: Hierarchical clustering tree of methanogenesis genes [@LL18]; r Zc calculated for reference proteomes [@DT23] based on RefSeq protein sequences [@OWB+16]. See Table S1 in the paper's Supplementary Information for references for optimal growth temperature (T~opt~).

Relative stabilities of organic compounds depend on redox conditions (Figure 2)

utogig2()

Data sources: List of organic compounds from @SC10 and TCA cycle metabolites from @CS16. See Table 1 in the paper for references for thermodynamic data.

Thermodynamic model for methanogen niche structure (Figure 3)

utogig3()

Data sources: Lost City T and H~2~ concentration [@KKF+05], Rainbow vent fluid mixing model [@SC10], methanogenic and non-methanogenic sediments [@LG88].

Chemical and thermodynamic analysis of evolutionary divergence along redox gradients (Figure 4)

Table_S6 <- utogig4()

Data sources: Methanogens [@LL18], Nif-bearing organisms [@PCF+18], Thaumarchaeota [@RFH+19]. Amino acid compositions are from RefSeq proteomes (methanogens and Nif-bearing organisms) or NCBI and IMG genomes (Thaumarchaeota).

Parametric and non-parametric tests of comparisons in Figure 4 (Table S6)

kable(Table_S6, row.names = FALSE, digits = 99, format.args = list(scientific = TRUE))

Comparison of r Zc of proteomes predicted by Glimmer and downloaded from NCBI (Figure S1)

utogigS1()

Association between redox gradients and r Zc of proteins and lipids in alkaline Yellowstone hot springs (Figure S2)

utogigS2()

Data sources: Proteins [@DS13] and lipids [@BSS+20].

Relative stabilities of organic compounds at lower activity (Figure S3)

utogig2(logact = -6)

r logaH2-T plots for different organic compound classes (Figure S4)

utogigS4()

Convert r logaH2 to Eh

logaH2_15 <- -15
pH <- 7
(logK1 <- subcrt(c("H2", "H+", "e-"), c(-1, 2, 2), T = 25)$out$logK)
pe <- (- logK1 - 2 * pH - logaH2_15) / 2
Eh <- convert(pe, "Eh")
print(paste0("Given logaH2 = ", logaH2_15, " and pH = ", pH, ", Eh = ", round(1000 * Eh), " mV at equilibrium"))

Convert r pH2 to r logaH2

(logK2 <- subcrt(c("H2", "hydrogen"), c(-1, 1), T = 25)$out$logK)
# pH2 = 10^-2
logpH2 <- -2
print(paste0("Given logpH2 = ", logpH2, ", logaH2 = ", round(logpH2 - logK2, 1), " at equilibrium"))
# 0.55 ppmv H2
logpH2 <- log10(0.55e-6)
print(paste0("Given logpH2 = ", round(logpH2, 2), ", logaH2 = ", round(logpH2 - logK2, 1), " at equilibrium"))

Convert r logaH2 to r logfH2 and r logfO2

(logK3 <- subcrt(c("H2O", "oxygen", "hydrogen"), c(-1, 0.5, 1), T = 25)$out$logK)
logfH2 <- logaH2_15 + logK2
logfO2 <- 2 * (logK3 - logfH2)
print(paste0("Given logaH2 = ", logaH2_15, ", logfH2 = ", round(logfH2, 1), " at equilibrium"))
print(paste0("Given logaH2 = ", logaH2_15, ", logfO2 = ", round(logfO2, 1), " at equilibrium"))

References



jedick/JMDplots documentation built on April 12, 2025, 1:35 p.m.