Load Packages & Data Prep

library(ggplot2)
library(gridExtra)
library(bbmle)
library(emdbook)
library(dplyr)
library(tidyr)
library(tidyverse)
library(tibble)
library(knitr)
library(rmarkdown)
library(kableExtra)
library(stringr)
library(grid)
library(ggpubr)
library(dunn.test)
library(lawstat)

theme_mitch <- theme(panel.background=element_blank(), panel.grid.major=element_blank(), panel.grid.minor=element_blank(), panel.border=element_blank(), axis.line=element_line(color="black", size=1), text = element_text(colour = "black", size = 18),axis.text.x = element_text(color = "black", margin=unit(c(0,0.2,0.2,0.2), "cm")), axis.text.y = element_text(color = "black", margin=unit(c(0.2,0,0.2,0.2), "cm")), plot.title = element_text(hjust =))

AL <- read.csv(file.choose()) # choose "NOVISSData.csv" file that is provided

Effects of Temperature on Total Skin Protein Fraction (Figure 6)

Total Protein fraction recovery (Fig6a): µg of skin proteins recovered per gram body mass from adult NOVI at three temperatures

Data Prep

# TP Control Only Setup ####

TPCtlmaster <- filter(AL, Trtmt =="Control", Secretion=="Total Protein", InduceType!="Massage", InduceConc=="25.0nmol/g",  DPI=="000 dy")

# TP uggbw Control only####

TPTemp <- group_by(TPCtlmaster, Temp)
TPTempuggbw <- filter(TPTemp, !is.na(uggbw))

Data Summary

## summarize####

TPTempuggbwsum <- summarise(TPTempuggbw, count=n(), avg=mean(uggbw), standarddev=sd(uggbw), sem=sd(uggbw)/sqrt(n()))
F6aSum <- TPTempuggbwsum
F6aSum
## # A tibble: 3 x 5
##   Temp  count   avg standarddev   sem
##   <fct> <int> <dbl>       <dbl> <dbl>
## 1 06°C     10 165.        163.   51.5
## 2 14°C     10  95.5        68.9  21.8
## 3 22°C      7  53.5        49.2  18.6

Figure 6a

## plot means####

Fig6a <- ggplot(TPTempuggbwsum, aes(Temp, avg, fill=Temp)) + 
  geom_col() +   
  scale_fill_manual(values=c("cornflowerblue", "goldenrod2", "firebrick")) +
  theme(legend.position="none") +
  xlab("Temperature(°C)") +
  ylab("Protein Recovered(µg/gbw)") + 
  theme_mitch + 
  scale_x_discrete(limits=c("06°C", "14°C", "22°C"), labels=c("6", "14", "22")) +
  geom_errorbar(aes(x=Temp, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9))+
  scale_y_continuous(expand=c(0,0), limits=c(0,240))
Fig6a

Testing Assumptions & Transforming Data

## stats####

### test assumptions

levene.test(TPTempuggbw$uggbw, TPTempuggbw$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  TPTempuggbw$uggbw
## Test Statistic = 1.0969, p-value = 0.3501
shapiro.test(TPTempuggbw$uggbw)
## 
##  Shapiro-Wilk normality test
## 
## data:  TPTempuggbw$uggbw
## W = 0.70808, p-value = 5.032e-06
### transform data

TPTempuggbw$uggbw_log <- log10(TPTempuggbw$uggbw)

### test assumptions

levene.test(TPTempuggbw$uggbw_log, TPTempuggbw$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  TPTempuggbw$uggbw_log
## Test Statistic = 0.40428, p-value = 0.6719
shapiro.test(TPTempuggbw$uggbw_log)
## 
##  Shapiro-Wilk normality test
## 
## data:  TPTempuggbw$uggbw_log
## W = 0.97745, p-value = 0.8008

ANOVA

### analyze data

TPTempuggbwanovalog <- aov(uggbw_log ~ Temp, data=TPTempuggbw)
F6aStats <- summary(TPTempuggbwanovalog)
F6aStats
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Temp         2  1.054  0.5272   4.078 0.0299 *
## Residuals   24  3.103  0.1293                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

PostHoc Test

F6aPostHoc <- TukeyHSD(TPTempuggbwanovalog)
F6aPostHoc
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = uggbw_log ~ Temp, data = TPTempuggbw)
## 
## $Temp
##                 diff        lwr         upr     p adj
## 14°C-06°C -0.1777813 -0.5793536  0.22379092 0.5199666
## 22°C-06°C -0.5046606 -0.9471717 -0.06214954 0.0232693
## 22°C-14°C -0.3268793 -0.7693904  0.11563181 0.1768010

Total Protein percent inhibition (Fig6b): percent of B. sal. growth inhibition by adult NOVI skin proteins (500µg/mL) at three temperatures measured using Cell Titre Glo assay

Data Prep

# TP % inhib Control only####

TPTempinhib <- filter(TPTemp, CellGloConc=="500", !is.na(CellGloPctInhib))

Data Summary

## summarize####

TPTempinhibsum <- summarise(TPTempinhib, count=n(), avg=mean(CellGloPctInhib), standarddev=sd(CellGloPctInhib), sem=sd(CellGloPctInhib)/sqrt(n()))
F6bSum <- TPTempinhibsum
F6bSum
## # A tibble: 3 x 5
##   Temp  count   avg standarddev   sem
##   <fct> <int> <dbl>       <dbl> <dbl>
## 1 06°C     10  35.6        19.6  6.18
## 2 14°C      9  32.2        32.4 10.8 
## 3 22°C      5  34.2        30.5 13.6

Figure 6b

## plot means ####

Fig6b <- ggplot(TPTempinhibsum, aes(Temp, avg, fill=Temp)) + 
  geom_col() +  
  scale_fill_manual(values=c("cornflowerblue", "goldenrod2", "firebrick")) + 
  theme(legend.position="none") +
  xlab("Temperature(°C)") +
  ylab("Percent Inhibition") + 
  theme_mitch +
  scale_x_discrete(limits=c("06°C", "14°C", "22°C"), labels=c("6", "14", "22")) +
  geom_errorbar(aes(x=Temp, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9))+
  scale_y_continuous(expand=c(0,0), limits=c(0,100))
Fig6b

Testing Assumptions & Transforming Data

## stats####

### test assumptions

levene.test(TPTempinhib$CellGloPctInhib, TPTempinhib$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  TPTempinhib$CellGloPctInhib
## Test Statistic = 0.66147, p-value = 0.5265
shapiro.test(TPTempinhib$CellGloPctInhib)
## 
##  Shapiro-Wilk normality test
## 
## data:  TPTempinhib$CellGloPctInhib
## W = 0.94856, p-value = 0.2521

ANOVA

### analyze data

TPTempinhibanova <- aov(CellGloPctInhib ~ Temp, data=TPTempinhib)
F6bStats <- summary(TPTempinhibanova)
F6bStats
##             Df Sum Sq Mean Sq F value Pr(>F)
## Temp         2     56    27.8   0.038  0.963
## Residuals   21  15533   739.7

Total Protein Effectiveness (Fig6c): adult NOVI Total Protein effectiveness (µg produced * percent inhibition) at three temperatures

Data Prep

# TP Effectiveness Control only####

TPTempeffctl <- filter(TPTemp, CellGloConc=="500", !is.na(uggbw), !is.na(CellGloPctInhib))
TPTempeffctl$Eff <- TPTempeffctl$uggbw*TPTempeffctl$CellGloPctInhib

Data Summary

## summarize####

TPTempeffsumctl <- summarise(TPTempeffctl, count=n(), avg=mean(Eff), standarddev=sd(Eff), sem=sd(Eff)/sqrt(n()))
F6cSum <- TPTempeffsumctl
F6cSum
## # A tibble: 3 x 5
##   Temp  count   avg standarddev   sem
##   <fct> <int> <dbl>       <dbl> <dbl>
## 1 06°C     10 7513.       9864. 3119.
## 2 14°C      9 1801.       1790.  597.
## 3 22°C      5 1293.        892.  399.

Figure 6c

### plot means####

Fig6c <- ggplot(TPTempeffsumctl, aes(Temp, avg, fill=Temp)) + 
  geom_col() +   
  scale_fill_manual(values=c("cornflowerblue", "goldenrod2", "firebrick")) +
  theme(legend.position="none") +
  xlab("Temperature(°C)") +
  ylab("Protein Effectiveness") + 
  theme_mitch + 
  scale_x_discrete(limits=c("06°C", "14°C", "22°C"), labels=c("6", "14", "22")) +
  geom_errorbar(aes(x=Temp, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9))+
  scale_y_continuous(expand=c(0,0), limits=c(0,12000))
Fig6c

Testing Assumptions & Transforming Data

## stats####

### test assumptions

levene.test(TPTempeffctl$Eff, TPTempeffctl$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  TPTempeffctl$Eff
## Test Statistic = 1.8194, p-value = 0.1868
shapiro.test(TPTempeffctl$Eff)
## 
##  Shapiro-Wilk normality test
## 
## data:  TPTempeffctl$Eff
## W = 0.54288, p-value = 1.511e-07
### transform data

TPTempeffctl$log_Eff <- log10(TPTempeffctl$Eff + 1)

### test assumptions

levene.test(TPTempeffctl$log_Eff, TPTempeffctl$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  TPTempeffctl$log_Eff
## Test Statistic = 0.46005, p-value = 0.6375
shapiro.test(TPTempeffctl$log_Eff)
## 
##  Shapiro-Wilk normality test
## 
## data:  TPTempeffctl$log_Eff
## W = 0.7316, p-value = 2.714e-05

Kruskal-Wallis Test

### analyze data

F6cStats <- kruskal.test(Eff ~ Temp, data=TPTempeffctl)
F6cStats
## 
##  Kruskal-Wallis rank sum test
## 
## data:  Eff by Temp
## Kruskal-Wallis chi-squared = 4.5657, df = 2, p-value = 0.102

Effects of B.sal. exposure on Total Skin Protein and Hydrophobic Peptide production (Figure 7)

Total Protein fraction recovery (Fig7a): µg of skin proteins recovered per gram body mass from adult NOVI exposed to different doses of B. sal. (all adult NOVI were kept at 16°C)

Data Prep

# TP 6C Only uggbw####
TPAllmaster <- filter(AL, Secretion=="Total Protein", InduceType!="Massage", InduceConc=="25.0nmol/g",  DPI=="000 dy")

# TP uggbw All Newts####

TPTempAll <- group_by(TPAllmaster, Temp)
TP6C <- filter(TPTempAll, Temp=="06°C", !is.na(uggbw))
TP6C <- group_by(TP6C, Trtmt)

Data Summary

## summarize####

TP6Csum <- summarize(TP6C, count=n(), avg=mean(uggbw), standarddev=sd(uggbw), sem=sd(uggbw)/sqrt(n()))
F7aSum <- TP6Csum
F7aSum
## # A tibble: 3 x 5
##   Trtmt   count   avg standarddev   sem
##   <fct>   <int> <dbl>       <dbl> <dbl>
## 1 5*10^3      9  208.       134.   44.8
## 2 5*10^4      6  131.        67.0  27.4
## 3 Control    10  165.       163.   51.5

Figure 7a

## plot means####

Fig7a <- ggplot(TP6Csum, aes(Trtmt, avg, fill=Trtmt)) + 
  geom_col() + 
  theme(legend.position="none") +   
  scale_fill_manual(values=c("#B74641", "#730202", "#FB8383")) +
  xlab("Exposure Treatment(zsp)") +
  ylab("Recovered Proteins(µg/gbw)") + 
  theme_mitch + 
  geom_errorbar(aes(x=Trtmt, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9)) +
  scale_x_discrete(limits=c("Control", "5*10^3", "5*10^4"), labels=c("Control", "5,000", "50,000")) +
  scale_y_continuous(expand=c(0,0), limits=c(0,300))
Fig7a

Testing Assumptions & Transforming Data

## stats####

### test assumptions

levene.test(TP6C$uggbw, TP6C$Trtmt)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  TP6C$uggbw
## Test Statistic = 0.4774, p-value = 0.6267
shapiro.test(TP6C$uggbw)
## 
##  Shapiro-Wilk normality test
## 
## data:  TP6C$uggbw
## W = 0.81622, p-value = 0.0004292
### transform data

TP6C$uggbw_log <- log10(TP6C$uggbw)

### test assumptions

levene.test(TP6C$uggbw_log, TP6C$Trtmt)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  TP6C$uggbw_log
## Test Statistic = 0.54474, p-value = 0.5876
shapiro.test(TP6C$uggbw_log)
## 
##  Shapiro-Wilk normality test
## 
## data:  TP6C$uggbw_log
## W = 0.96336, p-value = 0.4855

ANOVA

### analyze data

TP6Canovalog <- aov(uggbw_log ~ Trtmt, data=TP6C)
F7aStats <- summary(TP6Canovalog)
F7aStats
##             Df Sum Sq Mean Sq F value Pr(>F)
## Trtmt        2 0.1489 0.07443   0.716    0.5
## Residuals   22 2.2855 0.10389

Hydrophobic Peptide fraction recovery (Fig7b): µg of hydrophobic peptides recovered per gram body mass from adult NOVI exposed to different doses of B. sal. (all adult NOVI were kept at 16°C)

Data Prep

# HP All Newts Setup ####

HPAllmaster <- filter(AL, Secretion=="Hydrophobic Peptide", InduceType!="Massage", InduceConc=="25.0nmol/g",  DPI=="000 dy")

# HP uggbw All Newts####

HPTempAll <- group_by(HPAllmaster, Temp)
HP6C <- filter(HPTempAll, Temp=="06°C", !is.na(uggbw))
HP6C <- group_by(HP6C, Trtmt)

Data Summary

## summarize####

HP6Csum <- summarize(HP6C, count=n(), avg=mean(uggbw), standarddev=sd(uggbw), sem=sd(uggbw)/sqrt(n()))
F7bSum <- HP6Csum
F7bSum
## # A tibble: 3 x 5
##   Trtmt   count   avg standarddev   sem
##   <fct>   <int> <dbl>       <dbl> <dbl>
## 1 5*10^3      9  27.1       23.9   7.97
## 2 5*10^4      6  18.5        6.90  2.82
## 3 Control     9  89.2       76.7  25.6

Figure 7b

## plot means####

Fig7b <- ggplot(HP6Csum, aes(Trtmt, avg, fill=Trtmt)) + 
  geom_col() +  
  theme(legend.position="none") +   
  scale_fill_manual(values=c("#B74641", "#730202", "#FB8383")) +
  xlab("Exposure Treatment(zsp)") +
  ylab("Recovered Peptides(µg/gbw)") + 
  theme_mitch + 
  geom_errorbar(aes(x=Trtmt, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9)) +
  scale_x_discrete(limits=c("Control", "5*10^3", "5*10^4"), labels=c("Control", "5,000", "50,000"))+
  scale_y_continuous(expand=c(0,0), limits=c(0,300))
Fig7b

Testing Assumptions & Transforming Data

## stats####

### test assumptions

levene.test(HP6C$uggbw, HP6C$Trtmt)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  HP6C$uggbw
## Test Statistic = 2.9254, p-value = 0.07573
shapiro.test(HP6C$uggbw)
## 
##  Shapiro-Wilk normality test
## 
## data:  HP6C$uggbw
## W = 0.71124, p-value = 1.423e-05
### transform data

HP6C$uggbw_log <- log10(HP6C$uggbw)

### test for normailty

levene.test(HP6C$uggbw_log, HP6C$Trtmt)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  HP6C$uggbw_log
## Test Statistic = 1.7094, p-value = 0.2052
shapiro.test(HP6C$uggbw_log)
## 
##  Shapiro-Wilk normality test
## 
## data:  HP6C$uggbw_log
## W = 0.98605, p-value = 0.9769

ANOVA

### analyze data

HP6Canovalog <- aov(uggbw_log ~ Trtmt, data=HP6C)
F7bStats <- summary(HP6Canovalog)
F7bStats
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Trtmt        2  1.785  0.8925   5.107 0.0156 *
## Residuals   21  3.670  0.1748                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

PostHoc Test

F7bPostHoc <- TukeyHSD(HP6Canovalog)
F7bPostHoc
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = uggbw_log ~ Trtmt, data = HP6C)
## 
## $Trtmt
##                      diff          lwr       upr     p adj
## 5*10^4-5*10^3  0.00530229 -0.550047045 0.5606516 0.9996808
## Control-5*10^3 0.56542215  0.068702609 1.0621417 0.0239107
## Control-5*10^4 0.56011986  0.004770529 1.1154692 0.0478216

Effects of Temperature on Hydrophobic Peptide Fraction (Figure S1)

Hydrophobic Peptide fraction recovery (FigS1a): µg of hydrophobic peptides recovered per gram body mass from adult NOVI at three temperatures

Data Prep

# HP Control Only Setup #### 

HPCtlmaster <- filter(AL, Trtmt=="Control", Secretion=="Hydrophobic Peptide", InduceType!="Massage", InduceConc=="25.0nmol/g", DPI=="000 dy")

# HP uggbw Control only####

HPTemp <- group_by(HPCtlmaster, Temp)
HPTempuggbw <- filter(HPTemp, !is.na(uggbw))

Data Summary

## summarize####

HPTempuggbwsum <- summarise(HPTempuggbw, count=n(), avg=mean(uggbw), standarddev=sd(uggbw), sem=sd(uggbw)/sqrt(n()))
FS1aSum <- HPTempuggbwsum
FS1aSum
## # A tibble: 3 x 5
##   Temp  count   avg standarddev   sem
##   <fct> <int> <dbl>       <dbl> <dbl>
## 1 06°C      9  89.2        76.7  25.6
## 2 14°C     10 103.         88.6  28.0
## 3 22°C      7  67.9        69.3  26.2

Figure S1a

## plot means####

FigS1a <- ggplot(HPTempuggbwsum, aes(Temp, avg, fill=Temp)) + 
  geom_col() +   
  scale_fill_manual(values=c("cornflowerblue", "goldenrod2", "firebrick")) +
  theme(legend.position="none") +
  xlab("Temperature(°C)") +
  ylab("Peptides Recovered(µg/gbw)") + 
  theme_mitch + 
  scale_x_discrete(limits=c("06°C", "14°C", "22°C"), labels=c("6", "14", "22")) +
  geom_errorbar(aes(x=Temp, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9)) +
  scale_y_continuous(expand=c(0,0), limits=c(0,240))
FigS1a

Testing Assumptions & Transforming Data

## stats####

### test assumptions

levene.test(HPTempuggbw$uggbw, HPTempuggbw$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  HPTempuggbw$uggbw
## Test Statistic = 0.30887, p-value = 0.7373
shapiro.test(HPTempuggbw$uggbw)
## 
##  Shapiro-Wilk normality test
## 
## data:  HPTempuggbw$uggbw
## W = 0.84571, p-value = 0.001176
### transform data

HPTempuggbw$uggbw_log <- log10(HPTempuggbw$uggbw)

### test assumptions

levene.test(HPTempuggbw$uggbw_log, HPTempuggbw$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  HPTempuggbw$uggbw_log
## Test Statistic = 0.018807, p-value = 0.9814
shapiro.test(HPTempuggbw$uggbw_log)
## 
##  Shapiro-Wilk normality test
## 
## data:  HPTempuggbw$uggbw_log
## W = 0.98428, p-value = 0.9493

ANOVA

### analyze data

HPTempuggbwanovalog <- aov(uggbw_log ~ Temp, data=HPTempuggbw)
FS1aStats <- summary(HPTempuggbwanovalog)
FS1aStats
##             Df Sum Sq Mean Sq F value Pr(>F)
## Temp         2  0.164 0.08221   0.483  0.623
## Residuals   23  3.913 0.17011

Hydrophobic Peptide percent inhibition (FigS1b): percent of B. sal. growth inhibition by adult NOVI hydrophobic peptides (250µg/mL) at three temperatures measured using a 7-day Growth Inhibition assay

Data Prep

# HP % inhib @ 250ug/mL Control only####

HPTempinhib250 <- filter(HPTemp, !is.na(GIAPctInhib250))

Data Summary

## summarize####

HPTempinhibsum250 <- summarise(HPTempinhib250, count=n(), avg=mean(GIAPctInhib250), standarddev=sd(GIAPctInhib250), sem=sd(GIAPctInhib250)/sqrt(n()))
FS1bSum <- HPTempinhibsum250
FS1bSum
## # A tibble: 3 x 5
##   Temp  count   avg standarddev   sem
##   <fct> <int> <dbl>       <dbl> <dbl>
## 1 06°C      5  39.4        15.6  6.99
## 2 14°C     10  51.3        28.8  9.10
## 3 22°C      2  68.6        22.8 16.2

Figure S1b

## plot means####

FigS1b <- ggplot(HPTempinhibsum250, aes(Temp, avg, fill=Temp)) + 
  geom_col() +    
  scale_fill_manual(values=c("cornflowerblue", "goldenrod2", "firebrick")) +
  theme(legend.position="none") +
  xlab("Temperature(°C)") +
  ylab("Percent Inhibition") + 
  theme_mitch + 
  scale_x_discrete(limits=c("06°C", "14°C", "22°C"), labels=c("6", "14", "22")) +
  geom_errorbar(aes(x=Temp, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9)) +
  scale_y_continuous(expand=c(0,0), limits=c(0,100))
FigS1b

Testing Assumptions & Transforming Data

## stats####

### test for normality

levene.test(HPTempinhib250$GIAPctInhib250, HPTempinhib250$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  HPTempinhib250$GIAPctInhib250
## Test Statistic = 0.54789, p-value = 0.5901
shapiro.test(HPTempinhib250$GIAPctInhib250)
## 
##  Shapiro-Wilk normality test
## 
## data:  HPTempinhib250$GIAPctInhib250
## W = 0.91736, p-value = 0.1332

ANOVA

### analyze

HPTempinhibanova250 <- aov(GIAPctInhib250 ~ Temp, data=HPTempinhib250)
FS1bStats <- summary(HPTempinhibanova250)
FS1bStats
##             Df Sum Sq Mean Sq F value Pr(>F)
## Temp         2   1265   632.6    0.99  0.396
## Residuals   14   8948   639.1

Hydrophobic Peptide Effectiveness (FigS1c): adult NOVI Hydrophobic Peptide effectiveness (µg produced * percent inhibition) at three temperatures

Data Prep

# HP Effectiveness Control only####

HPTempeffctrl <- filter(HPTemp, GIA250=="Y", !is.na(uggbw), !is.na(GIAPctInhib250))
HPTempeffctrl$Eff <- HPTempeffctrl$uggbw*HPTempeffctrl$GIAPctInhib250

Data Summary

## summarize####

HPTempeffsumctrl <- summarize(HPTempeffctrl, count=n(), avg=mean(Eff), standarddev=sd(Eff), sem=sd(Eff)/sqrt(n()))
FS1cSum <- HPTempeffsumctrl
FS1cSum
## # A tibble: 3 x 5
##   Temp  count   avg standarddev   sem
##   <fct> <int> <dbl>       <dbl> <dbl>
## 1 06°C      5 5081.       3262. 1459.
## 2 14°C     10 4166.       3315. 1048.
## 3 22°C      2 2880.       2187. 1547.

Figure S1c

## plot means####

FigS1c <- ggplot(HPTempeffsumctrl, aes(Temp, avg, fill=Temp)) +
  geom_col() +   
  scale_fill_manual(values=c("cornflowerblue", "goldenrod2", "firebrick")) +
  theme(legend.position="none") +
  xlab("Temperature(°C)") +
  ylab("Peptide Effectiveness") +
  theme_mitch +
  scale_x_discrete(limits=c("06°C", "14°C", "22°C"), labels=c("6", "14", "22")) +
  geom_errorbar(aes(x=Temp, ymin=avg-sem, ymax=avg+sem), width = 0.2, position=position_dodge(width=0.9)) +
  scale_y_continuous(expand=c(0,0), limits=c(0,12000))
FigS1c

Testing Assumptions & Transforming Data

## stats####

### test assumptions

levene.test(HPTempeffctrl$Eff, HPTempeffctrl$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  HPTempeffctrl$Eff
## Test Statistic = 0.12212, p-value = 0.886
shapiro.test(HPTempeffctrl$Eff)
## 
##  Shapiro-Wilk normality test
## 
## data:  HPTempeffctrl$Eff
## W = 0.83988, p-value = 0.007546
### transform data

HPTempeffctrl$log_Eff <- log10(HPTempeffctrl$Eff + 1)

### test assumptions

levene.test(HPTempeffctrl$log_Eff, HPTempeffctrl$Temp)
## 
##  Modified robust Brown-Forsythe Levene-type test based on the absolute
##  deviations from the median
## 
## data:  HPTempeffctrl$log_Eff
## Test Statistic = 0.42946, p-value = 0.6591
shapiro.test(HPTempeffctrl$log_Eff)
## 
##  Shapiro-Wilk normality test
## 
## data:  HPTempeffctrl$log_Eff
## W = 0.9243, p-value = 0.1746

ANOVA

### analyze data

HPTempeffctrlanova <- aov(log_Eff ~ Temp, data=HPTempeffctrl)
FS1cStats <- summary(HPTempeffctrlanova)
FS1cStats
##             Df Sum Sq Mean Sq F value Pr(>F)
## Temp         2 0.1099 0.05496   0.552  0.588
## Residuals   14 1.3927 0.09948