Tracking lateral gene transfer events between bacterial genomes