Genetic regulation of resistance to intracellular pathogens