Community structure of partial nitritation‐anammox biofilms at decreasing substrate concentrations and low temperature

Summary Partial nitritation‐anammox (PNA) permits energy effective nitrogen removal. Today PNA is used for treatment of concentrated and warm side streams at wastewater treatment plants, but not the more diluted and colder main stream. To implement PNA in the main stream, better knowledge about microbial communities at the typical environmental conditions is necessary. In order to investigate the response of PNA microbial communities to decreasing substrate availability, we have operated a moving bed biofilm reactor (MBBR) at decreasing reactor concentrations (311–27 mg‐N l−1 of ammonium) and low temperature (13°C) for 302 days and investigated the biofilm community using high throughput amplicon sequencing; quantitative PCR; and fluorescence in situ hybridization. The anammox bacteria (Ca. Brocadia) constituted a large fraction of the biomass with fewer aerobic ammonia oxidizing bacteria (AOB) and even less nitrite oxidizing bacteria (NOB; Nitrotoga, Nitrospira and Nitrobacter). Still, NOB had considerable impact on the process performance. The anammox bacteria, AOB and NOB all harboured more than one population, indicating some diversity, and the heterotrophic bacterial community was diverse (seven phyla). Despite the downshifts in substrate availability, changes in the relative abundance and composition of anammox bacteria, AOB and NOB were small and also the heterotrophic community showed little changes in composition. This indicates stability of PNA MBBR communities towards decreasing substrate availability and suggests that even heterotrophic bacteria are integral components of these communities.


Introduction
Autotrophic nitrogen removal from wastewater can be achieved by partial nitritation together with anaerobic ammonium oxidation (anammox). Partial nitritation-anammox (PNA) saves energy due to a reduced need for aeration by > 50% (Siegrist et al., 2008) and enables a higher utilization of organic carbon for production of valuable products, for example, biogas, compared to conventional nitrogen removal with nitrification-denitrification. Together, this makes energy positive wastewater treatment plants (WWTPs) possible (Kartal et al., 2010).
Today, PNA is established for treatment of warm and concentrated wastewater side streams , where the conditions for growth of aerobic ammonia oxidizing bacteria (AOB) and anammox bacteria are beneficial and inhibition of unwanted aerobic nitrite oxidation by nitrite oxidizing bacteria (NOB) can be effective. However, the side stream nitrogen removal at WWTPs treats only 15-20% of the total nitrogen. To utilize the benefits of PNA in the wastewater main stream is highly desirable and has recently become a prioritized research area. In the main stream, the conditions for PNA are much more challenging (De Clippeleir et al., 2013;Hu et al., 2013;Laureni et al., 2016). The cold and diluted water causes low activity and slow growth rate of particularly the anammox bacteria (Hendrickx et al., 2014;Lotti et al., 2015), even though some adaptations to low temperatures have been observed (Dosta et al., 2008;Hu et al. 2013;Hendrickx et al., 2014). Moreover, the competition between AOB and anammox bacteria with NOB and denitrifying bacteria is challenging at these conditions (see e.g. De Clippeleir et al., 2013;Perez et al., 2014), which necessitates detailed knowledge about the dynamics of these microorganisms in order to understand process performance.
Despite the challenges, maintenance and activity of AOB and anammox bacteria at low temperatures and low substrate concentrations have been demonstrated in biofilm-and granular sludge reactors (De Clippeleir et al., 2013;Gustavsson et al., 2014;Lotti et al., 2014a;Gilbert et al., 2015;Ma et al., 2015;Laureni et al., 2016) and in a few studies the major population of AOB, anammox bacteria and NOB have been identified Lotti et al., 2014a). Little is, however, known about the microbial community structure and dynamics at main stream conditions  and how such communities differ from the communities in the PNA reactors treating concentrated wastewater with higher substrate availability. Furthermore, the heterotrophic bacteria in PNA reactors Pellicer-N acher et al., 2014;Chu et al., 2015) most likely affect the nitrogen turnover and process performance, but the composition, diversity and roles of these are little investigated, particularly at main stream conditions.
Here, an experiment was designed to investigate the role of the substrate concentration in shaping the PNA microbial community in a MBBR over 302 days. The influent nitrogen concentration was decreased from 500 to 45 mg-N l À1 at low temperature (13°C) to stepwise approach main stream conditions. For investigation of the composition and diversity of the total bacterial community (including heterotrophic bacteria), the abundance of key functional groups and their localization in the biofilms, a multiphase approach of high throughput amplicon sequencing (Illumina MiSeq), quantitative PCR (qPCR) and fluorescence in situ hybridization (FISH) in conjunction with confocal laser scanning microscopy (CLSM) of cryosectioned biofilms was used. Reactor performance and potential activity of key functional groups was also monitored.

Reactor performance
The concentration of the influent was decreased from target concentrations of 500 to 45 mg-N l À1 from period I to period VI ( Figure S1) resulting in average ammonium concentrations of 311 to 27 mg-N l À1 in the reactor. During periods I to V, the nitrogen removal rate (NRR) was rather similar, with a decrease in period VI, at the lowest influent ammonium concentration ( Table 1). The biomass weight on the carriers was stable, with insignificant changes during the study period ( Figure S3, ANOVA, P > 0.05). The set-up and the performance of the reactor is summarized in Table 1. Time-course displays of nitrogen species are found in Figure S1.

Abundance of autotrophic nitrogen converting bacteria
The anammox bacteria dominated the total bacterial community in all periods, as measured by qPCR (Fig. 1). The gene copy numbers of AOB (amoA) were about two orders of magnitude lower than the anammox bacteria (16S rRNA). The abundances of the NOB, Nitrobacter and Nitrospira, were even lower. There were no major changes in the relative abundances of the anammox bacteria, AOB, Nitrobacter and Nitrospira over the course of the study, as measured by qPCR (ANOVA, P > 0.05), and correlations between the relative abundances for each sampling occasion (n = 17) and the reactor concentrations of nitrogen species, COD and alkalinity were non-significant (P > 0.05). The methods of qPCR, FISH and amplicon sequencing, all showed that anammox bacteria was the largest group followed by AOB and NOB ( Fig. 1 and Table S4). FISH detected a higher percentage of AOB than the other methods, but it should be noted that only 20 to 40% of the cells detected by a general DNA stain (SYTO62) were detected by the general FISH EUB probe mix ( Figure S4).

Batch activity tests of nitrogen converting groups of microorganisms
Batch tests (Fig. 2) were performed to assess the potential aerobic ammonium oxidation (AOB), aerobic nitrite oxidation (NOB), anammox and nitrate uptake rate (potential denitrification). Although the variations between samples and sampling occasions were considerable, the data showed a gradual decrease in potential anammox (ANOVA, P < 0.01, F = 5.7) and an increase in potential nitrite oxidation (ANOVA, P < 0.01, F = 4.6). For the aerobic ammonium oxidation and the nitrate uptake rate, the changes between the periods were not significant (P > 0.05).

Composition and diversity of the biofilm communities
High throughput amplicon sequencing of the 16S rRNA gene (V4 region) showed that the bacterial communities at four periods in the MBBR consisted of similar numbers of OTUs (477 to 523), when resampled at 10 000 sequences (Table S2) and of all the 886 OTUs detected,  236 were shared by all samples. The diversity of the sample from the final period (VI) was somewhat higher, indicative of a slightly more even community (Table S2). Pairwise comparisons of the biofilm communities (Bray-Curtis) in periods I, III and V resulted in coefficients of 0.10-0.11, while period VI differed slightly more (0.15-0.18). However, the dissimilarity coefficients were generally low, indicating similar community structure of all samples. The composition at the phylum level showed that the majority of the sequences belonged to Planctomycetes, with Chloroflexi and Proteobacteria also having large contributions to the community (Fig. 3). In addition, Bacteroidetes, Acidobacteria, Chlorobi, the candidate phylum BRC1, Actinobacteria and Deinococcus-Thermus were present in relative sequence abundances > 0.5%.
The anammox bacteria were all affiliated to the genus Ca. Brocadia in one single OTU that dominated the bacterial biofilm community in all reactor periods (Table 2). Further subdivision of the sequences within Ca. Brocadia, by applying a more stringent criterion of 99% sequence similarity of OTUs, revealed that most anammox bacteria were similar to Ca. Brocadia sp. 40, with a smaller population of Ca. Brocadia fulgida-like bacteria (Table S3). This population was also detected by FISH (0.5-2.0% of total bacteria).
Among the NOB, one OTU belonged to the order Nitrospirales (Table 2) but could not be affiliated to any described bacterium. However, BLAST analysis showed high similarities to unclassified sequences from other nitrogen converting wastewater reactors (OTU1534-1535 in Table S3), suggesting that these non-described Nitrospirales converted nitrogen. In addition, the presence of Nitrospira was demonstrated by qPCR and FISH (Table S4), but no FISH signal was seen with comammox probes for Nitrospira nitrosa and N. nitrificans (Table S1). One OTU highly similar to Nitrotoga was detected in all biofilm communities (Table 2) and Nitrotoga cells were also detected by FISH (Table S4). No OTU was assigned to Nitrobacter, although Nitrobacter was detected by qPCR and FISH (Table S4). However, OTUs with high similarity to Nitrobacter sp., but also to other species within Bradyrhizobiaceae, were revealed by BLAST (OTU 0176, 0226 in Table S3). Hence, the sequence information in the V4 region of the 16S rRNA gene was not sufficient for Nitrobacter identification.
In the MBBR, 43-50% of the sequences were affiliated to putative heterotrophic bacteria. These bacteria were subdivided into 25 orders with a sequence contribution > 0.5% in any of the samples (Fig. 4).

Localization of key bacterial groups in the biofilm
FISH-CLSM of biofilm cryosections was used to show the localization of key bacterial groups (for FISH probes, see Table S1). Clusters of AOB (Nitrosomonas europaea/eutropha, Fig. 5A) and Nitrosospira, Fig. 5B), and clusters of NOB (Nitrospira, Fig. 5C) were detected near the biofilm-water interface. Anammox bacteria were observed in high numbers deeper in the biofilm (Fig. 5), with two populations present closer to the biofilm-water interface (Fig. 5E). Bacteria within the phylum Chloroflexi were also detected both near the biofilm-water interface and deeper in the biofilm (Fig. 5D).

Discussion
Substrate availability is a main factor that determines microbial competitive interactions and thereby shapes the structure of microbial communities (Hibbing et al., 2010;Litchman et al., 2015). PNA is used for treatment of highly concentrated as well as diluted streams of wastewater and the substrate concentrations vary a lot (e.g. Hu et al., 2013;Lackner et al., 2014;Lotti et al., 2014a), but very few systematic studies of the community response to changes in substrate availability have been made. Here, we test the hypothesis that a reduction in substrate availability influences the PNA microbial community structure and function in a MBBR at low temperature, gradually approaching main stream conditions. The stepwise diluted influent resulted in decreased reactor ammonium concentrations, from 311 to 27 mg-N l À1 , as well as decreased concentrations of COD (Table 1). Despite these decreases in substrate concentrations, no major effects on the reactor biomass were observed. The biofilm weight did not change significantly (Table S3). The anammox bacteria dominated the bacterial community with AOB and NOB being considerably fewer (Fig. 1, Table 2, S4), located near the biofilmwater interface (Fig. 5). Changes in the relative abundances of anammox bacteria, AOB and NOB (qPCR) were non-significant between test periods and could not be related to the reactor concentrations of nitrogen species, COD and alkalinity. Changes in potential activity of the anammox bacteria and NOB were observed (Fig. 2) and reflected the nitrogen conversions in the reactor (Table 1), but in general reactor operation was stable (Table 1), suggesting similar functionality of the microbial community.
The estimation of the relative abundances of anammox bacteria, AOB and NOB generally agreed between the methods (Table S4). The largest deviation was the higher AOB percentage assessed by FISH, but smaller differences among the methods were observed also for anammox bacteria and NOB. Discrepancies between rRNA-based FISH and DNA-based qPCR and   sequencing can be expected. A large fraction of the microbial community had a ribosomal content below the FISH detection limit ( Figure S4). However, AOB are known to retain their ribosomes even at challenging conditions such as starvation (Morgenroth et al., 2000), which may help to explain their particularly high relative abundance observed by FISH. Also, the DNA extraction methodology, the choice of PCR primers and the cell copy numbers of target genes influence relative abundances (see e.g. Acinas et al., 2004;Albertsen et al., 2015). Quantification by high throughput amplicon sequencing is furthermore technically challenging (Zhou et al., 2015). Although sequence processing has improved significantly with pipelines, such as Mothur used here (Kozich et al., 2013), relative abundances, especially of rare OTUs (e.g. the NOB), have to be interpreted with caution. Hence, all methods suffer from limitations and multiple methods provide important complementary information. The methods also vary in response time. Specific populations can be estimated by qPCR and FISH on suspended biofilms within a day or two, which is useful for routine monitoring. High throughput amplicon sequencing and FISH biofilms cryosections provide more detailed information, but takes considerably longer time.
The major anammox population was highly similar to Ca. Brocadia sp. 40 (Table 2, Table S3), which has previously been observed in several anammox reactors (van der Star et al., 2008;Park et al., 2010;Costa et al., 2014;Gilbert et al., 2014). Only one population of anammox bacteria is usually observed in PNA reactors (Hu et al., 2013;Gilbert et al., 2014;Laureni et al., 2015). However, using 99% similarity for sequence clustering (Table S3) and a competitor probe to improve the FISH specificity (Table S1, Persson et al. (2014)), a second, closely related, Ca. Brocadia fulgida-like population was detected (Fig. 5, Table S3). It is likely that the two populations have different niches, just as described for   Lotti et al., 2014a,b). The AOB community was dominated by two populations within the Nitrosomonas europaea/eutropha cluster (Table 2, S3), which are commonly found in PNA reactors (Park et al., 2010;Vlaeminck et al., 2010;Pellicer-N acher et al., 2014). Minor OTUs similar to N. oligotropha (sp. JL21) and Nitrosospira multiformis were also detected. This diverse AOB community was confirmed by FISH.
NOB were constantly present ( Fig. 1) and were active during all periods, as seen by the production of nitrate (Table 1, Figure S1) and batch activity tests (Fig. 2). In particular, they had large impact on the process performance in period VI, resulting in low nitrogen removal efficiency (11%). Strategies to abate NOB include careful control of DO-and substrate concentrations (Perez et al., 2014) as well as intermittent periods of anoxic and aerated phases, either at high-or low-DO concentrations (Wett et al., 2013;Ma et al., 2015). Despite maintained ammonium concentrations and careful DO control, NOB could not be repressed in the MBBR biofilms. Unwanted NOB activity in main stream PNA reactors is frequently reported (De Clippeleir et al., 2013;Gilbert et al., 2014;Lotti et al., 2014a) and the strategy for NOB repression depending on the aggregation state of the biomass (suspended, granular, biofilm) and the ecophysiology of AOB and NOB.
The NOB consisted of Nitrobacter, Nitrospira and Nitrotoga. In PNA reactors, the low bulk concentrations of nitrite would select for Nitrospira, rather than Nitrobacter, due to their higher substrate affinity (Isanta et al., 2015). Nitrospira is furthermore hard to outcompete using low DO concentrations due to their high oxygen affinity (Isanta et al., 2015). Nitrospira has, in fact, been the only NOB observed in some main stream PNA reactors (De Clippeleir et al., 2013;Gilbert et al., 2014), but as shown here and elsewhere (Liu et al., 2012), even Nitrobacter can sustain at such conditions. Interestingly, the long-term operation of the MBBR at 13°C allowed the establishment of a small Nitrotoga population (Table 2, S4). Nitrotoga has been shown to be important in activated sludge communities at 7-16°C (L€ ucker et al., 2015), but so far little is known about their ecophysiology, except for their low temperature requirements. Nitrotoga has, to the best of our knowledge, not been previously detected in PNA reactors and this finding may have implications for NOB suppression strategies.
In the MBBR, 43-50% of the sequences were affiliated to putative heterotrophic bacteria. Also in other studies of PNA systems, significant fractions of the microbial communities have been heterotrophs, although little is known about their composition, dynamics and roles (Chu et al., 2015;Gilbert et al., 2014;Pellicer-N acher et al., 2014). The relative abundances of the major contributors of the heterotrophic community in the MBBR (from seven phyla) were stable in relative abundance throughout the study (Fig. 4). This implies that the decreasing COD concentrations in the reactor (Table 1) had little impact on the heterotrophic community and suggests that even heterotrophic bacteria were an integral part of the community, possibly with defined roles in the PNA biofilm. Heterotrophic bacteria may contribute to nitrogen removal via denitrification, but their competition with AOB and anammox bacteria for space and electron acceptors can also be detrimental (Kumar and Lin, 2010). Furthermore, they can utilize soluble microbial products (SMP) from the biofilm (Ni et al., 2012) and aid in biofilm formation (Cho et al., 2010). A minor fraction of the influent COD was consistently removed in the MBBR (Table 1) and batch activity tests showed anoxic nitrate uptake (Fig. 2), which suggests some denitrification. We found members of Rhodocyclales, Burkholderiales, Rhizobiales and Xanthomonadales (Fig. 4), which all are important contributors to wastewater denitrification (Baytshtok et al., 2009;McIlroy et al., 2016) and have been detected in PNA reactors treating organic-free wastewater (Pellicer-N acher et al., 2014;Chu et al., 2015), suggesting SMP utilization. SMP may also have sustained the biofilm population of the nondenitrifying, protein degrading Saprospirales (Xia et al., 2008). Chloroflexi were abundant here (Figs. 3 and 4), as well as in other PNA communities Chu et al., 2015). Chloroflexi can provide biofilm structural integrity (Cho et al., 2010) and metabolize SMP from autotrophs at both aerobic and anoxic conditions (Okabe et al., 2005;Kindaichi et al., 2012), which would explain their distribution throughout the biofilm (Fig. 5). Phycisphaerae, Ignavibacteriales, Deinococcales (Fig. 4) harbour bacteria with mostly undefined ecophysiologies, but their presence here and in other PNA-and anammox communities (Costa et al., 2014;Chu et al., 2015) suggests defined functions.
There are several possible explanations for the observed stability and maintained diversity of the microbial community at the decreasing substrate concentrations. The main anammox bacteria (Ca. Brocadia sp. 40 and Ca. Brocadia fulgida) and AOB (Nitrosomonas europaea/eutropha) have been detected at high relative abundances at different conditions, including a wide range of substrate concentrations (Park et al., 2010;Vlaeminck et al., 2010;Almstrand et al., 2014;Gilbert et al., 2014;Lotti et al., 2014a;Pellicer-N acher et al., 2014), which indicates broad ecophysiologies and a competitiveness at all tested concentrations. Furthermore, the presence of numerous micro-environments in the thick biofilms with gradients of substrate and electron acceptors likely promoted diversity and permitted the coexistence of competing as well as of commensal community members. As mentioned, the community had both active and non-active bacteria; the low ribosomal content of a large fraction of the bacteria indicated inactivity ( Figure S4). The protected environment in the biofilm carriers may offer a refuge site for active and inactive cells, which may slow down community changes, as would the low temperature. Although the time between subsequent test periods may have been too short for major community changes to occur, for the entire study, spanning 302 days, time was likely sufficient. In municipal wastewater, the continuous variations over time in influent composition of substrates and suspended bacteria, are factors that may affect the stability of the microbial community, but these were not addressed here. Very few studies have been performed on PNA using real main stream wastewater, and the impact of these factors is yet not valuated. Maintenance and activity of anammox and AOB populations for at least 240 days in PNA MBBRs receiving pre-treated municipal wastewater was recently shown (Laureni et al., 2016), indicating that, at least for biofilm systems, the influence of these factors for the stability of the key functional populations is manageable.
In conclusion, the bacterial community in a PNA MBBR system was stable during decreasing concentrations of substrate, approaching main stream conditions. Within the guilds of AOB, anammox bacteria and NOB, composition and diversity was maintained at all tested concentrations. The composition was largely stable even for the diverse heterotrophic community, suggesting that they were an integral part of the community.

Experimental procedures
The pilot moving bed biofilm reactor A 200 l MBBR was filled with biofilm carriers (Kaldnes K1) at 40% filling degree. It received reject water after anaerobic digestion from the Himmerfj€ arden WWTP in Stockholm, diluted with tap water. The study period (302 days) was divided into six periods with stepwise decreased influent concentrations of ammonium from 500 mg-N l À1 , representative of reject water, to 45 mg-N l À1 , representative of main stream wastewater, with concomitant decreases in nitrogen loading rate and hydraulic retention time (Table 1). The MBBR was operated at 13°C corresponding to low main stream temperatures in moderate climates.
Redox, pH and DO was measured using online sensors (Cerlic AB, Segeltorp, Sweden). Air supply was provided from the bottom of the reactor and was controlled, via the DO, by a PID controller. The temperature was monitored and controlled by a compact controller (JUMO GmbH & Co. KG, Fulda, Germany) and a cooler (JULABO GmbH, Seelbach, Germany). Mixing of the bulk water and biofilm carriers was achieved by a twoblade stirrer (50 rpm).
For analysis of inorganic nitrogen species and COD in the influent and effluent (filtered 0.45 lm), Dr. LANGE cuvettes were used on a XION 500 Spectrophotometer (HACH LANGE GmbH, D€ usseldorf, Germany).

Batch tests for potential activity measurements
Batch tests were performed to measure potential microbial activities at 25°C. The activity measurements of AOB and NOB was based on the oxidation rate of ammonium (present in the test medium) and nitrite (formed by the AOB during the test) by measuring the oxygen uptake rate (OUR) using a DO probe (YSI 5905; YSI Inc. Yellow Springs, OH, USA). The method was adopted from Surmacz-G orska et al. (1996). At the start of each measurement, ammonium was available at 100 mg N l À1 . First, the total OUR was measured. After 5 minutes, NaClO 3 (17 mM) was added for the inhibition of NOB. After 10 minutes, allylthiourea (43 lM) was added for the inhibition of AOB. The activity of NOB and AOB was obtained from the OUR before minus the OUR after the addition of NaClO 3 and allylthiourea respectively. The remaining OUR, after addition of both inhibitors, is represented by endogenous respiration and substrate oxidation by heterotrophs and was not reported. The potential anammox activity was measured as the production of nitrogen gas (headspace pressure) according to Dapena-Mora et al. (2007) with NH 4 + and NO 2 À at initial concentrations of 70 mg N l À1 each.
Nitrate uptake rate measurements were used for measurements of potential heterotrophic denitrifying activity.
The tests were performed at anoxic conditions in reject water diluted with distilled water at an initial COD concentration of 200 mg O 2 l À1 , with NaNO 3 at an initial concentration of 100 mg N l À1 . Samples for measurement of NO 3 À were taken every 12 minutes for 4 hours.

DNA extraction
DNA was separately extracted from three carriers at each sampling occasion. From each carrier, 30 mg of biofilm was used for extraction using the FastDNA spin kit for soil (MP Biomedicals, Santa Ana, CA, USA) according to the manufacturers' recommendations. The concentration of the extracted DNA was measured using a NanoDrop ND-1000 spectrophotometer (Thermo Scientific NanoDrop products, Wilmington, DE, USA).

Quantitative PCR
qPCR was used for quantification of autotrophic nitrogen converting bacteria according to Persson et al. (2014). In brief, primers for the 16S rRNA gene were used to target all bacteria, anammox bacteria, Nitrospira and Nitrobacter and primers for the amoA gene were used to target AOB. The qPCR was carried out on an iQ5 (Bio-Rad Laboratories. Inc., Hercules, CA, USA) thermal cycler using the SYBR green chemistry. Plasmid target gene inserts were used as standards. The results are presented as copy number fractions of the nitrogen converging bacteria to all bacteria, to get relative abundances. Differences in the relative abundances between periods I-VI was tested by one-factor analysis of variance (ANOVA). Prior to ANOVA, variance homogeneity was confirmed by Levene's test. To assess whether there was a link between the reactor conditions and the relative abundance of the key microbial groups at each sampling occasion (n = 17), the preceding reactor concentrations of nitrogen species, COD and alkalinity was averaged over 10 days. Correlations between these average concentrations and the relative abundances were tested for using a linear model (Pearson's r).
High throughput amplicon sequencing PCR was carried out using the primers 515F and 806R to amplify partial V4 region sequences of the 16S rRNA gene (Caporaso et al., 2011) with dual indexing of the primers (Kozich et al., 2013). Sequencing was performed on an Illumina MiSeq (Illumina Inc., San Diego, CA, USA) using the MiSeq Reagent Kit v2 with PhiX control library spiked in at 7.5%. For details on PCR, purification, and quality control, see supporting methods. The obtained sequences were processed in Mothur (Schloss et al., 2009) for assembly of contigs, denoising, removal of putative chimera, alignment, classification and construction of operational taxonomic units (OTUs) at 97% taxonomic identity (Kozich et al., 2013). For classification with the Bayesian classifier within Mothur, the Greengenes database v. 13.8.99 (McDonald et al., 2012) was used at 80% confidence threshold. Prior to analysing alpha-and beta-diversity, the OTU dataset was subsampled at 10 000 sequences. Raw sequence reads were deposited at the NCBI Sequence Read Archive, no. SRP059362.
Fluorescence in situ hybridization and confocal laser scanning microscopy For FISH, samples were taken in the periods II, IV and VI. The carriers were fixed in paraformaldehyde (4% w/ v) for 8 h at 4°C. For FISH on biofilm suspension, two carriers form each sampling period were used. The fixed biofilm was brushed off the carriers and homogenized in PBS before storage in PBS-ethanol (1:1) at À20°C. The biofilm suspensions (2-4 ll) were spotted on diagnostic microscope slides (8 9 6 mm diameter wells; Menzel GmbH, Braunschweig, Germany) for FISH and images were acquired from 10 random fields of view for each carrier. For FISH on biofilm cryosections, the carriers with fixed biofilm were embedded, frozen and cryosectioned in 20-25 lm thick slices which were captured on microscope slides and subjected to FISH. FISH was carried out at 46°C for 2 h for biofilm suspensions and 4 h for biofilm cryosections according to Almstrand et al. (2014). The probes (Table S1) were 5 0 labelled with Cy3, Cy5, or Alexa 488. The relative abundances of the anammox bacteria, AOB and NOB was estimated on biofilm suspensions as the ratios of the FISH-targeted biovolumes of the specific populations to the total bacteria (EUB338 I-IV probe mix, Table S1) using daime 2.1 (Daims et al., 2006). See supporting methods for details about embedding, cryosectioning, image acquisition and image analysis.

Supporting information
Additional Supporting Information may be found online in the supporting information tab for this article:    Fig. S4. Comparison between FISH (using EUBmix probe) and staining of cells with SYTO 62. Table S1. FISH probes used in the study. Table S2. Diversity of the biofilm communities by high throughput amplicon sequencing. 1000 resamplings of 10 000 sequences. OTUs clustered at 97% sequence similarity. Table S3. Potential autotrophic nitrogen removing OTUs clustered at 99% sequence similarity. Table S4. Percentage of anammox, AOB and NOB during the experiment. Data are range of percentages over periods during the experiment (see Table 1 for time periods). FISH data are biovolume of specific probe targeted guilds in percentages of the total biovolume measured by EUB probe mix (see Table S1 for probes). FISH data are from periods II, IV and VI. High throughput amplicon sequencing data are percentages of OTUs from target group out of the total number of OTUs during periods I, IV, V and VI. qPCR data are percentages of the different target groups of the total bacteria measured by a universal primer pair. qPCR data are from periods I -VI. See Experimental Procedures for details. Data S1. Supporting methods and references.