Identification of ligands for bacterial sensor proteins