Determining the bacterial response to environmental stresses