Dissecting microbial functions and communities to understand how microbes interact with their environments