antiTSP_mod_data <- read.csv('Figure 5A source data1 model.csv', stringsAsFactors = F) %>%
mutate(Infection = infection+0.01,
anemone = paste(Anemone,hours,Treatment),
Hours = as.factor(hours))
# run mixed effects model - nlme for contrast methods
antiTSP_model_test <- lme(log(Infection)~ Hours*Treatment,
random=~1|anemone,
data=antiTSP_mod_data)
plot(antiTSP_model_test)
sm_test <- summary(antiTSP_model_test)
anova(antiTSP_model_test, type='m')
These are contrasts between the FSW and IGG controls and the anti-TSR treatment
antiTSP_lsmobj <- lsmeans(antiTSP_model_test, ~ Treatment|Hours)
summary(as.glht(pairs(antiTSP_lsmobj),by=NULL))
confint(pairs(antiTSP_lsmobj))
# summary file of means and SE per treatment and time-point
antiTSP <- read.csv('Figure 5A source data2.csv', stringsAsFactors = F)
antiTSP$Treatment[antiTSP$Treatment == 'TSP antibody'] <- 'Thrombospondin antibody'
ggf1 <- ggplot(antiTSP,aes(x=Hours,y=X..Infection,colour = Treatment, shape = Treatment)) +
geom_line() +
geom_point() +
geom_pointrange(aes(ymin = X..Infection - se, ymax = X..Infection + se)) +
geom_text(data=antiTSP,aes(x=Hours, y=X..Infection+se+0.5,label=c(NA,NA,NA,NA,NA,'**',NA,NA,'***',NA,NA,'***',NA,NA,'***')),show.legend = FALSE)+
#scale_y_continuous(labels = percent)+
scale_x_continuous(breaks = c(0,24,48,72,96,120))+
ylab('') +
scale_colour_manual('Thrombospondin antibody',values = c("#56B4E9","#E69F00", "#009E73")) +
scale_shape_discrete('Thrombospondin antibody')+
theme_cowplot()+
theme(legend.title = element_text(colour = NA),
axis.title.x = element_text(colour = NA),
axis.text.x = element_text(colour = NA))
tsp_soluble_mod_data <- read.csv('Figure 5B source data1 model.csv', stringsAsFactors = F) %>%
mutate(Infection = infection+0.01,
anemone = paste(Anemone,hours,Treatment),
Hours = as.factor(hours))
# run mixed effects model
tsp_soluble_model_test <- lme(log(Infection)~ Hours*Treatment,
random=~1|anemone,
data=tsp_soluble_mod_data)
plot(tsp_soluble_model_test)
# summaries
sm_test <- summary(tsp_soluble_model_test)
anova(tsp_soluble_model_test, type='m')
tsp_soluble_lsmobj <- lsmeans(tsp_soluble_model_test, ~ Treatment|Hours)
summary(as.glht(pairs(tsp_soluble_lsmobj),by=NULL))
confint(pairs(tsp_soluble_lsmobj),by=NULL)
# summary file of means and SE per treatment and time-point
tsp_soluble <- read.csv('Figure 5B source data2.csv', stringsAsFactors = F)
tsp_soluble$Treatment[tsp_soluble$Treatment == 'Hs TSP-1'] <- 'Hs TSR'
ggf2 <- ggplot(tsp_soluble,aes(x=Hours,
y=X..Infection,
colour = Treatment, shape = Treatment)) +
geom_line() +
geom_point() +
geom_pointrange(aes(ymin = X..Infection - se, ymax = X..Infection + se)) +
geom_text(data=tsp_soluble,aes(x=Hours, y=X..Infection+se+c(rep(0.5,5),1.5,rep(0.5,4)),label=c(NA,NA,NA,'***',NA,NA,NA,'**',NA,NA)),show.legend = FALSE)+
#scale_y_continuous(labels = percent)+
scale_x_continuous(breaks = c(0,24,48,72,96,120))+
ylab('% colonisation') +
scale_colour_manual('Thrombospondin antibody',values = c("#56B4E9","#CC79A7")) +
scale_shape_discrete('Thrombospondin antibody')+
theme_cowplot()+
theme(legend.title = element_text(colour = NA),
axis.title.x = element_text(colour = NA),
axis.text.x = element_text(colour = NA))
sm_test <- summary(peptide_model_test)
anova(peptide_model_test,type='marginal')
peptide_lsmobj <- lsmeans(peptide_model_test, ~ Treatment|Hours)
summary(as.glht(pairs(peptide_lsmobj),by=NULL))
confint(pairs(peptide_lsmobj), by=NULL)
peptide_infection <- read.csv('Figure 5C source data2.csv')
ggf3 <- ggplot(peptide_infection,aes(x=Hours,y=X..Infection,colour = Treatment, shape = Treatment)) +
geom_line() +
geom_point() +
geom_pointrange(aes(ymin = X..Infection - se, ymax = X..Infection + se)) +
geom_text(data=peptide_infection,aes(x=Hours, y=X..Infection+se+0.5,label=c(NA,NA,NA,NA,NA,'***',NA,NA,'***',NA,NA,'***',NA,NA,NA)),show.legend = FALSE)+
geom_text(data=peptide_infection,aes(x=Hours, y=X..Infection-se-c(rep(1,nrow(peptide_infection)-2),0.1,NA),label=c(NA,NA,NA,NA,'***',NA,NA,'***',NA,NA,'***',NA,NA,NA,NA)),nudge_y = -0.2,show.legend = FALSE)+
#scale_y_continuous(labels = percent)+
scale_x_continuous(breaks = c(24,48,72,96,120))+
ylab('') +
scale_colour_manual('Thrombospondin antibody',values = c("#56B4E9", "#0072B2", "#D55E00")) +
scale_shape_discrete('Thrombospondin antibody')+
theme_cowplot()+
theme(legend.title = element_text(colour = NA))
all_figures <- cowplot::plot_grid(ggf1,ggf2,ggf3,ncol=1)
all_figures
ggsave(all_figures,filename = 'Figure 5.pdf',width = 6,height=8)
qPCR <- read.csv('Figure 6 source data.csv',
stringsAsFactors = F)
qPCR$Time <- as.factor(qPCR$Time)
qPCR$Symbiont <- as.factor(qPCR$Symbiont)
Semamod<-lm(Sema~oral_disc+Symbiont*Time, data = qPCR)
anova(Semamod)
Semamod_lsmobj <- lsmeans(Semamod, ~ Symbiont|Time)
summary(as.glht(pairs(Semamod_lsmobj),by=NULL))
confint(pairs(Semamod_lsmobj),by=NULL)
Trypsinmod<-lm(Trypsin~oral_disc+Symbiont*Time, data = qPCR)
anova(Trypsinmod)
Trypsinmod_lsmobj <- lsmeans(Trypsinmod, ~ Symbiont|Time)
summary(as.glht(pairs(Trypsinmod_lsmobj),by=NULL))
confint(pairs(Trypsinmod_lsmobj),by=NULL)