Repulsion and metabolic switches in the collective behavior of bacterial colonies.