Interactions of microorganisms with the environment, and their roles in natural communities