Introduction

Septic tanks are the oldest, simplest, and common primary systems for the onsite treatment of domestic wastewater. These anaerobic systems are more used as decentralized alternatives for treatment and are very attractive due to some favorable economic and functional reasons like low-cost, easy installation, operation and maintenance, being widely used to meet residence and small agglomeration demands. This kind of wastewater treatment system is favored in tropical countries by the predominance of a warm climate (Silva et al. 2013).

Conventional septic tanks can provide suspended solids removal, solid storage and can function as an anaerobic bioreactor for digestion of the organic matter. However, there are several inherent problems associated to such systems, the most significant one being its low treatment efficiency (25–35% of COD) with limited removal efficiency (Cullimore and Viraraghavan 1994; Nasr and Mikhaeil 2013). Also, onsite treatment systems are not effective either in removing nitrate and phosphorus compounds or in reducing the abundance of pathogenic microorganisms (Cullimore and Viraraghavan 1994; Metcalf et al. 2014). To overcome these problems, it is necessary to improve the existing design and/or to add post-treatment stages. There are several options for the post-treatment of septic tank effluent (Panswad and Komolmethee 1997; Wu et al. 2011), the most recommended is the use of an anaerobic filter (Agency 2002; Raman and Chakladar 1972). The efficiency values of septic tanks can increase between 70 and 80% (COD) when combined with anaerobic filter (Von Sperling 2007).

The monitoring of wastewater treatment systems is crucial for determining the quality of effluent water and the efficiency of the process. In addition to the monitoring of physicochemical parameters, such as COD, pH, and total suspended solids, among others, the bio-monitoring or biological monitoring can reveal important information about the process (Senthil Kumar et al. 2018).

The septic tank and anaerobic filter treatment units are based on anaerobic digestion processes performed by microorganisms, and their efficiency is directly linked to microbial community diversity. Thus, the microbial communities in these systems are crucial for well-performing processes. However, monitoring and maintaining wastewater treatment systems are still based on empirical relationships between physicochemical and operational parameters, which are not enough for reliable performance (Liu et al. 2016b). A systematic understanding of the microorganisms present in the wastewater treatment systems as a function of environmental factors and how they influence the performance is important to improve process stability and efficiency and to provide important guidance in diagnosis and prognosis (Liu et al. 2016b).

In addition to the traditional cultivation-dependent microbiological procedures, other techniques allow a more precise investigation of the composition of microbial communities, including 16 rRNA gene clone libraries, community profiling techniques like denaturing gradient gel electrophoresis (DGGE), fluorescence in situ hybridization (FISH) as well as high throughput sequencing of 16S rRNA genes and whole metagenome (Shu et al. 2015). Large scale sequencing of 16S rRNA gene amplicons is a powerful tool to investigate the ecology of microbial-mediated processes (Senthil Kumar et al. 2018). This technique allows one to analyze the structure, composition, and diversity of the microbiome present in a given environment. Liu et al. (2016a; b) demonstrated seasonal variability in microbial communities in various wastewater treatment systems in China using high throughput sequencing of the 16S rRNA gene. Based on the biological information, the researchers were able to create a satisfactory model to predict the effluent BOD, suspended solids, and total nitrogen values, providing an alternative for the assessment of the performance of the wastewater treatment system (Liu et al. 2016b). Despite the availability of these tools to survey microbial communities, the treatment by septic tanks and anaerobic filters are poorly evaluated. Connelly et al. (2019) carried out large-scale sequencing of two septic tanks (conventional and solar) and observed the presence of key taxonomic groups that were robust over time. Additionally, the authors speculated that the microbiology of septic tanks is highly variable as a function of wastewater features. Thus, the survey of treatment systems with septic tanks and anaerobic filters could provide data for the improvement of anaerobic process stability (Connelly et al. 2019).

In this study, 16S rRNA gene high throughput sequencing was used to investigate the microbial diversity from two different systems composed by septic tank and anaerobic filter applied in the wastewater treatment in a factory and rural school. The aims of the present study were to (i) compare the taxonomic and functional prediction profiles between the two wastewater treatment systems (factory and rural school); (ii) compare the taxonomic and functional prediction profiles between the two stages (septic tank and anaerobic filter); and (iii) correlate the biological information with the physicochemical parameters.

There is a big gap in the literature on taxonomic profiles of wastewater treatment systems object of this study, which likely represents a barrier in achieving higher efficiency values of the processes.

Material and methods

Sampling details and site description

In this study, 14 sludge samples were collected from two domestic wastewater treatment systems composed of a septic tank combined with anaerobic filter (STANF). The samples were collected from the bottom of the tanks using sampler and 500 mL flasks previously “washed” with the sludge. One of the treatment systems studied is located at a fiberglass product manufacturing factory (22° 34′ 21.0″ S 47° 28′ 19.2″ W) and the other one at the rural school Professor Dorivaldo Damm (22° 32′ 16.1″ S 47° 16′ 48.0″ W), both in Limeira, SP (Fig. S1). Samples were collected in duplicate and different seasons of the year.

Description of the domestic wastewater treatment system: factory

The fiberglass manufacturing factory is located on the border of the municipalities Limeira and Iracemápolis, São Paulo, Brazil. Considering that the factory employs eight workers (sewage contribution estimated: 50–70 L person−1 day−1), the wastewater treatment system receives approximately 400–560 L day−1. The STANF is composed of a septic tank combined with an anaerobic filter and discharges the final effluent into a sinkhole (Fig. S2).

Description of the domestic wastewater treatment system: rural school

The rural school is located in the rural area of the municipality of Limeira, São Paulo, Brazil. The rural school has 677 students and 50–90 employees. The treatment system is composed of a grease trap, a septic tank, four anaerobic filters, and eight sinkholes (Fig. S3). The sewage generated is estimated between 36.500 and 38.800 L day−1 (sewage contribution estimated: 50 L person−1 day−1).

Sludge samples

At the rural school, liquid samples were collected in three points (Fig. S3), input and output of the anaerobic filter, and input of the septic tank. Sampling was performed in three seasons of 2018, autumn (June), winter (August), and spring (October). At the factory, liquid samples were collected in two points of the wastewater treatment system (Fig. S2), the input of the septic tank and output of the anaerobic filter, in September (winter) and October (spring) 2018 and January (summer) and April (autumn) 2019. All sludge samples were sampled in duplicate and kept on ice immediately after sampling. Samples were further stored at − 20 °C until DNA extraction.

Physicochemical analyses

Analysis of pH (4500B), fixed solids—FSS (2540E), volatile solids—VSS (2540E), alkalinity (2320B), nitrogen ammonia (4500-NH3 B) and chemical oxygen demand (5220D) were determined according to the Standard Methods for Examination of Water and Wastewater (APHA AWWA-WPCF 2005).

Molecular analyses

DNA extraction and sequencing of 16S rRNA genes

DNeasy Power Soil Pro Kit (Qiagen) was used for DNA extraction according to the manufacturer’s instructions. DNA integrity was checked through electrophoresis in 0.8% agarose gel. DNA quality was assessed by a NanoDrop1000 spectrophotometer (Thermo Fischer Scientific, Waltham, MA, USA).

The hypervariable V4 region of 16S rRNA gene from the microbial community of sludge samples was sequenced using Illumina MiSeq platform 2 × 250 bp by NGS Soluções Genômicas (Piracicaba, SP, Brazil) using the modified primers 515F (5′ GTGYCAGCMGCCGCGGTAA) and 806R (5′ GGACTACNVGGGTWTCTAAT) (Caporaso et al. 2010). In these primers, additional degeneracy was added to reduce bias against Crenarchaeota/Thaumarchaeota and the SAR11 clade (Apprill et al. 2015; Parada et al. 2016).

Taxonomic profiles

Quality control of sequencing reads was performed using FASTQ v.0.11.5 (Andrews 2010). Trimmomatic v. 0.39 (Bolger et al. 2014) was used to trim reads with quality lower than 30 (Phred score) and length smaller than 100 bp. Further bioinformatics analyses were carried out using Quantitative Insights into Microbial Ecology (QIIME2, version 2019.4, https://docs.qiime2.org/2019.4) (Bolyen et al. 2018) and its plugins. The ‘cutadapt’ plugin (Martin 2011) was used for primer trimming. “Qiime tools import” plugin was used for the import of demultiplexed quality filtered paired-end reads and the creation of the “artifact” file (type ‘SequencesWithQuality’) followed by denoising, chimera removal (consensus method) and clustering into representative sequences, amplicon sequence variants (ASVs), using “dada2” plugin (Callahan et al. 2016) (via q2-dada2). All ASVs were aligned with mafft (Katoh et al. 2002) (via q2-alignment) and used for phylogenetic reconstruction with fasttree2 (Price et al. 2010) (via q2-phylogeny). The taxonomic assignment of ASVs was done using q2-feature-classifier plugin (Bokulich et al. 2018) and classify-consensus-vsearch (Rognes et al. 2016) against the SILVA ribosomal RNA gene database version 132 (Quast et al. 2012).

Functional prediction profiles

Phylogenetic Investigation of Communities by Reconstruction of Unobserved States (PICRUSt2) is a software for inferring metagenome functional content from 16S rRNA gene sequencing data. The output ASV table from taxonomic analysis (section 'Taxonomic profiles') was used as input into PICRUSt2 QIIME2 plugin (q2-picrust2) (Douglas et al. 2019) (https://github.com/picrust/picrust2/wiki/q2-picrust2-Tutorial). The KEGG ortholog database (Kanehisa et al. 2016) was used for inference from PICRUSt results. These results were normalized calculating the relative abundance of each KEGG ID. Specific metabolisms were explored, like carbon and energy metabolisms (KEGG level 2).

Statistical analyses

The downstream statistical analyses were developed in the R statistical environment (v. 3.6.1) (R Core Team 2013). The taxonomic and count tables and metadata files were imported as phyloseq object using the R package Phyloseq (McMurdie and Holmes 2013). The technical replicates were combined using the geometric mean. Principal coordinates analysis (PCoA) based on Bray–Curtis (Bray and Curtis 1957) and Weighted Unifrac (Lozupone et al. 2011) distances were performed to evaluate how divergent the technical replicates and the samples were before and after combining the replicates. Sequencing coverage was evaluated by rarefaction analysis. Alpha diversity indices, including Chao1 richness estimator (Chao 1984), observed species, Shannon–Wiener index H′ and Simpson evenness index J (Magurran 2013), were calculated using Phyloseq package in R. Statistical differences in alpha diversity indexes between both wastewater treatment systems were determined by the one-way ANOVA test. Before, data normality was assessed by the Shapiro–Wilk’s test. Shared families among the wastewater treatment systems were shown with a Venn diagram (Bardou et al. 2014). Microbial compositions were expressed as relative abundances at the levels of phylum, family, and genus. DESeq2-phyloseq was used to analyze the genera differently abundant (p < 0.05) between the two domestic wastewater treatment systems (Love et al. 2014; McMurdie and Holmes 2014). Sequences yielded in this study were deposited at the European Nucleotide Archive (ENA) database under the project accession number PRJEB36453.

Results and discussion

Physicochemical characterization

Eight samples were taken in the factory and nine samples in the rural school, at the initial, intermediate (only at the school) and final treatment stage, along the four seasons of the year, aiming at the physicochemical characterization of the sludge (Figs. S2 and S3).

The pH is an essential parameter for maintaining anaerobic metabolism in the treatment systems (Bodkhe 2009). The pH values (Table 1) of input and output in the STANF of the factory were in the range of 6.7–8.3 and 7.7–8.1, respectively, along the different seasons. Meanwhile, at the rural school, pH values were between 6.8–7.1 and 6.9–8.1 for the input and output of the septic tank, respectively, and 6.9–7.2 at the end of the treatment system (output of anaerobic filter). The alkalinity of influent and treated effluent at the factory was in the range of 235–644 mg/L and 240–610 mg/L, respectively, as CaCO3 (Table 1). Meanwhile, at the rural school the alkalinity of input and treated sludge was in the range of 509–685 mg/L and 593–836 mg/L, respectively, as CaCO3. The ratio of intermediate to total alkalinity is a simple measure of the stability of an anaerobic process. This ratio indicates a balance between acidogenesis and methanogenesis in the treatment system, and it should be maintained well below 0.5 for optimum functioning (Bodkhe 2008). In this work, these ratios varied from 0.13 to 0.28 at the factory and from 0.14 to 0.78 at the rural school.

Table 1 Physicochemical measurements of sludge samples

Influent COD ranges were 195–254 and 742–962 at the factory and the rural school, respectively. Figure S4 shows the COD removal efficiency in the two treatment systems along the different seasons. COD reduction varied from 60 to 83% among the seasons at the factory (Fig. S4, green bars). Meanwhile, at the rural school, the COD removal rate was lower than 30% (Fig. S4, blue bars). This may be attributed to (i) issues with hydraulic short-circuit in the septic tank; (ii) unequal effluent distribution between the septic tank and the anaerobic filters (Fig. S3b); and (iii) a higher input COD concentration, which was possibly due to a higher organic load related to food preparation. Although there were two steps of treatment in the rural school, the low COD removal rate in the school was equivalent to the observed in septic tanks (Von Sperling 2007), indicating that hydraulic issues may have hindered organic removal.

The concentration of ammonia in the influent varied in the range of 45–154 mg/L at the factory and 101–225 mg/L at the rural school. At the factory, 61.9% of the ammonia was incorporated in spring and 31.5% in summer. While at the rural school, 26.3% of the ammonia was incorporated in spring and 25% in winter. Despite a high concentration of ammonia that can inhibit the anaerobic process (Von Sperling and de Lemos Chernicharo 2005), the concentrations observed in the two treatment systems were below the levels reported inhibiting microbial growth (> 1500 mg/L) (McCarty 1964).

Microbiome composition of sludge samples

Sequencing statistics

Twenty-eight sequence datasets were obtained, derived from 16 rRNA gene sequencing of 14 samples in duplicate. The 16S rRNA gene sequencing yielded 9.8–16.8 × 104 sequences per sample as raw data, with an average length of 271 bp. On average, after trimming, denoising, and chimera removal, 30.98% of sequences were removed due to low quality, and the average lengths were reduced to 100–225 bp (Table S.1). The average GC-content was 53%.

Assessment of microbial community composition and structure in the two wastewater treatment systems

Microbial community analysis of sludge samples based on 16S rRNA gene sequencing allowed clustering of sequences into ASVs and subsequent alpha diversity calculations (Table 2 and Fig. 1). The number of ASVs obtained ranged from 402 to 773 and 848 to 1013, for factory and rural school datasets, respectively (Table 2). Rarefaction analyses showed that all samples reached the plateau, indicating that sequencing effort was enough to cover the microbial diversity in these treated and untreated sludge samples (Fig. 1a). In Table 2, Chao1 (species richness estimator) values indicated that species richness was higher in all rural school sludge samples, especially in the septic tank. The highest species richness was observed in the autumn sample (rural school, Septic Tank Autumn/18). ANOVA analyses (p < 0.01) showed a significant effect of the wastewater treatment system (factory or rural school) on the observed ASVs (p-value 0.00006), Chao1 (p-value 0.00006) and Shannon (p-value 0.00903) index (Table 2), confirming higher abundance and diversity in the samples from the rural school.

Table 2 Summary of species richness and diversity estimates in sludge samples
Fig. 1
figure 1

a Rarefaction curves of species richness as a function of sequencing effort of microbial communities from sludge samples of the two domestic wastewater treatment systems; b Multidimensional scaling analysis based on pairwise Bray–Curtis (the first two coordinates are shown, representing 74.7% of the total variance), and c Weighted UniFrac (representing 80.4% of the total variance) distance matrices of the bacterial communities; colors represent samples and shapes represent stage of treatment (circle—septic tank, square—anaerobic filter)

MDS analysis of microbial communities of all samples based on Bray–Curtis and Weighted UniFrac distances matrices allowed clustering of samples by treatment system (factory and rural school). In addition, samples of the factory were separated into two groups according to the stage of treatment (septic tank and anaerobic filter) (Fig. 1b), indicating that microbial communities are different between the two units of treatment in the factory. On the other hand, microbial communities from the two stages of treatment at the rural school were more similar. This similarity observed in samples from the septic tank and anaerobic filter at the rural school corroborates the possibility of hydraulic short-circuit. Nevertheless, Weighted UniFrac analysis (Fig. 1c), which takes the phylogenetic distance between ASVs into account, showed that microbial communities from all samples are phylogenetically close to each other. Despite the variation of the mean temperature of the region (ranging from 17 to 26 °C when the samples were collected), no impact in the microbial community related to the different seasons was observed. Most likely, the heat generated by the biological process and the placement of treatment units reduced the susceptibility to external temperature variations. The anaerobic filter and septic tank in both systems were placed buried in the soil, reducing the heat exchange with the external environment.

Sequencing of 16S rRNA genes in all sludge samples detected 836 ASVs. These ASVs were classified into 56 phyla, 470 families, and 836 genera, with 78.3% classified at the family level and 74.6% at the genus level. Taxonomic affiliation revealed that bacteria accounted for 88–96% and 92–97% and archaea for 3.8–12% and 2.4–7.7% of the total community in the factory and the rural school, respectively. The use of methodologies such as metagenomics and metatranscriptomics, aiming to scrutinize microbial community composition, structure, and function, confirmed that members of the Bacteria domain are largely responsible for carbon removal in activated sludge from municipal wastewater treatment system (Sánchez et al. 2011; Yu and Zhang 2012) while the Archaea domain seems to be less relevant (Ferrera and Sánchez 2016). At the phylum level (Fig. 2a), more than 50 distinct phyla were observed. Proteobacteria, Bacteroidetes, Chloroflexi, and Firmicutes were the most representative phyla in the factory sludge samples; whereas Proteobacteria, followed by Firmicutes and Bacteroidetes were the most abundant phyla in the rural school. Studies of microbial community composition and structure in different wastewater treatment plants have demonstrated the dominance of Proteobacteria members, followed by other phyla, like Bacteroidetes, Chloroflexi, Firmicutes, among others, depending on the prevalent conditions (Boon et al. 2002; Snaidr et al. 1997; Wagner et al. 1994; Wang et al. 2011). Chloroflexi, Proteobacteria, Bacteroidetes and Synergistetes phyla belong to a core group of common phylotypes from anaerobic digesters (Riviere et al. 2009). In the present study, samples from the fiberglass factory were the ones that showed microbial community structure most similar to the core group. Proteobacteria and Firmicutes are important groups of microbes in anaerobic treatment systems because members of the classes β-proteobacteria and γ-proteobacteria are involved in the first steps of the degradation process (Riviere et al. 2009) and are propionate, butyrate, and acetate-utilizers, and Firmicutes members correspond to the butyrate-utilizing microbes (Ariesyady et al. 2007), including syntrophic bacteria that can degrade volatile fatty acids (Riviere et al. 2009). These products can be degraded to hydrogen, which is then degraded by hydrogenotrophic methanogens (Riviere et al. 2009). The Chloroflexi phylum comprises a fermenting bacterial group frequently reported in anaerobic reactors that may have a role in the granulation due to their filamentous morphology (Bovio et al. 2019; Demirel and Scherer 2008; Fernández et al. 2008; Riviere et al. 2009). Bacteroidetes are known as proteolytic bacteria (Kindaichi et al. 2004), able to degrade proteins and then to ferment amino acids to acetate (Riviere et al. 2009).

Fig. 2
figure 2

Taxonomic affiliation and relative abundances at a phylum and b family levels. Samples were divided according to the site of wastewater treatment system. Abundance was defined as the number of sequences affiliated to a phylum or family divided by the total number of sequences per sample

The Euryarchaeota phylum (2.4–11.6% relative abundance) was the most abundant archaeal group in the sludge samples, followed by Omnitrophicaeota (0.03–1.4% relative abundance). The methanogenic archaea belong to the Euryarchaeota phylum, mainly present in anaerobic processes, generating methane as a value-added by-product (Ferrera and Sánchez 2016). Methanogenic archaea are active at the end of the anaerobic degradation process and are very specialized because they can degrade a very limited number of substrates (Demirel and Scherer 2008; Fernández et al. 2008).

In the factory wastewater treatment system, the most representative families (Fig. 2b) were Anaerolineaceae, Bacteroidetes VadinHA17, Methanobacteriaceae, and Syntrophaceae. Meanwhile, Eubacteriaceae was the most abundant family in the rural school treatment system, followed by Moraxellaceae, Methanobacteriaceae, and Syntrophaceae (Fig. 2b). Members of the Bacteroidetes environmental group VadinHA17 were isolated from an anaerobic digester treating winery wastewater (Baldwin et al. 2015).

The predominant genera in the factory were Smithella (5.8%), Methanobacterium (3.2%), Syntrophohabdus (3.0%), Syntrophus (2.4%), and Syntrophobacter (1.7%). Meanwhile, Acinetobacter (7.7%), Smithella (4.4%), Arcobacter (2.9%), Methanobacterium (2.89%), and Syntrophobacter (2.4%) were the top five most abundant genera in the rural school. Acinetobacter has been related to fecal contamination (McLellan et al. 2010). The genera Smithella and Syntrophobacter are considered typical obligate anaerobic syntrophic bacteria, able to oxidize propionate and fatty acid under methanogenic, mesophilic temperature conditions in association with hydrogen scavengers such as members of Methanomicrobiaceae or Methanobacteriaceae (Embree et al. 2015; Ju et al. 2017; Kato and Watanabe 2009; McInerney et al. 2015) via hydrogenotrophic methanogenesis pathway (Werner et al. 2011). The study of the sewage community composition mainly focuses on syntrophic microorganisms associated with methanogenic archaea (McInerney et al. 2009; Narihiro et al. 2015). Functional redundancy, especially in hydrogen production, and the high diversity among syntrophs of the same genus, make them more resistant and resilient to disturbances, which is essential to maintain robust anaerobic treatment systems over time (Allison and Martiny 2008; Fujimoto et al. 2019). The proportion of syntrophic bacteria (Smithella, Syntrophus, Syntrophobacter, Syntrophohabdus) was higher in the factory than in the rural school. Most likely, the higher proportion of syntrophic bacteria in the factory could be due to a stimulus caused by the presence of solvents or other toxic compounds, used in fiberglass manufacturing, in the sewage. Torres et al. (2018) used an upflow anaerobic sludge blanket reactors (UASB) to treat wastewater polluted with organic solvents, like ethanol, ethyl acetate and 1-ethyoxy-2-propanol. Analysis of the microbial community revealed that the syntrophic microorganisms predominated the reactor and were able to produce acetate and propionate from ethanol (Torres et al. 2018).

Many sequence analyses of methanogenic sludge have shown that archaeal communities are mainly composed of Methanoregulaceae (hydrogenotrophic), Methanosarcinaceae (hydrogenotrophic/acetotrophic/methylotrophic) and Methanobacteriaceae (hydrogenotrophic) (Ferrera and Sánchez 2016). The hydrogen solubility is higher at low temperatures, thus the hydrogenotrophic methanogenesis pathway is favored, because the substrate availability is increased, resulting in the availability of free energy for microbial growth (Kotsyurbenko 2005). During anaerobic treatment of various wastewaters at different temperatures, the hydrogenotrophic methanogenesis pathway was found to be dominant (Álvarez et al. 2008; Bialek et al. 2012; Connaughton et al. 2006; McHugh et al. 2004). In the present study, the hydrogenotrophic methanogen Methanobacterium was found in higher abundance in both systems compared to the acetotrophic methanogen Methanosaeta. In a previous study on the treatment of long-chain fatty acids (LCFA) at mesophilic conditions, Methanobacterium members were found at a higher relative abundance than Methanosaeta (Duarte et al. 2018). It was also found that Methanobacterium spp. were less sensitive to hydraulic and organic shocks than Methanosaeta (Kundu et al. 2013). Significant enrichment of Methanobacterium could be produced by the increase in the hydrogen concentration (Wu et al. 2019) because this methanogenic archaea can produce methane by reducing CO2 with H2 and formic acid and was often observed in organic waste anaerobic treatments and phenol-degrading enrichment cultures (Chen et al. 2008; Sierra et al. 2018; Zhang et al. 2018). In other studies, the predominant genera were acetotrophic methanogens such as Methanosaeta and Methanosarcina (Ariesyady et al. 2007; Fredriksson et al. 2012; Stets et al. 2014). Herein, Methanosaeta was found in higher relative abundance in the factory than in the school (data not shown) and Methanosarcina was practically absent in both systems. Methanosaeta requires a lower concentration of acetate than Methanosarcina and is more resistant to environmental changes (Liu and Whitman 2008). In the absence of acetotrophic methanogens, acetate can be converted to hydrogen by syntrophic acetate-oxidizing bacteria, thus stimulating the hydrogenotrophic pathway (Karakashev et al. 2006). Members of the Clostridia class (i.e. Clostridiaceae, Eubacteriaceae, Ruminococcaceae) can perform syntrophic acetate oxidation (De Vrieze et al. 2015; Müller et al. 2016). A high relative abundance of Eubacteriaceae was observed at the rural school, and Clostridiaceae and Ruminococcaceae in the septic tank and the anaerobic filter at the factory, respectively, suggesting that the hydrogenotrophic methanogenesis pathway is stimulated by the syntrophic association in both sites. However, it is known that syntrophic acetate oxidizers are slow producers, and thus less competitive than acetotrophic methanogens (Westerholm et al. 2016), as observed in the differential efficiency between the factory and the rural school wastewater treatment systems. The hydrogenotrophic methanogenic pathway seems to be feasible in both sites. However, it is more efficient in the factory, probably due to community composition, syntrophic consortia, and the lack of issues of hydraulic short-circuit.

Diverse studies about wastewater treatment show that the most common methanogen species found depend on the type of wastewater input. Dairy wastes are characterized by high levels of free ammonia (3.6–6.1 mg/L) (Karakashev et al. 2005) and volatile fatty acids, and members of Methanosarcinaceae, Methanomicrobiales, and Methanobacterium thermoautotrophicum are present as dominant methanogens (Ahring 1995; Baloch et al. 2007; Karakashev et al. 2005; Koster and Lettinga 1984). Meanwhile, cheese whey wastewater is characterized by the presence of long-chain fatty acids, mainly oleic acid, and species such as Methanosaeta spp. and Methanobrevibacter spp. (Demirel and Yenigün 2006; Ince et al. 2003; Perle et al. 1995; Uyanik et al. 2002). In the pulp and paper wastewaters, toxic and recalcitrant compounds (i.e. lignins, resins, tannins, and highly chlorinated organics, such as chlorophenolic compounds) are commonly found and Methanosarcina spp. and Methanobacterium spp. occur as dominant methanogenic archaea (Bolaños et al. 2005; Buzzini and Pires 2002; Buzzini et al. 2006; Demirel and Scherer 2008; Kortekaas et al. 1998; Ney et al. 1991; Roest et al. 2005; Sierra-Alvarez 1990). As already mentioned, at the rural school, food preparation is a daily activity. The methanogen Methanobrevibacter was found in much higher relative abundance in the rural school system than in the factory one. And Methanobacterium is slightly more abundant in the factory than in the rural school. However, the relative abundances of such phylotypes are low (~ 0.4%) in the total microbial community.

Madigou et al. (2019) evaluated the consequences of abrupt temperature modification on the microbiota of anaerobic digestion (Madigou et al. 2019). They operated two different size reactors which were subjected to temperature increase and decrease, first 35 ºC followed by an abrupt increase to 55 ºC and finally a decrease to 35 °C. They observed microbial shifts after an increase or decrease of temperature and concluded that the bacteria Ruminococcaceae and the archaea Methanobacterium were able to recover their initial abundances after abrupt temperature modifications, suggesting that they were key drivers of bioreactor resilience after return to the mesophilic condition. Mesophilic processes are more stable and robust, requiring less energy and with less probability of inhibition by long-chain fatty acids, thus resulting in a more efficient system (Fernández-Rodríguez et al. 2015). Ruminococcaceae family was found as the predominant phylotype in a methanogenic culture enriched with Methyl tert-butyl ether (MTBE) (Liu et al. 2016a). All members of this family are obligate anaerobes and can produce acetate from hydrogen and carbon dioxide using the acetyl-CoA pathway (Drake et al. 2006).

The different stages (septic tank and anaerobic filter) of each treatment system (factory and rural school) showed a taxonomic overlap of microbial families (Fig. S6). In total, 96 families were shared between both systems. The number of families shared between each stage in the rural school (46) was higher than in the factory (9). In the rural school, 22 and 23 families were exclusive in the septic tank and the anaerobic filter, respectively. In the factory, 11 and 18 families were exclusive in the septic tank and anaerobic filter, respectively. These results are congruent with Bray–Curtis analyses, which showed that in the factory there was higher speciation between the two stages of the treatment compared to the rural school (Fig. 1b). The anaerobic treatment process is composed of four stages (i.e. hydrolysis, acidogenesis, acetogenesis, and methanogenesis) (Angelidaki and Batstone 2011). The acidogens and methanogens have different growth rates, nutritional requirements, and resistance to environmental changes, such as variation in temperature and input sewage characteristics (Shi et al. 2019). Thus, the two-stage or two-phase anaerobic system treatment, such as septic tank-anaerobic filter, has been proposed to optimize conditions for the growth of both kinds of microorganisms and to improve efficiency (Azbar and Speece 2001; Pohland and Ghosh 1971; Shi et al. 2019). The lack of differentiation in the microbial species between the two phases of the rural school wastewater treatment is likely a result of hydraulic short-circuit issues, contributing to a low removal of COD.

The volcano plot (Fig. 3) showed a differential abundance of genera in each site. In the factory wastewater treatment system, genera like Ruminococcaceae UCG-010, Methylobacter, Methanomethylovorans, Syntrophus, Leptolinea, and Methanolinea, among others, had higher abundance compared with the rural school treatment system. Petriglieri et al. (2018) characterized microbial communities in more than 30 anaerobic digesters and observed that Leptolinea was the dominant Chloroflexi member (Petriglieri et al. 2018). Leptolinea is a filamentous and strict anaerobic bacterium, commonly found on the surface of granular sludge (Delforno et al. 2014; Yamada et al. 2006). Zhang et al. (2019) studied the microbial communities present in different full-scale anaerobic digesters and linked them to the digester performance. They found that Leptolinea, belonging to the Anaerolineaceae family, was positively correlated with Methanosaeta (Zhang et al. 2019). Anaerolineaceae and Methanosaeta (acetotrophic methanogen) are syntrophs in the acetotrophic pathway (Liang et al. 2015; McIlroy et al. 2017; Zhao et al. 2016). Syntrophus is a strictly anaerobic bacterium that can degrade fatty acids and benzoate in syntrophic association with hydrogen/formate consumers (Jackson et al. 1999; McInerney et al. 2007). A positive correlation between Syntrophus and Methanolinea was observed previously (Zhang et al. 2019). These two genera were found in higher abundance in the factory compared to the school, reflecting a syntrophic community able to efficiently utilize complex carbon substrates in the factory wastewater treatment. Methanomethylovorans, another genus with higher abundance in the factory, is a mesophilic, methylotrophic, methanogenic archaea, able to use methanol, mono-, di- and trimethylamine, dimethylsulfide, and methanethiol as catabolic and methanogenic substrates (Cha et al. 2013). Particularly, fiberglass production involves a binder that could produce odor due to the presence of trimethylamine (Miele 1994). On the other hand, Achromobacter, Acinetobacter, Thermovirga, Bacteroides, and Lactivibrio showed higher abundance in the rural school treatment system. Dahle and Birkeland (2006) found a species of Thermovirga able to use protein substrates, some single amino acids, and few organic acids (Dahle and Birkeland 2006). This type of specialized metabolism is expected in the rural school wastewater treatment, considering that there were food residues derived from the preparation of meals.

Fig. 3
figure 3

Enhanced volcano plot demonstrating differential abundance of genera (p < 0.05) between the two domestic wastewater treatment system sites. Scattered points represent genera: the x-axis is the log2 fold change for the genera abundance in the factory (left) vs. rural school (right), whereas the y-axis is the − Log10P (where P is the probability that a genus has statistical significance in its differential abundance). Red dots are thus genera significantly over-abundant in each wastewater treatment system, and green dots are genera without significant abundance between both systems

Functional prediction using Picrust

The average values calculated from all samples of the first level in the metabolisms of KEGG orthology were 09100 Metabolism (38.12%), 09120 Genetic Information Processing (24.71%), 09130 Environmental Information Processing (14.78%), Cellular Processes (5.75%) and Unclassified (14.45%). Inside the 09100 Metabolism category, the carbohydrate metabolism (level 2) accounted for ~ 7.0% of all sequences. Pathways such as pyruvate, glycolysis, and gluconeogenesis metabolism belong to it (Fig. 4—section VII). Genes like aceE, pdhA, pdhB, and aceF are present in the acetogenesis pathways from pyruvate. This pathway was more abundant in the dataset from the rural school treatment system. Aldehyde dehydrogenase, yiaY, frmA, adh_1 genes are involved in the synthesis of ethanol from acetate. The alcohol dehydrogenase codified by yiaY gene was more abundant in the rural school than in the factory (Fig. 4).

Fig. 4
figure 4

Functional inference from phylogenetic data. Genes from specific metabolism (i) methanogenesis from methylated compounds; (ii) methanogenesis from methanol; iii) hydrogenotrophic methanogenesis; (iv) acetotrophic methanogenesis; (v) methanogenesis; (vi) dissimilatory nitrate reduction; (vii) carbon metabolism; (viii) assimilatory sulfate reduction. Numbers represent the percentage of the total dataset

The methanogenesis pathway (level 1 metabolism/level 2 energy metabolism) is divided in methanogenesis from mono-, di-, tri-methylamines (Fig. 4, section I), methanogenesis from methanol (Fig. 4, section II), hydrogenotrophic methanogenesis (Fig. 4, section III), acetotrophic methanogenesis (Fig. 4, section IV) and general methanogenesis, that includes the common genes for all methanogenesis pathways (Fig. 4, section VI). The methanogenesis from methylated compounds was more representative in the rural school treatment system. The abundance of other methane metabolisms was very similar between the two sites. Based on the results, the most prevalent methanogenesis pathway was the acetotrophic one, followed by hydrogenotrophic, methanol, and methylotrophic pathways. These results suggest that these genes play a key role in the generation of methane in anaerobic treatment systems. The prevalence of the acetotrophic pathway of methanogenesis in anaerobic wastewater treatments has also been observed by other authors (Guo et al. 2015; Yu et al. 2005). Nevertheless, the abundance of hydrogenotrophic methanogenic pathways was not consistent with taxonomic results, which indicated that the hydrogenotrophic genus Methanobacterium (~ 2.9–3.2%) was the most abundant methanogenic group in both treatment systems. On the other hand, the acetotrophic Methanosaeta showed ~ 0.7% and 1.7% of relative abundance in the rural school and factory treatment systems, respectively. These discrepancies between taxonomic and functional inference can be explained by the overlapping metabolic functions in many taxa, i.e. Methanosarcinaceae family can produce methane by hydrogenotrophic and acetotrophic pathways.

Genes of assimilatory sulfate reduction (Fig. 4, section VIII) and dissimilatory nitrate reduction (Fig. 4, section VI) were observed in the two treatment systems with similar abundances, but these metabolisms were not prevalent.

Influence of physicochemical parameters on microbiome structure

The treatment system of the fiberglass factory presented the highest organic matter removal (measured as COD) and the more adequate core of phylotypes. Connelly et al. (2019) evaluated two (a conventional and a solar-type) septic tanks which presented COD removal rate of 70–89% and predominance of members of Synergistetes, Firmicutes, Bacteroidetes and Euryarchaeota phyla. The COD removal rates obtained in the fiberglass factory (60–83%) were lower than the values reported by Connelly et al. (2019), who had an improvement of removal rate in the solar septic tank due to the control of temperature. The differences in the microbiome structure were related to the greater abundance of Synergistetes and Euryarchaeota: Synergistetes phylum corresponds to one from the core group present in anaerobic digestion bioreactors (Riviere et al. 2009); Euryarchaeota phylum corresponds to the archaeal members responsible for methanogenesis, the last step of anaerobic digestion. Furthermore, hydrogenotrophic methanogenic pathways were more abundantly inferred in the fiberglass factory in comparison with acetotrophic methanogenic pathways. Connelly et al. (2019) suggested that balanced methanogenic pathways could improve the performance of organic matter removal.

Comparing the similarities of the microbiome structure between the sample from the fiberglass factory and the one reported by Connelly et al. (2019), both presented reads affiliated to Firmicutes and Bacteroidetes. Additionally, a high abundance of Chloroflexi and Proteobacteria phyla were detected by Connelly et al. (2019). Except for the Firmicutes phylum, the other phyla belong to the core group of anaerobic digestion postulated by Riviere et al. (2009). These authors studied samples from anaerobic digesters receiving municipal sewage sludge and mixed by biogas reinjection whereas septic tanks and anaerobic filters do not have mixing, which could influence the phylotype composition. Connelly et al. (2019) correlated a low COD removal rate with the presence of Firmicutes in the effluent. These observations emphasize that Firmicutes phylum does not belong to the bacterial core group of anaerobic digestion, however reinforce the fact that this phylum can be frequently found in septic tanks and anaerobic filters.

The low removal rate of organic matter in the treatment system of school could be related to design, especially the hydraulic short-circuit, which resulted in a microbiome structure with high abundance of Firmicutes members. A high abundance of Firmicutes (~ 37%) was detected in the sample from the anaerobic filter of school collected in Autumn of 2018, which corresponds to the lowest COD removal rate observed (2%). As aforementioned, the presence of Firmicutes phylum in the effluent of septic tanks has been previously related to a low COD removal rate (Connelly et al. 2019). Compared to the factory treatment system, a lower abundance of Chloroflexi members was detected in the school treatment. The low presence of Chloroflexi phylum could be related to the hydraulic short-circuit, since this issue hinders the cellular retention and this phylum comprises filamentous bacteria related to granulation (Bovio et al. 2019).

Conclusion

In summary, by combining 16S rRNA gene high-throughput sequencing and physicochemical analyses, we were able to identify the main microorganisms, predict metabolisms involved in the anaerobic digestion and characterize the operational parameters for two different size two-stage wastewater treatment systems. Some of the phyla that represent the microbial core of anaerobic digesters were found in samples from the fiberglass factory (Bacteroidetes, Chloroflexi and Proteobacteria). Conversely, in the school treatment the predominance of Firmicutes members was related to a low removal of COD, and the low abundance of Chloroflexi members was related to the system design, which seems to impair cellular retention. Characterizing and understanding the microbiome of sewage treatment systems allow to infer the metabolic processes that may take place in the systems. Thus, knowledge on microbiome structure, function and dynamics allows one to propose changes in order to improve the efficiency of pollutant removal.