The genetics of bacteria and their viruses