We defined cases as patients who received at least two TUD ICD-9 or −10 codes (corresponding to the phecode definition) in their medical records, and controls as patients who had no TUD diagnosis codes (Supplementary Table 2). In UKBB only, cases were defined as having 1 ICD-10 code for TUD, and controls had none.41 Additionally, we required controls to be 18 years of age or older at time of analysis (04/2022). Patients younger than 18 years were excluded because they may not yet have reached the age of TUD diagnosis. We examined the sensitivity of our TUD phenotyping using the patients’ self-reported tobacco use via survey data when available (Supplementary Table 3, list of smoking traits).