Detecting RNA base methylations in single cells by in situ hybridization

Methylated bases in tRNA, rRNA and mRNA control a variety of cellular processes, including protein synthesis, antimicrobial resistance and gene expression. Currently, bulk methods that report the average methylation state of ~104–107 cells are used to detect these modifications, obscuring potentially important biological information. Here, we use in situ hybridization of Molecular Beacons for single-cell detection of three methylations (m62A, m1G and m3U) that destabilize Watson–Crick base pairs. Our method—methylation-sensitive RNA fluorescence in situ hybridization—detects single methylations of rRNA, quantifies antibiotic-resistant bacteria in mixtures of cells and simultaneously detects multiple methylations using multicolor fluorescence imaging.

I t is becoming increasingly clear that methylated RNA bases play key roles in all forms of life. It has been known for over 50 years that ribosomal RNA (rRNA) contains methylated bases 1 : 21 of the 35 post-transcriptional modifications to the Escherichia coli ribosome include base methylations 2 , while 8 other methylated bases confer antibiotic resistance by preventing binding of protein synthesis inhibitors 3 . For example, the rRNA methylations catalyzed by Erm (forming N 6 -dimethyladenosine, m 6 2 A) 4 and Cfr (forming 2,8-dimethyladenosine, m 2,8 A) 5 both render bacteria multi-drug resistant. Among the numerous modifications to transfer RNA (tRNA), 1-methylguanosine (m 1 G) at position 37, which minimizes frameshift mutations during protein synthesis 6 , is notable for being conserved across all kingdoms of life. The observations that the fat mass and obesity-associated (FTO) protein demethylates N 6 -methyladenosine (m 6 A), 3methyluridine (m 3 U) and 3-methylthymidine (m 3 T) in singlestranded RNA 7,8 led to the realization that eukaryotic messenger RNAs (mRNAs) undergo dynamic and widespread methylations at N6 and N1 of adenine [9][10][11][12][13] , which likely regulate expression. This flurry of recent discoveries has refocused attention on posttranscriptional RNA modifications 14 , and spawned a new field: epitranscriptomics.
The epitranscriptome lay underappreciated until the last 5-10 years because methods for detecting methylated bases were unsuitable for studying mRNA. Conventionally, cellular RNAs are digested to individual nucleosides that are separated by liquid chromatography to identify modified bases, which are then put into sequence context by a separate reverse transcription assay, analyzed using gel electrophoresis 15 . These bulk methods have detection limits in the femtomole to picomole range, which even for abundant species like rRNAs therefore report the average methylation state of~10 4 -10 7 cells 16 . Even state-of-the-art methods for mapping modified bases-based on immunoprecipitation followed by next-generation sequencing-pool the lysates from >10 4 cells 17 . In contrast, microscopy-based fluorescence in situ hybridization (FISH) 18 is revolutionizing transcription profiling by capturing cell-to-cell variation in mRNA levels 19 , and revealing the sub-cellular distributions of specific mRNAs on the basis of their unique nucleotide sequences 20 . In situ hybridization techniques capable of detecting methylated bases within specific RNAs could be similarly illuminating, greatly enhancing our understanding of the biological roles of individual methylations.
Here, we use in situ hybridization to detect epitranscriptomic modifications at the single-cell level, exploiting the fact that methyl groups on the Watson-Crick faces can impair base pairing 21,22 . Our approach deploys hybridization probes that are sensitive to methylation of their complementary RNA sequences as intracellular thermodynamic sensors. We call this method "methylation-sensitive RNA fluorescence in situ hybridization" (MR-FISH), which we validate in a series of methyltransferaseknockout bacterial cell lines, focusing on rRNA methylations. MR-FISH is sensitive to single methylations, and can characterize the composition of heterogeneous mixtures of cells that differ only in RNA methylation.

Results
Detecting tetramethylation by KsgA methyltransferase. In designing a hybridization assay for methylation, we selected Molecular Beacons ( Supplementary Fig. 2) 23 . We reasoned that these hybridization probes, which discriminate single-base changes better than linear probes because they can form a hairpin structure rather than bind to a mismatched nucleic acid 24 , might also be sensitive to methylation of a complementary nucleic acid. We first tested whether a Molecular Beacon could detect the tetramethylation catalyzed by the methyltransferase (MTase) KsgA (Fig. 1a), one of the best-studied post-transcriptional modifications of rRNA. KsgA dimethylates A1518 and A1519 of 16S rRNA to form consecutive m 6 2 A bases, subtly restructuring the 30S subunit of the ribosome; 25 bacteria that lack this modification are resistant to the aminoglycoside antibiotic, kasugamycin 26 . Because the three states of Molecular Beacons (hairpin structure, hybridized to the target and random coil) have different fluorescence intensities due to changes in the fluorophore-quencher distance ( Supplementary Fig. 2), the stability of duplexes they form with different target sequences can be measured by monitoring fluorescence during thermal melting. This technique verified that a Molecular Beacon designed to detect methylation by KsgA shows a transition for melting of an RNA/DNA duplex with complementary unmethylated RNA, but only a transition for melting of the hairpin loop in the presence of tetramethylated RNA (Fig. 1c). This indicates that the impaired base pairing of adjacent m 6 2 A nucleotides (Fig. 1b) inhibits the binding of the methylation-sensitive probe.
To detect post-transcriptional modifications inside fixed cells, we use two probes: a green-fluorescent (Alexa Fluor 488-labeled) methylation-sensitive probe and a red-fluorescent (Alexa Fluor 647-labeled) probe that binds the same rRNA strand, at a sequence remote from the modification site that does not undergo methylation. This red-labeled methylation-insensitive probe acts as an internal calibrant, meaning that the red/green ratio of each cell-rather than the green intensity alone-indicates the extent of methylation. This ratio distinguishes between cells with a high proportion of methylated rRNA and cells which simply have a low concentration of rRNA (Fig. 1d). To investigate whether MR-FISH distinguishes between cells with highly methylated and unmethylated ribosomes, we used an E. coli which expresses all constitutive rRNA MTases (parent strain BW25113), and a mutant of this strain in which the KsgA MTase is deleted (ΔksgA), confirming the methylation state of each cell type by high-performance liquid chromatography (HPLC; Supplementary  Fig. 3). Both bacteria fluoresce red due to the methylationinsensitive probe, but only the ΔksgA cells, with A1518 and A1519 of 16S rRNA unmethylated, are brightly stained green by the methylation-sensitive probe (Fig. 1e). Automated analysis of the wide-field epifluorescence images (Methods, Supplementary  Fig. 4) allows us to extract fluorescence intensities of hundreds of single cells in both color channels, which quantitatively confirms that MR-FISH distinguishes between cells with methylated and unmethylated ribosomes (Fig. 1f). Timecourses of hybridization show that ΔksgA cells can be distinguished from the parent strain after 30 min, but that they are best discriminated after ≥4.5 h, when the ratio of their green fluorescence intensities is > 10 ( Supplementary Fig. 5). The fluorescence of the methylationsensitive probe is selectively reduced in the presence of excess unlabeled oligonucleotide with the same sequence, confirming that the signal results primarily from hybridization, rather than non-specific binding to cellular components or autofluorescence ( Supplementary Fig. 10). When the red/green ratios of individual cells are extracted from MR-FISH image data, each cell type displays a log-normal distribution ( Fig. 1g and Supplementary  Fig. 6), which unambiguously discriminates between cells with tetramethylated and unmethylated ribosomes in replicate measurements ( Fig. 1h and Supplementary Fig. 7). 16S rRNA 28 . Methylation-sensitive probes for each modification discriminate well between methylated and unmethylated synthetic RNAs, but unlike the tetramethylated KsgA target sequence, fluorescence melting showed evidence of duplex formation between both methylation-sensitive beacons and their singly methylated RrmA and RsmE target sequences (Fig. 2a, b). The duplex formed by the RsmE target containing a single m 3 U base was stable enough to thermodynamically characterize, showing it to be destabilized by~20 kJ mol −1 compared with its unmethylated counterpart, which decreases its melting temperature by~17°C ( Supplementary Fig. 2). Nevertheless, MR-FISH detected both methylated bases inside fixed cells, although a higher formamide concentration (30% vs. 20%) was required to discriminate the less-destabilizing m 3 U modification ( Fig. 2c-f, Supplementary Figs 8 and 9). These data show that MR-FISH can detect even single methylations of RNA.
Characterizing mixtures of cells with different methylation states. A major advantage of detecting epitranscriptomic modifications on a cell-by-cell basis, rather than in lysates pooled from thousands or millions of cells, is the potential to study heterogeneous populations without separating them first. To demonstrate this concept, we used MR-FISH to characterize the composition of mixtures of E. coli and the kasugamycin-resistant derivative ΔksgA. We first combined different ratios of separately cultured samples of each strain and analyzed the mixtures using MR-FISH. Fitting the resulting two-color-ratio histograms with bimodal Gaussian distributions returns compositions that are in excellent agreement with the known proportions of parent strain and ΔksgA cells (Fig. 3a-c). Next, we measured the composition of a co-culture of these bacteria using MR-FISH, which was in good agreement with that determined by colony counting (Fig. 3d-g). The greater precision of our single-cell approach- Finally, we combined methylation-sensitive Molecular Beacons to demonstrate simultaneous detection of two methylations using multicolor imaging (Fig. 4). We multiplexed MR-FISH using a probe cocktail comprising an Alexa-Fluor-647-labeled-methylation-insensitive probe, an Alexa-Fluor-488-labeled probe sensitive to KsgA methylation and a Cy3-labeled probe sensitive to RrmA methylation (Fig. 4a). A mixture of bacteria containing either of these methylations (ΔksgA or ΔrrmA) or both methylations (parent strain) are therefore stained with different color combinations: either Alexa Fluor 647 and Alexa Fluor 488 (ΔksgA), Alexa Fluor 647 and Cy3 (ΔrrmA), or Alexa Fluor 647 only (parent strain) (Fig. 4b). Comparison to pure samples of each bacterium confirms that MR-FISH can accurately identify the components of a complex mixture of bacteria with multiple different methylation states (Fig. 4c, d and Supplementary  Fig. 11).

Discussion
This work demonstrates the detection of methylated bases in RNA at the single-cell level. MR-FISH is sensitive to single methylations, and can characterize the composition of mixtures of cells with different RNA methylation states. Our results show excellent discrimination between cells with and without specific methylations; further studies will establish the sensitivity of MR-FISH to different degrees of methylation. Three different methylations have been detected here, but in its current form, our hybridization-based approach will not be applicable to modifications that do not affect Watson-Crick base pairing, such as 5methylcytidine (m 5 C) or pseudouridine. On the other hand, m 1 A has recently been shown to substantially disrupt RNA duplexes 29 , while m 6 A forms a "spring-loaded" base pair containing a steric clash between the N6-methyl group and N7 22 . Encouragingly, we have confirmed that the presence of m 6 A does destabilize duplex formation with a Molecular Beacon, but to a lesser degree than the other modifications detected here ( Supplementary Fig. 12).
The fact that standard epifluorescence microscopes can be used to detect methylation of abundant RNAs ( Supplementary Fig. 13) as well as its simplicity ( Supplementary Fig. 14) makes MR-FISH accessible to wide range of users. For example, our method could enable basic research into antibiotic resistance conferred by methylated bases in single or mixed bacterial populations. In particular, MR-FISH could reveal the extent of methylation needed for resistance and stochastic cell-to-cell variation within resistant populations, as well as offering a way to screen methyltransferase inhibitors inside cells with a molecular readout. The fact that MR-FISH requires simple optical equipment, is capable of multiplexing and can identify specific rRNA methylations in cells after only 30 min also highlights its potential in diagnostic tests for antibiotic-resistant bacteria. In future applications, the abundance of the RNA of interest will determine the most appropriate imaging mode. In exponentially growing  MR-FISH has distinct advantages and disadvantages compared with existing techniques. While the need for pre-existing knowledge of the locations of methylated bases to design methylation-sensitive probes and the finite multiplexing capacity of FISH make it unsuitable for transcriptome-wide discovery of base methylations, MR-FISH offers the ability to analyze methylation in large numbers of single cells, including heterogeneous populations and/or tissue samples. Alongside sequencing-based techniques that identify modifications 17 , and chemical probes that establish their structural effects 34 , MR-FISH promises to add another dimension to studies of methylated bases, by capturing cell-to-cell variation and potentially revealing the sub-cellular locations of specific methylated RNAs.

Methods
Materials. The E. coli strain BW25113 (parent strain) was purchased from ThermoFisher Scientific (Ulm, Germany). Three derivatives of this strain: JW0050-3 with specific deletion of the ksgA gene (ΔksgA); JW1181-1 with specific deletion of the rrmA gene (ΔrrmA); and JW2913-1 with specific deletion of the rsmE gene (ΔrsmE), were sourced from the Coli Genetic Stock Centre (Yale, USA) 35,36 . Bacterial growth medium was purchased from Appleton Woods (Birmingham, UK) and was prepared by dissolving in deionized water followed by autoclaving at 121°C for 20 min. Phosphate-buffered saline (PBS) tablets, sodium chloride, tris (hydroxymethyl)aminomethane hydrochloride (Tris-HCl), sodium dodecyl sulfate (SDS), diethyl pyrocarbonate (DEPC), formamide, benzamidine, phenylmethylsulfonyl fluoride (PMSF), magnesium chloride, ammonium chloride, kanamycin, paraformaldehyde, 2-mercaptoethanol and sucrose were purchased from Sigma Aldrich (Gillingham, UK). The 125:24:1 phenol/chloroform/isoamyl alcohol mixture and chloroform were purchased from ThermoFisher Scientific (Paisley, UK). P1 nuclease, bacterial alkaline phosphatase, unmethylated nucleoside standards (A, C, G and U) were purchased from Sigma Aldrich, methylated nucleoside standards (N 6 -dimethyladenosine, 1-methylguanosine and 3-methyluridine) from Carbosynth (Compton, UK) and HPLC-grade solvents from VWR International Ltd (Lutterworth, UK). To avoid degradation of RNA, stock solutions of all buffer components (except formamide) for fluorescence melting and FISH were prepared using 0.1% DEPC to inactivate RNases and then autoclaved to decompose DEPC prior to use. All microcentrifuge tubes and pipette tips used were certified RNase free and bench surfaces cleaned with RNaseZAP™ according to the manufacturer's instructions (Sigma Aldrich). The sequences and code names of all oligonucleotides used in this work are given in Table 1, while structures of modified nucleosides, fluorophores and quenchers are given in Supplementary Fig. 1. RNA oligonucleotides (synthesized on the 1 µmol scale and purified by denaturing polyacrylamide gel electrophoresis) were purchased from Dharmacon/GE Healthcare (Little Chalfont, UK); their identities were also confirmed by digestion to nucleosides followed by HPLC (Supplementary Fig. 3 For experiments in the absence of RNA targets (i.e., Molecular Beacon only), samples were heated to 95°C, held at this temperature for 10 min, cooled from 95°C to 37°C at a rate of 1°C min −1 , held at 37°C for 10 min and heated from 37°C to 95°C at a rate of 1°C min −1 . For experiments in the presence of RNA targets, slower rates of heating/cooling were required to avoid hysteresis: samples were heated to 95°C, held at this temperature for 10 min and then cooled in steps of 0.2°C at 0.5°C min −1 to 37°C. Samples were then held at 37°C for 10 min before being heated to 95°C, again in steps of 0.2°C at a rate of 0.5°C min −1 . The fluorescence intensity was recorded for both the cooling (annealing) and heating (melting) phases and compared to confirm minimal hysteresis. Five technical replicates were performed under each condition.
Melting temperatures (T b or T d ) were extracted using a script written in MATLAB. For each melting curve, an approximate first derivative was calculated, to which a single-term Gaussian function was fitted, with start and end points  Supplementary Fig. 1 determined by user input and fit quality assessed by visual inspection. The center of the fitted Gaussian was taken to be the melting temperature. The thermodynamics of hairpin melting (transition 2 → 3, Supplementary  Fig. 2a) were analyzed as in Bonnet and Tyagi 24 , using the variation of fluorescence intensity with temperature (in the absence of target) to find the equilibrium constant at each temperature, using Eq. 1 (where F is the fluorescence measured at a given temperature, α is the fluorescence of the hairpin structure (the fluorescence measured at 37°C) and β is the fluorescence of the random coil structure (fluorescence measured at 95°C), Supplementary Fig. 2d).
The equilibrium constant in this form can be used to find the thermodynamic parameters for the transition, assuming no variation of thermodynamic parameters with temperature and no populated intermediates between the hairpin and random coil structures. A plot in the form of Eq. 2 (where T is the temperature in K) was used to calculate the standard enthalpies (ΔH°2 -3 in J mol −1 ) and entropies (ΔS°2 -3 in J mol −1 K −1 ) of the hairpin melting transitions by linear fitting in Excel (Microsoft Corporation, Redmond, Washington, USA) or OriginPro (OriginLab Corporation, Northampton, Massachusetts, USA), and hence ΔG°2 -3 (Supplementary Fig. 2e and g). Thermodynamic parameters for the duplex to hairpin transition (transition 1 → 2, Supplementary Fig. 2a) were calculated as in Bonnet and Tyagi 24 . A plot in the form of Eq. 3 (where R is the gas constant, T 0 is the target concentration, B 0 is the beacon concentration, T d is the melting temperature for this transition) was used to calculate the standard enthalpies (ΔH°1 -2 in J mol −1 ) and entropies (ΔS°1 -2 in J mol −1 K −1 ) of the hairpin melting transitions by linear fitting in Excel or OriginPro (Supplementary Fig. 2c and f).
Bacterial culture and fixation. Biological replicates were prepared by streaking a glycerol stock onto LB agar and individual colonies picked and cultured overnight at 37°C in LB broth, supplemented with kanamycin (30 µg mL −1 ) for growth JW0050-3 (ΔksgA), JW1181-1 (ΔrrmA) and JW2913-1 (ΔrsmE). The overnight culture was subsequently used as a 1% inoculum into fresh LB broth without antibiotics which was incubated at 37°C in an orbital shaker until the OD 600 was 0.5-0.7. One volume of 4% formaldehyde (freshly prepared from paraformaldehyde) in PBS (pH 6.9) was then added directly to bacterial culture (7.5 mL, approximately 4.5 × 10 9 colony-forming units) and the resulting suspension incubated at room temperature for 90 min. Inactivated bacterial cells were then pelleted by centrifugation, washed three times in PBS (10 mL) and suspended in 50% ethanol/PBS (1 mL) yielding approximately 4.5 × 10 9 fixed cells per mL, which were stored at −20°C until required.
Bacterial co-culture and colony counting. Single colonies of BW25113 (parent strain) and JW0050-3 (ΔksgA) were picked and cultured separately overnight at 37°C in LB broth, without antibiotics. The overnight cultures were used to inoculate a single flask containing 100 mL of sterile LB broth without antibiotics to a starting OD 600 of 0.005 absorbance units for each strain. The mixed culture was then incubated at 37°C in an orbital shaker until the OD 600 was 0.5-0.7, at which point 7.5 mL of culture was removed and fixed as described above. The ratio of parent/ΔksgA was determined by diluting the culture by a factor of 10 6 in sterile LB broth and spreading 200 μL onto LB agar plates with or without 30 μg mL −1 kanamycin. Colonies were counted after 18 h of incubation at 37°C.
16S ribosomal RNA purification. Single colonies BW25113 (parent strain) and JW0050-3 (ΔksgA) were picked and grown overnight at 37°C in LB broth, supplemented with kanamycin (50 µg mL −1 ) for growth of the ΔksgA strain. The overnight culture was used as a 1% inoculum into pre-warmed LB medium (4 × 1000 mL in 2 L flasks) and cultured without antibiotics until the OD 600 was 0.5-0.6. The cells were harvested and pellets washed twice by resuspension in PBS (50 mL), prior to being flash-frozen for storage at −80°C. The ribosome purification protocol was modified from a previously published method 40 . All buffers were supplemented with 0.1 mM benzamidine and 1 mM PMSF directly before use. Cell pellets were thawed on ice, resuspended in 15 mL buffer C (20 mM Tris pH 7.5, 10 mM MgCl 2 , 200 mM NH 4 Cl, 6 mM 2-mercaptoethanol) and lysed using an Emulsiflex-C3 homogenizer (Avestin, CAN). The resulting lysate was cleared by pelleting debris twice for 30 min at 30,000×g at 4°C in an F21-8×50y rotor (Thermo Fisher). The resulting supernatant was layered on a 40 mL sucrose cushion (buffer C adjusted to 500 mM NH 4 Cl, 1.1 M sucrose) and ribosomes pelleted for 18 h at 142,000×g at 4°C in a 45 TI rotor (Beckman Coulter). Pellets were washed twice and resuspended for 1 h under gentle agitation in 1 mL buffer D (buffer C adjusted to 1 M NH 4 Cl). In order to separate the 70S ribosomes into 30S and 50S subunits, the samples were dialyzed overnight at 4°C against 20 mM Tris pH 7.5, 1 mM MgCl 2 , 200 mM NH 4 Cl, 6 mM 2-mercaptoethanol. Six 10-30% sucrose gradients in buffer D were prepared for each sample, using a Gradient Station IP (Biocomp, USA). Each gradient was prepared in advance, layered with 100-150 μL of sample (~150 A 260 units) and spun at 58,200×g in a SW28 rotor (Beckman Coulter) for 18 h at 4°C. Fractions corresponding to the 30S and 50S subunits were separately diluted to 60 mL in buffer C and pelleted for 18 h at 142,000×g at 4°C in a TI 45 rotor. The pellets were resuspended in 250 μL RNasefree water and flash-frozen for storage. Purified 30S ribosomal subunits were washed twice with 1 vol. of 125:24:1 phenol/chloroform/isoamyl alcohol pH 4.5 followed by once with 1 vol. chloroform. RNA was ethanol precipitated by adding 0.1 vol. of 3 M sodium acetate followed by 2 vol. of ice-cold ethanol and pelleted by centrifugation in a bench top microcentrifuge (10 min, maximum speed). The RNA was dissolved in water (40 μL) and used immediately in RNase digestion reactions.
RNase digestion. Purified rRNA (9-50 ng μL −1 ) or synthetic oligonucleotides (25 μM) were dissolved in water. Digestion reactions were prepared by addition of ammonium acetate buffer (20 mM, pH 7) and P1 nuclease (0.5 U), followed by incubation at 45°C for 4 h. The reaction was then cooled to room temperature, bacterial alkaline phosphatase (150 U) added followed by incubation at 37°C for a further 2 h. Proteins were precipitated by addition of perchloric acid (1% final vol.) and pelleted by centrifugation (20 min, maximum speed). Supernatants were immediately analyzed by HPLC.
HPLC analysis. A fully automated Shimadzu Prominence platform, operated through LabSolutions software, was used for all HPLC analyses. The platform consisted of a LC-20AD ternary, low-pressure mixing solvent delivery system with a DGU-20A inline degasser, SIL-20AHT variable volume auto-injector and autosampler, SPD-M20A diode array detector and CTD-10ASVP heated column oven. HPLC-grade solvents were used for preparing the mobile phase. Peaks were identified by comparing their retention times with standards prepared from commercially sourced nucleosides. For analysis of digested and undigested synthetic RNA oligonucleotides, the HPLC conditions shown in Table 2 were used. For nucleoside quantification in digested samples, the integrated peak area was compared to a dilution series prepared from commercially sourced nucleosides. For analysis of digested 16S ribosomal RNA, the HPLC conditions shown in Table 3 were used.
Fluorescence in situ hybridization. The protocol for FISH was adapted from Valm et al. 41 .   Diener Electronic, Royal Oak, MI, USA) and subsequently attached to a Frame-Seal slide chamber (9 × 9 mm, Biorad, Hercules, CA, USA)), and a drop of mounting medium (Hydromount slide mounting medium, Fisher Scientific) was applied. Samples were then sealed with another plasma-cleaned coverslip and allowed to set for at least 30 min at room temperature before imaging.
Fluorescence microscopy. Two-color fluorescence images except those used to generate Supplementary Fig. 6 were acquired using a microscope previously described 42  . Out-of-focus images were discarded during acquisition, i.e., before analysis. Three-color fluorescence images for multiplexed detection of methylations ( Fig. 4 and Supplementary Fig. 11) and two-color images used to generate Supplementary Fig. 6 were acquired using another home-built microscope. The output from three lasers operating at 488 nm (Toptica, iBeam smart, 200 mW, Munich, Germany), 561 nm (Cobalt Jive, 200 mW, Cobalt, Sweden) and 640 nm (Coherent Cube, 100 mW, Coherent, USA) were attenuated using neutral density filters, and passed through quarter-wave plates, beam expanders and their respective excitation filters (LL01-488-25 for 488 nm FF01-561/14-25 for 561 nm and FF01-640/14-25 for 640 nm; Semrock). The lasers were combined using two dichroic mirrors (FF552-Di02-25×36, FF458-Di02-25×36, Semrock), and passed through the back port of a Nikon Ti-E Eclipse microscope (Nikon, Japan), where they were reflected down the optical axis of a 1.49 NA, 60× TIRF objective (UPLSAPO, 60XO TIRF, Olympus) in epifluorescence mode. Then, 641, 561 and 488 nm excitation was performed sequentially, and emitted fluorescence was collected by the same objective and separated from excitation light by a dichroic mirror (Di01-R405/488/561/635-25×36, Semrock). The red, yellow and green fluorescence emissions were filtered by further bandpass and/or longpass filters The microscope was fitted with a perfect focus system which auto-corrects the zstage drift during a prolonged period of imaging. Out-of-focus images were discarded during acquisition, i.e., before analysis.

Image analysis. Bacteria detection (identifying regions of interest for analysis):
Fluorescence images were analyzed using custom software written in MATLAB (MATLAB R2010b, The MathWorks, Inc., Supplementary Software). For each field of view, two or three images are acquired sequentially for each color channel, exciting the red ('red image') and then green ('green image') fluorophore, and, in the case of three-color imaging, the Cy3 fluorophore ('yellow image'). The process therefore begins with a step to ensure good registration across the image pairs or triplets. To achieve this, a sub-region is defined in the red image and the normalized two-dimensional cross-correlation coefficients are calculated between this sub-region and the yellow or the green image, from which the xy position of maximal cross-correlation can be obtained for each image. The difference between the positions found gives the offset between the green or yellow channel from the red. In some instances, calculation of the cross-correlation does not return realistic values, in particular if the intensities are low or there are few image features. In this case, the offset is set to the median offset found for images of the given data set. The image of one channel is then shifted with respect to the other channel by this offset value, correcting for translational shift.
Prior to the detection of stained bacteria, which appear as local regions of high intensity above baseline levels in fixed positions within the field of view ( Supplementary Fig. 4), the red image is converted to a binary image (mask) using a threshold intensity set to be the mean single pixel intensity of the bandpassfiltered red image plus 20 times this value. Pixels with intensity values below the threshold are set to zero and considered to be background, while pixels with values above the threshold are set to one and potential candidates for bacteria signals. This threshold was determined empirically and by visual inspection of the resulting mask and comparison with the original data. Only the signal from the red channel is used for bacteria detection to minimize any selection bias due to the expected large variation in fluorescence brightness in the green and yellow channels. For example, bacteria with highly methylated ribosomes might not give rise to sufficient intensity in the green channel to be detected, biasing detection toward bacteria with low ribosomal methylation state.
Selection of the signals from single, isolated bacteria: In the next step, objects (bacteria) are detected by tracing continuous regions of ones in the binary image (mask). It is necessary to include further selection criteria in the algorithm for robust discrimination against aggregates of bacteria which may consist of bacteria belonging to different strains. To this end, for each region, the position, size and continuity (number of pixels corresponding to "holes" with value zero in the region) is determined. Signals are assumed to correspond to single bacteria if the area of the region is 1-10 µm 2 and contains < 50 background pixels (value zero). Selection criteria based on region ellipticity were also explored but not found to improve discrimination. For regions that fulfill these requirements (single bacteria), the mean intensity for the region is calculated from the green, yellow and red original images and corrected for the local background by subtracting the average intensity of  a shell around the detected region (+/− 3px). The entire procedure is fully automated and does not require the user to select control areas or individual bacteria. Analysis and presentation of the extracted data: Finally, the ratio of red/green intensity (or yellow/green in the case of three-color experiments) was calculated for each bacterium. Since the distribution of the two-color ratio for a single population is expected to be log-normal, the histograms were plotted logarithmically and fitted to a single-term Gaussian function, thus obtaining the center of each ratio distribution. All plots and further fits were created in OriginPro.
Code availability. MATLAB code for analyzing MR-FISH image data is available at https://github.com/kganzinger/Analysis-Software-for-in-situ-hybridizationdata-in-single-cells. The code requires MATLAB R2010b (or later releases) and the following tool boxes to run: Image Processing, Curve Fitting and Statistics.
Statistics. Sufficient imaging data were collected to yield >450 cells per sample for analysis after thresholding, with three to seven replicate samples per experiment (with n quoted in the appropriate figure legends). Descriptive statistics are used throughout.