Insect specimens

H. hampei specimens (n=68; Supplementary Data 1) were obtained from Kenya (Kiambu), Indonesia (East Java), India (Karnataka), Puerto Rico (Adjuntas), Hawaii (Kona), Guatemala (Coatepeque) and Mexico (Chiapas; Supplementary Data 1). Insects from India were collected from C. arabica and from a robusta hybrid (C. congensis × C. canephora). H. obscurus, H. crudiae and S. maurus were obtained from Cecropia leaf stems in Chiapas, Mexico. For the biogeography study and comparison purposes, coffee berry borers reared on artificial diet38 (laboratory insects) were also included. At all collection sites, individual insects were placed alive in tubes containing RNAlater (Ambion, Grand Island, NY, USA) and shipped to our laboratory for analyses.

DNA extraction, PCR amplification and high-throughput sequencing

For DNA extraction, individual specimens were removed from RNAlater, and were surface-sterilized by passing the beetles through four sequential washing steps in microcentrifuge tubes containing 500 μl of diethylpyrocarbonate (DEPC)-treated water, commercial bleach, absolute ethanol or DEPC–water, respectively. At each step, the sample was vigorously shaken for ca. 30 s. A Biomasher (Investigen, Hercules, CA) column was placed in a microcentrifuge tube, and 180 μl of ATL buffer from the QIAmp DNA micro kit (Qiagen, Grand Island, NY, USA) added to the column. Individual insects were placed on the column and ground with the biomasher pestle. The biomasher column was kept in place, and 5 μl of proteinase K (Ambion) was added to the column, mixed by tapping and incubated at 56 °C for 30 min. The sample was centrifuged at 16,000g for 1 min; the column and biomasher were discarded afterwards. The flow-through was incubated at 56 °C for an additional 30 min. Lysozyme buffer (180 μl; 20 mM Tris-HCl (pH 8.0), 2 mM EDTA, 1.2% Triton X) containing 10 mg ml−1 of lysozyme was then added to the flow-through and the mixture incubated at 37 °C for 30 min. The DNA was then precipitated and purified following the QIAmp DNA micro protocol for tissues (Qiagen). The DNA concentration was determined with the use of a Qubit fluorometer (Qiagen). The DNA yields ranged from 0.5 to 5 ng μl−1. The bacterial/archaeal hypervariable domains V3–V4 of the 16S rRNA gene were amplified from each DNA extract in triplicate reactions using the primers 515F and 806R modified with adaptors and unique barcodes for Illumina sequencing39. All samples were then pooled and purified with the use of SPRI beads (Agencourt AMPure XP, Beckman Coulter, Brea, CA, USA). Sequencing of amplicons was carried out on a GAIIX Illumina Sequencer (Illumina, San Diego, CA, USA).

16S rRNA gene analysis

Reads between 80 and 100 bp were used for downstream analysis in the Quantitative Insights Into Microbial Ecology pipeline40. The total number of reads amounted to 15,000,000 with an average number of 169,000 sequences per sample (range: 19,000–200,000). All reads were deposited at the European Bioinformatics Institute with the accession code PRJEB8706. Sequences were clustered at 97% pairwise identity using the UCLUST41 reference-based Operational Taxonomic Unit (OTU) picking method, where the reference data set was the GreenGenes 99% (GG99_12_10; ref. 42). A representative sequence from each OTU was aligned to the GG99 data set using PyNAST (ref. 43). The concatenated alignment of OTUs was filtered to remove gaps and hypervariable regions using the GreenGenes Lane mask44. A phylogenetic tree was constructed from the filtered alignment using FastTree45. Taxonomic assignments were carried out with the naive Bayesian algorithm46 developed for the Ribosomal Database Project (RDP) classifier47 using the GG99 taxonomy data set as training42. OTU-generated matrices were used to create network profiles that were visualized with the Cytoscape software48. For network visualization, only the most abundant bacterial groups were retained. Node sizes were adjusted according to the degree of each node, and the edge intensity adjusted to its corresponding weight (number of sequences associated with a node). Phylogenetic β-diversity was quantified with a weighted Unifrac distance matrix (Weighted Unifrac), which was constructed at a depth of coverage of 20,000 sequences (normalized coverage to the minimum number of sequences in the data set). The resulting distance matrix was used to cluster samples using the UPGMA hierarchical clustering algorithm. Support values for the UPGMA dendrograms were calculated using 100 jackknife permutations, and nodes having at least 50% support were deemed to have high support. The samples were categorized according to their geographical origins, insect species and plant species from where the samples were collected. The effect of the categories on the data variations was tested with Adonis (nonparametric permutation multivariate analysis of variance) performing 1,000 permutations.

Isolation of caffeine-degrading bacteria and their identification

To isolate bacteria with the ability to degrade caffeine, H. hampei specimens collected in Hawaii and Mexico were used. Ten H. hampei specimens per location were dissected and macerated in 100 μl of 1 × phosphate buffer and further diluted at a proportion of 1:10 in 1 × phosphate buffer. Fifty microlitres of the diluted gut solution were plated on agar plates containing the following: (1) mineral media (9.5 mM KH 2 PO 4 , 4.8 mM MgSO 4 , 0.1 mM CaCl 2 , 0.8 mM Na 2 HPO 4 and 20 g l−1 bacto agar), with a gradient of caffeine ranging from 5 to 12.8 mM (1 to 2.5 g l−1); (2) mineral media, 5 to 12.5 mM gradient of caffeine and 2 mM of glucose; or (3) mineral media, 5 to 12.5 mM caffeine gradient and 9 mM NH 4 Cl. The inoculated plates were incubated at 30 °C for 1 week. The growth of bacteria was monitored every day to follow the formation of morphologically distinct colonies that were picked and transferred to fresh minimal media agar plates containing 7.7 mM (1.5 g l−1) caffeine. Isolated colonies were transferred to assay tubes containing 5 ml of tryptic soy broth and incubated at 30 °C for 72 h to produce biomass for DNA extraction, and to prepare glycerol stocks that were placed at −80 °C for storage. The bacterial DNA was extracted with the DNeasy Blood and Tissue Kit (Qiagen) following the protocol for Gram-positive bacteria, and used for the amplification of the complete 16S rRNA genes using the primers 27F (5′-GTTTGATCCTGGCTCAG-3′) and 1492R (5′-GGTTACCTTGTTACGACTT-3′). The PCR reactions were prepared as follows: 10 ng of DNA as template, 5 μl of 10 × ExTaq Buffer, 200 μM of dNTPs, 2.5 U ExTaq DNA polymerase (Takara Mirus Bio Inc., WI, USA), 300 ng μl−1 of BSA, 10 μM of each primer and DEPC-treated water to a final volume of 25 μl. The PCR conditions were 98 °C for 3 min, then 30 cycles of 98 °C for 10 s, followed by 57 °C for 30 s, 72 °C for 30 s and a final extension step of 72 °C for 2 min. The PCR products were then purified with the MinElute PCR purification kit (Qiagen) and bi-directionally sequenced with the same primers. The isolates were identified by phylogenetic analysis as follows. Sequences were visualized using 4Peaks and edited with the Seaview software49. The obtained 16S rRNA sequences were aligned using Clustal X (ref. 50) with corresponding reference sequences from NCBI, and phylogenetic analysis was carried out with maximum parsimony criteria in PAUP51. Heuristic tree searches were performed using a tree bisection reconnection model and a branch-swapping algorithm with 100 random stepwise swaps. One hundred trees were calculated for each pseudoreplicate. A rescaled consistency index, derived from trees and obtained by unweighted analysis, was used to generate an a posteriori weighted data set. The same heuristic search conditions as used for the unweighted data were used to analyse the weighted data set. Branch support was obtained with 100 bootstrap replicates. Desulfurobacterium thermolitotrophum (NR_025270) was used as outgroup in each phylogenetic reconstruction.

Screening of the ndmA gene in isolates and H. hampei

For the screening of the ndmA gene, the DNA from each isolate was used as template for PCR amplification with the primers A-degF1 and cdm-Rev123. The PCR reactions were prepared as follows: 50 ng of DNA as template, 5 μl of 10 × ExTaq Buffer, 200 μM of dNTPs, 2.5 U ExTaq DNA polymerase (Takara Mirus Bio Inc., WI, USA), 300 ng μl−1 of BSA, 10 μM of each primer and DEPC-treated water to a final volume of 25 μl. The temperature profiles were as reported in ref. 23 for the same set of primers. Positive reactions were defined by the presence of a 1,000-bp band. Obtained PCR bands were purified and sequenced with the same set of primers. Obtained DNA sequences were aligned, and a second set of primers designed for qPCR (CBBcdmF, 5′-TGGCATCCCGTWTGTACYGT-3′; CBBcdmR, 5′-CTTGKATAACRATTCGCAACC-3′) generating an ∼400-bp product. RNA was extracted from a pool of five insects collected in Mexico using the ISOLATE II RNA micro kit (Bioline, MA, USA) and complementary DNA prepared using 100 ng of total RNA. Total RNA, 300 ng of random hexamer primers and 20 nmol of each dNTP were combined to a total volume of 11 μl and the mixture incubated at 65 °C for 5 min. Then, 5 μl of 5 × first strand buffer was added to the mixture, together with 20 U of SUPERase-ln (Invitrogen), and incubated at 25 °C for 2 min. After incubating, 200 U of SuperScript III reverse transcriptase (Invitrogen) was added to the mixture and incubated at 50 °C for 50 min. The reaction was inactivated at 70 °C for 10 min. cDNA was then used as a template for qPCR with the primers CBBcdmF and CBBcdmR. Amplification reactions were carried out in a total volume of 25 μl, which consisted of 1 μl of a diluted (1:10) cDNA template, 12.5 μl of 2 × iQ SYBR green super mix (Bio-Rad), 0.4 μM of each primer and 9.5 μl of water. The PCR conditions were 95 °C for 3 min, then 45 cycles of 95 °C for 10 s, followed by 57 °C for 30 s with the iQ system (Bio-Rad). qPCR products from each gut region were pooled and purified using the QIAquick PCR purification kit (Qiagen) and cloned into competent E. coli JM109 cells (Promega) using the pGEM-T Easy Vector Kit (Promega) according to the manufacturer’s instructions. Transformants were incubated in modified LB media (0.4% glycerol and 1.7 mM KH 2 PO 4 and 7.2 mM K 2 HPO 4 ) at 37 °C and 300 r.p.m. for 19 h. Plasmids were extracted using the SeqPrep 96 HP Plasmid Prep Kit and sequenced with an ABI377 sequencer (Applied Biosystems, Grand Island, NY, USA) using M13 universal forward and reverse sequencing primers. Sequences were visualized using 4Peaks and edited with the Seaview software49. DNA sequences from both isolates and H. hampei were aligned, trimmed and translated in all frames using the CLC sequence Viewer 6 (CLC Bio, Cambridge, MA, USA). Translated NdmA sequences were aligned using Clustal X (ref. 50) with related protein reference sequences from NCBI and phylogenetic analysis was carried out with maximum parsimony criteria in PAUP as described before. The ammonia monooxygenase protein sequence of Mycobacterium rhodesiae (AEV73531) was used as an outgroup for the phylogenetic reconstruction.

O 2 measurements using microelectrodes

Oxygen gradients in the gut of H. hampei were measured as described before32. Briefly, insects were dissected keeping the head of the insects attached to the gut to avoid releasing the gut content and O 2 profiles measured at the anterior midgut. Clark-type oxygen microelectrodes (OX-25, Unisense) were used for the measurement of O 2 concentration. Before use, the electrodes were polarized overnight and calibrated in water saturated with air, as well as in an anoxic solution consisting of 0.1 M sodium hydroxide and 0.1 M sodium ascorbate. Calibration was carried out before each experiment. The current was measured with a Unisense microsensor multimeter and recorded using the SensorTracePRO software (Unisense). Before microelectrode measurements 10 ml of low-melting-point agarose consisting of 2% agarose in insect Ringer’s solution was cast into a microchamber. A freshly dissected gut was placed on this layer of agarose, fully extended and immediately covered with a second layer of molten 1% agarose at 30 °C. Microelectrodes were positioned using a motorized micromanipulator (MXU2, Pyro Science). Measurements were performed radially starting at the surface of the gut wall (0 μm) through the beetle gut until the tip completely penetrated the whole tissue. The progress of the tip was followed with a digital microscope (44032 Celestron) connected to a computer. All measurements were carried out at room temperature.

Diet-transit time in H. hampei

A modified diet, here referred to as minimal diet, was formulated based on the artificial diet used for rearing H. hampei (laboratory insects)38, but containing only 50-g twice-ground green coffee beans, 1 g Wesson salts, 0.5 g nipagin, 0.4 g benzoic acid, 1 ml 37% formaldehyde, 1.5 g of gellan gum as a solidifying agent and 375 ml water. The diet was modified to reduce protein interaction with antibiotics. A population of laboratory insects maintained in the regular artificial diet was transferred to the minimal diet and allowed to feed for 3 weeks. A subsample of the minimal diet-fed laboratory insects was used for all of the experimental procedures. Four 10-ml vials containing 2 g of minimal diet and fluorescent spheres (Fluospheres, Invitrogen) at a concentration of 1,800 particles per mg of diet were inoculated with 20 laboratory insects. Each vial was sampled at 1, 2, 3, 4 and 24 h, and a total of four H. hampei specimens selected per sampling time for gut extraction52. After dissection, each gut was placed on a cover slide and covered with 2 μl of 1 × phosphate buffer. The dissected guts were then screened using a microscope at × 40 magnification under ultraviolet light for the detection and counting of the fluorescent spheres. Considering a homogeneous distribution of particles in the diet, the number of counted fluorescent spheres per sampling point was transformed into mg of ingested diet over the time. The counts were fitted to a model in the R software environment53 using a nonlinear least squares regression to calculate the feeding rates of H. hampei. The time at which the fluorescent spheres were localized near the anal opening was considered to be the total transit time of the diet; after this period, dropping activity (defecation) and release of the fluospheres was expected and confirmed by placing 4-h-fed H. hampei into a clean PCR tube for 2 h. The insects were then removed and frass-homogenized with water and screened with ultraviolet-microscopy for the detection of the fluospheres.

Antibiotic treatment and reinfection

Twenty laboratory specimens of H. hampei were transferred into five sets of 10-ml triplicated vials containing 2 ml of minimal diet supplemented with a mixture of 50 μg ml−1 tetracycline, 200 μg ml−1 rifampicin and 100 μg ml−1 streptomycin; one set was prepared for direct detection of caffeine and the second for the reinfection experiments. The same number of insects was transferred to control vials containing 2 ml of minimal diet (no antibiotics). The insects were transferred to freshly prepared sterile diet every week during a 4-week period. After the fourth week, 10 insects from each vial were aseptically transferred to new 10-ml vials containing sterile minimal diet with fluorescent spheres (1,800 particles mg−1). Insects were allowed to feed for 4 h (time required to reach gut content equilibrium) and then transferred to a clean flat-bottom 96-well plate for frass collection. After 4 h the insects were removed from the wells and the frass collected by washing the wells with 50 μl of water. The samples were then stored at −20 °C until further analysis. For the reinfection experiments, isolate iMX49 (identified as P. fulva) was propagated in tryptic soy broth at 30 °C and 100 r.p.m. for 24 h. The resulting biomass was centrifuged and the pellet washed and stored in 5 ml of 1 × phosphate buffer. The number of CFUs corresponding to this bacterial solution were determined by plating a 1:100 dilution of the suspension on tryptic soy agar plates and incubated for 24 h at 30 °C. New minimal diet was prepared and supplemented with the iMX49 bacterial solution at rate of 10,000 CFU ml−1, and left to dry for 48 h at room temperature. Antibiotic-treated insects (after their fourth week) were transferred to the bacteria-inoculated diet and were allowed to feed. After 1 week, the frass from the reinfected insects was collected in the same way as for the control samples. Since the amount of frass was too small to be weighed accurately, three 10-μl aliquots (per treatment) of the frass solution were visualized under the microscope under ultraviolet illumination to count the fluospheres. The number of fluospheres was then used to transform quantities to milligram of diet for normalization purposes. The obtained samples from each treatment were then analysed using FTIR and GC–MS to determine their corresponding levels of caffeine as described below.

Detection of caffeine in frass samples

To determine the concentration of caffeine in the frass samples of the antibiotic-treated-, antibiotic-infected- and control beetles, two strategies were followed: measurement of caffeine in raw frass with FTIR and measurement of extracted caffeine from frass samples with GC–MS.

Measurement of caffeine in raw frass using FTIR: Obtained frass solutions were first deposited and air-dried for 5 min on a 1-mm-thick zinc-selenide crystal and then infrared absorption spectra of the samples collected with a transmission FTIR22 microscope (Nic-Plan IR Microscope with Nicolet Magna 760 bench, Thermo Fisher Scientific Inc.) with a 100-μm aperture. A globar thermal source, a MCT detector and a KBr beamsplitter were used in all the experiments. Each spectrum was averaged by 128 scans at the 4-cm−1 spectral resolution. The whole area of each sample was raster-scanned and the spectra were averaged for each sample. Known amounts of pure caffeine (0.03, 0.12, 0.2 and 0.3 μg of caffeine; Sigma-Aldrich, St Louis, MO, USA) were also deposited on the same crystal and their corresponding signals used as the standards for the relative quantification of caffeine in the frass samples (Supplementary Fig. 2). The major infrared absorption peaks at ∼1,655 and ∼1,705 cm−1, related to the stretching vibrations of carbon–nitrogen double bond and the carbonyl groups, respectively, are used to identify the presence of caffeine and evaluate the caffeine concentration in different frass samples. The two Lorentzian peaks were deconvolved from each obtained absorption spectrum, and the peak area data were used to compare with the areas obtained from the standards. The caffeine content of the frass samples was normalized by the amount of frass deposited in the zinc-selenide crystal per sample.

Caffeine extraction from frass and GC–MS: Water-solubilized frass samples were nitrogen-dried and then derivatized54. Briefly, 10 μl of a solution containing 40 mg ml−1 of 98% methoxyamine hydrochloride in pyridine was added to each dry sample followed by 90 min of shaking at 30 °C. A mixture of internal retention index markers was prepared using fatty acid methyl esters (FAMEs) of C8, C9, C10, C12, C14, C16, C18, C20, C22, C24, C26, C28 and C30 linear chain length, dissolved in chloroform at a concentration of 0.8 mg ml−1 (C8–C16) and 0.4 mg ml−1 (C18–C30). The FAME mixture (20 μl) was added to 1 ml of N-Methyl-N-(trimethylsilyl)-trifluoroacetamide containing 1% of Trimethylclorosilane. Ninety microlitres of N-Methyl-N-(trimethylsilyl)-trifluoroacetamide spiked with the FAME mixture was then added to each extract followed by mixing for 30 min at 37 °C. Pure caffeine (Sigma-Aldrich) was used to generate a calibration curve with levels at 0.25, 0.5, 1, 2.5, 5, 10 and 20 μg ml−1 in 50% methanol. One hundred microlitres of each level was dried and derivatized using the same procedure described for the samples. Derivatized samples were manipulated using a Gerstel automatic liner exchange MPS system (Gerstel, Muehlheim, Germany) controlled with the Maestro software v.1.4.25.8 to inject 2 μl of sample into a Gerstel CIS cooled injection system. The injector was operated in the splitless mode, and the split vent was opened after 25 s. Samples were injected into the inlet initially at 60 °C, which was then ramped to 270 °C in 12 °C s−1 increments and held for 3 min. Sample separation was carried out on a 30-m-long, 0.25-mm ID Rtx-5Sil MS column (Restek, Bellefonte, PA), 0.25 mm 5% diphenyl film with a 10-m integrated guard column using an Agilent 7890 gas chromatograph (Agilent Technologies, Santa Clara, CA), controlled with the Agilent GC–MS MassHunter Acquisition software v.B07.00 SP1 with a constant flow rate of 1 ml min−1. Initial oven temperature was 60 °C with the following gradient applied: held at 60 °C for 1 min; ramp at 10 °C min−1 to 310 °C, held for 10 min. Mass spectrometry was performed with an Agilent 5977 single quadrupole MS with 250 °C transfer line temperature, electron ionization at 70 eV, an ion source temperature of 230 °C and a quadrupole temperature of 150 °C. Mass spectra were acquired in a selected ion-monitoring mode at a scan rate of 4.4 spectra s−1. Selected ions for caffeine were 55, 82, 109 and 194. A quality-control mix was run in triplicate before and after the sample set to confirm GC and MS signal reproducibility. Caffeine levels were quantitated in acquired data using Agilent MassHunter Quantitative Analysis v.B.07.00.

For FTIR and GC–MS analyses, significant differences between treatments (control, antibiotic-treated and antibiotic-treated/re-inoculated) were determined using one-way analysis of variance and least significant differences using the R software environment53.

Antibiotic treatment effect on H. hampei reproduction

One hundred females recently emerged as adults were placed together with 20 males in vials containing regular diet and were incubated for 14 days to maximize mating. After the initial mating incubation, individual females were transferred to a vial containing either regular diet (control) or diet supplemented with antibiotics (as described above) and incubated for 44 days. A third set of mated females was treated with antibiotics for 3 weeks, transferred to diet with P. fulva and also incubated for 44 days. Fifteen vials from each treatment were destructively sampled on each sampling time (days 14, 24, 34 and 44) and screened for eggs, larvae, pupae and adults. A logistic regression was performed on the sum of all stages in each vial. Then, a model was fit with just the main effects (DIET—control, antibiotics, infection; and SAMPLE—sampling time), where overdispersion was included. Both main effects were significant, that is, there is a significant effect of DIET when compared with control, and there is a significant effect of sample (later samples had higher counts).