Computer-aided identification of polymorphism sets diagnostic for groups of bacterial and viral genetic variants