Study offers new insight into how antimicrobial resistance emerges in patients with bacterial infections