Function-specific response to depletion of microbial diversity