Two component systems (TCS) are widespread signal transduction pathways mainly found in bacteria where they play a major role in adaptation to changing environmental conditions. Nevertheless, they can also be found in some eukaryotes and archaea. Numerous studies have shown the involvement of TCS in a broad range of adaptive processes such as sporulation, nitrogen regulation, phosphate regulation, cell envelope stress response, pathogenicity, motility, etc. . TCS typically consist of a sensor histidine kinase (HK), usually membrane-bound, and a cytoplasmic response regulator (RR). HKs and RRs are modular proteins containing homologous and heterologous domains [2, 3]. The homologous domains, kinase domain and H-box in HKs and receptor domain in RR, are involved in the phosphotransfer reaction whereas the heterologous domains, sensor (HKs) and effector (RR) domains, are involved in the reception of a specific stimulus and the corresponding response, respectively.
In the most basic scheme, upon detection of a stimulus, the HK autophosphorylates in a conserved His residue at the H-box and subsequently transfers the phosphate group to a conserved aspartyl residue at the receptor domain of the RR. Phosphorylation of the RR modulates its activity and in most cases it functions as a transcriptional regulator . In addition, more complex phosphotransfer relays also exist which involve multiple phosphotransfer reactions among domains that can be found on separate polypeptides or as part of multi-domain proteins [4–6]. Furthermore, some HKs also contain PAS (P er- A rnt- S im) domains , possibly involved in sensing redox potential, HAMP domains (H istidine kinases, A denylyl cyclases, M ethyl binding proteins, P hosphatases) which have been proposed to transmit the stimulus from the sensor domain to the H-box and kinase domains  or a second type of His-domain termed HPt which functions as an intermediate phosphate receiver and donor in complex phosphorelays . In some cases, TCS also include auxiliary proteins that regulate the activities of the HK or that influence the stability of RR phosphorylation .
TCS are found in varying numbers in bacteria although, generally, bacteria with larger genomes encode more TCS [10, 11]. In addition, free-living bacteria usually harbour more TCS than pathogenic bacteria , suggesting a correlation between metabolic versatility and number of TCS . Data from complete genome sequencing projects have shown that TCS-specific domains rank among the most common protein domains found in bacteria. This has led to the development of specialised databases such as MiST  or P2CS  and to the proposal of a number of classification schemes. Some researchers have based TCS classifications on phylogenetic reconstructions of conserved domains [4, 14–16]. A second approach has made use of the domain composition of TCS proteins [17, 18]. Notwithstanding, the results of most classifications agree to a considerable extent and have shown that the majority of TCS proteins belong to a limited number of families which share common ancestry and domain structure . Furthermore, TCS are usually encoded by adjacent genes (although orphan genes can also be found) and are arranged in the same order and orientation .
The evolutionary history of TCS has also been the subject of a number of studies . Koretke et al.  studied the TCS proteins encoded in 18 genomes (12 bacteria, 4 archaea and 2 eukaryotes). From their phylogenetic analyses they concluded that TCS systems originated in bacteria and were acquired by archaea and eukaryotes by multiple horizontal gene transfer (HGT) events. They also concluded that coevolution of cognate HKs and RRs has been prevalent, although some examples of recruitment were also detected, mostly in hybrid HKs. Furthermore, coevolution is also prevalent at the domain level, so that domain shuffling or swapping have been relatively rare events [4, 20]. A subsequent study focused on HKs present in 207 genomes modified to some extent this view . The analysis of this dataset revealed that many bacteria carry a large repertoire of recently evolved HKs as a result of lineage-specific gene expansion (LSE) or HGT and species-specific preference for either of these two modes of acquisition of new TCS. For example, genomes with large numbers of HKs relative to their genome size tended to accumulate HKs by LSE. In addition, whereas TCS acquired by HGT tended to be organized in operons, those arising from LSE were much more likely to show as "orphans" separated from their cognate RRs . The origin of TCS also correlated with the frequency of subsequent gene rearrangements. For instance, whereas 47.4% of HGT-acquired HKs conserved the same domain composition, only 29.1% of LSE-acquired HKs retained the same domain structure as their closest paralogs .
Other studies have focused on TCS systems present in particular bacterial groups [18, 22–25]. These studies have not shown great discrepancies with the conclusions from general studies although they have provided a more detailed picture of the corresponding evolutionary scenarios. For example, the study of TCS systems in Pseudomonas has shown a significant contribution of gene recruitment in the evolution of the NarL-group of TCS whereas coevolution was prevalent in the OmpR-group . In summary, the results obtained so far indicate that all TCS share a common ancestor from which major families have evolved by duplication and divergence. This process has continued during bacterial evolution with the acquisition of new sensor or effector capabilities via domain shuffling .
Lactic acid bacteria (LAB) constitute a group of obligate fermentative microorganisms that produce lactic acid as the main product of sugar degradation. This characteristic has been exploited to produce a variety of fermented products since the acidification and enzymatic processes associated to their growth prevent the proliferation of detrimental organisms and pathogens and confer the characteristic flavor and texture of these products. Furthermore, some strains, especially lactobacilli that colonize the gastrointestinal tract of humans and animals, are considered as probiotics [26, 27]. LAB have been isolated from a wide range of sources including a variety of foodstuffs, beverages, plants and the gastrointestinal tract of animals. Taxonomically, LAB are classified within the order Lactobacillales which encompasses the families Aerococcaceae, Carnobacteriaceae, Enterococcaceae, Lactobacillaceae, Leuconostocaceae and Streptococcaceae. However, phylogenetic analyses do not support the distinction between Leuconostocaceae and Lactobacillaceae . For this reason, throughout this study the term Lactobacillaceae will be used to refer to species currently classified within the families Lactobacillaceae and Leuconostocaceae. The genome sequences of a number of Lactobacillaceae species from different ecological niches are currently available thus enabling comparative genomics and evolutionary analyses. An important conclusion from these studies is that lineage-specific gene loss has been extensive in the evolution of Lactobacillales . However, no study on the evolution of TCS in this bacterial group has been carried out yet. A number of physiological studies have dealt with the functional role of TCS in LAB. These studies have shown the involvement of some TCS in quorum sensing and production of bacteriocins [30–33], the stress response in some species of this group [34–36] and malic acid metabolism in Lactobacillus casei . These results suggest that TCS may have played a role in the adaptation of LAB to the different ecological niches that they occupy. Therefore, the phylogenetic analysis of TCS present in LAB may provide insight into the evolutionary processes involved in the adaptation of LAB to the different habitats they colonize and into the functional role of as yet uncharacterized TCS. The aim of this work is thus to explore the evolution of TCS in Lactobacillaceae. To this end we have focused in the OmpR/IIIA family since they are the most widely distributed in this bacterial group. The prototypic Escherichia coli OmpR EnvZ system was originally identified as regulating the expression of the porin-encoding genes ompF and ompC in response to medium osmolarity . Later studies have shown the involvement of members of this family in varied physiological processes. To put some examples, OmpR/IIIA TCSs are involved in nitrogen metabolism in Streptomyces coelicolor  or phosphate metabolism in E. coli and Bacillus subtilis . Furthermore, some orthologous systems control different processes in different bacteria, such as the YycFG TCS which has been involved in cell division, cell wall biosynthesis or virulence factor expression, among other functions .