Microbes in the same community but with distinct niches can have unique long stretches of perfect sequence identity due to recent genetic exchange. Arevalo et al. (2019) use this as a starting point for defining ecologically-relevant populations within a community and to identify the genes that appear to be driving divergence between populations.
Stolyar, S., & Marx, C. J. (2019, August 8). Align to Define: Ecologically Meaningful Populations from Genomes. Cell. Cell Press. https://doi.org/10.1016/j.cell.2019.07.026