Cooperation and competition in pathogenic bacteria