# Formicine ants swallow their highly acidic poison for gut microbial selection and control

1. Simon Tragust simon.tragust@zoologie.uni-halle.de 1
2. Claudia Herrmann 1
3. Jane Häfner 1
4. Ronja Braasch 1
5. Christina Tilgen 1
6. Maria Hoock 1
7. Margarita Artemis Milidakis 1
8. Roy Gross 2
9. Heike Feldhaar 1

1. Animal Ecology I, Bayreuth Center for Ecology and Environmental Research (BayCEER), University of Bayreuth, Universitätsstraße
2. Microbiology, Biocenter, University of Würzburg, Am Hubland

2020-11-03

- Research Article

- Evolutionary Biology
- Microbiology and Infectious Disease

- Camponotus floridanus
- Acetobacteraceae
- Serratia marcescens
- phylosymbiosis
- microbiom
- external immune defense
- Other

- publisher-id 60287
- doi 10.7554/eLife.60287
- elocation-id e60287

## Abstract

Animals continuously encounter microorganisms that are essential for health or cause disease. They are thus challenged to control harmful microbes while allowing the acquisition of beneficial microbes. This challenge is likely especially important for social insects with respect to microbes in food, as they often store food and exchange food among colony members. Here we show that formicine ants actively swallow their antimicrobial, highly acidic poison gland secretion. The ensuing acidic environment in the stomach, the crop, can limit the establishment of pathogenic and opportunistic microbes ingested with food and improve the survival of ants when faced with pathogen contaminated food. At the same time, crop acidity selectively allows acquisition and colonization by Acetobacteraceae, known bacterial gut associates of formicine ants. This suggests that swallowing of the poison in formicine ants acts as a microbial filter and that antimicrobials have a potentially widespread but so far underappreciated dual role in host-microbe interactions.

## Introduction

Animals commonly harbor gut-associated microbial communities (Engel and Moran, 2013; Moran et al., 2019). Patterns of recurring gut microbial communities have been described for many animal groups (Brune and Dietrich, 2015; Kwong et al., 2017; Ochman et al., 2010). The processes generating these patterns are however often not well understood. They might result from host filtering (Mazel et al., 2018), a shared evolutionary history between gut-associated microbes and their hosts (Moeller et al., 2016) involving microbial adaptations to the host environment (McFall-Ngai et al., 2013), simply be a byproduct of similar host dietary preferences (Anderson et al., 2012; Hammer et al., 2017), or result from interactions between microbes in the gut-associated microbial community (Brinker et al., 2019; García-Bayona and Comstock, 2018).

Food is an important environmental source of microbial gut associates (Blum et al., 2013; Broderick and Lemaitre, 2012; David et al., 2014; Hammer et al., 2017; Perez-Cobas et al., 2015; Pais et al., 2018) but also poses a challenge, the need to discriminate between harmful and beneficial microbes, as food may contain microbes that produce toxic chemicals or that are pathogenic (Burkepile et al., 2006; Demain et al., 2000; Janzen, 1977; Trienens et al., 2010). In social animals, control of harmful microbes in food while at the same time allowing the acquisition and transmission of beneficial microbes from and with food, is likely especially important. Eusocial Hymenoptera not only transport and store food in their stomach, the crop, but also distribute food to members of their colony via trophallaxis, i.e. the regurgitation of crop content from donor individuals to receiver individuals through mouth-to-mouth feeding (Gernat et al., 2018; Greenwald et al., 2018; LeBoeuf et al., 2016). While trophallaxis can facilitate the transmission of beneficial microbes, it can also entail significant costs, as it might open the door to unwanted microbial opportunists and pathogens that can take advantage of these transmission routes (Onchuru et al., 2018; Salem et al., 2015).

Here we investigate how formicine ants, specifically the Florida carpenter ant Camponotus floridanus, solve the challenge to control harmful microbes in their food while allowing acquisition and transmission of beneficial microbes from and with their food. Apart from specialized intracellular endosymbionts associated with the midgut in the ant tribe Camponotini (Degnan et al., 2004; Feldhaar et al., 2007; Russell et al., 2017; Williams and Wernegreen, 2015), formicine ant species have only low abundances of microbial associates in their gut lumen but carry members of the bacterial family Acetobacteraceae as a recurring part of their gut microbiota (Brown and Wernegreen, 2016; Chua et al., 2018; He et al., 2011; Ivens et al., 2018; Russell et al., 2017). Some formicine gut-associated Acetobacteraceae show signs of genomic and metabolic adaptations to their host environment indicating coevolution and mutual benefit (Brown and Wernegreen, 2019; Chua et al., 2020). But the recurrent presence of Acetobacteraceae in the gut of formicine ants potentially also reflects the direct transmission of bacteria among individuals, selective uptake on the part of the ants, specific adaptations for colonizing ant guts on the part of the bacteria, or some combination of all three (Engel and Moran, 2013).

Formicine ant species possess a highly acidic poison gland secretion containing formic acid as its main component (Lopez et al., 1993; Osman and Brander, 1961; Schmidt and Piek, 1986). Although the poison is presumably foremost used as a defensive weapon (Osman and Kloft, 1961), it is also distributed to the environment of these ants as an external immune defense trait (sensu Otti et al., 2014) to protect their offspring and the nest and to limit disease spread within the society (see references in Tragust, 2016; Brütsch et al., 2017; Pull et al., 2018). To this end, ants take up their poison from the acidopore, the opening of the poison gland at the gaster tip, into their mouth (Tragust et al., 2013) during a specialized behavior existing only in a subset of ant families among all Hymenopterans (Basibuyuk and Quicke, 1999; Farish, 1972), termed acidopore grooming.

Here we first investigate whether the poison is also swallowed during acidopore grooming in C. floridanus and seven other formicine ant species from three genera in a comparative survey. In survival experiments and in in vitro and in vivo bacterial viability and growth experiments, we then investigate whether swallowing of the poison can serve gut microbial control and may prevent bacterial pathogen infection. Complementing these experiments, we also test whether poison swallowing has the potential to limit pathogen transmission during trophallactic food exchange. Finally, we explore whether swallowing of the poison acts as a microbial filter that is permissible to gut colonization by bacteria from the family Acetobacteraceae.

## Results

    #############The following packages need to be installed with: install.packages("name of the package") before calling them
    #############code and functions need to be run first before use

    #############calling used packages

    #computational packages and code
    #R version 3.6.1: "Action of the Toes"
    library(plyr)#version 1.8.4
    library(dplyr)#version 0.8.3
    drop.levels <- function(dat){
      # Drop unused factor levels from all factors in a data.frame
      # Author: Kevin Wright.  Idea by Brian Ripley.
      dat[] <- lapply(dat, function(x) x[,drop=TRUE])
      return(dat)
    }

    #graphical packages
    library(ggplot2)#version 3.2.1
    library(ggkm)#version 0.6.0; see https://github.com/sachsmc/ggkm

    #statistical packages
    library(lme4)#version 1.1-21
    library(multcomp)#version 1.4-10
    library(DHARMa)#version 0.2.4
    library(coxme)#2.2-14
    library(glmmTMB)#version 0.2.3

    #in order for the package multcomp to work with glmmTMB you need this function see: https://github.com/glmmTMB/glmmTMB/blob/master/glmmTMB/vignettes/model_evaluation.rmd
    glht_glmmTMB <- function (model, ..., component="cond") {
        glht(model, ...,
             coef. = function(x) fixef(x)[[component]],
             vcov. = function(x) vcov(x)[[component]],
             df = NULL)
    }
    modelparm.glmmTMB <- function (model, coef. = function(x) fixef(x)[[component]],
                                   vcov. = function(x) vcov(x)[[component]],
                                   df = NULL, component="cond", ...) {
        multcomp

modelparm.default(model, coef. = coef., vcov. = vcov., df = df, ...) }

library(broman) # for myround function to round p-values for inline text format_pval <- function(x){ if (x < .001) return(paste('<0.001')) if (x > .05 & x < 0.1) return(paste('>0.05')) paste('=', myround(x, 3)) # 3 = no. of digits to round p value to if .001 < p < .250. }

#############the raw data is stored at the Dryad Digital Data Repository: https://doi.org/10.5061/dryad.k0p2ngf4v

    :::
    {echo=FALSE warning=FALSE message=FALSE results='hide' figshow='hide'}

    ## Swallowing of the formicine ant poison gland secretion leads to acidic crop environments
    chunk:
    :::
    ```r
    ######################################################################################################
    ######################### Fig 1 a,b,c: Crop acidification ############################################
    ######################################################################################################

    #############loading data for Fig.1a
    acidification.c.floridanus<-read.delim("https://datadryad.org/stash/downloads/file_stream/708509",header=T)#choose file: Supplementary Data Fig.1a.txt
    str(acidification.c.floridanus)
    acidification.c.floridanus$time<-factor(acidification.c.floridanus$time,c("0+4h","0+24h","0+48h","48+4h"))#reorder factor time

    #############statistcal analysis
    m.acidification.c.floridanus<-lmer(log(ph)~time+(1|colony),data=acidification.c.floridanus)
    summary(m.acidification.c.floridanus)

    #model validation
    res.m.acidification.c.floridanus<-simulateResiduals(fittedModel=m.acidification.c.floridanus)
    plot(res.m.acidification.c.floridanus)

    #significance of predictor time since feeding (four levels: 0+4h, 0+24h, 0+48h, 48h+4h)
    m.acidification.c.floridanus0<-lmer(log(ph)~1+(1|colony),data=acidification.c.floridanus)
    anova(m.acidification.c.floridanus,m.acidification.c.floridanus0)

    #post-hoc comporisons of predictor-levels time since feeding
    m.acidification.c.floridanus.glht<-glht(m.acidification.c.floridanus,linfct=mcp(time="Tukey"))
    output.m.acidification.c.floridanus.glht<-summary(m.acidification.c.floridanus.glht,test=adjusted("Westfall"))
    output.m.acidification.c.floridanus.glht

    #calculation of median values and confidence intervals of predictor time since feeding (four levels: 0+4h, 0+24h, 0+48h, 48h+4h)
    ph.summary.c.floridanus<-ddply(acidification.c.floridanus,"time",summarize,
    N=length(ph),
    median=quantile(ph,0.5),
    lowerCI=quantile(ph,0.025),
    upperCI=quantile(ph,0.975))
    ph.summary.c.floridanus

    #############loading data for Fig.1b
    mobility.c.floridanus<-read.delim("https://datadryad.org/stash/downloads/file_stream/708508",header=T)#choose file: Supplementary Data Fig.1b.txt
    str(mobility.c.floridanus)

    #############statistcal analysis for Fig.1b
    m.mobility.c.floridanus<-lmer(ph~treatment+(1|colony),data=mobility.c.floridanus)
    summary(m.mobility.c.floridanus)

    #model validation
    res.m.mobility.c.floridanus<-simulateResiduals(fittedModel=m.mobility.c.floridanus)
    plot(res.m.mobility.c.floridanus)

    #significance of predictor ant manipulation (two levels: FA+ and FA-, i.e. ants with and without acidopore access)
    m.mobility.c.floridanus0<-lmer(ph~1+(1|colony),data=mobility.c.floridanus)
    anova(m.mobility.c.floridanus,m.mobility.c.floridanus0)

    #############loading data for Fig.1c
    mobility.formicine.ants<-read.delim("https://datadryad.org/stash/downloads/file_stream/708511",header=T)#choose data: Supplementary Data Fig.1c.txt
    str(mobility.formicine.ants)

    #subsetting the data frame into the six formicine ant species
    mobility.c.maculatus<-subset(mobility.formicine.ants,colony=="c2")
    mobility.c.maculatus<-drop.levels(mobility.c.maculatus)
    str(mobility.c.maculatus)

    mobility.l.fuliginosus<-subset(mobility.formicine.ants,colony=="l1")
    mobility.l.fuliginosus<-drop.levels(mobility.l.fuliginosus)
    str(mobility.l.fuliginosus)

    mobility.f.pratensis<-subset(mobility.formicine.ants,colony=="f1")
    mobility.f.pratensis<-drop.levels(mobility.f.pratensis)
    str(mobility.f.pratensis)

    mobility.f.rufibarbis<-subset(mobility.formicine.ants,colony=="f2")
    mobility.f.rufibarbis<-drop.levels(mobility.f.rufibarbis)
    str(mobility.f.rufibarbis)

    mobility.f.cinerea<-subset(mobility.formicine.ants,colony=="f3")
    mobility.f.cinerea<-drop.levels(mobility.f.cinerea)
    str(mobility.f.cinerea)

    mobility.f.cunicularia<-subset(mobility.formicine.ants,colony=="f4")
    mobility.f.cunicularia<-drop.levels(mobility.f.cunicularia)
    str(mobility.f.cunicularia)

    mobility.f.fuscocinerea<-subset(mobility.formicine.ants,colony=="f5")
    mobility.f.fuscocinerea<-drop.levels(mobility.f.fuscocinerea)
    str(mobility.f.fuscocinerea)

    #############statistcal analysis for Fig.1c
    wilcox.test(ph~treatment,data=mobility.c.maculatus)
    wilcox.test(ph~treatment,data=mobility.l.fuliginosus)
    wilcox.test(ph~treatment,data=mobility.f.pratensis)
    wilcox.test(ph~treatment,data=mobility.f.rufibarbis)
    wilcox.test(ph~treatment,data=mobility.f.cinerea)
    wilcox.test(ph~treatment,data=mobility.f.cunicularia)
    wilcox.test(ph~treatment,data=mobility.f.fuscocinerea)

    ######################################################################################################
    ###################### Fig. 1 - figure supplement 1: crop acidity baseline ###########################
    ######################################################################################################

    #############loading data for Fig.1 - figure supplement 1
    acidification.baseline<-read.delim("https://datadryad.org/stash/downloads/file_stream/708512",header=T)#choose file: Supplementary Data Fig.1 - figure supplement 1.txt
    str(acidification.baseline)

    #calculation of median values and confidence intervals of predictor status (two levels:satiated and starved) and worker caste (two levels: minor and major)
    ph.summary.acidification.baseline<-ddply(acidification.baseline,c("status","caste"),summarize,
    N=length(ph),
    median=quantile(ph,0.5),
    lowerCI=quantile(ph,0.025),
    upperCI=quantile(ph,0.975))
    ph.summary.acidification.baseline

    ######################################################################################################
    ###################### Fig. 1 - figure supplement 2: acidopore grooming ##############################
    ######################################################################################################

    #############loading data for Fig. 1 - figure supplement 2
    acidopore.grooming<-read.delim("https://datadryad.org/stash/downloads/file_stream/708513",header=T)#choose file: Supplementary Data Fig.1 - figure supplement 2.txt
    str(acidopore.grooming)
    food.treatment1<-factor(acidopore.grooming$food.treatment,levels=c("unfed","water","honey"))#reorder factor treatment

    #############statistcal analysis for Fig. 1 - figure supplement 2
    m.grooming<-glmer.nb(groomingevents~food.treatment+(1|colony),data=acidopore.grooming)
    summary(m.grooming)

    #model validation
    res.m.grooming<-simulateResiduals(fittedModel=m.grooming)
    plot(res.m.grooming)

    #significance of predictor food treatment (three levels: unfed, water, honey)
    m.grooming0<-glmer.nb(groomingevents~1+(1|colony),data=acidopore.grooming)
    anova(m.grooming,m.grooming0)

    #post-hoc comporisons of predictor-levels food treatment
    m.grooming.glht<-glht(m.grooming,linfct=mcp(food.treatment="Tukey"))
    output.m.grooming.glht<-summary(m.grooming.glht,test=adjusted("Westfall"))
    output.m.grooming.glht

    ######################################################################################################
    ############################### Fig. 1 - figure supplement 3: pH midgut  #############################
    ######################################################################################################

    #############loading data for Fig.1 - figure supplement 3
    ph.midgut<-read.delim("https://datadryad.org/stash/downloads/file_stream/708514", header=T)#choose data: Supplementary Data Fig.1 - figure supplement 3.txt
    str(ph.midgut)

    #############statistcal analysis for Fig.1 - figure supplement 3
    m.ph.midgut<-lmer(ph~gutregion+(1|colony),data=ph.midgut)
    summary(m.ph.midgut)

    #model validation
    res.m.ph.midgut<-simulateResiduals(fittedModel=m.ph.midgut)
    plot(res.m.ph.midgut)

    #significance of predictor gutregion (five levels: crop, midgut.position1, midgut.position2, midgut.position3, midgut.position4)
    m.ph.midgut0<-lmer(ph~1+(1|colony),data=ph.midgut)
    anova(m.ph.midgut,m.ph.midgut0)

    #post-hoc comporisons of predictor-levels position
    m.ph.midgut.glht<-glht(m.ph.midgut,linfct=mcp(gutregion="Tukey"))
    output.m.ph.midgut.glht<-summary(m.ph.midgut.glht,test=adjusted("Westfall"))
    output.m.ph.midgut.glht

    #calculation of median values and confidence intervals of predictor position
    ph.summary.midgut<-ddply(ph.midgut,"gutregion",summarize,
    N=sum(!is.na(ph)),
    median=quantile(ph,0.5,na.rm=TRUE),
    lowerCI=quantile(ph,0.025,na.rm=TRUE),
    upperCI=quantile(ph,0.975,na.rm=TRUE),
    mean=mean(ph,na.rm=TRUE),
    sd=sd(ph,na.rm=TRUE),
    length=length(!is.na(ph)),
    se=sd/sqrt(length))
    ph.summary.midgut

::: {echo=FALSE warning=FALSE message=FALSE results='hide' figshow='hide'}

To reveal whether formicine ants swallow their acidic poison during acidopore grooming, we first monitored acidity levels in the crop lumen of the Florida carpenter ant Camponotus floridanus after feeding them 10% honey water (pH = 5). We found that after feeding the crop became increasingly acidic over time, reaching highly acidic values 48 hr after feeding (median pH = `ph.summary.c.floridanus[3,3]` ; 95% CI: `myround(ph.summary.c.floridanus[3,4],1)`– `myround(ph.summary.c.floridanus[3,5],1)`), whilst renewed access to food after 48 hr raised the pH to levels recorded after the first feeding (Figure 1a; LMM, LR-test, χ2 = `myround(anova(m.acidification.c.floridanus,m.acidification.c.floridanus0)[2,6],2)`, df = `anova(m.acidification.c.floridanus,m.acidification.c.floridanus0)[2,7]`, p `format_pval( myround(anova(m.acidification.c.floridanus,m.acidification.c.floridanus0)[2,8],3))`; Westfall corrected post-hoc comparisons: 0+4 hr versus. 48h+4 hr: p=`myround((output.m.acidification.c.floridanus.glht$test)$pvalues[3],3)`, all other comparisons: p `format_pval(myround((output.m.acidification.c.floridanus.glht$test)$pvalues[2],3))`). We also found that crop pH levels of C. floridanus ants were highly acidic in workers taken directly out of a satiated colony (Figure 1—figure supplement 1; major workers: median pH = `ph.summary.acidification.baseline[1,4]`, 95% CI: `myround(ph.summary.acidification.baseline[1,5],1)`– `myround(ph.summary.acidification.baseline[1,6],1)`; minor workers: median pH = `ph.summary.acidification.baseline[2,4]`, CI: `myround(ph.summary.acidification.baseline[2,5],1)`– `myround(ph.summary.acidification.baseline[2,6],1)`) and in worker cohorts that were satiated for 3 d and then starved for 24 hr before measurements (majors: median pH = `ph.summary.acidification.baseline[3,4]`, 95% CI: `myround(ph.summary.acidification.baseline[3,5],1)`– `myround(ph.summary.acidification.baseline[1,6],1)`; minors: median pH = `ph.summary.acidification.baseline[4,4]`, CI: `myround(ph.summary.acidification.baseline[4,5],1)`– `myround(ph.summary.acidification.baseline[4,6],1)`), suggesting that under natural conditions an acidic baseline pH in the crop lumen is maintained following perturbation thereof through ingested fluids.

Figure 1.

chunk:

    #addition of median values per time since feeding into the data.frame as a new variable
    acidification.c.floridanus2<-acidification.c.floridanus%>%group_by(time)%>%mutate(medianph=median(ph))

    #definition of universal ph indicator colors: 1-6
    ph.colors.rgb1<-c(
    "202 58 67",
    "235 81 42",
    "252 125 19",
    "253 190 2",
    "254 250 0",
    "235 230 54"
    )

    #transformation of RGB colors into hex colors
    ph.colors.hex1<-sapply(strsplit(ph.colors.rgb1, " "), function(ph.colors.rgb1)
        rgb(ph.colors.rgb1[1], ph.colors.rgb1[2], ph.colors.rgb1[3], maxColorValue=255))

    #plotting of Fig.1a
    fig.1a<-ggplot()+
    geom_boxplot(data=acidification.c.floridanus2,mapping=aes(x=time,y=ph,fill=medianph),colour="grey30",lwd=1.5,outlier.shape=NA,alpha=0.5,width=0.4,coef=0)+
    scale_fill_gradientn(colours=ph.colors.hex1,breaks=c(1,2,3,4,5,6),limits=c(1,6.5),guide=FALSE)+
    geom_point(data = acidification.c.floridanus,mapping=aes(x=time,y=ph,fill=ph),pch=21,color="white",position=position_jitter(width=0.1),size=6.5,alpha=1)+
    scale_x_discrete(name="Time after feeding",labels=c("0h+4h","0h+24h","0h+48h","48h+4h"))+
    scale_y_continuous(name="pH-value",limits=c(1,6),breaks=c(1,2,3,4,5,6))+
    annotate("text",x=c(1,2,3,4),y=c(5.5,4.4,4,5.5),size=14,label=c("a","b","c","a"),fontface=2)+#statistical significance
    annotate("text",x=c(2.5),y=c(6),size=16,label=c("***"),fontface=2)+
    labs(tag="a")+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=35),
          axis.text.y=element_text(colour="black",size=35),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key.height=unit(4,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.1a

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

    #############plot fig.1b
    #calculation of median values and confidence intervals of predictor ant manipulation
    ph.summary.mobility.c.floridanus<-ddply(mobility.c.floridanus,"treatment",summarize,
    N=length(ph),
    median=quantile(ph,0.5),
    lowerCI=quantile(ph,0.025),
    upperCI=quantile(ph,0.975))

    #addition of median values per ant manipulation into the data.frame as a new variable
    mobility.c.floridanus2<-mobility.c.floridanus%>%group_by(treatment)%>%mutate(medianph=median(ph))

    #definition of universal ph indicator colors: 1-6
    ph.colors.rgb1<-c(
    "202 58 67",
    "235 81 42",
    "252 125 19",
    "253 190 2",
    "254 250 0",
    "235 230 54"
    )

    #transformation of RGB colors into hex colors
    ph.colors.hex1<-sapply(strsplit(ph.colors.rgb1, " "), function(ph.colors.rgb1)
        rgb(ph.colors.rgb1[1], ph.colors.rgb1[2], ph.colors.rgb1[3], maxColorValue=255))

    #plotting of Fig.1b
    fig.1b<-ggplot()+
    geom_boxplot(data=mobility.c.floridanus2,mapping=aes(x=treatment,y=ph,fill=medianph,colour=treatment),outlier.shape=NA,lwd=1.5,alpha=0.5,width=0.6,coef=0)+
    scale_fill_gradientn(colours=ph.colors.hex1,breaks=c(1,2,3,4,5,6),limits=c(1,6.5),guide=FALSE)+
    scale_color_manual(values=c("grey70","grey30"),guide=FALSE)+
    geom_point(data = mobility.c.floridanus, mapping=aes(x=treatment,y=ph,fill=ph),pch=21,color="white",position=position_jitter(width=0.1),size=6.5,alpha=1)+
    scale_x_discrete(name="Treatment",labels=c("FA -","FA +"))+
    scale_y_continuous(name="pH-value",limits=c(1,6),breaks=c(1,2,3,4,5,6))+
    geom_segment(aes(x = 1, y = 5.5, xend = 2, yend = 5.5),lwd=1.5)+
    annotate("text",x=c(1.5),y=c(5.6),size=16,label=c("***"),fontface=2)+#statistical significance
    labs(tag="b")+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=35),
          axis.text.y=element_text(colour="black",size=35),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key.height=unit(4,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.1b

    #############plot fig.1c
    mobility.formicine.ants$species2<-factor(mobility.formicine.ants$species,levels=c("maculatus","fuliginosus","cinerea","cunicularia","fuscocinerea","pratensis","rufibarbis"))#reorder facotr species

    #calculation of median values and confidence intervals of predictor ant manipulation (two levels:FA- and FA+) and of factor species (six levels)
    ph.summary.mobility.formicine.ants<-ddply(mobility.formicine.ants,c("species2","treatment"),summarize,
    N=length(ph),
    median=quantile(ph,0.5),
    lowerCI=quantile(ph,0.025),
    upperCI=quantile(ph,0.975))

    #addition of median values per ant manipulation into the data.frame as a new variable
    mobility.formicine.ants2<-mobility.formicine.ants%>%group_by(colony,treatment)%>%mutate(medianph=median(ph))

    #definition of universal ph indicator colors: 1-6
    ph.colors.rgb1<-c(
    "202 58 67",
    "235 81 42",
    "252 125 19",
    "253 190 2",
    "254 250 0",
    "235 230 54"
    )

    #transformation of RGB colors into hex colors
    ph.colors.hex1<-sapply(strsplit(ph.colors.rgb1, " "), function(ph.colors.rgb1)
        rgb(ph.colors.rgb1[1], ph.colors.rgb1[2], ph.colors.rgb1[3], maxColorValue=255))

    #plotting of Fig.1c
    fig.1c<-ggplot()+
    geom_boxplot(data=mobility.formicine.ants2,mapping=aes(x=species2,y=ph,fill=medianph,colour=treatment),position=position_dodge(0.5),outlier.shape=NA,lwd=1.5,alpha=0.5,width=0.4,coef=0)+
    scale_fill_gradientn(colours=ph.colors.hex1,guide=FALSE,breaks=c(1,2,3,4,5,6),limits=c(1,6.5))+
    scale_color_manual(values=c("grey70","grey30"),name="Animal treatment:",labels=c("FA-","FA+"))+
    geom_point(data = mobility.formicine.ants, mapping=aes(x=species2,y=ph,fill=ph,group=treatment),pch=21,color="white",position=position_jitterdodge(jitter.width=0.1,jitter.height=0.05,dodge.width=0.5),size=5,alpha=1)+
    scale_x_discrete(name="Species",
    labels=c(
    expression(paste(italic("C. maculatus"))),
    expression(paste(italic("L. fuliginosus"))),
    expression(paste(italic("F. cinerea"))),
    expression(paste(italic("F.cunicularia"))),
    expression(paste(italic("F. fuscocinerea"))),
    expression(paste(italic("F. pratensis"))),
    expression(paste(italic("F. rufibarbis")))
    ))+
    scale_y_continuous(name="pH-value",limits=c(1,6),breaks=c(1,2,3,4,5,6))+
    geom_segment(aes(x = 0.875, y = 3.9, xend = 1.125, yend = 3.9),lwd=2)+
    geom_segment(aes(x = 1.875, y = 3.9, xend = 2.125, yend = 3.9),lwd=2)+
    geom_segment(aes(x = 2.875, y = 4.9, xend = 3.125, yend = 4.9),lwd=2)+
    geom_segment(aes(x = 3.875, y = 4.9, xend = 4.125, yend = 4.9),lwd=2)+
    geom_segment(aes(x = 4.875, y = 4.9, xend = 5.125, yend = 4.9),lwd=2)+
    geom_segment(aes(x = 5.875, y = 5.4, xend = 6.125, yend = 5.4),lwd=2)+
    geom_segment(aes(x = 6.875, y = 4.4, xend = 7.125, yend = 4.4),lwd=2)+
    annotate("text",x=c(1,2,3,4,5,6,7),y=c(4.1,4.1,5.1,5.1,5.1,5.6,4.6),size=8,label=
    c(
    expression(paste(italic("P")," = 0.036")),
    expression(paste(italic("P")," < 0.001")),
    expression(paste(italic("P")," < 0.001")),
    expression(paste(italic("P")," = 0.007")),
    expression(paste(italic("P")," < 0.001")),
    expression(paste(italic("P")," = 0.018")),
    expression(paste(italic("P")," < 0.001"))),
    fontface=1)+
    labs(tag="c")+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=30,angle=50,hjust=1),
          axis.text.y=element_text(colour="black",size=30),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=30),
          legend.text=element_text(size=30),
          legend.key.size=unit(1.2,"cm"),
          legend.key.height=unit(4,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.1c

#### Acidification of formicine ant crop lumens through swallowing of acidic poison gland secretions.

(a) The pH of crop lumens at 4 hr, 24 hr, and 48 hr after feeding C. floridanus ants 10% honey water (pH = 5) at 0 hr and at 4 hr after re-feeding ants at 48 hr (LMM, LR-test, χ2 = `myround(anova(m.acidification.c.floridanus,m.acidification.c.floridanus0)[2,6],2)`, df = `anova(m.acidification.c.floridanus,m.acidification.c.floridanus0)[2,7]`, p `format_pval( myround(anova(m.acidification.c.floridanus,m.acidification.c.floridanus0)[2,8],3))`, same letters indicate p= `myround((output.m.acidification.c.floridanus.glht$test)$pvalues[3],3)` and different letters indicate p `format_pval(myround((output.m.acidification.c.floridanus.glht$test)$pvalues[2],3))` in Westfall corrected post hoc comparisons). (b) The pH of crop lumens in C. floridanus ants that were either prevented to ingest the formic acid containing poison gland secretion (FA-) or not (FA+) for 24 hr after feeding (LMM, LR-test, χ2 = `myround( anova(m.mobility.c.floridanus,m.mobility.c.floridanus0)[2,6],2)`, df = `anova(m.mobility.c.floridanus,m.mobility.c.floridanus0)[2,7]`, p `format_pval( format_pval(myround(anova(m.mobility.c.floridanus,m.mobility.c.floridanus0)[2,8],3)))`). (c) The pH-value of crop lumens 24 hr after feeding in seven formicine ant species that were either prevented to ingest the formic acid containing poison gland secretion (FA-) or not (FA+). Wilcoxon rank-sum tests (two-sided). Lines and shaded boxes show the median and interquartile range; points show all data. Colors in shaded rectangles near the y-axis represent universal indicator pH colors. Color filling of shaded boxes correspond to the median pH color of x-axis groups and color filling of points correspond to universal indicator pH colors. The border of shaded boxes represents animal treatment (light gray: prevention of poison ingestion, FA-; dark gray: poison ingestion not prevented, FA+). ::: {#fig1}

Figure 1—figure supplement 1.

chunk:

    #addition of median values per status and caste into the data.frame as a new variable
    acidification.baseline2<-acidification.baseline%>%group_by(status,caste)%>%mutate(medianph=median(ph))

    #definition of universal ph indicator colors: 1-6
    ph.colors.rgb1<-c(
    "202 58 67",
    "235 81 42",
    "252 125 19",
    "253 190 2",
    "254 250 0",
    "235 230 54"
    )

    #transformation of RGB colors into hex colors
    ph.colors.hex1<-sapply(strsplit(ph.colors.rgb1, " "), function(ph.colors.rgb1)
        rgb(ph.colors.rgb1[1], ph.colors.rgb1[2], ph.colors.rgb1[3], maxColorValue=255))

    #plotting of Fig.1 - figure supplement 1
    fig.1.figure.supplement1<-ggplot()+
    geom_boxplot(data=acidification.baseline2,mapping=aes(x=status,y=ph,fill=medianph,colour=caste),position=position_dodge(0.5),outlier.shape=NA,lwd=1.5,alpha=0.5,width=0.4,coef=0)+
    scale_fill_gradientn(colours=ph.colors.hex1,guide=FALSE,breaks=c(1,2,3,4,5,6),limits=c(1,6.5))+
    scale_color_manual(values=c("grey70","grey30"),name="Worker caste:",labels=c("Major","Minor"))+
    geom_point(data = acidification.baseline, mapping=aes(x=status,y=ph,fill=ph,group=caste),pch=21,color="white",position=position_jitterdodge(jitter.width=0.1,jitter.height=0.05,dodge.width=0.5),size=5,alpha=1)+
    scale_x_discrete(name="Animal feeding status",labels=c("Colony:\nsatiated","Colony cohort:\nstarved"))+
    scale_y_continuous(name="pH-value",limits=c(1,6),breaks=c(1,2,3,4,5,6))+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=30,angle=30,hjust=1),
          axis.text.y=element_text(colour="black",size=30),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=30),
          legend.text=element_text(size=30),
          legend.key.size=unit(1.2,"cm"),
          legend.key.height=unit(4,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.1.figure.supplement1

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### Baseline acidity of C. floridanus crop lumens under satiated and starved conditions.

pH of crop lumens in C. floridanus workers (light gray: major workers, dark gray: minor workers) that were either taken directly out of a satiated colony or that were kept in cohorts of ~100 individuals under satiated conditions for 3 d and then starved for 24 hr before measuring the pH. Lines and shaded boxes show the median and interquartile range; points show all data. Colors in shaded rectangles near the y-axis represent universal indicator pH colors. Color filling of shaded boxes correspond to the median pH color of x-axis groups and color filling of points correspond to universal indicator pH colors. Border of shaded boxes represents animal caste (light gray: major workers; dark gray: minor workers). ::: {#fig1s1}

Figure 1—figure supplement 2.

chunk:

    ############plot Fig. 1 - figure supplement 2
    fig.1.figure.supplement2<-ggplot()+
    geom_boxplot(data=acidopore.grooming,mapping=aes(x=food.treatment1,y=groomingevents,fill=food.treatment1),outlier.shape=NA,lwd=1.5,alpha=0.2,width=0.4,coef=0)+
    geom_point(data=acidopore.grooming,mapping=aes(x=food.treatment1,y=groomingevents,color=food.treatment1),position=position_jitter(width=0.1),size=4,alpha=0.7)+
    scale_fill_manual(values=c("white","white","white"),name="Food treatment (Mean/Median):",labels=c("unfed","water","honey"),guide=FALSE)+
    scale_colour_manual(values=c("grey","dodgerblue","yellow1"),name="Raw data",guide=FALSE)+
    scale_x_discrete(name="Food",labels=c("unfed","water","honey"))+
    scale_y_continuous(name="Acidopre grooming frequency",limits=c(-0.5,15))+
    annotate("text",x=c(1,2,3),y=c(8,11,11),size=10,label=c("a","b","b"),fontface=2)+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=18),
          axis.text.y=element_text(colour="black",size=18),
          axis.title.x=element_text(colour="black",size=25,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=25,margin=margin(0,22,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.1.figure.supplement2

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### Acidopore grooming frequency of C. floridanus after ingestion of different food types.

Frequency of acidopore grooming within 30 min. after fluid ingestion (water or 10% honey water) compared to ants that did not receive any fluid (unfed) (GLMM, LR-test, χ2 = `myround(anova(m.grooming,m.grooming0)[2,6],3)`, df = `anova(m.grooming,m.grooming0)[2,7]`, p`format_pval( myround(anova(m.grooming,m.grooming0)[2,8],3))`,same letters indicate p=`myround((output.m.grooming.glht$test)$pvalues[2],3)` and different letters indicate p`format_pval(myround((output.m.grooming.glht$test)$pvalues[1],3))` in Westfall corrected post hoc comparisons). ::: {#fig1s2}

Figure 1—figure supplement 3.

chunk:

    #############plot Fig.1 - figure supplement 3

    #addition of median values per position into the data.frame as a new variable
    ph.midgut2<-ph.midgut%>%group_by(gutregion)%>%mutate(medianph=median(ph,na.rm=TRUE))

    #definition of universal ph indicator colors: 1-7
    ph.colors.rgb<-c(
    "202 58 67",
    "235 81 42",
    "252 125 19",
    "253 190 2",
    "254 250 0",
    "235 230 54",
    "133 203 40"
    )

    #transformation of RGB colors into hex colors
    ph.colors.hex<-sapply(strsplit(ph.colors.rgb, " "), function(ph.colors.rgb)
        rgb(ph.colors.rgb[1], ph.colors.rgb[2], ph.colors.rgb[3], maxColorValue=255))

    #plotting of Fig.1 - figure supplement 3
    fig.1.figure.supplement3<-ggplot()+
    geom_boxplot(data=ph.midgut2,mapping=aes(x=gutregion,y=ph,fill=medianph),colour="grey30",lwd=1.5,outlier.shape=NA,alpha=0.5,coef=0)+
    scale_fill_gradientn(colours=ph.colors.hex,guide=FALSE,breaks=c(1,2,3,4,5,6,7),limits=c(1,7.5))+
    geom_point(data=ph.midgut2,mapping=aes(x=gutregion,y=ph,fill=ph),pch=21,color="white",position=position_jitter(width=0.1),size=6.5,alpha=1)+
    scale_x_discrete(name="Gut position",labels=c("Crop","Midgut\nposition 1","Midgut\nposition 2","Midgut\nposition 3","Midgut\nposition 4"))+
    scale_y_continuous(name="pH-value",limits=c(1,7),breaks=c(1,2,3,4,5,6,7))+
    annotate("text",x=c(1,2,3,4,5),y=c(4.5,6.5,6.5,6.5,6.5),size=9,label=c("a","b","b","b","b"),fontface=2)+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=20),
          axis.text.y=element_text(colour="black",size=20),
          axis.title.x=element_text(colour="black",size=25,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=25,margin=margin(0,22,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key.height=unit(3.6,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.1.figure.supplement3

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### Acidity along the gastrointestinal tract of C. floridanus.

pH-measurements 24 hr after access to 10% honey-water in the crop (N = `ph.summary.midgut[1,2]`) and directly after the proventriculus at four points along the midgut (N = `ph.summary.midgut[2,2]` except position four with N = `ph.summary.midgut[5,2]`) (LMM, LR-test, χ2 = `myround(anova(m.ph.midgut,m.ph.midgut0)[2,6],3)`, df = `anova(m.ph.midgut,m.ph.midgut0)[2,7]`, p`format_pval( myround(anova(m.ph.midgut,m.ph.midgut0)[2,8],3))`, same letters indicate p≥`myround((output.m.ph.midgut.glht$test)$pvalues[6],3)` and different letters indicate p`format_pval(myround((output.m.ph.midgut.glht$test)$pvalues[1],3))` in Westfall corrected post hoc comparisons). Lines and shaded boxes show the median and interquartile range; points show all data. Colors in shaded rectangles near the y-axis represent universal indicator pH colors. Color filling of shaded boxes correspond to the median pH color of x-axis groups and color filling of points correspond to universal indicator pH colors. ::: {#fig1s3}

To pinpoint acidopore grooming and swallowing of the poison gland secretion as the source for crop acidity and to exclude that internal, physiological mechanisms cause crop acidity, we then prevented acidopore grooming in C. floridanus ants for 24 hr after feeding through immobilization. This experiment revealed that acidopore grooming prevented ants showed a significantly diminished acidity in their crop compared to ants that were not prevented from acidopore grooming (Figure 1b; LMM, LR-test, χ2 = `myround(anova(m.mobility.c.floridanus,m.mobility.c.floridanus0)[2,6],3)`, df = `anova(m.mobility.c.floridanus,m.mobility.c.floridanus0)[2,7]`, p`format_pval( myround(anova(m.mobility.c.floridanus,m.mobility.c.floridanus0)[2,8],3))`). A similar, significantly diminished acidity in crop lumens was ubiquitously obtained in a comparative survey across seven formicine ant species and three genera (Camponotus, Lasius, and Formica) upon comparison of ants that were prevented from acidopore grooming through immobilization to non-prevented ants (Figure 1c; two-sided Wilcoxon rank-sum tests, comparisons for all ant species: p≤`myround(wilcox.test(ph~treatment,data=mobility.c.maculatus)$p.value,3)`). We conclude that formicine ants attain a highly acidic baseline pH in their crop lumen by taking up their poison into their mouth during acidopore grooming (Tragust et al., 2013), and subsequently swallowing it. The comparative survey also shows that this behavior is widespread among formicine ants.

Although venomous animals often bear a cost of venom production and express behavioural adaptations to limit venom expenditure (Casewell et al., 2013), we also found that C. floridanus ants increase the frequency of acidopore grooming within the first 30 min after ingesting fluids compared to unfed ants irrespective of the fluid’s nutritional value (Figure 1—figure supplement 2; GLMM, LR-test, χ2 = `myround(anova(m.grooming,m.grooming0)[2,6],3)`, df = `anova(m.grooming,m.grooming0)[2,7]`, p`format_pval( myround(anova(m.grooming,m.grooming0)[2,8],3))`; Westfall corrected post-hoc pairwise comparisons, water versus. 10% honey-water: p=`myround((output.m.grooming.glht$test)$pvalues[2],3)`, unfed versus water and unfed versus 10% honey-water: both p`format_pval(myround((output.m.grooming.glht$test)$pvalues[1],3))`). Moreover, we found that the strong acidity was limited to the crop of C. floridanus ants and did not extend to the midgut, the primary site of digestion in insects (Holtof et al., 2019; Terra and Ferreira, 1994; Figure 1—figure supplement 3; pH-measurements at four points along the midgut 24 hr after access to 10% honey-water; mean ± se; midgut position 1 = `myround(ph.summary.midgut[2,6],2)` ± `myround(ph.summary.midgut[2,9],2)`, midgut position 2 = `myround(ph.summary.midgut[3,6],2)` ± `myround(ph.summary.midgut[3,9],2)`, midgut position 3 = `myround(ph.summary.midgut[4,6],2)` ± `myround(ph.summary.midgut[4,9],2)`, midgut position 4 = `myround(ph.summary.midgut[5,6],2)` ± `myround(ph.summary.midgut[5,9],2)`). Together, these results led us to hypothesize that poison acidified crop lumens in formicine ants do not primarily serve a digestive function but may serve microbial control, limiting infection by oral pathogens.

### Poison acidified crops can prevent the passage of pathogenic and opportunistic bacteria to the midgut

    ######################################################################################################
    ############################### Fig 2 a,b: Serratia viability in vivo ################################
    ######################################################################################################

    #############loading data for Fig.2a,b
    growth.serratia<-read.delim("https://datadryad.org/stash/downloads/file_stream/708515",header=T)#choose data file: Supplementary Data Fig.2a,b.txt
    str(growth.serratia)

    #create factor variable time2 from the continuous variable time
    growth.serratia$time2<-as.factor(growth.serratia$time)

    #subsetting the data frame into two groups (serratia.crop, serratia.midgut)
    growth.serratia.crop<-subset(growth.serratia,gutregion=="crop")
    growth.serratia.crop<-drop.levels(growth.serratia.crop)
    growth.serratia.midgut<-subset(growth.serratia,gutregion=="midgut")
    growth.serratia.midgut<-drop.levels(growth.serratia.midgut)

    #calculation of median values and confidence intervals of change in CFUs relative to 0h in the crop
    growth.serratia.summary<-ddply(growth.serratia,c("gutregion","time"),summarise,
    N=length(cfu.change.relative),
    median=quantile(cfu.change.relative,0.5),
    lowerCI=quantile(cfu.change.relative,0.025),
    upperCI=quantile(cfu.change.relative,0.975))
    growth.serratia.summary

    #removal of time factor levels 4h and 48h in the midgut of serratia fed ants, as these levels consisted only of zeros and were not included in the statistical analysis
    growth.serratia.midgut1<-subset(growth.serratia.midgut,time2!="48"&time2!="4")
    growth.serratia.midgut1<-drop.levels(growth.serratia.midgut1)

    #############statistical analysis Fig. 2a
    m.growth.serratia.crop<-glmmTMB(cfu~time2+(1|colony),ziformula=~1,data=growth.serratia.crop,family=nbinom1)
    summary(m.growth.serratia.crop)

    #model validation
    res.m.growth.serratia.crop<-simulateResiduals(fittedModel=m.growth.serratia.crop)
    plot(res.m.growth.serratia.crop)

    #significance of predictor time since feeding (five levels: 0h, 0.5h, 4h, 24h, 48h)
    m.growth.serratia.crop0<-glmmTMB(cfu~1+(1|colony),ziformula=~1,data=growth.serratia.crop,family=nbinom1)
    anova(m.growth.serratia.crop,m.growth.serratia.crop0)

    #post-hoc comporisons of predictor-levels time since feeding
    m.growth.serratia.crop.glht<-glht(m.growth.serratia.crop,linfct=mcp(time2="Tukey"))
    output.m.growth.serratia.crop.glht<-summary(m.growth.serratia.crop.glht,test=adjusted("Westfall"))
    output.m.growth.serratia.crop.glht

    #############statistical analysis Fig. 2b
    m.growth.serratia.midgut<-glmmTMB(cfu~time2+(1|colony),data=growth.serratia.midgut1,ziformula=~1,family=nbinom2)
    summary(m.growth.serratia.midgut)

    #model validation
    res.m.growth.serratia.midgut<-simulateResiduals(fittedModel=m.growth.serratia.midgut)
    plot(res.m.growth.serratia.midgut)

    #statistical significance of predictor time (three levels: 0h, 0.5h, 24h)
    m.growth.serratia.midgut0<-glmmTMB(cfu~1+(1|colony),data=growth.serratia.midgut1,ziformula=~1,family=nbinom2)
    anova(m.growth.serratia.midgut,m.growth.serratia.midgut0)

    ######################################################################################################
    ############ Fig. 2 - figure supplement 1a,b: food passage fluorescent particles #####################
    ######################################################################################################

    #############loading data for Fig. 2 - figure supplement 1a,b
    food.flow<-read.delim("https://datadryad.org/stash/downloads/file_stream/708516",header=T)#choose data file: Supplementary Data Fig.2 - figure supplement 1a,b.txt
    str(food.flow)
    food.flow$time<-factor(food.flow$time,levels=c("2h","4h","6h","8h","12h","14h","16h","18h","24h","48h"))#reorder factor time
    food.flow$gutregion<-factor(food.flow$gutregion,levels=c("crop","midgut","hindgut"))#reorder factor gutregion

    #calculation of median values and confidence intervals of particles in gutregion over time per minor and major workers
    food.flow.summary<-ddply(food.flow,c("caste","gutregion","time"),summarise,
    N=length(particles),
    median=quantile(particles,0.5),
    lowerCI=quantile(particles,0.025),
    upperCI=quantile(particles,0.975))
    food.flow.summary

    #subsetting the data frame food.flow into two groups (food.flow.minor, food.flow.major)
    food.flow.minor<-subset(food.flow,caste=="minor")
    food.flow.minor<-drop.levels(food.flow.minor)
    food.flow.major<-subset(food.flow,caste=="major")
    food.flow.major<-drop.levels(food.flow.major)

    ######################################################################################################
    ################### Fig. 2 - figure supplement 2a,b: E.coli viability in vivo ########################
    ######################################################################################################

    #############loading data for Fig. 2 - figure supplement 2a,b
    growth.ecoli<-read.delim("https://datadryad.org/stash/downloads/file_stream/708517",header=T)#choose data file: Supplementary Data Fig.2 - figure supplement 2a,b.txt
    str(growth.ecoli)

    #create factor variable time2 from the continuous variable time
    growth.ecoli$time2<-as.factor(growth.ecoli$time)

    #subsetting the data frame into two groups (ecoli.crop, ecoli.midgut)
    growth.ecoli.crop<-subset(growth.ecoli,gutregion=="crop")
    growth.ecoli.crop<-drop.levels(growth.ecoli.crop)
    growth.ecoli.midgut<-subset(growth.ecoli,gutregion=="midgut")
    growth.ecoli.midgut<-drop.levels(growth.ecoli.midgut)

    #calculation of median values and confidence intervals of change in CFUs relative to 0h in the crop
    growth.ecoli.summary<-ddply(growth.ecoli,c("gutregion","time"),summarise,
    N=length(cfu.change.relative),
    median=quantile(cfu.change.relative,0.5),
    lowerCI=quantile(cfu.change.relative,0.025),
    upperCI=quantile(cfu.change.relative,0.975))
    growth.ecoli.summary

    #removal of time factor levels 0h in the midgut of e.coli fed ants, as this level consisted only of zeros and were not included in the statistical analysis
    growth.ecoli.midgut1<-subset(growth.ecoli.midgut,time2!="0")
    growth.ecoli.midgut1<-drop.levels(growth.ecoli.midgut1)

    #############statistical analysis Fig. 2 - figure supplement 2a
    m.growth.ecoli.crop<-glmmTMB(cfu~time2+colony,data=growth.ecoli.crop,ziformula=~1,family=nbinom1)
    summary(m.growth.ecoli.crop)

    #model validation
    res.m.growth.ecoli.crop<-simulateResiduals(fittedModel=m.growth.ecoli.crop)
    plot(res.m.growth.ecoli.crop)

    #statistical significance of predictor time since feeding (five levels: 0h, 0.5h, 4h, 24h, 48h)
    m.growth.ecoli.crop0<-glmmTMB(cfu~colony,data=growth.ecoli.crop,ziformula=~1,family=nbinom1)
    anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)

    #statistical significance of predictor colony (four levels: C313, C322, C333, C94)
    m.growth.ecoli.crop1<-glmmTMB(cfu~time2,data=growth.ecoli.crop,ziformula=~1,family=nbinom1)
    anova(m.growth.ecoli.crop,m.growth.ecoli.crop1)

    #post-hoc comporisons of predictor-levels time since feeding
    m.growth.ecoli.crop1.glht<-glht(m.growth.ecoli.crop1,linfct=mcp(time2="Tukey"))
    output.m.growth.ecoli.crop1.glht<-summary(m.growth.ecoli.crop1.glht,test=adjusted("Westfall"))
    output.m.growth.ecoli.crop1.glht

    #############statistical analysis Fig. 2 - figure supplement 2b
    m.growth.ecoli.midgut<-glmmTMB(cfu~time2+(1|colony),data=growth.ecoli.midgut1,ziformula=~1,family=nbinom1)
    summary(m.growth.ecoli.midgut)

    #model validation
    res.m.growth.ecoli.midgut<-simulateResiduals(fittedModel=m.growth.ecoli.midgut)
    plot(res.m.growth.ecoli.midgut)

    #statistical significance of predictor time since feeding (four levels: 0.5h, 4h, 24h, 48h)
    m.growth.ecoli.midgut0<-glmmTMB(cfu~1+(1|colony),data=growth.ecoli.midgut1,ziformula=~1,family=nbinom1)
    anova(m.growth.ecoli.midgut,m.growth.ecoli.midgut0)

    #post-hoc comporisons of predictor-levels time since feeding
    m.growth.ecoli.midgut.glht<-glht(m.growth.ecoli.midgut,linfct=mcp(time2="Tukey"))
    output.m.growth.ecoli.midgut.glht<-summary(m.growth.ecoli.midgut.glht,test=adjusted("Westfall"))
    output.m.growth.ecoli.midgut.glht

    ######################################################################################################
    ##################### Fig. 2 - figure supplement 3: Serratia growth in vitro #########################
    ######################################################################################################

    #############loading data for Fig. 2 - figure supplement 3
    serratia.growth.invitro<-read.delim("https://datadryad.org/stash/downloads/file_stream/708518",header=T)#choose file: Supplementary Data Fig. 2 - figure supplement 3.txt
    str(serratia.growth.invitro)

    #calculation of median values and confidence intervals of change in CFUs relative to pH 5
    serratia.growth.invitro.summary<-ddply(serratia.growth.invitro,c("ph"),summarize,
    median.cfu.change=quantile(cfu.change.relative,0.5),
    lowerCI.cfu.change=quantile(cfu.change.relative,0.025),
    upperCI.cfu.change=quantile(cfu.change.relative,0.975))
    serratia.growth.invitro.summary

    #removal of pH levels 2 and 3 from serratia.growth.invitro, as these levels consisted only of zeros
    serratia.growth.invitro1<-subset(serratia.growth.invitro,ph=="pH5"|ph=="pH4")
    serratia.growth.invitro1<-drop.levels(serratia.growth.invitro1)
    str(serratia.growth.invitro1)

    #############statistical analysis Fig. 2 - figure supplement 3
    m.serratia.growth.invitro1<-glm.nb(cfu~ph,data=serratia.growth.invitro1)
    summary(m.serratia.growth.invitro1)

    #model validation
    res.m.serratia.growth.invitro1<-simulateResiduals(fittedModel=m.serratia.growth.invitro1)
    plot(res.m.serratia.growth.invitro1)

    #statistical significance of predictor pH-level (two levels: pH5, pH4)
    m.serratia.growth.invitro10<-glm.nb(cfu~1,data=serratia.growth.invitro1)
    anova(m.serratia.growth.invitro1,m.serratia.growth.invitro10)

To investigate a potential microbial control function, we next tested whether poison acidified crop lumens can inhibit Serratia marcescens, an insect pathogenic bacterium (Grimont et al., 2006), when ingested together with food and prevent its passage from the crop to the midgut in C. floridanus ants. To this end, we first estimated food passage times through the gut of C. floridanus with fluorescent particles contained in food, as we surmised that ingested fluids need to remain in the crop for a minimum time before being passed to the midgut in order for poison swallowing and the ensuing crop acidity to take effect after perturbation of the crop pH through ingested fluids. In agreement with food passage times through the gastrointestinal tract of other ants (Cannon, 1998; Kloft, 1960; Kloft, 1960; Howard and Tschinkel, 1981; Markin, 1970), we found that only a small amount of ingested food is passed from the crop to the midgut 2–4 hr after feeding, while thereafter food is steadily passed from the crop to the midgut until 18 hr after feeding (Figure 2—figure supplement 1).

We then measured the viability of Serratia marcescens ingested together with food in the gastrointestinal tract of C. floridanus at two time points before (0.5 hr and 4 hr) and after (24 hr and 48 hr) main food passage from the crop to the midgut, with the time directly after food ingestion (0 hr) serving as a reference. We found that S. marcescens presence decreased sharply over time in the crop (Figure 2a; GLMM, LR-test, χ2 = `myround(anova(m.growth.serratia.crop,m.growth.serratia.crop0)[2,6],3)`, df = `anova(m.growth.serratia.crop,m.growth.serratia.crop0)[2,7]`, p`format_pval( myround(anova(m.growth.serratia.crop,m.growth.serratia.crop0)[2,8],3))`). The proportion of CFUs that we were able to retrieve from the crop relative to the mean at 0 hr in the crop diminished from `round(growth.serratia.summary[2,4]*100)`% at 0.5 hr post-feeding (median, CI: `round(growth.serratia.summary[2,5]*100)`–`round(growth.serratia.summary[2,6]*100)`%) to `round(growth.serratia.summary[3,4]*100)`% at 4 hr (CI: `round(growth.serratia.summary[3,5]*100)`–`round(growth.serratia.summary[3,6]*100)`%), 24 hr (CI: `round(growth.serratia.summary[4,5]*100)`–`round(growth.serratia.summary[4,6]*100)`%), and 48 hr (CI: `round(growth.serratia.summary[5,5]*100)`–`round(growth.serratia.summary[5,6]*100)`%) post-feeding. In addition, relative to the mean at 0 hr in the crop, S. marcescens could only be detected at extremely low numbers in the midgut (median `round(growth.serratia.summary[6,4]*100)`%) at 0 hr (CI: `round(growth.serratia.summary[6,5]*100)`–`round(growth.serratia.summary[6,6]*100)`%), 0.5 hr (CI: `round(growth.serratia.summary[7,5]*100)`–`round(growth.serratia.summary[7,6]*100)`%) and 24 hr (CI: `round(growth.serratia.summary[9,5]*100)`–`round(growth.serratia.summary[9,6]*100)`%) post-feeding and not at all at 4 hr and 48 hr post-feeding (Figure 2b; GLMM, LR-test, χ2 = `myround(anova(m.growth.serratia.midgut,m.growth.serratia.midgut0)[2,6],3)`, df = `anova(m.growth.serratia.midgut,m.growth.serratia.midgut0)[2,7]`, p=`myround(anova(m.growth.serratia.midgut,m.growth.serratia.midgut0)[2,8],3)`)). A similar, rapid reduction in the crop and inability to pass from the crop to the midgut was obtained when we fed E. coli, a potential opportunistic bacterium that is not a gut associate of insects (Blount, 2015) to C. floridanus ants (Figure 2—figure supplement 2; crop: GLMM, LR-test, χ2 = `myround(anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,6],3)`, df = `anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,7]`, p`format_pval( myround(anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,8],3))`; midgut: GLMM, LR-test, χ2 = `myround(anova(m.growth.ecoli.midgut,m.growth.ecoli.midgut0)[2,6],3)`, df = `anova(m.growth.ecoli.midgut,m.growth.ecoli.midgut0)[2,7]`, p=`myround(anova(m.growth.ecoli.midgut,m.growth.ecoli.midgut0)[2,8],3)`).

Figure 2.

chunk:

    #############plot Fig. 2a
    fig.2a<-ggplot()+
    geom_boxplot(data=growth.serratia.crop,aes(x=time2,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,alpha=0.3,coef=0,width=0.4)+
    geom_point(data=growth.serratia.crop,aes(x=time2,y=cfu.change.relative),pch=21,fill="deeppink1",color="white",alpha=1,position=position_jitter(width=0.1),size=5)+
    annotate("text",x=c(1,2,3,4,5),y=c(6.5,6.5,0.7,0.7,0.7),size=9,label=c("a","a","b","b","b"),fontface=2)+
    scale_x_discrete(name="Time",labels=c("0h","0.5h","4h","24h","48h"))+
    scale_y_continuous(name="CFU change",limits=c(-0.01,7.5))+
    labs(tag="a")+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15,face="italic"),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          aspect.ratio=1)
    fig.2a

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

    #############plot Fig. 2b
    fig.2b<-ggplot()+
    geom_boxplot(data=growth.serratia.midgut,aes(x=time2,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,alpha=0.7,coef=0,width=0.4)+
    geom_point(data=growth.serratia.midgut,aes(x=time2,y=cfu.change.relative),fill="deeppink1",pch=21, color="white",alpha=1,position=position_jitter(width=0.1),size=5)+
    annotate("text",x=c(3),y=c(0.15),size=9,label=c(expression(paste(italic("P")," = 0.593"))),fontface=2)+
    scale_x_discrete(name="Time",labels=c("0h","0.5h","4h","24h","48h"))+
    scale_y_continuous(name="CFU change",limits=c(-0.01,0.17))+
    labs(tag="b")+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15,face="italic"),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          aspect.ratio=1)
    fig.2b

#### Viability of S. marcescens over time in the digestive tract of C. floridanus.

Change in the number of colony forming units (CFUs) in the crop (a) and midgut (b) part of the digestive tract (yellow color in insert) relative to the mean CFU-number at 0 hr in the crop (CFU change corresponds to single data CFU-value divided by mean CFU-value at 0 hr in the crop), 0 hr, 0.5 hr, 4 hr, 24 hr, and 48 hr after feeding Camponotus floridanus ants 10% honey water contaminated with Serratia marcescens. (a), Change of S. marcescens in the crop (GLMM, LR-test, χ2 = `myround(anova(m.growth.serratia.crop,m.growth.serratia.crop0)[2,6],3)`, df = `anova(m.growth.serratia.crop,m.growth.serratia.crop0)[2,7]`, p`format_pval( myround(anova(m.growth.serratia.crop,m.growth.serratia.crop0)[2,8],3))`, same letters indicate p≥`myround(( output.m.growth.serratia.crop.glht$test)$pvalues[8],3)` and different letters indicate p`format_pval(myround((output.m.growth.serratia.crop.glht$test)$pvalues[2],3))` in Westfall corrected post hoc comparisons). (b), Change of S. marcescens in the midgut (GLMM, LR-test, χ2 = `myround(anova(m.growth.serratia.midgut,m.growth.serratia.midgut0)[2,6],3)`, df = `anova(m.growth.serratia.midgut,m.growth.serratia.midgut0)[2,7]`, p=`myround(anova(m.growth.serratia.midgut,m.growth.serratia.midgut0)[2,8],3)`). Note that timepoints with zero bacterial growth in the midgut (4 hr and 48 hr) were excluded from the statistical model. ::: {#fig2}

Figure 2—figure supplement 1.

chunk:

    #############plot Fig.2 - figure supplement 1a
    #subsetting the data frame food.flow.summary into three groups (food.flow.summary.minor.crop, food.flow.summary.minor.midgut, food.flow.summary.minor.hindgut)
    food.flow.summary.minor<-subset(food.flow.summary,caste=="minor")
    food.flow.summary.minor<-drop.levels(food.flow.summary.minor)
    food.flow.summary.minor.crop<-subset(food.flow.summary.minor,gutregion=="crop")
    food.flow.summary.minor.crop<-drop.levels(food.flow.summary.minor.crop)
    food.flow.summary.minor.midgut<-subset(food.flow.summary.minor,gutregion=="midgut")
    food.flow.summary.minor.midgut<-drop.levels(food.flow.summary.minor.midgut)
    food.flow.summary.minor.hindgut<-subset(food.flow.summary.minor,gutregion=="hindgut")
    food.flow.summary.minor.hindgut<-drop.levels(food.flow.summary.minor.hindgut)

    #plot Fig.2 - figure supplement 1a
    fig.2.figure.supplement1a<-ggplot()+
    geom_line(data = food.flow.summary.minor.crop,aes(x=time,y=median+1,group="time"),colour="blue",lwd=1.5,alpha=0.8)+
    geom_line(data = food.flow.summary.minor.midgut,aes(x=time,y=median+1,group="time"),colour="skyblue",lwd=1.5,alpha=0.8)+
    geom_line(data = food.flow.summary.minor.hindgut,aes(x=time,y=median+1,group="time"),colour="turquoise",lwd=1.5,alpha=0.8)+
    geom_point(data = food.flow.minor,mapping=aes(x=time,y=particles+1,fill=gutregion),pch=21,color="white",position=position_jitter(width=0.1),size=7,alpha=1)+
    scale_fill_manual(values=c("blue","skyblue","turquoise"))+
    scale_x_discrete(name="Time after feeding",labels=c("2h","4h","6h","8h","12h","14h","16h","18h","24h","48h"))+
    scale_y_continuous(trans="log10",name="Number particles",limits=c(-1,3000))+
    annotation_logticks(sides="l",size=1, short = unit(0.25, "cm"), mid = unit(0.5, "cm"), long = unit(0.8,  "cm"))+
    labs(tag="a")+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=35),
          axis.text.y=element_text(colour="black",size=35),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key.height=unit(4,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.2.figure.supplement1a

::: {echo=FALSE warning=FALSE message=FALSE height=15 width=15 outheight=800 outwidth=800}

    #############plot Fig.2 - figure supplement 1b
    #subsetting the data frame food.flow.summary into three groups (food.flow.summary.major.crop, food.flow.summary.major.midgut, food.flow.summary.major.hindgut)
    food.flow.summary.major<-subset(food.flow.summary,caste=="major")
    food.flow.summary.major<-drop.levels(food.flow.summary.major)
    food.flow.summary.major.crop<-subset(food.flow.summary.major,gutregion=="crop")
    food.flow.summary.major.crop<-drop.levels(food.flow.summary.major.crop)
    food.flow.summary.major.midgut<-subset(food.flow.summary.major,gutregion=="midgut")
    food.flow.summary.major.midgut<-drop.levels(food.flow.summary.major.midgut)
    food.flow.summary.major.hindgut<-subset(food.flow.summary.major,gutregion=="hindgut")
    food.flow.summary.major.hindgut<-drop.levels(food.flow.summary.major.hindgut)

    #plot Fig.2 - figure supplement 1b
    fig.2.figure.supplement1b<-ggplot()+
    geom_line(data = food.flow.summary.major.crop,aes(x=time,y=median+1,group="time"),colour="blue",lwd=1.5,alpha=0.8)+
    geom_line(data = food.flow.summary.major.midgut,aes(x=time,y=median+1,group="time"),colour="skyblue",lwd=1.5,alpha=0.8)+
    geom_line(data = food.flow.summary.major.hindgut,aes(x=time,y=median+1,group="time"),colour="turquoise",lwd=1.5,alpha=0.8)+
    geom_point(data = food.flow.major,mapping=aes(x=time,y=particles+1,fill=gutregion),pch=21,color="white",position=position_jitter(width=0.1),size=7,alpha=1)+
    scale_fill_manual(values=c("blue","skyblue","turquoise"))+
    scale_x_discrete(name="Time after feeding",labels=c("2h","4h","6h","8h","12h","14h","16h","18h","24h","48h"))+
    scale_y_continuous(trans="log10",name="Number particles",limits=c(-1,3000))+
    annotation_logticks(sides="l",size=1, short = unit(0.25, "cm"), mid = unit(0.5, "cm"), long = unit(0.8,  "cm"))+
    labs(tag="b")+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=35),
          axis.text.y=element_text(colour="black",size=35),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key.height=unit(4,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.2.figure.supplement1b

#### Food passage of fluorescent particles through the digestive tract of C. floridanus.

Number of fluorescent particles on a logarithmic scale in the crop (dark blue), midgut (light blue), and hindgut (turquoise) part of the digestive tract of minor (a) and major (b) ants 2 hr, 4 hr, 6 hr, 8 hr, 12 hr, 14 hr, 16 hr, 18 hr, 24 hr, and 48 hr after feeding them a 1:1 honey-water mix with polymethylmethacrylate (PMM) particles (size ≤40 µm). Note that for displaying purposes and better visibility of zero values a value of one has been added to all datapoints. Points represent the number of counted particles per individual ant and lines connect the median value of particles at the different time points after feeding. ::: {#fig2s1}

Figure 2—figure supplement 2.

chunk:

    #############plot Fig. 2 - figure supplement 2a
    fig.2.figure.supplement2a<-ggplot()+
    geom_boxplot(data=growth.ecoli.crop,aes(x=time2,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,alpha=0.3,coef=0,width=0.4)+
    geom_point(data=growth.ecoli.crop,aes(x=time2,y=cfu.change.relative),pch=21,fill="darkolivegreen",color="white",alpha=1,size=5,position=position_jitter(width=0.1))+
    annotate("text",x=c(1,2,3,4,5),y=c(2.5,1.5,1,0.5,0.5),size=9,label=c("a","b","c","d","d"),fontface=2)+#statistical significance
    scale_x_discrete(name="Time",labels=c("0h","0.5h","4h","24h","48h"))+
    scale_y_continuous(name="CFU change",limits=c(-0.01,3))+
    labs(tag="a")+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15,face="italic"),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          aspect.ratio=1)
    fig.2.figure.supplement2a

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

    #############plot Fig. 2 - figure supplement 2b
    fig.2.figure.supplement2b<-ggplot()+
    geom_boxplot(data=growth.ecoli.midgut,aes(x=time2,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,alpha=0.3,coef=0,width=0.4)+
    geom_point(data=growth.ecoli.midgut,aes(x=time2,y=cfu.change.relative),pch=21,fill="darkolivegreen",color="white",alpha=1,size=5,position=position_jitter(width=0.1))+
    annotate("text",x=c(2,3,4,5),y=c(0.02,0.02,0.02,0.02),size=9,label=c("ab","a","a","b"),fontface=2)+
    scale_x_discrete(name="Time",labels=c("0h","0.5h","4h","24h","48h"))+
    scale_y_continuous(name="CFU change",limits=c(-0.01,0.05))+
    labs(tag="b")+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15,face="italic"),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          aspect.ratio=1)
    fig.2.figure.supplement2b

#### Viability of E. coli over time in the digestive tract of C. floridanus over time.

Change in the number of colony forming units (CFUs) in the crop (a) and midgut (b) part of the digestive tract (yellow color in insert) relative to mean CFU-number at 0 hr in the crop (CFU change corresponds to single data CFU-value divided by the mean CFU-value at 0 hr in the crop), 0 hr, 0.5 hr, 4 hr, 24 hr, and 48 hr after feeding ants 10% honey water contaminated with Escherichia coli. (a), Change of E. coli in the crop (GLMM, LR-test, χ2 = `myround(anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,6],3)`, df = `anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,7]`, p`format_pval( myround(anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,8],3))`, same letters indicate p=`myround(( output.m.growth.ecoli.crop1.glht$test)$pvalues[10],3)` and different letters indicate p<`myround(( output.m.growth.ecoli.crop1.glht$test)$pvalues[5],3)` in Westfall corrected post hoc comparisons). (b), Change of E. coli in the midgut (GLMM, LR-test, χ2 = `myround(anova(m.growth.ecoli.midgut,m.growth.ecoli.midgut0)[2,6],3)`, df = `anova(m.growth.ecoli.midgut,m.growth.ecoli.midgut0)[2,7]`, p=`myround(anova(m.growth.ecoli.midgut,m.growth.ecoli.midgut0)[2,8],3)`, same letters indicate p≥`myround(( output.m.growth.ecoli.midgut.glht$test)$pvalues[3],3)` and different letters indicate p≤`myround(( output.m.growth.ecoli.midgut.glht$test)$pvalues[1],3)` in Westfall corrected post hoc comparisons). Note that timepoints with zero bacterial growth in the midgut (0 hr) were excluded from the statistical model. ::: {#fig2s2}

Figure 2—figure supplement 3.

chunk:

    #############plot Fig. 2 - figure supplement 3
    fig.2.figure.supplement3<-ggplot()+
    geom_boxplot(data=serratia.growth.invitro,aes(x=ph,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,position=position_dodge(0.6),alpha=0.6,coef=0,width=0.4)+
    geom_point(data=serratia.growth.invitro,aes(x=ph,y=cfu.change.relative,colour=ph),position=position_jitterdodge(dodge=0.6),size=4,alpha=0.8)+
    scale_colour_manual(values=c("deeppink1","deeppink1","deeppink1","deeppink1"),name="Raw data",guide=FALSE)+
    scale_x_discrete(name="pH of honeywater",labels=c("2","3","4","5"))+
    scale_y_continuous(name="CFU change",limits=c(0,1.7))+
    annotate("text",x=c(3.5),y=c(1.5),size=16,label=c(expression(paste(italic("P")," < 0.001"))),fontface=2)+#statistical significance
    geom_segment(aes(x = 3, y = 1.4, xend = 4, yend = 1.4),lwd=2)+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=30),
          axis.text.y=element_text(colour="black",size=30),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          legend.position="bottom",
          aspect.ratio=1)
    fig.2.figure.supplement3

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### S. marcescens growth in vitro.

Change in the number of CFUs relative to the mean at pH 5 (CFU change corresponds to single data CFU-value divided by the mean CFU-value at pH 5) after incubation of Serratia marcescens in 10% honey water (pH = 5) or in 10% honey water acidified with commercial formic acid to a pH of 4, 3, or 2 for 2 hr (GLM, LR-test, χ2 = `myround(anova(m.serratia.growth.invitro1,m.serratia.growth.invitro10)[2,7],3)`, df = `anova(m.serratia.growth.invitro1,m.serratia.growth.invitro10)[2,6]`, p`format_pval( myround(anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,8],3))`). Note that pH-values with zero bacterial growth (pH 2 and 3) were excluded from the statistical model. ::: {#fig2s3}

Although in vivo the antimicrobial activity of the natural poison is likely higher than the antimicrobial activity of formic acid, the main component of the formicine poison gland secretion (Lopez et al., 1993; Osman and Brander, 1961; Schmidt and Piek, 1986) due to the presence of other components (Tragust et al., 2013), we then tested the ability of S. marcescens to withstand acidic conditions created with formic acid in an in vitro experiment. We found that incubation of S. marcescens for 2 hr in 10% honey water acidified with formic acid to pH 4 resulted in a significantly lower number of CFUs relative to pH 5 and in zero growth for incubations at pH-levels that were lower than 4 (Figure 2—figure supplement 3; GLM, LR-test, χ2 = `myround(anova(m.serratia.growth.invitro1,m.serratia.growth.invitro10)[2,7],3)`, df = `anova(m.serratia.growth.invitro1,m.serratia.growth.invitro10)[2,6]`, p`format_pval( myround(anova(m.growth.ecoli.crop,m.growth.ecoli.crop0)[2,8],3))`). Our data thus indicate that poison acidified crops can indeed serve microbial control in formicine ants, likely inhibiting bacteria according to their ability to cope with acidic environments (Lund et al., 2014).

### Access to the poison improves survival upon ingestion of pathogen contaminated food

    ######################################################################################################
    ############################### Fig 3: Individual survival ###########################################
    ######################################################################################################

    #############loading data for Fig.3
    survival<-read.delim("https://datadryad.org/stash/downloads/file_stream/708519",header=T)#choose data file: Supplementary Data Fig.3.txt
    str(survival)

    #############statistcal analysis for Fig.3
    m.survival<-coxme(Surv(time.death.hours,status)~treatment+(1|experiment.block)+(1|colony),data=survival)
    print(m.survival)

    #significance of predictor ant treatment (four levels: Serratia- FA-, Serratia- FA+, Serratia-+FA-, Serratia+ FA+)
    m.survival0<-coxme(Surv(time.death.hours,status)~1+(1|experiment.block)+(1|colony),data=survival)
    anova(m.survival,m.survival0)

    #post-hoc comporisons of predictor-levels ant treatment
    m.survival.glht<-glht(m.survival,linfct=mcp(treatment="Tukey"))
    output.m.survival.glht<-summary(m.survival.glht,test=adjusted("Westfall"))
    output.m.survival.glht

To test whether acidic crops also provide a fitness benefit upon ingestion of pathogen contaminated food, we prevented acidopore grooming through immobilization in C. floridanus ants for 24 hr after feeding them once with 5 µL of either S. marcescens contaminated honey water or non-contaminated honey water and monitored their survival thereafter without providing additional food. We found that acidopore access after pathogen ingestion significantly increased the survival probability of ants (Figure 3; COXME, LR-test, χ2 = `myround(anova(m.survival,m.survival0)[2,2],3)`, df = `anova(m.survival,m.survival0)[2,3]`, p=`myround(anova(m.survival,m.survival0)[2,4],4)`). The survival of ants prevented from acidopore grooming and fed once with the pathogen contaminated food was significantly lower than that of non-prevented ants fed the same food source (Westfall corrected post-hoc comparisons: FA - | Serratia presence + versus. all other ant groups: p≤`myround(( output.m.survival.glht$test)$pvalues[6],3)`). In contrast, non-prevented ants fed once with the pathogen contaminated food source did not differ in survival to prevented and non-prevented ants fed the non-contaminated food source (Westfall corrected post-hoc comparisons: FA + | Serratia presence + versus. FA + | Serratia presence – and FA + | Serratia presence + versus. FA + | Serratia presence –: p≥`myround(( output.m.survival.glht$test)$pvalues[1],3)` for both comparisons). Although we observed an overall high mortality in this experimental setup, likely due to starvation following the one time feeding in combination with social isolation of individually kept ants (Kohlmeier et al., 2016; Koto et al., 2015; Stucki et al., 2019), this result indicates that poison acidified crop lumens provide a fitness benefit in terms of survival to formicine ants upon ingestion of pathogen contaminated food.

Figure 3.

chunk:

    #############plot Fig. 3
    fig.3<-ggplot(survival,aes(time=time.death.hours,status=status,linetype=treatment,colour=treatment))+
    geom_km(lwd=2)+
    scale_colour_manual(values=c("grey","grey","black","black"),name="Animal treatment",label=c("Serratia- | FA-","Serratia- | FA+","Serratia+ | FA-","Serratia+ | FA+"))+
    scale_linetype_manual(values=c("solid","dashed","solid","dashed"),name="Animal treatment",labels=c("Serratia- | FA-","Serratia- | FA+","Serratia+ | FA-","Serratia+ | FA+"))+
    scale_x_continuous(name="Time after feeding [h]",limits=c(0,160),breaks=seq(0,120,24))+
    scale_y_continuous(name="Proportion survival",limits=c(0,1))+
    geom_segment(aes(x=140,y=0.12,xend=150,yend=0.12),lwd=1.5,col="grey",lty=2)+
    geom_segment(aes(x=140,y=0.10,xend=150,yend=0.10),lwd=1.5,col="black",lty=2)+
    geom_segment(aes(x=140,y=0.08,xend=150,yend=0.08),lwd=1.5,col="grey",lty=1)+
    geom_segment(aes(x=140,y=0.00,xend=150,yend=0.00),lwd=1.5,col="black",lty=1)+
    annotate("text",x=c(155,155),y=c(0.105,0.005),size=10,label=c("a","b"),fontface=2)+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.5,"cm"),
          legend.key=element_blank(),
          legend.position=c(0.8,0.8),
          aspect.ratio=1)
    fig.3

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### Survival after ingestion of pathogen contaminated food.

Survival of individual C. floridanus ants that were either prevented to ingest the formic acid containing poison gland secretion (FA-; ant outlines with blue dot) or not (FA+) after feeding them once either honey water contaminated with Serratia marcescens (Serratia+, yellow circle with pink dots and black ant outlines) or non-contaminated honey water (Serratia-) without providing food thereafter (COXME, LR-test, χ2 = `myround(anova(m.survival,m.survival0)[2,2],3)`, df = `anova(m.survival,m.survival0)[2,3]`, p=`myround(anova(m.survival,m.survival0)[2,4],4)`, same letters indicate p≥`myround(( output.m.survival.glht$test)$pvalues[1],3)` and different letters indicate p≤`myround(( output.m.survival.glht$test)$pvalues[6],3)` in Westfall corrected post hoc comparisons). ::: {#fig3}

### Access to the poison in donor ants also benefits receiver ants without poison access after food exchange via trophallaxis

    ######################################################################################################
    #################################### Fig 4: Survival trophallaxis ####################################
    ######################################################################################################

    #############loading data for Fig.4
    survival.trophallaxis<-read.delim("https://datadryad.org/stash/downloads/file_stream/708520",header=T)#choose data file: Supplementary Data Fig.4.txt
    str(survival)

    #############statistical analysis for Fig. 4
    m.survival.trophallaxis<-coxme(Surv(time.death,status.death)~treatment+(1|colony)+(1|experiment.block)+(1|petridish),data=survival.trophallaxis)
    print(m.survival.trophallaxis)

    #significance of predictor ant treatment (four levels: donor FA+, donor FA-, receiver FA+, receiver FA-)
    m.survival.trophallaxis0<-coxme(Surv(time.death,status.death)~1+(1|colony)+(1|experiment.block)+(1|petridish),data=survival.trophallaxis)
    anova(m.survival.trophallaxis,m.survival.trophallaxis0)

    #post-hoc comparisons of predictor-levels ant treatment
    m.survival.trophallaxis.glht<-glht(m.survival.trophallaxis,linfct=mcp(treatment="Tukey"))
    output.m.survival.trophallaxis.glht<-summary(m.survival.trophallaxis.glht,test=adjusted("Westfall"))
    output.m.survival.trophallaxis.glht

    #hazard ratios between predictor-levels ant treatment through releveling of predictor
    treatment1<-factor(survival.trophallaxis$treatment,levels=c("receiverFA+","receiverFA-","donorFA+","donorFA-"))
    treatment2<-factor(survival.trophallaxis$treatment,levels=c("donorFA+","receiverFA+","receiverFA-","donorFA-"))
    treatment3<-factor(survival.trophallaxis$treatment,levels=c("receiverFA-","receiverFA+","donorFA+","donorFA-"))
    m.survival.trophallaxis1<-coxme(Surv(time.death,status.death)~treatment1+(1|colony)+(1|experiment.block)+(1|petridish),data=survival.trophallaxis)
    print(m.survival.trophallaxis1)
    m.survival.trophallaxis2<-coxme(Surv(time.death,status.death)~treatment2+(1|colony)+(1|experiment.block)+(1|petridish),data=survival.trophallaxis)
    print(m.survival.trophallaxis2)
    m.survival.trophallaxis3<-coxme(Surv(time.death,status.death)~treatment3+(1|colony)+(1|experiment.block)+(1|petridish),data=survival.trophallaxis)
    print(m.survival.trophallaxis3)

    #####################################################################################################
    ######################### Fig.4 - figure supplement 1: trophallaxis behavior ########################
    #####################################################################################################

    #############loading data for Fig.4 - figure supplement 1
    trophallaxis<-read.delim("https://datadryad.org/stash/downloads/file_stream/708521",header=T)#choose file: Supplementary Data Fig.4 - figure supplement 1.txt
    str(trophallaxis)

    #############statistcal analysis for Fig.4 - figure supplement 1
    m.duration.trophallaxis<-lmer(sqrt(sum.duration.trophallaxis)~ant.pair+(1|colony)+(1|experimental.block),data=trophallaxis)
    summary(m.duration.trophallaxis)

    #model validation
    res.m.duration.trophallaxis<-simulateResiduals(fittedModel=m.duration.trophallaxis)
    plot(res.m.duration.trophallaxis)

    #significance of predictor food treatment (three levels: unfed, water, honey)
    m.duration.trophallaxis0<-lmer(sqrt(sum.duration.trophallaxis)~1+(1|colony)+(1|experimental.block),data=trophallaxis)
    anova(m.duration.trophallaxis,m.duration.trophallaxis0)

The ability to swallow the acidic poison may not only improve survival of formicine ants feeding directly on pathogen contaminated food but also of ants that share the contaminated food via trophallaxis. To test this, we created two types of donor-receiver ant pairs. Donor ants in both pairs were directly fed S. marcescens contaminated food every other day, while receiver ants obtained food only through trophallaxis from their respective donor ants. Receiver ants in both pairs were precluded from swallowing of the poison through blockage of their acidopore opening, while donor ants were blocked in one pair but only sham blocked in the other pair. We found that the duration of trophallaxis between the two donor-receiver ant pairs during the first 30 min. of the first feeding bout did not significantly differ (Figure 4—figure supplement 1; LMM, LR-test, χ2 = `myround(anova(m.duration.trophallaxis,m.duration.trophallaxis0)[2,6],3)`, df = `anova(m.duration.trophallaxis,m.duration.trophallaxis0)[2,7]`, p=`myround(anova(m.duration.trophallaxis,m.duration.trophallaxis0)[2,8],3)`), indicating that trophallactic behavior was not influenced through acidopore blockage in donor ants at the beginning of the experiment. Over the next 12 d, we found that acidopore blockage per se had a significant negative effect on the survival of donor as well as receiver ants (Figure 4; COXME, LR-test, χ2 = `myround(anova(m.survival.trophallaxis,m.survival.trophallaxis0)[2,2],3)`, df = `anova(m.survival.trophallaxis,m.survival.trophallaxis0)[2,3]`, p`format_pval( myround(anova(m.survival.trophallaxis,m.survival.trophallaxis0)[2,4],3))`). However, although receiver ants that obtained food every other day from donors with the ability to swallow the poison died at a higher rate than their respective donor counterparts (hazard ratio: `round(exp(m.survival.trophallaxis2$coefficients)[1],2)`; Westfall corrected post-hoc comparison: p`format_pval(myround((output.m.survival.trophallaxis.glht$test)$pvalues[5],3))`) they were only half as likely to die compared to receiver ants that obtained pathogen contaminated food from blocked donors unable to swallow their poison (hazard ratio: `round(exp(m.survival.trophallaxis3$coefficients)[1],2)`; Westfall corrected post-hoc comparison: p`format_pval(myround((output.m.survival.trophallaxis.glht$test)$pvalues[6],3))`). This indicates that swallowing of the poison and the ensuing crop acidity also provides a fitness benefit to other members of a formicine ant society.

Figure 4.

chunk:

    #############plot Fig. 4
    fig.4<-ggplot(survival.trophallaxis,aes(time=time.death,,status=status.death,linetype=treatment,colour=treatment))+
    geom_km(lwd=2)+
    scale_colour_manual(values=c("grey","grey","black","black"),name="Animal:",labels=c("donor FA-","donor FA+","receiver FA- with\ndonor FA-","receiver FA- with\ndonor FA+"))+
    scale_linetype_manual(values=c("dashed","solid","dashed","solid"),name="Animal:",label=c("donor FA-","donor FA+","receiver FA- with\ndonor FA-","receiver FA- with\ndonor FA+"))+
    scale_x_continuous(name="Time in days",breaks=seq(0,14,2))+
    scale_y_continuous(name="Proportion survival",limits=c(0,1))+
    annotate("text",x=c(12.5,12.5,12.5,12.5),y=c(0.26,0.17,0.1,0.06),size=10,label=c("a","b","c","c"),fontface=2)+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.5,"cm"),
          legend.key=element_blank(),
          legend.position=c(0.8,0.8),
          aspect.ratio=1)
    fig.4

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### Survival after sharing pathogen contaminated food via trophallaxis.

Survival of donor ants (light gray ant outlines) that were directly fed with pathogen contaminated food (yellow circle with pink dots in insert) every other day and were either prevented to ingest their formic acid containing poison gland secretion (FA-; ant outlines with blue dot) or not (FA+) and survival of receiver ants (black ant outlines) that received pathogen contaminated food only through trophallaxis with donor ants and were always prevented to ingest their formic acid containing poison gland secretion (FA-) (COXME, LR-test, χ2 = `myround(anova(m.survival.trophallaxis,m.survival.trophallaxis0)[2,2],3)`, df = `anova(m.survival.trophallaxis,m.survival.trophallaxis0)[2,3]`, p`format_pval( myround(anova(m.survival.trophallaxis,m.survival.trophallaxis0)[2,4],3))`, same letters indicate p=`myround((output.m.survival.trophallaxis.glht$test)$pvalues[2],3)`) and different letters indicate p≤`myround((output.m.survival.trophallaxis.glht$test)$pvalues[3],3)`) in Westfall corrected post hoc comparisons). ::: {#fig4}

Figure 4—figure supplement 1.

chunk:

    fig.4.figure.supplement1<-ggplot()+
    geom_boxplot(data=trophallaxis,mapping=aes(x=ant.pair,y=sum.duration.trophallaxis,fill=ant.pair),outlier.shape=NA,lwd=1.5,width=0.4,coef=0)+
    geom_point(data=trophallaxis,mapping=aes(x=ant.pair,y=sum.duration.trophallaxis,color=ant.pair),position=position_jitter(width=0.1),size=4,alpha=0.9)+
    scale_fill_manual(values=c("white","white"),name="Animal pairing:",labels=c("donorFA- receiverFA-","donorFA+ receiverFA-"),guide=FALSE)+
    scale_colour_manual(values=c("deeppink1","deeppink1"),name="Raw data:",labels=c("no","yes"),guide=FALSE)+
    scale_x_discrete(name="Animal pairing",labels=c("donorFA- receiverFA-","donorFA+ receiverFA-"))+
    scale_y_continuous(name="Duration trophallaxis [s]",limits=c(-5,1800),breaks=seq(0,1800,200))+
    geom_segment(aes(x = 1, y = 1750, xend = 2, yend = 1750),lwd=2)+
    annotate("text",x=c(1.5),y=c(1800),size=10,label=c(expression(paste(italic("P")," = 0.268"))),fontface=2)+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=20),
          axis.text.y=element_text(colour="black",size=20),
          axis.title.x=element_text(colour="black",size=25,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=25,margin=margin(0,22,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          legend.position="right")
    fig.4.figure.supplement1

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### Duration of trophallaxis in donor-receiver ant pairs.

Total duration of trophallaxis events within 30 min. of the first bout of food exchange between donor-receiver ant-pairs (LMM, LR-test, χ2 = `myround(anova(m.duration.trophallaxis,m.duration.trophallaxis0)[2,6],3)`, df = `anova(m.duration.trophallaxis,m.duration.trophallaxis0)[2,7]`, p=`myround(anova(m.duration.trophallaxis,m.duration.trophallaxis0)[2,8],3)`). Donor ants in both pairs were directly fed with Serratia marcescens contaminated 10% honey water and were either prevented to ingest their formic acid containing poison gland secretion (FA-) or not (FA+), while receiver ants received pathogen contaminated food only through trophallaxis with the respective donor ants and were always prevented to ingest their formic acid containing poison gland secretion (FA-). ::: {#fig4s1}

### Poison acidified crops allow members of the bacteria family Acetobacteraceae passage to the midgut

    ######################################################################################################
    ################################ Fig 5 a,b: Asaia viability in vivo ##################################
    ######################################################################################################

    #############loading data for Fig.5a,b
    growth.asaia<-read.delim("https://datadryad.org/stash/downloads/file_stream/708522",header=T)#choose data file: Supplementary Data Fig.5a,b.txt
    str(growth.asaia)

    #create factor variable time2 from the continuous variable time
    growth.asaia$time2<-as.factor(growth.asaia$time)

    #subsetting the data frame into two groups (growth.asaia.crop, growth.asaia.midgut)
    growth.asaia.crop<-subset(growth.asaia,gutregion=="crop")
    growth.asaia.crop<-drop.levels(growth.asaia.crop)
    growth.asaia.midgut<-subset(growth.asaia,gutregion=="midgut")
    growth.asaia.midgut<-drop.levels(growth.asaia.midgut)

    #calculation of median values and confidence intervals of change in CFUs relative to 0h in the crop
    growth.asaia.summary<-ddply(growth.asaia,c("gutregion","time"),summarise,
    N=length(cfu.change.relative),
    median=quantile(cfu.change.relative,0.5),
    lowerCI=quantile(cfu.change.relative,0.025),
    upperCI=quantile(cfu.change.relative,0.975))
    growth.asaia.summary

    #removal of time factor levels 0h in the midgut of asaia fed ants, as this level consisted only of zeros and is not included in the statistical analysis
    growth.asaia.midgut1<-subset(growth.asaia.midgut,time2!="0")
    growth.asaia.midugt1<-drop.levels(growth.asaia.midgut1)

    #############statistical analysis Fig. 5a
    m.growth.asaia.crop<-glmmTMB(cfu~time2+(1|colony),data=growth.asaia.crop,ziformula=~1,family=nbinom2)
    summary(m.growth.asaia.crop)

    #model validation
    res.m.growth.asaia.crop<-simulateResiduals(fittedModel=m.growth.asaia.crop)
    plot(res.m.growth.asaia.crop)

    #statistical significance of predictor time since feeding (five levels: 0h, 0.5h, 4h, 24h, 48h)
    m.growth.asaia.crop0<-glmmTMB(cfu~1+(1|colony),data=growth.asaia.crop,ziformula=~1,family=nbinom2)
    anova(m.growth.asaia.crop,m.growth.asaia.crop0)

    #post-hoc comporisons of predictor-levels time since feeding
    m.growth.asaia.crop.glht<-glht(m.growth.asaia.crop,linfct=mcp(time2="Tukey"))
    output.m.growth.asaia.crop.glht<-summary(m.growth.asaia.crop.glht,test=adjusted("Westfall"))
    output.m.growth.asaia.crop.glht

    #############statistical analysis Fig. 5b
    m.growth.asaia.midgut<-glmmTMB(cfu~time2+(1|colony),data=growth.asaia.midgut1,ziformula=~1,family=nbinom1)
    summary(m.growth.asaia.midgut)

    #model validation
    res.m.growth.asaia.midgut<-simulateResiduals(fittedModel=m.growth.asaia.midgut)
    plot(res.m.growth.asaia.midgut)

    #statistical significance of predictor time since feeding (four levels: 0.5h, 4h, 24h, 48h)
    m.growth.asaia.midgut0<-glmmTMB(cfu~1+(1|colony),data=growth.asaia.midgut1,ziformula=~1,family=nbinom1)
    anova(m.growth.asaia.midgut,m.growth.asaia.midgut0)

    #post-hoc comporisons of predictor-levels time since feeding
    m.growth.asaia.midgut.glht<-glht(m.growth.asaia.midgut,linfct=mcp(time2="Tukey"))
    output.m.growth.asaia.midgut.glht<-summary(m.growth.asaia.midgut.glht,test=adjusted("Westfall"))
    output.m.growth.asaia.midgut.glht

    ######################################################################################################
    ##################### Fig. 5 - figure supplement 1: Asaia growth in vitro ############################
    ######################################################################################################

    #############loading data for Fig. 5 - figure supplement 1
    asaia.growth.invitro<-read.delim("https://datadryad.org/stash/downloads/file_stream/708523",header=T)#choose file: Supplementary Data Fig. 5 - figure supplement 1.txt
    str(asaia.growth.invitro)

    #calculation of median values and confidence intervals of change in CFUs relative to pH 5
    asaia.growth.invitro.summary<-ddply(asaia.growth.invitro,c("ph"),summarize,
    median.cfu.change=quantile(cfu.change.relative,0.5),
    lowerCI.cfu.change=quantile(cfu.change.relative,0.025),
    upperCI.cfu.change=quantile(cfu.change.relative,0.975))
    asaia.growth.invitro.summary

    #removal of pH level 2 from asaia.growth.invitro, as this level consisted only of zeros
    asaia.growth.invitro1<-subset(asaia.growth.invitro,ph!="pH2")
    asaia.growth.invitro1<-drop.levels(asaia.growth.invitro1)
    str(asaia.growth.invitro1)

    #############statistical analysis Fig. 5 - figure supplement 1
    m.asaia.growth.invitro1<-glm.nb(cfu~ph,data=asaia.growth.invitro1)
    summary(m.asaia.growth.invitro1)

    #model validation
    res.m.asaia.growth.invitro1<-simulateResiduals(fittedModel=m.asaia.growth.invitro1)
    plot(res.m.asaia.growth.invitro1)

    #statistical significance of predictor pH-level (two levels: pH5, pH4)
    m.asaia.growth.invitro10<-glm.nb(cfu~1,data=asaia.growth.invitro1)
    anova(m.asaia.growth.invitro1,m.asaia.growth.invitro10)

    #post-hoc comparison among predictor levels of pH (three levels: pH5, pH4, pH3)
    m.asaia.growth.invitro1.glht<-glht(m.asaia.growth.invitro1,linfct=mcp(ph="Tukey"))
    output.m.asaia.growth.invitro1.glht<-summary(m.asaia.growth.invitro1.glht,test=adjusted("Westfall"))
    output.m.asaia.growth.invitro1.glht

In addition to microbial control, poison acidified formicine ant crops might act as a chemical filter for gut-associated microbial communities, similar to gut morphological structures that can act as mechanical filters in ants (Cannon, 1998; Glancey et al., 1981; Lanan et al., 2016; Little et al., 2006; Quinlan and Cherrett, 1978) and other insects (Itoh et al., 2019; Ohbayashi et al., 2015). To investigate the idea of a chemical filter, we tested the ability of the insect gut-associated bacterium Asaia sp. (family Acetobacteraceae) (Crotti et al., 2009; Favia et al., 2007) to withstand acidic environments in vitro and in vivo. In contrast to S. marcescens (Figure 2—figure supplement 2), Asaia sp. was not affected by an incubation for 2 hr in 10% honey water acidified with formic acid to pH 4 and was still able to grow when incubated at pH 3 in in vitro tests (Figure 5—figure supplement 1; GLM, overall LR-test χ2 = `myround(anova(m.asaia.growth.invitro1,m.asaia.growth.invitro10)[2,7],3)`, df = `anova(m.asaia.growth.invitro1,m.asaia.growth.invitro10)[2,6]`, p`format_pval( myround(anova(m.asaia.growth.invitro1,m.asaia.growth.invitro10)[2,8],3))`; Westfall corrected post hoc comparisons: pH = 5 versus. pH = 4: p=`myround((output.m.asaia.growth.invitro1.glht$test)$pvalues[3],3)`, all other comparisons: p`format_pval(myround((output.m.asaia.growth.invitro1.glht$test)$pvalues[1],3))`). Moreover, in in vivo tests, Asaia sp. only gradually diminished over time in the crop (Figure 5a; GLMM; LR-test, χ2 = `myround(anova(m.growth.asaia.crop,m.growth.asaia.crop0)[2,6],3)`, df = `anova(m.growth.asaia.crop,m.growth.asaia.crop0)[2,7]`, p`format_pval(myround(anova(m.growth.asaia.crop,m.growth.asaia.crop0)[2,8],3))`) with the proportion of CFUs that we were able to retrieve from the crop relative to the mean at 0 hr in the crop diminishing to only `round(growth.asaia.summary[3,4]*100)`% (median, CI: `round(growth.asaia.summary[3,5]*100)`–`round(growth.asaia.summary[3,6]*100)`%) and `round(growth.asaia.summary[4,4]*100)`% (CI: `round(growth.asaia.summary[4,5]*100)`–`round(growth.asaia.summary[4,6]*100)`%) at 4 hr and 24 hr post-feeding, respectively. At the same time, relative to the mean at 0 hr in the crop, Asaia sp. steadily increased in the midgut (Figure 5b; GLMM; LR-test, χ2 = `myround(anova(m.growth.asaia.midgut,m.growth.asaia.midgut0)[2,6],3)`, df = `anova(m.growth.asaia.midgut,m.growth.asaia.midgut0)[2,7]`, p`format_pval(myround(anova(m.growth.asaia.midgut,m.growth.asaia.midgut0)[2,8],3))`) from its initial absence at 0 hr post-feeding to `round(growth.asaia.summary[10,4]*100)`% (median, CI: `round(growth.asaia.summary[10,5]*100)`–`round(growth.asaia.summary[10,6]*100)`%) at 48 hr post-feeding. This suggests that in formicine ants, poison acidified crops might act as a chemical filter that works selectively against the establishment of opportunistic and potentially harmful bacteria but allows entry and establishment of members of the bacterial family Acetobacteraceae.

Figure 5.

chunk:

    #############plot Fig. 5a
    fig.5a<-ggplot()+
    geom_boxplot(data=growth.asaia.crop,aes(x=time2,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,alpha=0.3,coef=0,width=0.4)+
    geom_point(data=growth.asaia.crop,aes(x=time2,y=cfu.change.relative),pch=21,fill="grey70",color="white",alpha=1,size=5,position=position_jitter(width=0.1))+
    annotate("text",x=c(1,2,3,4,5),y=c(3,3,1.7,0.8,0.5),size=9,label=c("a","a","b","c","d"),fontface=2)+#statistical significance
    scale_x_discrete(name="Time",labels=c("0h","0.5h","4h","24h","48h"))+
    scale_y_continuous(name="CFU change",limits=c(-0.01,4))+
    labs(tag="a")+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15,face="italic"),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          aspect.ratio=1)
    fig.5a

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

    #############plot Fig. 5b
    fig.5b<-ggplot()+
    geom_boxplot(data=growth.asaia.midgut,aes(x=time2,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,alpha=0.3,coef=0,width=0.4)+
    geom_point(data=growth.asaia.midgut,aes(x=time2,y=cfu.change.relative),pch=21,fill="grey70",color="white",alpha=1,size=5,position=position_jitter(width=0.1))+
    annotate("text",x=c(2,3,4,5),y=c(0.02,0.02,0.03,0.065),size=9,label=c("a","a","b","c"),fontface=2)+
    scale_x_discrete(name="Time",labels=c("0h","0.5h","4h","24h","48h"))+
    scale_y_continuous(name="Change in CFU's",limits=c(-0.01,0.065))+
    labs(tag="b")+
    theme(axis.line = element_line(colour = "black",size=2),
          axis.ticks=element_line(colour="black",size=2),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=25),
          axis.text.y=element_text(colour="black",size=25),
          axis.title.x=element_text(colour="black",size=30,margin=margin(25,0,0,0)),
          axis.title.y=element_text(colour="black",size=30,margin=margin(0,25,0,0)),
          plot.tag=element_text(colour="black",size=60,face="bold"),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15,face="italic"),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          aspect.ratio=1)
    fig.5b

#### Viability of Asaia sp. over time in the digestive tract of C. floridanus.

Change in the number of colony forming units (CFUs) in the crop (a) and midgut (b) part of the digestive tract (yellow color in insert) relative to the mean CFU-number at 0 hr in the crop (CFU change corresponds to single data CFU-values divided by mean CFU-value at 0 hr in the crop), 0 hr, 0.5 hr, 4 hr, 24 hr, and 48 hr after feeding ants 10% honey water contaminated with Asaia sp. (a), Change of Asaia sp. in the crop (GLMM; LR-test, χ2 = `myround(anova(m.growth.asaia.crop,m.growth.asaia.crop0)[2,6],3)`, df = `anova(m.growth.asaia.crop,m.growth.asaia.crop0)[2,7]`, p`format_pval(myround(anova(m.growth.asaia.crop,m.growth.asaia.crop0)[2,8],3))`, same letters indicate p=`myround((output.m.growth.asaia.crop.glht$test)$pvalues[1],3)` and different letters indicate p≤`myround((output.m.growth.asaia.crop.glht$test)$pvalues[5],3)` in Westfall corrected post hoc comparisons). (b), Change of Asaia sp. in the midgut (GLMM; LR-test, χ2 =`myround(anova(m.growth.asaia.midgut,m.growth.asaia.midgut0)[2,6],3)`, df = `anova(m.growth.asaia.midgut,m.growth.asaia.midgut0)[2,7]`, p`format_pval(myround(anova(m.growth.asaia.midgut,m.growth.asaia.midgut0)[2,8],3))`, same letters indicate p=`myround((output.m.growth.asaia.midgut.glht$test)$pvalues[1],3)` and different letters indicate p≤`myround((output.m.growth.asaia.midgut.glht$test)$pvalues[4],3)` in Westfall corrected post hoc comparisons). Note that timepoints with zero bacterial growth in the midgut (0 hr) were excluded from the statistical model. ::: {#fig5}

Figure 5—figure supplement 1.

chunk:

    #############plot Fig. 5 - figure supplement 1
    fig.5.figure.supplement1<-ggplot()+
    geom_boxplot(data=asaia.growth.invitro,aes(x=ph,y=cfu.change.relative),fill="white",outlier.shape=NA,lwd=1.5,position=position_dodge(0.6),alpha=0.6,coef=0,width=0.4)+
    geom_point(data=asaia.growth.invitro,aes(x=ph,y=cfu.change.relative,colour=ph),position=position_jitterdodge(dodge=0.6),size=4,alpha=0.8)+
    scale_colour_manual(values=c("grey40","grey40","grey40","grey40"),name="Raw data:",guide=FALSE)+
    annotate("text",x=c(2,3,4),y=c(0.9,1.4,1.4),size=9,label=c("b","a","a"),fontface=2)+#statistical significance
    scale_x_discrete(name="pH of honeywater",labels=c("2","3","4","5"))+
    scale_y_continuous(name="CFU change",limits=c(0,1.7))+
    theme(axis.line = element_line(colour = "black",size=1.5),
          axis.ticks=element_line(colour="black",size=1.5),
          axis.ticks.length=unit(0.3,"cm"),
          axis.text.x=element_text(colour="black",size=30),
          axis.text.y=element_text(colour="black",size=30),
          axis.title.x=element_text(colour="black",size=40,margin=margin(20,0,0,0)),
          axis.title.y=element_text(colour="black",size=40,margin=margin(0,22,0,0)),
          panel.grid.major = element_blank(),
          panel.grid.minor = element_blank(),
          panel.border = element_blank(),
          panel.background = element_blank(),
          legend.title=element_text(size=15),
          legend.text=element_text(size=15),
          legend.key.size=unit(1.2,"cm"),
          legend.key=element_blank(),
          legend.position="bottom",
          aspect.ratio=1)
    fig.5.figure.supplement1

::: {echo=FALSE warning=FALSE message=FALSE height=10 width=10 outheight=800 outwidth=800}

#### Asaia sp. growth in vitro.

Change in the number of CFUs relative to the mean at pH 5 (CFU change corresponds to single data CFU-value divided by mean CFU-value at pH 5) after incubation of Asaia sp. in 10% honey water (pH = 5) or in 10% honey water acidified with commercial formic acid to a pH of 4, 3, or 2 for 2 hr (GLM, LR-test χ2 = `myround(anova(m.asaia.growth.invitro1,m.asaia.growth.invitro10)[2,7],3)`, df = `anova(m.asaia.growth.invitro1,m.asaia.growth.invitro10)[2,6]`, p`format_pval( myround(anova(m.asaia.growth.invitro1,m.asaia.growth.invitro10)[2,8],3))`, same letters indicate p=`myround((output.m.asaia.growth.invitro1.glht$test)$pvalues[3],3)`, and different letters indicate p`format_pval(myround((output.m.asaia.growth.invitro1.glht$test)$pvalues[1],3))` in Westfall corrected post hoc comparisons). Note that pH-values with zero bacterial growth (pH 2) were excluded from the statistical model. ::: {#fig5s1}

## Discussion

In this study, we investigated how formicine ants solve the challenge to control harmful microbes in their food while at the same time allowing acquisition and transmission of beneficial microbes from and with their food. We found that formicine ants swallow their antimicrobial, highly acidic poison gland secretion during the behavior of acidopore grooming. The resulting acidic environment in their stomach, the crop, can protect formicine ants from food borne bacterial pathogens while at the same time allowing the acquisition and establishment of members of the bacterial family Acetobacteraceae, a recurring part of the gut microbiota of formicine ants.

Highly acidic stomach lumens are ubiquitous in higher vertebrates, including amphibians, reptiles, birds and mammals (Beasley et al., 2015; Koelz, 1992). In insects, highly acidic gut regions have so far only rarely been described from the midgut (Chapman, 2013; Holtof et al., 2019). The mechanisms responsible for the creation of a gut lumen compartment with a certain pH are often unknown in insects (Harrison, 2001), but in principle, highly acidic gut regions in insects may, similar to vertebrates (Hersey and Sachs, 1995), be generated through physiological mechanisms (Matthews et al., 2017; Miguel-Aliaga et al., 2018; Onken et al., 2017). Alternatively, acidic derivatives of gut-associated microbes (Ratzke et al., 2018, Ratzke and Gore, 2018, Wolfe, 2005) or acidic gland secretions (Blum, 1996; Morgan, 2008; Vander Meer, 2012) might contribute to the insect gut pH. In agreement with the latter, the results of our study show that formicine ants maintain a highly acidic baseline pH in their stomach, the crop, through swallowing of their poison gland secretion during acidopore grooming. Interestingly, although we found that a higher crop acidity was observed in all formicine ants in our comparative survey when they had access to their poison, we also found that crop acidity was highly variable in ants with and without access to their poison. While a variable crop acidity in ants without access to their poison could indicate the existence of additional internal or external sources that maintain crop acidity, a variable crop acidity in ants with access to their poison could indicate species specific differences in acidopore grooming, in the composition of the poison gland secretion or in optimal crop acidity. Future studies will need to explore these possibilities.

Sanitation of food through the addition of organic acids or through acidic fermentation is frequently practiced by humans (Cherrington et al., 1991; Hirshfield et al., 2003; Theron and Rykers Lues, 2010) and sanitation of food with antimicrobials from different sources is ubiquitous in animals that provision food to their offspring or that store, cultivate, develop or live in food (Currie et al., 1999; Herzner et al., 2013; Herzner and Strohm, 2007; Joop et al., 2014; Mueller et al., 2005; Vander Wall, 1990). A microbial control function of poison acidified crops in formicine ants to sanitize ingested food is supported by our survival experiments and our in vivo and in vitro bacterial growth and viability experiments. There we found that access to the poison improved survival of formicine ants after feeding on pathogen contaminated food. We also found that pathogenic and opportunistic bacteria were quickly inhibited in the crop when ingested with food and could not establish in the midgut. Although our data suggests that this is likely due to the sensitivity of these bacteria to acidic environments, our evidence for this is only indirect. At present it is unclear whether the acidic environment in the crop is sufficient to protect formicine ants and to inhibit pathogenic and opportunistic microbes ingested with food or whether acidic conditions act in concert with other factors. Studies in vertebrates and the fruit fly Drosophila melanogaster have shown that acidic gut regions together with immune system effectors serve microbial control and prevent infection by oral pathogens (Giannella et al., 1972; Howden and Hunt, 1987; Martinsen et al., 2005; Overend et al., 2016; Rakoff-Nahoum et al., 2004; Slack et al., 2009; Tennant et al., 2008; Watnick and Jugder, 2020). Concordantly, previous studies investigating formicine ant trophallactic fluids Hamilton et al., 2011; LeBoeuf et al., 2016 found the presence of proteins related to cathepsin D, a lysosomal aspartic protease that can exhibit antibacterial effector activity and the proteolytic production of antimicrobial peptides (Ning et al., 2018). Future studies will therefore need to disentangle the relative contributions of crop acidity and immune system effectors released into the gut lumen to the improved survival of formicine ants in the face of pathogen contaminated food and to the microbe inhibitory action of poison acidified crops in formicine ants.

In addition to improving their own survival, the ability of donor ants to access their poison also improved the survival of receiver ants without access to their poison following trophallactic exchange of pathogen-contaminated food. Acidic crop lumens might therefore act as a barrier to disease spread in formicine ant societies, alleviating the cost of sharing pathogen contaminated food (Onchuru et al., 2018; Salem et al., 2015) and counteracting the generally increased risk of pathogen exposure and transmission associated with group-living (Alexander, 1974; Boomsma et al., 2005; Kappeler et al., 2015). Although food distribution via trophallaxis is a dynamic process governed by many different factors (Buffin et al., 2009; Buffin et al., 2011; Greenwald et al., 2015; Sendova-Franks et al., 2010), the technological advances in recent years to track multiple individuals of a group simultaneously over time (Gernat et al., 2018; Greenwald et al., 2015; Imirzian et al., 2019; Stroeymeyt et al., 2018), will make it possible to clarify the contribution of acidic crop lumens to disease spread prevention in formicine ant societies.

Acidic crop lumens might not only serve microbial control but might also act as a chemical filter for microbes, working selectively against pathogenic or opportunistic bacteria but allowing entry and establishment of species from the bacteria family Acetobacteraceae. We found that, compared to a bacterial pathogen, a bacterial member of the Acetobacteraceae was not only better able to withstand acidic conditions created with formic acid in vitro but was able to establish itself in the midgut of formicine ants in vivo. This suggests that host filtering of microbes (Mazel et al., 2018) via acidic crop lumens might explain at least part of the recurrent presence of Acetobacteraceae in the gut of formicine ants and the otherwise reduced microbial diversity and abundance of gut-associated microbes in formicine ants (Brown and Wernegreen, 2016; Brown and Wernegreen, 2019; Chua et al., 2018; Chua et al., 2020; Ivens et al., 2018; Russell et al., 2017).

Though not formally established (see Mushegian and Ebert, 2016), recent studies indicate a mutualistic relationship between formicine ants, and their gut-associated Acetobacteraceae (Brown and Wernegreen, 2019; Chua et al., 2020). Thus, the creation of an acidic crop environment in formicine ants that is easier to endure if colonizing microbes are mutualists agrees with the concept of screening as a mechanism to choose microbial partners out of a pool of environmental microbes (Archetti et al., 2011; Archetti et al., 2011; Biedermann and Kaltenpoth, 2014; Scheuring and Yu, 2012). Contrary to signalling, where costly information is displayed to partners, in screening a costly environment is imposed on partners that excludes all but high-quality ones. Partner choice in a number of cross-kingdom mutualisms is readily explained by screening (see examples in Archetti et al., 2011; Archetti et al., 2011; Biedermann and Kaltenpoth, 2014; Scheuring and Yu, 2012) but experimental evidence is so far limited in insect-microbe associations (Innocent et al., 2018; Itoh et al., 2019; Ranger et al., 2018). Although our experiments can only hint at screening as a means of partner choice in formicine ants, the results of our study would provide support for the prediction that screening is more likely to evolve from a host’s defense trait against parasites (Archetti et al., 2011; Archetti et al., 2011), that is, the highly acidic, antimicrobial poison that creates a selective environment for microbes. Our study might therefore not only provide evidence that the well-established cross talk between the immune system and gut-associated microbes in vertebrates and invertebrates (Chu and Mazmanian, 2013; Rakoff-Nahoum et al., 2004; Slack et al., 2009; Watnick and Jugder, 2020; Xiao et al., 2019) can hold for a broader range of immune defense traits (sensu Otti et al., 2014) but also that this cross talk can be realized through signals (Fischbach and Segre, 2016; Moura-Alves et al., 2019; Villena et al., 2018) and through screening.

Overall, our study provides evidence that poison acidified crop lumens of formicine ants can act as a chemical filter for control and selection of microbes ingested with food. Poison acidified formicine crops might thus contribute to the ecological and evolutionary success of this group of insects by alleviating the increased risk of pathogen exposure and transmission associated with group living but allowing the acquisition and transmission of microbial mutualists. Similar microbial filters likely represent a widespread theme to manage harmful and beneficial host-associated microbes but have so far only partly been uncovered in a few animal systems (Cardoza et al., 2006; Duarte et al., 2018; Sapountzis et al., 2019; Scott et al., 2008; Shukla et al., 2018; Shukla et al., 2018; Vogel et al., 2017).

## Materials and methods

Key resources table
Reagent type (species) or resource | Designation | Source or reference | Identifiers | Additional information
--- | --- | --- | --- | ---
Biological sample (Camponotus floridanus) | Camponotus floridanus | other |  | See Materials and methods
Biological sample (Camponotus maculatus) | Camponotus maculatus | other |  | See Materials and methods
Biological sample (Lasius fuliginosus) | Lasius fuliginosus | other |  | See Materials and methods
Biological sample (Formica cinerea) | Formica cinerea | other |  | See Materials and methods
Biological sample (Formica cunicularia) | Formica cunicularia | other |  | See Materials and methods
Biological sample (Formica fuscocinerea) | Formica fuscocinerea | other |  | See Materials and methods
Biological sample (Formica pratensis) | Formica pratensis | other |  | See Materials and methods
Biological sample (Formica rufibarbis) | Formica rufibarbis | other |  | See Materials and methods
Strain, strain background (Serratia marcescens) | Serratia marcescens | Strain DSM12481, DSMZ-German Collection of Microorganisms and Cell Cultures GmbH, Braunschweig, Germany |  |
Strain, strain background (Escherichia coli) | Escherichia coli | Strain DSM6897, DSMZ-German Collection of Microorganisms and Cell Cultures GmbH, Braunschweig, Germany |  |
Strain, strain background (Asaia sp.) | Asaia sp. | Strain SF2.1 Favia et al., 2007 |  |
Other | Blaubrand intraMARK micro pipettes | Brand, Wertheim, Germany | 708707 |
Other | pH sensitive paper | Hartenstein, Würzburg, Germany | PHIP |
Other | pH electrode | Unisense, Aarhus, Denmark |  |
Other | Polymethylmethacrylate |  |  | University of Bayreuth, Animal Ecology I, group microplastic
Other | Leica microscope DM 2000 LED | Leica, Wetzlar, Germany |  |
Other | Leica stereomicroscope M 165 C | Leica, Wetzlar, Germany |  |
Other | Commercial honey | Different brands |  | 10% (w/v), 1:1 honey:water
Other | superglue | UHU brand |  |
Chemical compound, drug | ≥95% Formic acid | Sigmaaldrich, Merck, Darmstadt, Germany | Cat# F0507 |
Chemical compound, drug | Trypton | Sigmaaldrich, Merck, Darmstadt, Germany | Cat# T7293-250G |
Chemical compound, drug | Yeast extract | Millipore, Merck, Darmstadt, Germany | Cat# Y1625-250G |
Software, algorithm | R version 3. 6.1 |  |  | R Development Core Team, 2019

### Ant species and maintenance

Colonies of the carpenter ant Camponotus floridanus were collected in 2001 and 2003 in Florida, USA, housed in Fluon (Whitford GmbH, Diez, Germany) coated plastic containers with plaster ground and maintained at a constant temperature of 25°C with 70% humidity and a 12 hr/12 hr light/dark cycle. They were given water ad libitum and were fed two times per week with honey water (1:1 tap water and commercial quality honey), cockroaches (Blaptica dubia) and an artificial diet (Bhatkar and Whitcomb, 1970). For comparison, workers of one other Camponotus species (Camponotus maculatus), collected close to Kibale Forest, Uganda, in 2003 and housed under identical conditions as Camponotus floridanus were used. Additionally, six other formicine ant species, one Lasius, and five Formica species (Lasius fuliginosus, Formica cinerea, Formica cunicularia, Formica fuscocinerea, Formica pratensis, and Formica rufibarbis) were collected in Bayreuth, Germany in 2012 and 2018 and kept for approximately 2 weeks prior experimental use at 20°C, 70% humidity and a 14 hr/10 hr light/dark cycle. Except otherwise noted only the small worker caste (‘minors’) of Camponotus species was used.

### Acidity of the crop lumen and pH measurements

To determine whether formicine ants swallow their poison after feeding, we tracked changes in pH-levels of the crop lumen in C. floridanus ants over time. Before use in experimental settings, cohorts of ~100 ants were taken out of their natal colony (n = 6 colonies) into small plastic containers lined with Fluon and starved for 24–48 hr. Thereafter, ants were put singly into small petri dishes (Ø 55 mm) with damp filter paper covered bottom, given access to a droplet of 10% honey water (w/v) for 2 hr before removing the food source and measuring the pH of the crop lumen after another 2 hr (group 0+4 hr: n = 60 workers), after 24 hr (group 0+24 hr: n = 59 workers) or 48 hr (group 0+48 hr: n = 52 workers). To assess the effect of renewed feeding, a separate group of C. floridanus ants were given access to 10% honey water 48 hr after the first feeding for 2 hr prior to measuring the pH of their crop lumen after another 2 hr (group 48h+4 hr: n = 60 workers). To measure the pH, ants were first cold anesthetized on ice, then their gaster was cut off with a fine dissection scissor directly behind the petiole and leaking crop content (1–3 µL) collected with a capillary (5 µL Disposable Micro Pipettes, Blaubrand intraMARK, Brand, Wertheim). The collected crop content was then emptied on a pH sensitive paper to assess the pH (Hartenstein, Unitest pH 1–11). This method of collecting crop content will invariably result in some mixing of crop lumen content with haemolymph. As the pH of the insect haemolymph ranges from only slightly acidic (pH ≥6.5) to near-neutral or slightly alkaline (pH ≤8.2) (Harrison, 2001; Matthews et al., 2017), this might have biased the results of our pH measurements to slightly higher pH values. As a reference point for food pH, we also measured the pH of 10% honey water on pH sensitive paper, which gave invariably pH = 5.

In addition, we measured the pH in the crop lumen and at four points in the lumen along the midgut (1st measurement directly behind proventriculus to 4th measurement one mm apical from insertion point of the Malpighian tubules) of C. floridanus workers that were fed 24 hr prior to measurements with 10% honey-water. For these measurements worker guts were dissected as a whole and pH was measured in the crop (n = 2 workers from two colonies) and along the midgut (all midgut points n = 10, except point four with n = 9 workers from four different colonies) with a needle-shaped microelectrode (UNISENSE pH-meter; microelectrode with needle tip of 20 µm diameter).

In formicine ants, oral uptake of the poison into the mouth is performed via acidopore grooming (Tragust et al., 2013). During this behavior ants bend their gaster forward between the legs and the head down to meet the acidopore, the opening of the poison gland, at the gaster tip (Basibuyuk and Quicke, 1999; Farish, 1972). In an additional experiment we therefore compared the crop lumen pH of C. floridanus workers from four different colonies that were either prevented to reach their acidopore (FA- ants) or could reach their acidopore freely (FA+ ants). To do this, we again allowed single ants access to 10% honey water for 2 hr after a starvation period, before cold anesthetizing them briefly on ice and immobilizing FA- ants (n = 22 workers) in a pipetting tip, while FA+ ants (n = 23 workers) remained un-manipulated. After 24 hr we measured the pH of the crop lumen as before.

To investigate whether swallowing of the acidic poison is widespread among formicine ants, the latter experiment was repeated for six additional formicine ant species (FA- ants: n = 10 workers except for Formica pratensis with n = 21; FA+ ants: n = 10 workers except for Formica pratensis with n = 20; all ants: n = 1 colony) in the same fashion as described before with the exception that apart from Formica pratensis the crop lumen was collected through the mouth by gently pressing the ants’ gaster. Crop lumen of Formica pratensis ants was collected in the same fashion as crop lumen of C. floridanus ants.

To investigate whether the type of fluid and its nutritional value have an influence on the frequency of acidopore grooming in C. floridanus, the following experiment was performed. Cohorts of ~100 ants were taken out of their natal colony (n = 6 colonies) into small plastic containers and starved for 24–48 hr. Thereafter, ants were again put singly into small petri dishes (Ø 55 mm) and given access to either a 3 µL droplet of 10% honey water (w/v, n = 126 ants, treatment: honey-water fed), a 3 µL droplet of tap water (n = 128, water-fed) or to no fluid (n = 125, unfed). After acclimatization (unfed ants) or after swallowing of the fluid (honey-water and water-fed ants, both 1–2 min.), all ants were filmed for the next 30 min. (Logitech webcam c910). These videos were then analyzed for the frequency of acidopore grooming.

Finally, we measured the pH in the crop lumen of C. floridanus ants (n = 3 colonies) under satiated and starved conditions to estimate a baseline level of acidity in the crop. For this, ants taken out of satiated, twice per week fed colonies on the day of feeding were compared to ants that were maintained in cohorts of ~100 individuals for 3 d with access to 10% honey-water and then starved for 24 hr before measuring the pH in their crop (n = 10 major and 10 minor workers per colony and condition). The pH in the crop lumen was measured as described before by briefly cold anesthetizing ants an ice, collecting the crop content through the mouth by gently pressing the ants’ gaster and then emptying it on a pH sensitive paper (Hartenstein, Unitest pH 1–11).

### Bacterial strains and culture

As model entomopathogenic bacterium Serratia marcescens DSM12481 (DSMZ Braunschweig, Germany) was used. This bacterium is pathogenic in a range of insects (Grimont et al., 2006) and has been detected in formicine ants, that is Anoplolepis gracilipes (Cooling et al., 2018) and Camponotus floridanus (Ratzka et al., 2011). While often non-lethal within the digestive tract, S. marcescens can cross the insect gut wall (Mirabito and Rosengaus, 2016; Nehme et al., 2007) and is highly virulent upon entry into the hemocoel (Flyg et al., 1980), not least due to the production of bacterial toxins (Hertle, 2005). As a model bacterial gut-associate of ants Asaia sp. strain SF2.1 (Favia et al., 2007), was used. Asaia sp. belongs to the family Acetobacteraceae, members of which often thrive in sugar-rich environments (Mamlouk and Gullo, 2013), such as honeydew that ants like C. floridanus predominantly feed on. Asaia sp. is capable of cross-colonizing insects of phylogenetically distant genera and orders (Crotti et al., 2009; Favia et al., 2007) and can be a component of the gut-associated microbial community of formicine and other ants (Chua et al., 2018; Kautz et al., 2013; Kautz et al., 2013). In addition to S. marcescens and Asaia sp., Escherichia coli DSM6897 (DSMZ Braunschweig, Germany) was used as a model opportunistic bacterium that is not a gut-associate of insects. E. coli bacteria are a principal constituent of mammalian gut-associated microbial communities but are commonly also found in the environment (Blount, 2015).

Bacterial stocks of S. marcescens, Asaia sp., and E. coli were kept in 25% glycerol at −80°C until use. For use, bacteria were plated on agar plates (LB-medium: 10 g tryptone, 5 g yeast extract, 20 g agar in 1L MilliQ-water, and GLY-medium: 25 g gycerol, 10 g yeast extract, 20 g agar in 1L MilliQ-water with pH adjusted to 5.0, for S. marcescens/E. coli and Asaia sp. respectively), single colony forming units (CFUs) were picked after 24 hr (S. marcescens/E. coli) or 48 hr (Asaia sp.) of growth at 30°C and transferred to 5 ml liquid medium (LB-medium and GLY-medium minus agar for S. marcescens/E. coli and Asaia sp. respectively) for an overnight culture (24 hr) at 30°C. The overnight culture was then pelleted by centrifugation at 3000 g, the medium discarded and resolved in 10% (w/v) honey water to the respective working concentration for the experiments. The concentration of a typical overnight culture was determined for S. marcescens and Asaia sp. by plating part of the overnight culture on agar plates and counting CFUs after 24 hr or 48 hr of growth at 30°C, for S. marcescens and Asaia sp. respectively. This yielded a concentration of 1.865 * 109 ± 5.63 * 107 (mean ± sd) bacteria per mL for S. marcescens and 5.13 * 108 ± 8.48 * 106 (mean ± sd) bacteria for Asaia sp.

### Survival experiments

In a first survival experiment we tested whether the ability to perform acidopore grooming within the first 24 hr after ingestion of pathogen contaminated food provides a survival benefit for individual C. floridanus ants. Ants from eight colonies were starved for 24–48 hr before start of the experiment, as described before, and then workers put singly in small petri dishes were either given access to 5 µL of S. marcescens contaminated 10% honey water (9.33 * 109 bacteria/mL; Serratia+ ants: n = 127) or uncontaminated 10% honey water (Serratia- ants: n = 135) for 2 min. Afterward, all ants were cold anaesthetized and approximately half of the Serratia+ and the Serratia- ants (n = 65 and n = 69, respectively) immobilized in a pipetting tip, thus preventing acidopore grooming (FA- ants: n = 134) while the other half remained fully mobile (FA+ ants: n = 128). After 24 hr, FA- ants were freed from the pipetting tip to minimize stress. Mortality of the ants was monitored over 5 d (120 hr) every 12 hr providing no additional food, except the one time feeding of 5 µL contaminated or uncontaminated honey water at the start of the experiment. We chose to provide no additional food after the one time feeding at the beginning of the experiment, as an altered feeding behavior, that is, illness induced anorexia with known positive or negative effects on survival (Hite et al., 2020), might otherwise have influenced our results.

In an additional survival experiment, we investigated whether the ability to acidify the crop lumen has the potential to limit oral disease transmission during trophallactic food transfer. To this end, C. floridanus ants from seven colonies were again starved, divided randomly in two groups (donor and receiver ants, each n = 322) and their gaster marked with one of two colors (Edding 751). Additionally, to prevent uptake of the poison, the acidopore opening of all receiver ants (receiver FA-) and half of the donor ants (donor FA-) was sealed with superglue, while the other half of the donor ants were sham treated (donor FA+) with a droplet of superglue on their gaster (Tragust et al., 2013). We then paired these ants into two different donor-receiver ant pairs. Pairs with both donor and receiver ants having their acidopore sealed (donor FA- | receiver FA-) and pairs with only receiver ants having their acidopore sealed (donor FA+ | receiver FA-). Six hours after pairing, donor ants from both pairs were isolated and given access to 5 µl of S. marcescens contaminated 10% honey water (1.865 * 109 bacteria/mL) for 12 hr. Thereafter donor ants were again paired with the respective receiver ants for 12 hr and all pairs filmed for the first 30 min (Logitech webcam c910). These videos were then analyzed for the duration of trophallaxis events donor-receiver ant pairs engaged in during the first bout of trophallactic food exchange. After this first feeding round, donor ants were fed in the same fashion, that is, isolation for 12 hr with access to S. marcescens contaminated 10% honey water, every 48 hr, while they were maintained with the respective receiver ants for the rest of the time. This experimental design ensured that receiver ants were fed only through the respective donor ants with pathogen contaminated food. Survival of both, donor and receiver ants, was monitored daily for a total of 12 d.

### Bacterial viability and growth assays

We tested the ability of S. marcescens and Asaia sp. to withstand acidic environments in vitro, as well as their ability and the ability of E. coli to pass from the crop to the midgut in vivo when ingested together with food. In ants, gut morphological structures, that is, the infrabuccal pocket, an invagination of the hypopharynx in the oral cavity (Eisner and Happ, 1962), and the proventriculus, a valve that mechanically restricts passage of fluids from the crop to the midgut (Eisner and Wilson, 1952), consecutively filter solid particles down to 2 µm (Lanan et al., 2016) which would allow S. marcescens (Ø: 0.5–0.8 µm, length: 0.9–2 µm, Grimont et al., 2006), Asaia sp. (Ø: 0.4–1 µm, length: 0.8–2.5 µm, Komagata et al., 2014), and E. coli (length: 1 µm, width: 0.35 µm, Blount, 2015) to pass. For the in vitro tests we incubated a diluted bacterial overnight culture (105 and 104 CFU/ml for S. marcescens and Asaia sp., respectively) in 10% honey water (pH = 5) and in 10% honey water acidified with commercial formic acid to a pH of 4, 3, or 2 for 2 hr at room temperature (S. marcescens: n = 15 for all pH-levels, except pH = 4 with n = 13; Asaia sp.: n = 10). Then we plated 100 µl of the bacterial solutions on agar-medium (LB-medium and GLY-medium for S. marcescens and Asaia sp., respectively) and incubated them at 30°C for 24 hr (S. marcescens) or 48 hr (Asaia sp.) before counting the number of formed CFUs. For the in vivo tests C. floridanus ants from five (Asaia sp.), four (E. coli) or from six colonies (S. marcescens) were starved as before and then individually given access to 5 µL of bacteria contaminated 10% honey water (Asaia sp. and E. coli: 1 * 107 CFU/mL, S. marcescens: 1 * 106 CFU/mL) for 2 min. To assess the number of CFUs in the digestive tract, that is the crop and the midgut, ants were dissected either directly after feeding (0 hr; S. marcescens: n = 60 workers; Asaia sp. and E. coli: n = 15 each), or at 0.5 hr (S. marcescens: n = 60; Asaia sp. and E. coli: n = 15 each), 4 hr (S. marcescens: n = 60; Asaia sp. and E. coli: n = 15 each), 24 hr (S. marcescens: n = 53; Asaia sp. and E. coli: n = 15 each) or 48 hr (S. marcescens: n = 19; Asaia sp. and E. coli: n = 15 each) after feeding. For dissection, ants were cold anesthetized, the gaster opened and the whole gut detached. The crop and the midgut were then separated from the digestive tract, placed in a reaction tube, mechanically crushed with a sterile pestle and dissolved in 100 µL (Asaia sp. and E. coli) or 150 µL (S. marcescens) phosphate buffered saline (PBS-buffer: 8.74 g NaCl, 1.78 g Na2HPO4,2H2O in 1L MilliQ-water adjusted to a pH of 6.5). The resulting solutions were then thoroughly mixed, 100 µl streaked on agar-medium (LB-medium and GLY-medium for S. marcescens/E.coli and Asaia sp., respectively) and incubated at 30°C for 24 hr (S. marcescens and E. coli) or 48 hr (Asaia sp.), before counting the number of formed CFUs. No other bacteria (e.g. resident microbes) were apparent in terms of a different CFU morphology on the agar plates which agrees with the very low number of cultivable resident bacteria present in the midgut of C. floridanus (Stoll and Gross, unpublished results). This methodology cannot completely exclude that resident S. marcescens or species of Acetobacteraceae might have biased our count data by adding a background level of CFUs at all timepoints or by adding random outlier CFUs at specific timepoints. Both, background level CFU numbers and random outlier CFUs should however not influence observed patterns over time. The timepoints of 0 hr, 0.5 hr, 4 hr, 24 hr, and 48 hr in in vivo bacterial growth assays were chosen according to literature describing passage of food from the crop to the midgut within 3–6 hr after food consumption in ants (Cannon, 1998; Kloft, 1960; Kloft, 1960; Howard and Tschinkel, 1981; Markin, 1970). They should thus be representative of two time points before food passage from the crop to the midgut (0.5 hr and 4 hr) and two time points after food passage from the crop to the midgut (24 hr and 48 hr) together with the reference timepoint (0 hr).

### Food passage experiment

To estimate food passage from the crop to the midgut and hindgut of C. floridanus after feeding we performed the following experiment. We again took a cohort of ~100 workers out of one natal colony of C. floridanus, starved them for 24 hr and then offered them 200 µL of a 1:1 honey-water mix with 50 mg of polymethylmethacrylate (PMMA, aka acrylic glass) particles (size ≤40 µm). Afterward, we dissected the digestive tract of three major and three minor workers at each of the timepoints 2 hr, 4 hr, 6 hr, 8 hr, 12 hr, 14 hr, 16 hr, 18 hr, 24 hr, and 48 hr after feeding and placed each under a microscope (Leica DM 2000 LED) to detect and count the number of particles via fluorescence in the crop, the midgut, and the hindgut.

### Statistical analyses

All statistical analyses were performed with the R statistical programming language (version 3.6.1, R Development Core Team, 2019). All (zero-inflated) General(ized) linear and mixed models and Cox mixed-effects models were compared to null (intercept only) or reduced models (for those with multiple predictors) using Likelihood Ratio (LR) tests to assess the significance of predictors. Pairwise comparisons between factor levels of a significant predictor were performed using pairwise post-hoc tests adjusting the family-wise error rate according to the method of Westfall (package ‘multcomp’, Bretz et al., 2011). We checked necessary model assumptions of (zero-inflated) General(ised) linear and mixed models using model diagnostic tests and plots implemented in the package ‘DHARMa’ (Hartig, 2019). Acidity of the crop lumen (log transformed pH to normalize data) and midgut lumen in C. floridanus was analyzed using linear mixed models (LMM, package”lme4’, Bates et al., 2015) including time since feeding (four levels: 0+4 hr, 0+24 hr, 0+48 hr, 48h+4 hr; Figure 1a), ant manipulation (two levels: FA+ and FA-, that is ants with and without acidopore access; Figure 1b) or digestive tract part (four levels: crop, midgut position 1, midgut position 2, midgut position 3, midgut position 4; Figure 1—figure supplement 1) as predictors and natal colony as a random effect. Due to non-normality and heteroscedasticity, the acidity of the crop lumen in the seven formicine ant species other than C. floridanus (Figure 1c) was analysed using per species Wilcoxon rank-sum tests with ant manipulation (FA+ and FA-) as predictor. The frequency of acidopore grooming in C. floridanus upon feeding different types of fluids was analyzed using Generalized linear mixed models (GLMM, package”lme4’, Bates et al., 2015) with negative binomial errors and type of fluid (three levels: unfed, water-fed, or 10% honey water fed) as predictor and natal colony as random effect (Figure 1—figure supplement 2).

Survival data were analysed with Cox mixed effects models (COXME, package ‘coxme’, Therneau, 2019). For the survival of individual ants (Figure 3), ant treatment (four levels: Serratia- | FA-, Serratia- | FA+, Serratia+ | FA-, Serratia+ | FA+) was added as a predictor and the three ‘blocks’ in which the experiment was run and the colony ants originated from, were included as two random intercept effects. For the survival of donor-receiver ant pairs (Figure 4), ant treatment (four levels: donor FA+, donor FA-, receiver FA+, receiver FA-) was included as a predictor and the three ‘blocks’ in which the experiment was run, the colony ants originated from, and petri dish in which donor and receiver ants were paired, were included as three random intercept effects. Survival of receiver ants was right censored if the corresponding donor ant died at the next feeding bout (right censoring of both donor and receiver ants in one pair upon death of one of the ants yielded statistically the same result: COXME, overall LR χ2 = 60.202, df = 3, p<0.001; post-hoc comparisons: receiver FA- versus donor FA-: p=0.388, all other comparisons: p<0.001). The duration of trophallaxis events (square-root transformed to normalize data) between donor-receiver ant pairs was analysed using a linear mixed model with ant pair type (two levels: donor FA+ | receiver FA- and donor FA- | receiver FA-) as predictor and the three ‘blocks’, in which the experiment was run and the colony ants originated from as random effect (Figure 4—figure supplement 1).

Bacterial growth in vitro was analysed separately for S. marcescens and Asaia sp. using Generalized linear models (GLM) with negative binomial errors and pH as predictor, excluding pH levels with zero bacterial growth due to complete data separation (Figure 2—figure supplement 2 and Figure 5—figure supplement 1). Relative values shown in Figure 2—figure supplement 2 and Figure 5—figure supplement 1 were calculated by dividing each single number of formed CFUs at the different pH-values through the mean of formed CFUs at pH 5. Bacterial viability in vivo within the digestive tract of C. floridanus over time was analysed separately for the crop and midgut for S. marcescens and Asaia sp. (Figure 2 and Figure 5, respectively) and for E. coli (Figure 2—figure supplement 2). Zero-inflated generalized linear mixed models with negative binomial errors (package ‘glmmTMB’, Brooks et al., 2017) were used to model CFU number, with time after feeding as fixed predictor and ant colony as random effect, except for the E. coli model in the crop where colony was included as fixed factor as the model did not converge with colony as a random factor. Timepoints with zero bacterial growth were again excluded in the models. Relative CFU values shown in Figure 2, Figure 5, and Figure 2—figure supplement 2 were calculated by dividing single CFU-values through the mean of CFU-values at timepoint 0 hr in the crop. Proportions and percentages of relative CFU change in the text are based on these relative CFU values.

## References

1. 1. RD Alexander
   1974 The evolution of social behavior 5 Annual Review of Ecology and Systematics 325 383
2. 1. KE Anderson
   2. JA Russell
   3. CS Moreau
   4. S Kautz
   5. KE Sullam
   6. Y Hu
   7. U Basinger
   8. BM Mott
   9. N Buck
   10. DE Wheeler
   2012 Highly similar microbial communities are shared among related and trophically similar ant species 21 Molecular Ecology 2282 2296
3. 1. M Archetti
   2. I Scheuring
   3. M Hoffman
   4. ME Frederickson
   5. NE Pierce
   6. DW Yu
   2011 Economic game theory for mutualism and cooperation 14 Ecology Letters 1300 1312
4. 1. M Archetti
   2. F Ubeda
   3. D Fudenberg
   4. J Green
   5. NE Pierce
   6. DW Yu
   2011 Let the right one in: a microeconomic approach to partner choice in mutualisms 177 The American Naturalist 75 85
5. 1. HH Basibuyuk
   2. DLJ Quicke
   1999 Grooming behaviours in the hymenoptera (Insecta): potential phylogenetic significance 125 Zoological Journal of the Linnean Society 349 382
6. 1. D Bates
   2. M Maechler
   3. B Bolker
   4. S Walker
   2015 Fitting linear mixed-effects models using lme4 67 Journal of Statistical Software 1 48
7. 1. DE Beasley
   2. AM Koltz
   3. JE Lambert
   4. N Fierer
   5. RR Dunn
   2015 The evolution of stomach acidity and its relevance to the human microbiome 10 PLOS ONE
8. 1. A Bhatkar
   2. WH Whitcomb
   1970 Artificial diet for rearing various species of ants 53 The Florida Entomologist 229 232
9. 1. PH Biedermann
   2. M Kaltenpoth
   2014 New synthesis: the chemistry of partner choice in insect-microbe mutualisms 40 Journal of Chemical Ecology
10. 1. ZD Blount
    2015 The unexhausted potential of E. coli 4 eLife
11. 1. MS Blum
    1996 Semiochemical parsimony in the arthropoda 41 Annual Review of Entomology 353 374
12. 1. JE Blum
    2. CN Fischer
    3. J Miles
    4. J Handelsman
    2013 Frequent replenishment sustains the beneficial microbiome of Drosophila melanogaster 4 mBio
13. 1. JJ Boomsma
    2. P Schmid-Hempel
    3. WOH Hughes
    4. M. H. G Fellowes
    5. J Rolff
    2005 Life histories and parasite pressure across the major groups of social insects Insect Evolutionary Ecology 1345 1346 CABI
14. 1. F Bretz
    2. T Hothorn
    3. P Westfall
    2011 Multiple Comparisons Using R CRC Press
15. 1. P Brinker
    2. MC Fontaine
    3. LW Beukeboom
    4. J Falcao Salles
    2019 Host, symbionts, and the microbiome: the missing tripartite interaction 27 Trends in Microbiology 480 488
16. 1. NA Broderick
    2. B Lemaitre
    2012 Gut-associated microbes of Drosophila melanogaster 3 Gut Microbes 307 321
17. 1. ME Brooks
    2. K Kristensen
    3. KJ Benthem
    4. A Magnusson
    5. CW Berg
    6. A Nielsen
    7. HJ Skaug
    8. M Mächler
    9. BM Bolker
    2017 glmmTMB balances speed and flexibility among packages for Zero-inflated generalized linear mixed modeling 9 The R Journal
18. 1. BP Brown
    2. JJ Wernegreen
    2016 Deep divergence and rapid evolutionary rates in gut-associated Acetobacteraceae of ants 16 BMC Microbiology
19. 1. BP Brown
    2. JJ Wernegreen
    2019 Genomic erosion and extensive horizontal gene transfer in gut-associated Acetobacteraceae 20 BMC Genomics
20. 1. A Brune
    2. C Dietrich
    2015 The gut Microbiota of termites: digesting the diversity in the light of ecology and evolution 69 Annual Review of Microbiology 145 166
21. 1. T Brütsch
    2. G Jaffuel
    3. A Vallat
    4. TC Turlings
    5. M Chapuisat
    2017 Wood ants produce a potent antimicrobial agent by applying formic acid on tree-collected resin 7 Ecology and Evolution 2249 2254
22. 1. A Buffin
    2. D Denis
    3. G Van Simaeys
    4. S Goldman
    5. JL Deneubourg
    2009 Feeding and stocking up: radio-labelled food reveals exchange patterns in ants 4 PLOS ONE
23. 1. A Buffin
    2. A-C Mailleux
    3. C Detrain
    4. JL Deneubourg
    2011 Trophallaxis in Lasius Niger: a variable frequency and constant duration for three food types 58 Insectes Sociaux 177 183
24. 1. DE Burkepile
    2. JD Parker
    3. CB Woodson
    4. HJ Mills
    5. J Kubanek
    6. PA Sobecky
    7. ME Hay
    2006 Chemically mediated competition between microbes and animals: microbes as consumers in food webs 87 Ecology 2821 2831
25. 1. CA Cannon
    1998 Nutritional ecology of the carpenter ant Camponotus pennsylvanicus (De Geer): macronutrient preference and particle consumption Doctor Thesis of Philosophy in Entomology
26. 1. YJ Cardoza
    2. KD Klepzig
    3. KF Raffa
    2006 Bacteria in oral secretions of an endophytic insect inhibit antagonistic fungi 31 Ecological Entomology 636 645
27. 1. NR Casewell
    2. W Wüster
    3. FJ Vonk
    4. RA Harrison
    5. BG Fry
    2013 Complex cocktails: the evolutionary novelty of venoms 28 Trends in Ecology & Evolution 219 229
28. 1. RF Chapman
    2013 The Insects: Structure and Function Cambridge University Press
29. 1. CA Cherrington
    2. M Hinton
    3. GC Mead
    4. I Chopra
    1991 Organic acids: chemistry, antibacterial activity and practical applications 32 Advances in Microbial Physiology 87 108
30. 1. H Chu
    2. SK Mazmanian
    2013 Innate immune recognition of the Microbiota promotes host-microbial symbiosis 14 Nature Immunology 668 675
31. 1. K-O Chua
    2. S-L Song
    3. H-S Yong
    4. W-S See-Too
    5. W-F Yin
    6. K-G Chan
    2018 Microbial community composition reveals spatial variation and distinctive core microbiome of the weaver ant Oecophylla smaragdina in Malaysia 8 Scientific Reports
32. 1. K-O Chua
    2. W-S See-too
    3. J-Y Tan
    4. S-L Song
    5. H-S Yong
    6. W-F Yin
    7. K-G Chan
    2020 Oecophyllibacter saccharovorans gen. nov. sp. nov. a bacterial symbiont of the weaver ant Oecophylla smaragdina with a plasmid-borne sole rrn operon bioRxiv
33. 1. MD Cooling
    2. BD Hoffmann
    3. MAM Gruber
    4. PJ Lester
    2018 Indirect evidence of pathogen-associated altered oocyte production in queens of the invasive yellow crazy ant, Anoplolepis gracilipes, in Arnhem Land, Australia 108 Bulletin of Entomological Research 451 460
34. 1. E Crotti
    2. C Damiani
    3. M Pajoro
    4. E Gonella
    5. A Rizzi
    6. I Ricci
    7. I Negri
    8. P Scuppa
    9. P Rossi
    10. P Ballarini
    11. N Raddadi
    12. M Marzorati
    13. L Sacchi
    14. E Clementi
    15. M Genchi
    16. M Mandrioli
    17. C Bandi
    18. G Favia
    19. A Alma
    20. D Daffonchio
    2009 Asaia, a versatile acetic acid bacterial symbiont, capable of cross-colonizing insects of phylogenetically distant genera and orders 11 Environmental Microbiology 3252 3264
35. 1. CR Currie
    2. JA Scott
    3. RC Summerbell
    4. D Malloch
    1999 Fungus-growing ants use antibiotic-producing Bacteria to control garden parasites 398 Nature 701 704
36. 1. LA David
    2. CF Maurice
    3. RN Carmody
    4. DB Gootenberg
    5. JE Button
    6. BE Wolfe
    7. AV Ling
    8. AS Devlin
    9. Y Varma
    10. MA Fischbach
    11. SB Biddinger
    12. RJ Dutton
    13. PJ Turnbaugh
    2014 Diet rapidly and reproducibly alters the human gut microbiome 505 Nature 559 563
37. 1. PH Degnan
    2. AB Lazarus
    3. CD Brock
    4. JJ Wernegreen
    2004 Host-symbiont stability and fast evolutionary rates in an ant-bacterium association: cospeciation of Camponotus species and their endosymbionts, candidatus blochmannia 53 Systematic Biology 95 110
38. 1. AL Demain
    2. A Fang
    3. A Fiechter
    2000 The Natural Functions of Secondary Metabolites History of Modern Biotechnology I 1 39 Springer
39. 1. A Duarte
    2. M Welch
    3. C Swannack
    4. J Wagner
    5. RM Kilner
    2018 Strategies for managing rival bacterial communities: lessons from burying beetles 87 Journal of Animal Ecology 414 427
40. 1. T Eisner
    2. GM Happ
    1962 The infrabuccal pocket of a formicine ant: a social filtration device 69 Psyche: A Journal of Entomology 107 116
41. 1. T Eisner
    2. EO Wilson
    1952 The morphology of the proventriculus of a formicine ant 59 Psyche: A Journal of Entomology 47 60
42. 1. P Engel
    2. NA Moran
    2013 The gut Microbiota of insects - diversity in structure and function 37 FEMS Microbiology Reviews 699 735
43. 1. DJ Farish
    1972 The evolutionary implications of qualitative variation in the grooming behaviour of the hymenoptera (Insecta)20 Animal Behaviour 662 676
44. 1. G Favia
    2. I Ricci
    3. C Damiani
    4. N Raddadi
    5. E Crotti
    6. M Marzorati
    7. A Rizzi
    8. R Urso
    9. L Brusetti
    10. S Borin
    11. D Mora
    12. P Scuppa
    13. L Pasqualini
    14. E Clementi
    15. M Genchi
    16. S Corona
    17. I Negri
    18. G Grandi
    19. A Alma
    20. L Kramer
    21. F Esposito
    22. C Bandi
    23. L Sacchi
    24. D Daffonchio
    2007 Bacteria of the genus Asaia stably associate with anopheles stephensi, an Asian malarial mosquito vector 104 PNAS 9047 9051
45. 1. H Feldhaar
    2. J Straka
    3. M Krischke
    4. K Berthold
    5. S Stoll
    6. MJ Mueller
    7. R Gross
    2007 Nutritional upgrading for omnivorous carpenter ants by the endosymbiont Blochmannia 5 BMC Biology
46. 1. MA Fischbach
    2. JA Segre
    2016 Signaling in Host-Associated microbial communities 164 Cell 1288 1300
47. 1. C Flyg
    2. K Kenne
    3. HG Boman
    1980 Insect pathogenic properties of Serratia marcescens: phage-resistant mutants with a decreased resistance to Cecropia immunity and a decreased virulence to Drosophila 120 Microbiology 173 181
48. 1. L García-Bayona
    2. LE Comstock
    2018 Bacterial antagonism in host-associated microbial communities 361 Science
49. 1. T Gernat
    2. VD Rao
    3. M Middendorf
    4. H Dankowicz
    5. N Goldenfeld
    6. GE Robinson
    2018 Automated monitoring of behavior reveals bursty interaction patterns and rapid spreading dynamics in honeybee social networks 115 PNAS 1433 1438
50. 1. RA Giannella
    2. SA Broitman
    3. N Zamcheck
    1972 Gastric acid barrier to ingested microorganisms in man: studies in vivo and in vitro 13 Gut 251 256
51. 1. BM Glancey
    2. RK Vander Meer
    3. A Glover
    4. CS Lofgren
    5. SB Vinson
    1981 Filtration of microparticles from liquids ingested by the red imported fire antSolenopsis invicta buren 28 Insectes Sociaux 395 401
52. 1. E Greenwald
    2. E Segre
    3. O Feinerman
    2015 Ant trophallactic networks: simultaneous measurement of interaction patterns and food dissemination 5 Scientific Reports
53. 1. EE Greenwald
    2. L Baltiansky
    3. O Feinerman
    2018 Individual crop loads provide local control for collective food intake in ant colonies 7 eLife
54. 1. F Grimont
    2. PAD Grimont
    3. M Dworkin
    4. S Falkow
    5. E Rosenberg
    6. KH Schleifer
    7. E Stackebrandt
    2006 The genus Serratia The Prokaryotes 219 244 Springer
55. 1. C Hamilton
    2. BT Lejeune
    3. RB Rosengaus
    2011 Trophallaxis and prophylaxis: social immunity in the carpenter ant Camponotus pennsylvanicus 7 Biology Letters 89 92
56. 1. TJ Hammer
    2. DH Janzen
    3. W Hallwachs
    4. SP Jaffe
    5. N Fierer
    2017 Caterpillars lack a resident gut microbiome 114 PNAS 9641 9646
57. 1. JF Harrison
    2001 Insect acid-base physiology 46 Annual Review of Entomology 221 250
58. 1. F Hartig
    2019 DHARMa: Residual diagnostics for hierarchical (multi-level/mixed) regression models
59. 1. H He
    2. Y Chen
    3. Y Zhang
    4. C Wei
    2011 Bacteria associated with gut lumen of Camponotus japonicus mayr 40 Environmental Entomology 1405 1409
60. 1. SJ Hersey
    2. G Sachs
    1995 Gastric acid secretion 75 Physiological Reviews 155 189
61. 1. R Hertle
    2005 The family of Serratia type pore forming toxins 6 Current Protein & Peptide Science 313 325
62. 1. G Herzner
    2. A Schlecht
    3. V Dollhofer
    4. C Parzefall
    5. K Harrar
    6. A Kreuzer
    7. L Pilsl
    8. J Ruther
    2013 Larvae of the parasitoid wasp Ampulex compressa sanitize their host, the american cockroach, with a blend of antimicrobials 110 PNAS 1369 1374
63. 1. G Herzner
    2. E Strohm
    2007 Fighting fungi with physics: food wrapping by a solitary wasp prevents water condensation 17 Current Biology
64. 1. IN Hirshfield
    2. S Terzulli
    3. C O'Byrne
    2003 Weak organic acids: a panoply of effects on Bacteria 86 Science Progress 245 270
65. 1. JL Hite
    2. AC Pfenning
    3. CE Cressler
    2020 Starving the enemy? feeding behavior shapes Host-Parasite interactions 35 Trends in Ecology & Evolution 68 80
66. 1. M Holtof
    2. C Lenaerts
    3. D Cullen
    4. J Vanden Broeck
    2019 Extracellular nutrient digestion and absorption in the insect gut 377 Cell and Tissue Research 397 414
67. 1. DF Howard
    2. WR Tschinkel
    1981 The flow of food in colonies of the fire ant, Solenopsis invicta: a multifactorial study 6 Physiological Entomology 297 306
68. 1. CW Howden
    2. RH Hunt
    1987 Relationship between gastric secretion and infection 28 Gut 96 107
69. 1. N Imirzian
    2. Y Zhang
    3. C Kurze
    4. RG Loreto
    5. DZ Chen
    6. DP Hughes
    2019 Automated tracking and analysis of ant trajectories shows variation in forager exploration 9 Scientific Reports
70. 1. T Innocent
    2. N Holmes
    3. MA Bassam
    4. I Scheuring
    5. B Wilkinson
    6. MI Hutchings
    7. JJ Boomsma
    8. DW Yu
    2018 Experimental demonstration that screening can enable the environmental recruitment of a defensive microbiome bioRxiv
71. 1. H Itoh
    2. S Jang
    3. K Takeshita
    4. T Ohbayashi
    5. N Ohnishi
    6. XY Meng
    7. Y Mitani
    8. Y Kikuchi
    2019 Host-symbiont specificity determined by microbe-microbe competition in an insect gut 116 PNAS 22673 22682
72. 1. ABF Ivens
    2. A Gadau
    3. ET Kiers
    4. DJC Kronauer
    2018 Can social partnerships influence the microbiome? insights from ant farmers and their trophobiont mutualists 27 Molecular Ecology 1898 1914
73. 1. DH Janzen
    1977 Why fruits rot, seeds mold, and meat spoils 111 The American Naturalist 691 713
74. 1. G Joop
    2. O Roth
    3. P Schmid-Hempel
    4. J Kurtz
    2014 Experimental evolution of external immune defences in the red flour beetle 27 Journal of Evolutionary Biology 1562 1571
75. 1. PM Kappeler
    2. S Cremer
    3. CL Nunn
    2015 Sociality and health: impacts of sociality on disease susceptibility and transmission in animal and human societies 370 Philosophical Transactions of the Royal Society B: Biological Sciences
76. 1. S Kautz
    2. BER Rubin
    3. CS Moreau
    2013 Bacterial infections across the ants: frequency and prevalence of Wolbachia, spiroplasma, and Asaia 2013 Psyche; a Journal of Entomology
77. 1. S Kautz
    2. BE Rubin
    3. JA Russell
    4. CS Moreau
    2013 Surveying the microbiome of ants: comparing 454 pyrosequencing with traditional methods to uncover bacterial diversity 79 Applied and Environmental Microbiology 525 534
78. 1. W Kloft
    1960 Neuere untersuchungen über die sozialen wechselbeziehungen im ameisenvolk, durchgeführt mit Radio-Isotopen 5 Zoologische Beiträge 519 556
79. 1. W Kloft
    1960 Untersuchungen mit radioaktiven isotopen an waldameisen 5 Entomophaga 33 41
80. 1. HR Koelz
    1992 Gastric acid in vertebrates 27 Scandinavian Journal of Gastroenterology 2 6
81. 1. P Kohlmeier
    2. K Holländer
    3. J Meunier
    2016 Survival after pathogen exposure in group-living insects: don't forget the stress of social isolation!29 Journal of Evolutionary Biology 1867 1872
82. 1. K Komagata
    2. T Iino
    3. Y Yamada
    4. E Rosenberg
    5. E. F Delong
    6. S Lory
    7. E Stackebrandt
    8. F Thompson
    2014 The family Acetobacteraceae The Prokaryotes: Alphaproteobacteria and Betaproteobacteria 163 200 Springer
83. 1. A Koto
    2. D Mersch
    3. B Hollis
    4. L Keller
    2015 Social isolation causes mortality by disrupting energy homeostasis in ants 69 Behavioral Ecology and Sociobiology 583 591
84. 1. WK Kwong
    2. LA Medina
    3. H Koch
    4. KW Sing
    5. EJY Soh
    6. JS Ascher
    7. R Jaffé
    8. NA Moran
    2017 Dynamic microbiome evolution in social bees 3 Science Advances
85. 1. MC Lanan
    2. PA Rodrigues
    3. A Agellon
    4. P Jansma
    5. DE Wheeler
    2016 A bacterial filter protects and structures the gut microbiome of an insect 10 The ISME Journal 1866 1876
86. 1. AC LeBoeuf
    2. P Waridel
    3. CS Brent
    4. AN Gonçalves
    5. L Menin
    6. D Ortiz
    7. O Riba-Grognuz
    8. A Koto
    9. ZG Soares
    10. E Privman
    11. EA Miska
    12. R Benton
    13. L Keller
    2016 Oral transfer of chemical cues, growth proteins and hormones in social insects 5 eLife
87. 1. AE Little
    2. T Murakami
    3. UG Mueller
    4. CR Currie
    2006 Defending against parasites: fungus-growing ants combine specialized behaviours and microbial symbionts to protect their fungus gardens 2 Biology Letters 12 16
88. 1. LC Lopez
    2. ED Morgan
    3. JM Brand
    1993 Hexadecanol and hexadecyl formate in the venom gland of formicine ants 341 Philosophical Transactions of the Royal Society B-Biological Sciences 177 180
89. 1. P Lund
    2. A Tramonti
    3. D De Biase
    2014 Coping with low pH: molecular strategies in neutralophilic Bacteria 38 FEMS Microbiology Reviews 1091 1125
90. 1. D Mamlouk
    2. M Gullo
    2013 Acetic acid Bacteria: physiology and carbon sources oxidation 53 Indian Journal of Microbiology 377 384
91. 1. GP Markin
    1970 Food distribution within laboratory colonies of the argentine ant,tridomyrmex humilis (Mayr)17 Insectes Sociaux 127 157
92. 1. TC Martinsen
    2. K Bergh
    3. HL Waldum
    2005 Gastric juice: a barrier against infectious diseases 96 Basic ; Clinical Pharmacology ; Toxicology 94 102
93. 1. PGD Matthews
    2. D Weihrauch
    3. M O’Donnell
    2017 Acid–base regulation in insect haemolymph Acid-Base Balance and Nitrogen Excretion in Invertebrates 219 238 Springer
94. 1. F Mazel
    2. KM Davis
    3. A Loudon
    4. WK Kwong
    5. M Groussin
    6. LW Parfrey
    2018 Is host filtering the main driver of phylosymbiosis across the tree of life?3 mSystems
95. 1. M McFall-Ngai
    2. MG Hadfield
    3. TC Bosch
    4. HV Carey
    5. T Domazet-Lošo
    6. AE Douglas
    7. N Dubilier
    8. G Eberl
    9. T Fukami
    10. SF Gilbert
    11. U Hentschel
    12. N King
    13. S Kjelleberg
    14. AH Knoll
    15. N Kremer
    16. SK Mazmanian
    17. JL Metcalf
    18. K Nealson
    19. NE Pierce
    20. JF Rawls
    21. A Reid
    22. EG Ruby
    23. M Rumpho
    24. JG Sanders
    25. D Tautz
    26. JJ Wernegreen
    2013 Animals in a bacterial world, a new imperative for the life sciences 110 PNAS 3229 3236
96. 1. I Miguel-Aliaga
    2. H Jasper
    3. B Lemaitre
    2018 Anatomy and physiology of the digestive tract of Drosophila melanogaster 210 Genetics 357 396
97. 1. D Mirabito
    2. RB Rosengaus
    2016 A double-edged sword? the cost of proctodeal trophallaxis in termites 63 Insectes Sociaux 135 141
98. 1. AH Moeller
    2. A Caro-Quintero
    3. D Mjungu
    4. AV Georgiev
    5. EV Lonsdorf
    6. MN Muller
    7. AE Pusey
    8. M Peeters
    9. BH Hahn
    10. H Ochman
    2016 Cospeciation of gut Microbiota with hominids 353 Science 380 382
99. 1. NA Moran
    2. H Ochman
    3. TJ Hammer
    2019 Evolutionary and ecological consequences of gut microbial communities 50 Annual Review of Ecology, Evolution, and Systematics 451 475
100. 1. DE Morgan
     2008 Chemical sorcery for sociality: exocrine secretions of ants (Hymenoptera: formicidae)11 Myrmecological News 70 91
101. 1. P Moura-Alves
     2. A Puyskens
     3. A Stinn
     4. M Klemm
     5. U Guhlich-Bornhof
     6. A Dorhoi
     7. J Furkert
     8. A Kreuchwig
     9. J Protze
     10. L Lozza
     11. G Pei
     12. P Saikali
     13. C Perdomo
     14. HJ Mollenkopf
     15. R Hurwitz
     16. F Kirschhoefer
     17. G Brenner-Weiss
     18. J Weiner
     19. H Oschkinat
     20. M Kolbe
     21. G Krause
     22. SHE Kaufmann
     2019 Host monitoring of quorum sensing during Pseudomonas aeruginosa infection 366 Science
102. 1. UG Mueller
     2. NM Gerardo
     3. DK Aanen
     4. DL Six
     5. TR Schultz
     2005 The evolution of agriculture in insects 36 Annual Review of Ecology, Evolution, and Systematics 563 595
103. 1. AA Mushegian
     2. D Ebert
     2016 Rethinking "mutualism" in diverse host-symbiont communities 38 BioEssays 100 108
104. 1. NT Nehme
     2. S Liégeois
     3. B Kele
     4. P Giammarinaro
     5. E Pradel
     6. JA Hoffmann
     7. JJ Ewbank
     8. D Ferrandon
     2007 A model of bacterial intestinal infections in Drosophila melanogaster 3 PLOS Pathogens
105. 1. M Ning
     2. M Yuan
     3. M Liu
     4. Q Gao
     5. P Wei
     6. W Gu
     7. W Wang
     8. Q Meng
     2018 Characterization of cathepsin D from Eriocheir sinensis involved in Spiroplasma eriocheiris infection 86 Developmental & Comparative Immunology 1 8
106. 1. H Ochman
     2. M Worobey
     3. CH Kuo
     4. JB Ndjango
     5. M Peeters
     6. BH Hahn
     7. P Hugenholtz
     2010 Evolutionary relationships of wild hominids recapitulated by gut microbial communities 8 PLOS Biology
107. 1. T Ohbayashi
     2. K Takeshita
     3. W Kitagawa
     4. N Nikoh
     5. R Koga
     6. XY Meng
     7. K Tago
     8. T Hori
     9. M Hayatsu
     10. K Asano
     11. Y Kamagata
     12. BL Lee
     13. T Fukatsu
     14. Y Kikuchi
     2015 Insect's intestinal organ for symbiont sorting 112 PNAS
108. 1. TO Onchuru
     2. A Javier Martinez
     3. CS Ingham
     4. M Kaltenpoth
     2018 Transmission of mutualistic Bacteria in social and gregarious insects 28 Current Opinion in Insect Science 50 58
109. 1. H Onken
     2. DF Moffett
     3. D Weihrauch
     4. M O’Donnell
     2017 Acid–base loops in insect larvae with extremely alkaline midgut regions Acid-Base Balance and Nitrogen Excretion in Invertebrates 239 260 Springer
110. 1. MF Osman
     2. J Brander
     1961 Weitere beiträge zur kenntnis der chemischen zusammensetzung des giftes von ameisen aus der gattung Formica 16 Zeitschrift Für Naturforschung Part B-Chemie Biochemie Biophysik Biologie Und Verwandten Gebiete, B 749 753
111. 1. MFH Osman
     2. W Kloft
     1961 Untersuchungen zur insektiziden wirkung der verschiedenen bestandteile des giftes der kleinen Roten WaldameiseFormica polyctena Foerst 8 Insectes Sociaux 383 395
112. 1. O Otti
     2. S Tragust
     3. H Feldhaar
     2014 Unifying external and internal immune defences 29 Trends in Ecology & Evolution 625 634
113. 1. G Overend
     2. Y Luo
     3. L Henderson
     4. AE Douglas
     5. SA Davies
     6. JAT Dow
     2016 Molecular mechanism and functional significance of acid generation in the Drosophila midgut 6 Scientific Reports
114. 1. IS Pais
     2. RS Valente
     3. M Sporniak
     4. L Teixeira
     2018 Drosophila melanogaster establishes a species-specific mutualistic interaction with stable gut-colonizing bacteria 16 PLOS Biology
115. 1. AE Perez-Cobas
     2. E Maiques
     3. A Angelova
     4. P Carrasco
     5. A Moya
     6. A Latorre
     2015 Diet shapes the gut Microbiota of the omnivorous cockroach Blattella germanica 91 FEMS Microbiology Ecology
116. 1. CD Pull
     2. LV Ugelvig
     3. F Wiesenhofer
     4. AV Grasse
     5. S Tragust
     6. T Schmitt
     7. MJ Brown
     8. S Cremer
     2018 Destructive disinfection of infected brood prevents systemic disease spread in ant colonies 7 eLife
117. 1. RJ Quinlan
     2. JM Cherrett
     1978 Studies on the role of the infrabuccal pocket of the leaf-cutting antAcromyrmex octospinosus (Reich) (Hym., Formicidae)25 Insectes Sociaux 237 245
118. 1. R Development Core Team
     2019 R: A language and environment for statistical computing R Foundation for Statistical Computing
119. 1. S Rakoff-Nahoum
     2. J Paglino
     3. F Eslami-Varzaneh
     4. S Edberg
     5. R Medzhitov
     2004 Recognition of commensal microflora by toll-like receptors is required for intestinal homeostasis 118 Cell 229 241
120. 1. CM Ranger
     2. PHW Biedermann
     3. V Phuntumart
     4. GU Beligala
     5. S Ghosh
     6. DE Palmquist
     7. R Mueller
     8. J Barnett
     9. PB Schultz
     10. ME Reding
     11. JP Benz
     2018 Symbiont selection via alcohol benefits fungus farming by Ambrosia beetles 115 PNAS 4447 4452
121. 1. C Ratzka
     2. C Liang
     3. T Dandekar
     4. R Gross
     5. H Feldhaar
     2011 Immune response of the ant Camponotus floridanus against pathogens and its obligate mutualistic endosymbiont 41 Insect Biochemistry and Molecular Biology 529 536
122. 1. C Ratzke
     2. J Denk
     3. J Gore
     2018 Ecological suicide in microbes 2 Nature Ecology & Evolution 867 872
123. 1. C Ratzke
     2. J Gore
     2018 Modifying and reacting to the environmental pH can drive bacterial interactions 16 PLOS Biology
124. 1. JA Russell
     2. JG Sanders
     3. CS Moreau
     2017 Hotspots for symbiosis: function, evolution, and specificity of ant-microbe associations from trunk to tips of the ant phylogeny (Hymenoptera: formicidae)24 Myrmecological News 43 69
125. 1. H Salem
     2. L Florez
     3. N Gerardo
     4. M Kaltenpoth
     2015 An out-of-body experience: the extracellular dimension for the transmission of mutualistic Bacteria in insects 282 Proceedings of the Royal Society B: Biological Sciences
126. 1. P Sapountzis
     2. DR Nash
     3. M Schiøtt
     4. JJ Boomsma
     2019 The evolution of abdominal microbiomes in fungus-growing ants 28 Molecular Ecology 879 899
127. 1. I Scheuring
     2. DW Yu
     2012 How to assemble a beneficial microbiome in three easy steps 15 Ecology Letters 1300 1307
128. 1. JO Schmidt
     2. T Piek
     1986 Chemistry, pharmacology, and chemical ecology of ant venoms Venoms of the Hymenoptera: Biochemical, Pharmacological and Behavioral Aspects 1 580 Academic Press
129. 1. JJ Scott
     2. DC Oh
     3. MC Yuceer
     4. KD Klepzig
     5. J Clardy
     6. CR Currie
     2008 Bacterial protection of beetle-fungus mutualism 322 Science
130. 1. AB Sendova-Franks
     2. RK Hayward
     3. B Wulf
     4. T Klimek
     5. R James
     6. R Planqué
     7. NF Britton
     8. NR Franks
     2010 Emergency networking: famine relief in ant colonies 79 Animal Behaviour 473 485
131. 1. SP Shukla
     2. C Plata
     3. M Reichelt
     4. S Steiger
     5. DG Heckel
     6. M Kaltenpoth
     7. A Vilcinskas
     8. H Vogel
     2018 Microbiome-assisted carrion preservation aids larval development in a burying beetle 115 PNAS 11274 11279
132. 1. SP Shukla
     2. H Vogel
     3. DG Heckel
     4. A Vilcinskas
     5. M Kaltenpoth
     2018 Burying beetles regulate the microbiome of carcasses and use it to transmit a core Microbiota to their offspring 27 Molecular Ecology 1980 1991
133. 1. E Slack
     2. S Hapfelmeier
     3. B Stecher
     4. Y Velykoredko
     5. M Stoel
     6. MA Lawson
     7. MB Geuking
     8. B Beutler
     9. TF Tedder
     10. WD Hardt
     11. P Bercik
     12. EF Verdu
     13. KD McCoy
     14. AJ Macpherson
     2009 Innate and adaptive immunity cooperate flexibly to maintain host-microbiota mutualism 325 Science 617 620
134. 1. N Stroeymeyt
     2. AV Grasse
     3. A Crespi
     4. DP Mersch
     5. S Cremer
     6. L Keller
     2018 Social network plasticity decreases disease transmission in a eusocial insect 362 Science 941 945
135. 1. D Stucki
     2. D Freitak
     3. N Bos
     4. L Sundström
     2019 Stress responses upon starvation and exposure to Bacteria in the ant Formica exsecta 7 PeerJ
136. 1. SM Tennant
     2. EL Hartland
     3. T Phumoonna
     4. D Lyras
     5. JI Rood
     6. RM Robins-Browne
     7. IR Driel
     2008 Influence of gastric acid on susceptibility to infection with ingested bacterial pathogens 76 Infection and Immunity 639 645
137. 1. WR Terra
     2. C Ferreira
     1994 Insect digestive enzymes: properties, compartmentalization and function 109 Comparative Biochemistry and Physiology Part B: Comparative Biochemistry 1 62
138. 1. T Therneau
     2019 coxme: Mixed Effects Cox Models
139. 1. MM Theron
     2. JF Rykers Lues
     2010 Organic Acids and Food Preservation CRC Press
140. 1. S Tragust
     2. B Mitteregger
     3. V Barone
     4. M Konrad
     5. LV Ugelvig
     6. S Cremer
     2013 Ants disinfect fungus-exposed brood by oral uptake and spread of their poison 23 Current Biology 76 82
141. 1. S Tragust
     2016 External immune defence in ant societies (Hymenoptera: formicidae): The role of antimicrobial venom and metapleural gland secretion 23 Myrmecological News 119 128
142. 1. M Trienens
     2. NP Keller
     3. M Rohlfs
     2010 Fruit, flies and filamentous fungi - experimental analysis of animal-microbe competition using Drosophila melanogaster and Aspergillus mould as a model system 119 Oikos 1765 1775
143. 1. R Vander Meer
     2012 Ant interactions with soil organisms and associated semiochemicals 38 Journal of Chemical Ecology 728 745
144. 1. SB Vander Wall
     1990 Food Hoarding in Animals University of Chicago Press
145. 1. J Villena
     2. H Kitazawa
     3. SCM Van Wees
     4. CMJ Pieterse
     5. H Takahashi
     2018 Receptors and signaling pathways for recognition of Bacteria in livestock and crops: prospects for beneficial microbes in healthy growth strategies 9 Frontiers in Immunology
146. 1. H Vogel
     2. SP Shukla
     3. T Engl
     4. B Weiss
     5. R Fischer
     6. S Steiger
     7. DG Heckel
     8. M Kaltenpoth
     9. A Vilcinskas
     2017 The digestive and defensive basis of carcass utilization by the burying beetle and its Microbiota 8 Nature Communications
147. 1. PI Watnick
     2. BE Jugder
     2020 Microbial control of intestinal homeostasis via enteroendocrine cell innate immune signaling 28 Trends in Microbiology 141 149
148. 1. LE Williams
     2. JJ Wernegreen
     2015 Genome evolution in an ancient bacteria-ant symbiosis: parallel gene loss among Blochmannia spanning the origin of the ant tribe Camponotini 3 PeerJ
149. 1. AJ Wolfe
     2005 The acetate switch 69 Microbiology and Molecular Biology Reviews 12 50
150. 1. R Xiao
     2. X Wang
     3. E Xie
     4. T Ji
     5. X Li
     6. A Muhammad
     7. X Yin
     8. Y Hou
     9. Z Shi
     2019 An IMD-like pathway mediates the intestinal immunity to modulate the homeostasis of gut Microbiota in Rhynchophorus ferrugineus Olivier (Coleoptera: Dryophthoridae)97 Developmental & Comparative Immunology 20 27