A 6-year-old girl with B-cell acute lymphoblastic leukemia is receiving maintenance therapy with 6-mercaptopurine. She develops severe myelosuppression despite being on a standard dose. Genetic testing reveals a polymorphism in an enzyme that catalyzes the methylation of 6-mercaptopurine, leading to increased accumulation of cytotoxic thioguanine nucleotides. Which gene is most likely affected?