A variant of PTPN22 gene conferring risk to autoimmune diseases may protect against tuberculosis.