72
ONLINE SUPPLEMENTS TO Risk of developing chronic myeloid neoplasms in well- differentiated thyroid cancer patients treated with radioactive iodine: a population study by Remco J. Molenaar et al. LEUKEMIA 1

media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

ONLINE SUPPLEMENTS TO

Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer

patients treated with radioactive iodine: a population study

by Remco J. Molenaar et al.

LEUKEMIA

1

Page 2: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Contents

Supplementary Methods.................................................................................................................................................4

Background information on SEER databases............................................................................................................4

Comparison between SEERaBomb and SEER*Stat..................................................................................................4

Acquisition of SEER data..........................................................................................................................................4

Procedures to estimate relative risk dynamics...........................................................................................................4

Additional information on covariates extracted from SEER.....................................................................................5

Regression analyses to calculate hazard ratios of RAI treatment to develop MDS or Ph- MPN..............................5

Methodology using IBM Explorys Universe search platform to identify cytopenias in RAI-treated WDTC patients.......................................................................................................................................................................6

References.......................................................................................................................................................................6

Supplementary Figure 1: Comparison of SEERaBomb and SEER*Stat MP-SIR.........................................................7

Supplementary Figure 2: Incidence, treatment, survival, and mortality of WDTC........................................................8

Supplementary Figure 3: Relative risks to develop MDS or Ph- MPN after WDTC treatment for males and females.9

Supplementary Figure 4: Time courses of relative risks for developing Ph- MPN after WDTC diagnosis based on tumor size and stage......................................................................................................................................................10

Supplementary Figure 5: Mean radiation dose delivered to the bone marrow as a function of the total radioactive iodine (I131) dose used for treatment..............................................................................................................................11

Supplementary Figure 6: Comparison of Mean radiation dose delivered to the bone marrow with different radiation modalities......................................................................................................................................................................12

Supplementary Table 1: ICD-O-3 codes of included well-differentiated thyroid carcinoma, myelodysplastic syndrome and myeloproliferative neoplasm diagnoses................................................................................................13

Supplementary Table 2: Baseline characteristics of WDTC patients who later developed MDS................................14

Supplementary Table 3: Baseline characteristics of WDTC patients who later developed Ph- MPN.........................15

Supplementary Table 4: Characteristics of MDS cases that arose after WDTC diagnosis versus MDS cases that arose de novo..........................................................................................................................................................................16

Supplementary Table 5: Characteristics of Ph- MPN cases that arose after WDTC diagnosis versus Ph- MPN cases that arose de novo..........................................................................................................................................................17

Supplementary Table 6: Histological specifications of MNs developed after WDTC treatment versus MNs that arose de novo..........................................................................................................................................................................18

Supplementary Table 7: Relative risk-time course specifics for each time interval, MDS after treatment for all WDTC cases.................................................................................................................................................................19

Supplementary Table 8: Relative risk-time course specifics for each time interval. Ph- MPN after treatment for all WDTC cases.................................................................................................................................................................19

Supplementary Table 9: Relative risk-time course specifics for each time interval. MDS after treatment for small WDTC cases (<2 cm)...................................................................................................................................................19

Supplementary Table 10: Relative risk-time course specifics for each time interval. MDS after treatment for large WDTC cases (≥2 cm)....................................................................................................................................................20

Supplementary Table 11: Relative risk-time course specifics for each time interval. MDS after treatment for localized WDTC cases..................................................................................................................................................20

Supplementary Table 12: Relative risk-time course specifics for each time interval. MDS after treatment for WDTC cases with regional involvement...................................................................................................................................20

2

Page 3: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 13: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for small WDTC cases (<2 cm)..........................................................................................................................................21

Supplementary Table 14: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for large WDTC cases (≥2 cm)...........................................................................................................................................21

Supplementary Table 15: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for localized WDTC cases..................................................................................................................................................21

Supplementary Table 16: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for WDTC cases with regional involvement......................................................................................................................22

Supplementary Table 17: Relative risk-time course specifics for each time interval, MDS after treatment for WDTC cases with regional involvement or metastasized WDTC cases...................................................................................22

Supplementary Table 18: Relative risk-time course specifics for each time interval. Ph- MPN after treatment for WDTC cases with regional involvement or metastasized WDTC cases......................................................................22

Supplementary Table 19: Univariate and multivariate Cox regression tables..............................................................23

Supplementary Table 20: Characteristics of WDTC cases and controls......................................................................24

Supplementary Table 21: Characteristics of MN cases and controls...........................................................................25

Supplementary Table 22: Histologic characteristics of MN cases and controls...........................................................26

Supplementary Table 23: WDTC cases with RAI exposure and subsequent cytopenias and MDS............................27

Appendix. R scripts for extracting and generating data from SEER files....................................................................28

3

Page 4: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Methods

Background information on SEER databases.The SEER database began in 1973 with 9 registries and the number of registries increased from 9 to 13 (SEER 13) in 1992 and from 13 to 18 in 2000 (SEER 18). The SEER 9 database that began in 1973 therefore contains more person-years (PY) at risk than the databases that began in 1992 and 2000. Cancer numbers are proportional to PYs, so SEER 9 also has the greatest number of cancer cases. We preferred SEERaBomb, a previously validated program1 for the statistical programming language R2 over SEER*Stat MP-SIR (Multiple Primary-Standardized Incidence Ratio), a statistical tool made publicly available by SEER to conduct second cancer risk analyses due to certain inherent limitations with the latter. SEER registry data are subjected to regular quality monitoring for completeness and data accuracy.

Comparison between SEERaBomb and SEER*Stat.The SEER*Stat MP-SIR can access only registries in SEER 9 (1973-2014) or SEER 13 excluding Alaska (1992-2014) or SEER 18 excluding Alaska (2000-2014) but not all 18 registries from 1973 to 2014, which results in underestimation of the population-at-risk (WDTC patients; Supplementary Figure 1). Entry of MDS and PH- MPN (mostly) cases into SEER began only in 2001, the year they became SEER reportable neoplasms. In theory, the SEER 18 setting of SEER*Stat MP-SIR is able to capture almost all MDS and PH- MPN cancers in SEER, with the exception of cases in Alaska and PH- MPN cases that were already entered before 2000, such as CMML and malignant mastocytosis. However, because the SEER 18 setting of SEER*Stat MP-SIR is only able to access PYs at risk from 2000 onwards, SEER*Stat MP-SIR is “blind” to any first cancers that were diagnosed pre-2000. Therefore, SEER*Stat MP-SIR is unable to classify second cancers as such when the predecessor first cancer occurred before 2000. This is especially important in second cancer risk assessments when they involve long latency times.

Acquisition of SEER data.SEER ASCII text data is the data input for SEERaBomb, and is available at https://seer.cancer.gov/data/options.html after completing and submitting a SEER Research Data Agreement. SEERaBomb is then able to generate an R data file from these ASCII files. SEERaBomb can be installed by following the instructions on the program’s webpage http://epbi-radivot.cwru.edu/SEERaBomb/SEERaBomb.html.

However, this default dataset does not contain treatment-related data fields since the November 2016 data submission of SEER. The treatment-related data fields can be obtained via an NCI-SEER Custom Data Agreement (available via [email protected]). Researchers that have signed a Custom Data Agreement with NCI-SEER can access radiotherapy/chemotherapy data via SEER*Stat.

Procedures to estimate relative risk dynamics.MDS and Ph- MPN second cancer risk dynamics after diagnosis of WDTC treated with surgery and surgery + RAI were estimated using the same methodology as published earlier and summarized below.1 To estimate the expected number of MDS and Ph- MPN if risks are at background rates, we fitted the following generalized additive model 3 to cases observed using Poisson regression: cases ~ s(age) + s(year) + ti(age, year) + offset(log(PY)). Because 21% of second cancer MDS cases and 16% of second cancer Ph- MPN cases were diagnosed at 85 years or over, population PY in the age group 85+ years were redistributed to ages 85.5 to 99.5 years using male and female US National Vital Statistic Report mortality rates of 2001 (URL: https://www.cdc.gov/nchs/products/nvsr.htm). In SEERaBomb, when a SEER subject is diagnosed with a first cancer, such as WDTC, the patient’s PYs at risk for MDS or Ph- MPN becomes a strip of time that is diagonally directed across ages and calendar years in a single-year resolution PY matrix that has years as columns and ages as rows. The orientation of the strip is diagonal because

4

Page 5: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

each increase of one year of age implies a proportional increase of one year of calendar time. For each SEER cancer patient, PY strips add values between 0 and 1 to matrix elements under the strip. Fractions are calculated based on months of survival. Resolution of ages was prioritized over calendar years as typically, the correlation between second cancer incidence and age is stronger than the association between second cancer incidence and calendar year of diagnosis. Such PY matrices were generated for each selected time interval after diagnosis of WDTC. PY strip start and end ages were calculated as WDTC age-at-diagnoses plus starting and ending times of the time-since-diagnosis interval of interest, clipped by age-at-diagnosis of MN and survival times, whichever came first. In other words, WDTC patients were censored at their month of death when they did not develop MDS or Ph- MPN after their WDTC diagnosis. Because of computational efficiency, PY strips were summed using C++ (via the R package Rcpp) and all other codes were written in R. Background incidences that were multiplied point-wise into PY matrices of specific time-since-diagnosis intervals were summed over product matrix elements to form expected numbers of MDS and Ph- MPN cases after WDTC diagnoses for a specific time interval (E) which could be compared to the observed numbers of MDS and Ph- MPN cases after WDTC diagnosis for the corresponding time interval (O). This yielded relative risks (RR) = O/E. RR 95% confidence intervals (CI) were calculated in R under the assumption that O is Poisson distributed as qchisq(0.025, 2*O)/(2*E) and qchisq(0.975, 2*O+2)/(2*E). In summary, we determined O and calculated E for predefined time intervals [0,1), [1,2), [2,3), [3,6), [6,10) and [10,end) after WDTC diagnosis and from those, RRs and 95% CIs were calculated. Time courses of RRs ± 95% CIs for the risk of developing MDS or Ph- MPN were then plotted at interval midpoints. All R scripts needed to perform these calculations are provided at the bottom of this appendix file.

Additional information on covariates extracted from SEER.- Ethnicity/race in SEER is listed as either white, black or other, where “other” includes Asian, American

Indian, Alaskan Native, and Pacific Islander ethnicities.- WDTC disease stage was based on a SEER variable called “SEER Historic Stage A” classifying cancers as

localized (limited to the thyroid gland), regional (extrathyroidal extension or spread by more than 1 lymphatic or vascular supply route) or distant (metastasized beyond the anatomical structures listed in the previous categories).4

- WDTC tumor size is based on 4 SEER columns, EOD-OLD 4 DIGIT (EOD stands for “extent of disease”), which was tracked from 1983 through 1987, EOD-TUMOR SIZE (also called EOD-10, which was tracked from 1988 through 2003, and CS TUMOR SIZE (CS stands for “collaborative stage”), which was tracked for cases diagnosed in 2004 and later. Older tumor size columns (EOD-13 and EOD-2), which were tracked from 1973 through 1982, do not contain objective tumor size descriptives for thyroid cancer cases, precluding these cases from tumor size analyses. We labeled the tumor sizes of these cases as “unknown”.

Regression analyses to calculate hazard ratios of RAI treatment to develop MDS or Ph- MPN.Univariate and multivariate Cox regression analyses were performed to calculate hazard ratios (HRs) for developing MDS or Ph- MPN after WDTC. Covariates that were significant in univariate analyses (P < 0.05) were included in the multivariate analysis, which was subjected to the backwards Wald procedure to generate the final model. Because these analyses served to validate our risk-time course estimates, we limited the regression analyses to MNs that arose in the second and third year following WDTC treatment. We generated an interaction term where the dichotomous administration of RAI (no = 0, yes = 1) was multiplied by the WDTC tumor size in centimeters (rounded up, 0-1 cm = 1, 1-2 cm = 2, 2-3 cm = 3 and 3+ cm = 4) or if tumor size was not available, WDTC disease stage (localized disease = 1, regional disease = 2, see above for more information). All metastatic WDTC cases treated with RAI were given the highest score (i.e. 4). We validated this RAI dose simulation interaction term with a control interaction term that only included WDTC tumor size and stage, but not RAI receipt.

Given the low incidence rates of MDS and Ph- MPN after WDTC treatment, Fine-Gray competing risk regression analyses were the preferred method of analyzing these data. However, small sample sizes prevented convergence of these models for several covariates, including WDTC treatment, which rendered it impossible to perform these analyses.

5

Page 6: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Methodology using IBM Explorys Universe search platform to identify cytopenias in RAI-treated WDTC patients.Explorys, an IBM Company, provides a protected, cloud-based analytics platform that harnesses big data for clinical integration, predictive analytics and business intelligence for healthcare systems as well as research. Explorys Enterprise Performance Management (EPM) is a Health Insurance Portability and Accountability Act (HIPAA)–compliant database containing de-identified clinical data on 50 million patients from 26 healthcare networks comprising of 360 hospitals. The EPM database allows each participating health-care system to access its own information as well as data composing the Explorys universe. Explorys contains cancer as well as non-cancer data and is updated on a daily basis from de-identified EMR entries of patients treated at the participating institutions. It has been validated in several large retrospective studies including secondary malignancies. Because it is HIPAA compliant, it was exempted from institutional review board (IRB) approval. A major strength of this dataset is its ability to undertake massive-parallel data processing of a large sample size and is particularly useful for investigating cancers with low event rates. In this study, we aimed to use the EPM database as a novel approach to analyze the prevalence of cytopenias in patients with primary malignant thyroid cancer treated with radioactive iodine (RAI) and additionally, identify MDS cases occurring as second cancer in this cohort. We used the EPM database's “power search” tool to create primary malignant thyroid cancer cohort with specific temporal relationships to cytopenias using search criteria as described below.

The following terms were used to identify those who were treated with RAI: iodine radioisotope, radioactive isotope, exposure to ionizing radiation, history of radiation exposure, iodine radioisotope, exposure to radiation, iodine isotope, iodine and/or iodine compound and iodine compounds. We excluded patients with diagnosis of iron deficient anemia, vitamin B12 or folate deficiency, Human immunodeficiency virus (HIV), Hepatitis C, cirrhosis of liver, and chronic kidney disease stage III-V to avoid confounding reasons for cytopenias. Our search terms to identify cytopenias included anemia, neutropenia, and thrombocytopenia or any combination of these.

References 1. Radivoyevitch T, Sachs RK, Gale RP, Molenaar RJ, Brenner DJ, Hill BT , et al. Defining AML and MDS

second cancer risk dynamics after diagnoses of first cancers treated or not with radiation. Leukemia 2016 Feb; 30(2): 285-294.

2. R Core Team. R: A language and environment for statistical computing, R Foundation for Statistical Computing. Vienna, Austria.; 2017.

3. Hastie T, Tibshirani R. Generalized additive models for medical research. Stat Methods Med Res 1995 Sep; 4(3): 187-196.

4. Haugen BR, Alexander EK, Bible KC, Doherty GM, Mandel SJ, Nikiforov YE , et al. 2015 American Thyroid Association Management Guidelines for Adult Patients with Thyroid Nodules and Differentiated Thyroid Cancer: The American Thyroid Association Guidelines Task Force on Thyroid Nodules and Differentiated Thyroid Cancer. Thyroid 2016 Jan; 26(1): 1-133.

5. de Keizer B, Hoekstra A, Konijnenberg MW, de Vos F, Lambert B, van Rijk PP , et al. Bone marrow dosimetry and safety of high 131I activities given after recombinant human thyroid-stimulating hormone to treat metastatic differentiated thyroid cancer. J Nucl Med 2004 Sep; 45(9): 1549-1554.

6

Page 7: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Figure 1: Comparison of SEERaBomb and SEER*Stat MP-SIR.

Shown is the cumulative capture of (A-C) total person-years (PYs) in the general population that is covered by SEER or (D-F) total PYs at risk to develop MDS or Ph- MPN as second cancer in WDTC survivors. SEERaBomb can capture all cases during all time periods, whereas SEER*Stat MP-SIR setting SEER 9 (1973-2000), SEER 13 (1992-2014) and SEER 18 (2000-2014) can only capture either a subset of cases or a subset of follow-up times, but not both. The SEER 9 (1973-2000), SEER 13 (1992-2014) and SEER 18 (2000-2014) settings of SEER*Stat are shown in panels A/D, panels B/E and panels C/F, respectively. Note that in SEER 13 (1992-2014) and SEER 18 (2000-2014), SEER cases from Alaska cannot be accessed by SEER*Stat (but they can be accessed by SEERaBomb).

7

Page 8: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Figure 2: Incidence, treatment, survival, and mortality of WDTC.

(A) Incidence of WDTC per 100,000 person-years (PYs) shown on the left Y-axis. The percentage of WDTC patients treated with no radiation, radioactive iodine treatment (RAI), external beam radiation treatment (EB), unknown treatment, or chemotherapy (also including tyrosine kinase inhibitors) treatment are shown as functions of the bottom or top right Y-axis. (B) Incidence and mortality of WDTC per 100,000 PY is shown as a function of the left Y-axis. The percentage of WDTC patients surviving at least 5 years is shown as a function of the right Y-axis. Data are from 1973 through 2014 and derived from all 18 SEER registries.

8

Page 9: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Figure 3: Relative risks to develop MDS or Ph- MPN after WDTC treatment for males and females.

Shown are the relative risks (RRs) ± 95% confidence intervals of developing MDS in the years following WDTC diagnosis for males (A) and females (B) and the RRs of developing Ph- MPN in the years following WDTC diagnosis for males (C) and females (D). Abbreviations: MDS, myelodysplastic syndrome; Ph- MPN, myeloproliferative neoplasm; RAI, radioactive iodine; WDTC, well-differentiated thyroid cancer.

9

Page 10: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Figure 4: Time courses of relative risks for developing Ph- MPN after WDTC diagnosis based on tumor size and stage.

Plotted are the relative risks (RRs) ± 95% confidence intervals (Cis) for developing Ph- MPN in (A) WDTCs <2 cm in size, (B) WDTCs ≥2 cm in size, (C) WDTCs that are localized (limited to the thyroid gland) and (D) WDTCs that are regional (with extrathyroidal extension or spread by more than 1 lymphatic or vascular supply route). Panels E and F show the RRs ±95% CIs of developing MDS and Ph- MPN, respectively, in WDTCs that are either regional or distant metastasized. The solid line at y = 1 represents the Ph- MPN risk in the background population. Abbreviations: RAI, radioactive iodine; RR, relative risk; WDTC, well-differentiated thyroid cancer.

10

Page 11: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Figure 5: Mean radiation dose delivered to the bone marrow as a function of the total radioactive iodine (I131) dose used for treatment.

20 40 60 80 100 120 140 160 180 200 2200

0.2

0.4

0.6

0.8

1

1.2

1.4

I131 mCi

Mea

n Bo

ne M

arro

w D

ose

(Gy)

Median radiation dose delivered to the bone marrow can vary widely among patients, and the dose to the bone marrow varies significantly for the same injected activity. This is due to different residence times for I131, which depends on the disease burden, and health of patient.  The dose delivered to the marrow with different I131 adjuvant doses used was calculated using a previously published method 5.

11

Activity Mean Dose SDCi GBq Gy Gy30 1.11 0.1776 0.077750 1.85 0.296 0.129575 2.775 0.444 0.19425100 3.7 0.592 0.259150 5.55 0.888 0.3885200 7.4 1.184 0.518

Page 12: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Figure 6: Comparison of Mean radiation dose delivered to the bone marrow with different radiation modalities.

I131 Seeds 3D IMRT VMAT0

2

4

6

8

10

12

14

16

18

20

Mea

n Bo

ne M

arro

w D

ose

(Gy)

Bone Marrow mean doseI131 Seeds 3D IMRT VMAT

1.18 1.21 12.3 11.6 19.6

This figure compares the mean dose for I-131 and the 4 prostate treatments. The bone marrow dose determined from I131 is the mean dose, as the I131 circulates through the bone marrow 5. For the prostate cancer treatment, the mean dose was calculated from the planned dose distribution. Abbreviations: 3D, 3D conformational; IMRT, Intensity Modulated Radiation Therapy; VMAT, volumetric modulated arc therapy.

12

Page 13: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 1: ICD-O-3 codes of included well-differentiated thyroid carcinoma, myelodysplastic syndrome and myeloproliferative neoplasm diagnoses.

Comprehensive Diagnosis ICD-O-3 code

Classification

Well-differentiated thyroid cancer (WDTC)

ICD9 code: C19.3ICD10 code: C73

8050 Papillary carcinoma, NOS

8130 Papillary transitional cell carcinoma

8260 Papillary adenocarcinoma, NOS

8290 Oxyphilic adenocarcinoma

8330 Follicular adenocarcinoma, NOS

8331 Follicular adenocarcinoma well diff.

8332 Follicular adenocarcinoma trabecular

8335 Follicular carcinoma, minimally invasive

8340 Papillary carcinoma, follicular variant

8341 Papillary microcarcinoma

8342 Papillary carcinoma, oxyphilic cell

8343 Papillary carcinoma, encapsulated

8344 Papillary carcinoma, columnar cell

8450 Papillary cystadenocarcinoma, NOS

8452 Solid pseudopapillary carcinoma

Myelodysplastic syndromes (MDS)

9980 Refractory anaemia

9982 Refractory anaemia with sideroblasts

9983 Refractory anaemia with excess blasts

9984 Refractory anaemia with excess blasts in transformation

9985 Refractory cytopenia with multilineage dysplasia

9986 Myelodysplastic syndromes with 5q deletion syndrome

9987 Therapy-related myelodysplastic syndrome

9989 Myelodysplastic syndrome, NOS/unclassified

Myelodysplastic/Myeloproliferative neoplasms (MDS/Ph- MPN)

9876 Atypical chronic myeloid leukaemia (aCML), BCR-ABL neg

9945 Chronic myelomonocytic leukaemia (CMML)

9946 Juvenile myelomonocytic leukaemia (JMML)

9975 MDS/MPN, unclassifiable

Philadelphia chromosome-negative myeloproliferative neoplasms (Ph- MPN)

9740 Mast cell sarcoma

9741 Malignant mastocytosis

9742 Mast cell leukaemia

9950 Polycythaemia vera (PV)

9960 Chronic myeloproliferative disease, NOS

9961 Primary myelofibrosis (PMF)

9962 Essential thrombocythemia (ET)

9963 Chronic neutrophilic leukaemia (CNL)

9964 Chronic eosinophilic leukaemia, not otherwise specified (NOS)

ICD-O-3 morphological codes that were used to select WDTC, MDS and Ph- MPN cases. MDS/MPN were grouped under Ph- MPN for the analyses in the present study.

13

Page 14: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 2: Baseline characteristics of WDTC patients who later developed MDS

Patient characteristicWDTC patients that later developed MDS WDTC patients that did not develop MDSSurgery alone

(n = 42)Surgery +

RAI (n = 35)P

value*Surgery alone

(n = 79799)P

value**Surgery + RAI

(n = 68339)P

value***

Age at WDTC diagnosis

0-29 years 0 0

0.91M

9522 (12%)

<0.0001M

10085 (15%)

<0.0001M

30-39 years 3 (7%) 1 (3%) 15322 (19%) 14558 (21%)

40-49 years 4 (10%) 6 (17%) 18561 (23%) 16679 (24%)

50-59 years 5 (12%) 5 (14%) 17250 (22%) 13988 (20%)

60-69 years 16 (38%) 8 (23%) 11143 (14%) 8386 (12%)

> 70 years 14 (33%) 15 (43%) 8001 (10%) 4643 (7%)

GenderMale 9 (21%) 16 (46%)

0.03F16673 (21%)

0.85F16701 (24%)

0.006F

Female 33 (79%) 19 (54%) 63126 (79%) 51638 (76%)

Race

White 37 (88%) 28 (80%)

0.63F

64908 (81%)

0.65F

55614 (81%)

0.84FBlack 2 (5%) 2 (6%) 5667 (7%) 3712 (5%)

Other 3 (7%) 5 (14%) 9214 (12%) 9013 (13%)

Year of WDTC diagnosis

1973-1979 3 (7%) 0

0.54F

4112 (5%)

N/A

523 (1%)

N/A1980-1989 4 (10%) 3 (9%) 5801 (7%) 2334 (3%)

1990-1999 2 (5%) 6 (17%) 8690 (11%) 8173 (12%)

2000-2009 27 (64%) 26 (74%) 33432 (42%)0.0009M‡

33842 (50%)<0.0001M‡

2010-2014 6 (14%) 0 27764 (35%) 23467 (34%)

Histology Papillary 34 (81%) 27 (77%)0.78F

72201 (90%)0.06F

61431 (90%)0.02F

Follicular 8 (19%) 8 (23%) 7598 (10%) 6908 (10%)

Stage

Localized 30 (71%) 14 (40%)

0.02F

58859 (74%)

0.82F

33198 (49%)

0.05FRegional 10 (24%) 16 (46%) 17090 (21%) 31994 (47%)

Distant 1 (2%) 4 (11%) 1437 (2%) 2658 (4%)

Unknown 1 (2%) 1 (3%) 2407 (3%) 487 (1%)

Tumor size

<2 cm 23 (68%) 9 (29%)

0.002F

47803 (60%)

0.85F

31258 (39%)

0.03F≥2 cm 11 (32%) 22 (71%) 19729 (25%) 32804 (41%)

Unknown 8 (19%) 4 (11%) 12267 (15%) 4277 (5%)

Median PYs of follow-up (IQR)

8.5 (5.0-13.9) 8.1 (5.6-11.2)0.85M

6.6 (2.6-12.7)0.06M

6.6 (3.1-11.5)0.06M

Total PYs at risk 479 338 736576 558574

Percentages shown are calculated within rows. *Concerns a comparison of WDTC patients treated with surgery alone that later developed MDS versus WDTC patients treated with surgery + RAI that later developed MDS. **Concerns a comparison of WDTC patients treated with surgery alone that later developed MDS versus counterparts that did not develop MDS. ***Concerns a comparison of WDTC patients treated with surgery + RAI that later developed MDS versus RAI-treated counterparts that did not develop MDS. M Mann-Whitney U test. F Fisher’s exact test. † Statistical comparisons were not performed for diagnosis years 1973-2000, because MDS and most Ph- MPN subtypes are tracked by SEER since 2001. ‡ Concerns a statistical comparison for diagnosis years 2001-2014 only.

Abbreviations: IQR, interquartile range; MDS, myelodysplastic syndrome; N/A, not analyzed; RAI, radioiodine; PY, person-year; WDTC, well-differentiated thyroid cancer.

14

Page 15: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 3: Baseline characteristics of WDTC patients who later developed Ph- MPN.

Patient characteristic

WDTC patients that later developed Ph- MPN

WDTC patients that did not develop Ph- MPN

Surgery alone (n = 34)

Surgery + RAI (n = 32)

P value*

Surgery alone (n = 79807)

P value**

Surgery + RAI (n = 68342)

P value***

Age at WDTC diagnosis

0-29 years 0 0

0.13M

9522 (12%)

<0.0001M

10085 (15%)

0.0004M

30-39 years 1 (3%) 3 (9%) 15324 (19%) 14556 (21%)

40-49 years 6 (18%) 9 (28%) 18559 (23%) 16676 (24%)

50-59 years 10 (29%) 8 (25%) 17245 (22%) 13985 (20%)

60-69 years 12 (35%) 8 (25%) 11147 (14%) 8386 (12%)

> 70 years 5 (15%) 4 (13%) 8010 (10%) 4654 (7%)

GenderMale 12 (36%) 12 (38%)

1F16670 (21%)

0.05F16705 (24%)

0.99F

Female 22 (65%) 20 (63%) 63137 (79%) 51637 (76%)

Race

White 32 (94%) 26 (81%)

0.16F

64913 (81%)

0.05F

55616 (81%)

0.94FBlack 2 (6%) 2 (6%) 5677 (7%) 3712 (5%)

Other 0 4 (13%) 9217 (12%) 9014 (13%)

Year of WDTC diagnosis

1973-1979 3 (9%) 0

0.25M

4112 (5%)

N/A

523 (1%)

N/A1980-1989 2 (6%) 1 (3%) 5803 (7%) 2336 (3%)

1990-1999 8 (24%) 6 (19%) 8684 (11%) 8173 (12%)

2000-2009 19 (56%) 21 (66%) 33440 (42%)0.001M

33847 (50%)0.001F

2010-2014 2 (6%) 4 (13%) 27768 (35%) 23463 (34%)

Histology Papillary 31 (91%) 29 (91%)1F

72204 (90%)1F

61429 (90%)1F

Follicular 3 (9%) 3 (9%) 7603 (10%) 6913 (10%)

Stage

Localized 27 (79%) 15 (47%)

0.009F

58862 (74%)

0.94F

33197 (49%)

0.41FRegional 7 (21%) 14 (44%) 17093 (21%) 31996 (47%)

Distant 0 3 (9%) 1438 (2%) 2659 (4%)

Unknown 0 0 2408 (3%) 488 (1%)

Tumor size

<2 cm 20 (67%) 16 (55%)

0.42F

47806 (60%)

0.84F

31251 (39%)

0.58F≥2 cm 10 (33%) 13 (45%) 19730 (25%) 32813 (41%)

Unknown 4 (12%) 3 (9%) 12271 (15%) 4278 (5%)

Median PYs of follow-up (IQR)

11.7 (6.5-19.7) 10.3 (5.8-14.3)0.27M

6.6 (2.6-12.7)0.0006M

6.6 (3.1-11.5)0.003M

Total PYs at risk 475 342 736581 558570

Percentages shown are calculated within rows. *Concerns a comparison of WDTC patients treated with surgery alone that later developed Ph- MPN versus WDTC patients treated with surgery + RAI that later developed Ph- MPN. **Concerns a comparison of WDTC patients treated with surgery alone that later developed Ph- MPN versus counterparts that did not develop Ph- MPN. ***Concerns a comparison of WDTC patients treated with surgery + RAI that later developed Ph- MPN versus RAI-treated counterparts that did not develop Ph- MPN. M Mann-Whitney U test. F Fisher’s exact test. † Statistical comparisons were not performed for diagnosis years 1973-2000, because MDS and most Ph- MPN subtypes are tracked by SEER since 2001. ‡ Concerns a statistical comparison for diagnosis years 2001-2014 only.

Abbreviations: IQR, interquartile range; Ph- MPN, myeloproliferative neoplasm; N/A, not analyzed; RAI, radioiodine; PY, person-year; WDTC, well-differentiated thyroid cancer.

15

Page 16: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 4: Characteristics of MDS cases that arose after WDTC diagnosis versus MDS cases that arose de novo.

ParameterSurgery alone (n = 42)

Surgery + RAI (n = 35) P value*

De novo (n = 39678) P value** P value***

Age at MN diagnosis

0-49 years 1 (2%) 2 (6%)

0.79M

2032 (5%)

0.09M 0.05M

50-59 years 2 (5%) 4 (11%) 3048 (8%)

60-69 years 14 (33%) 6 (17%) 6884 (17%)

70-79 years 16 (38%) 15 (43%) 12491 (31%)

80-89 years 5 (12%) 6 (17%) 7236 (18%)

≥90 years 4 (10%) 2 (6%) 7987 (20%)

GenderMale 9 (21%) 16 (46%)

0.03F21712 (55%)

<0.0001F 0.31F

Female 33 (79%) 19 (54%) 17966 (45%)

Race

White 37 (88%) 28 (80%)

0.63F

33206 (84%)

0.71χ 0.44χBlack 2 (5%) 2 (6%) 3100 (8%)

Other 3 (7%) 5 (14%) 3372 (8%)

Year of MN diagnosis

2000-2009 18 (43%) 22 (63%)0.01M

24406 (62%)0.003M 0.79M

2010-2014 24 (57%) 13 (37%) 15267 (38%)Median duration between WDTC and MDS diagnoses in years (IQR)

5.1 (2.0-10.0) 4.1 (1.7-8.3) 0.54M N/A N/A N/A

Total PYs at risk 110 1070.26M

1097800.73M 0.12M

Median PYs of follow-up (IQR)

2.0 (0.9-3.7) 3.0 (1.3-4.3) 1.8 (0.6-4.2)

Progression to AML**** 3 (13%) 1 (8%) N/A 1303 (3%) N/A N/A

One patient with MDS that occurred after surgery alone for WDTC had unknown survival duration. 1063 patients with MDS that occurred de novo had unknown survival status. *Concerns a comparison of MDS after surgery alone for WDTC versus MDS after surgery + RAI for WDTC. **Concerns a comparison of MDS after surgery alone for WDTC versus MDS that arose de novo. ***Concerns a comparison of MDS after surgery + RAI for WDTC versus MDS that arose de novo. ****Only concerns MDS cases diagnosed since 2010, because that is when SEER started registering the progression of MDS to full-blown AML. M Mann-Whitney U test. F Fisher’s exact test. χ Chi-square test.

Abbreviations: IQR, interquartile range; MDS, myelodysplastic syndrome; N/A, not applicable; PY, person-year; WDTC, well-differentiated thyroid cancer.

16

Page 17: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 5: Characteristics of Ph- MPN cases that arose after WDTC diagnosis versus Ph- MPN cases that arose de novo.

ParameterSurgery alone (n = 34)

Surgery + RAI (n = 32) P value*

De novo (n = 35917) P value** P value***

Age at MN diagnosis

0-49 years 1 (3%) 7 (22%)

0.01M

6259 (17%)

0.24M 0.07M

50-59 years 5 (15%) 7 (22%) 5882 (16%)

60-69 years 8 (24%) 8 (25%) 8024 (22%)

70-79 years 17 (50%) 8 (25%) 8707 (24%)

80-89 years 0 1 (3%) 3861 (11%)

≥90 years 3 (9%) 1 (3%) 3535 (10%)

GenderMale 12 (35%) 12 (12%)

1F18699 (52%)

0.06F 0.16F

Female 22 (65%) 20 (20%) 17569 (48%)

Race

White 32 (94%) 26 (81%)

0.17F

29589 (82%)

0.12χ 0.72χBlack 2 (6%) 2 (6%) 3319 (9%)

Other 0 4 (13%) 3360 (9%)

Year of MN diagnosis

1980-1989 0 0

0.87M

208 (1%)

0.06M 0.06M1990-1999 0 0 1002 (3%)

2000-2009 20 (59%) 19 (59%) 21378 (59%)

2010-2014 14 (41%) 13 (41%) 13661 (38%)Median duration between WDTC and Ph- MPN diagnoses in years (IQR)

8.3 (2.6-14.1) 4.2 (2.5-10.6) 0.18M N/A N/A N/A

Total PYs at risk 136 1360.99M

1588450.75M 0.90M

Median PYs of follow-up (IQR)

2.8 (1.5-6.4) 3.0 (1.1-6.5) 3.5 (1.2-7.0)

351 patients with de novo Ph- MPN had unknown survival duration. *Concerns a comparison of Ph- MPN after surgery alone for WDTC versus Ph- MPN after surgery + RAI for WDTC. **Concerns a comparison of Ph- MPN after surgery alone for WDTC versus Ph- MPN that arose de novo. ***Concerns a comparison of Ph- MPN after surgery + RAI for WDTC versus Ph- MPN that arose de novo. No Ph- MPN cases occurring after treatment for WDTC progressed to full-blown AML. M Mann-Whitney U test. F Fisher’s exact test. χ Chi-square test.

Abbreviations: IQR, interquartile range; Ph- MPN, myeloproliferative neoplasm; N/A, not applicable; PY, person-year; WDTC, well-differentiated thyroid cancer.

17

Page 18: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 6: Histological specifications of MNs developed after WDTC treatment versus MNs that arose de novo.

Histologic type After WDTC treatment Spontaneously occurring

Surgery alone

Surgery + RAI

P value* De novo P value** P value***

MDS n = 42 n = 34 n = 39678

Refractory anaemia 5 (12%) 6 (17%) 0.09F 4188 (11%)

0.56F 0.09F

Refractory anaemia with sideroblasts 0 3 (9%) 3127 (8%)

Refractory anaemia with excess blasts 6 (14%) 8 (23%) 5158 (13%)

Refractory anaemia with excess blasts in transformation

0 0 163 (0%)

Refractory cytopenia with multilineage dysplasia

3 (7%) 0 2313 (6%)

Myelodysplastic syndrome with 5q deletion syndrome

1 (2%) 0 966 (2%)

Therapy-related myelodysplastic syndrome, NOS

0 1 (3%) 153 (0%)

Myelodysplastic syndrome, NOS 27 (64%) 17 (49%) 23610 (60%)

Ph- MPN n = 34 n = 32 n = 35917

Mast cell sarcoma 0 0 0.69F 18 (0%) 0.82F 0.34F

Malignant mastocytosis 1 (3%) 0 475 (1%)

Mast cell leukaemia 0 0 18 (0%)

Atypical chronic myeloid leukaemia, BCR/ABL-

0 0 132 (0%)

Chronic myelomonocytic leukaemia (CMML), NOS

5 (15%) 3 (9%) 4779 (13%)

Juvenile myelomonocytic leukaemia 0 0 116 (0%)

Polycythaemia vera 13 (38%) 10 (31%) 11920 (33%)

Chronic myeloproliferative disease, NOS

2 (6%) 3 (9%) 2700 (7%)

Primary myelofibrosis (PMF)/Myelosclerosis with myeloid metaplasia

2 (6%) 5 (15%) 2868 (8%)

Essential thrombocythemia 11 (32%) 9 (28%) 10598 (29%)

Chronic neutrophilic leukaemia (CNL) 0 1 (3%) 57 (0%)

Hypereosinophilic syndrome 0 0 388 (1%)

Myeloproliferative neoplasm, unclassifiable

0 1 (3%) 2199 (6%)

Percentages shown are calculated within rows. *Concerns a comparison of MNs that developed after surgery alone for WDTC versus surgery + RAI for WDTC. **Concerns a comparison of MNs after surgery alone for WDTC versus MNs that arose de novo. ***Concerns a comparison of MNs after surgery + RAI for WDTC versus MNs that arose de novo. F Fisher’s exact test.

Abbreviations: BCR-ABL, BCR-ABL1 fusion gene; MDS, myelodysplastic syndromes; Ph- MPN, myeloproliferative neoplasm; NOS, not otherwise specified; RAI, radioiodine.

18

Page 19: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 7: Relative risk-time course specifics for each time interval, MDS after treatment for all WDTC cases.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 71613 6 2.79 2.15 0.79-4.68 0.09 63898 3 2.12 1.42 0.29-4.14 0.62

1 - 2 64469 5 2.66 1.88 0.61-4.39 0.21 58124 8 2.08 3.85 1.66-7.58 0.0005

2 - 3 58164 2 2.51 0.80 0.10-2.88 0.81 52781 3 2.02 1.49 0.31-4.34 0.57

3 - 6 140931 10 6.44 1.55 0.74-2.86 0.20 127355 7 5.41 1.29 0.52-2.67 0.55

6 - 10 127690 8 6.13 1.31 0.56-2.57 0.50 107559 7 5.24 1.34 0.54-2.75 0.50

>10 222965 11 15.49 0.71 0.35-1.27 0.30 116837 7 7.72 0.91 0.36-1.87 0.83

See below for legend.

Supplementary Table 8: Relative risk-time course specifics for each time interval. Ph- MPN after treatment for all WDTC cases.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 71613 6 2.53 2.37 0.87-5.16 0.06 63898 4 2.08 1.92 0.52-4.92 0.26

1 - 2 64469 1 2.36 0.42 0.01-2.36 0.54 58124 2 2.01 1.00 0.12-3.59 1.00

2 - 3 58164 2 2.20 0.91 0.11-3.28 0.92 52781 6 1.92 3.13 1.15-6.80 0.012

3 - 6 140931 5 5.51 0.91 0.29-2.12 0.86 127355 6 5.01 1.20 0.44-2.61 0.70

6 - 10 127690 5 5.15 0.97 0.32-2.27 0.96 107559 5 4.71 1.06 0.34-2.48 0.91

>10 222965 15 11.94 1.26 0.70-2.07 0.42 116837 9 6.48 1.39 0.64-2.64 0.37

See below for legend.

Supplementary Table 9: Relative risk-time course specifics for each time interval. MDS after treatment for small WDTC cases (<2 cm).

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 42531 4 1.72 2.33 0.63-5.95 0.14 28532 0 0.84 0 N/A N/A

1 - 2 37594 4 1.64 2.44 0.66-6.24 0.12 25947 0 0.83 0 N/A N/A

2 - 3 33147 0 1.54 0 N/A N/A 23442 0 0.81 0 N/A N/A

3 - 6 76174 4 3.93 1.02 0.28-2.61 0.98 55508 2 2.12 0.94 0.11-3.41 0.95

6 - 10 61129 4 3.5 1.14 0.31-2.93 0.83 43974 4 1.98 2.02 0.55-5.17 0.22

>10 64195 6 5.17 1.16 0.43-2.53 0.76 38358 2 2.33 0.86 0.10-3.10 0.87See below for legend.

19

Page 20: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 10: Relative risk-time course specifics for each time interval. MDS after treatment for large WDTC cases (≥2 cm).

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 17172 1 0.73 1.37 0.03-7.63 0.83 29102 3 1.07 2.80 0.58-8.19 0.13

1 - 2 15650 1 0.71 1.41 0.04-7.85 0.82 26334 6 1.05 5.71 2.10-12.44 0.0001

2 - 3 14326 2 0.67 2.99 0.36-10.78 0.21 23861 2 1.02 1.96 0.24-7.08 0.45

3 - 6 35601 3 1.74 1.72 0.36-5.04 0.43 57662 3 2.75 1.09 0.22-3.19 0.91

6 - 10 33239 1 1.76 0.57 0.01-3.17 0.69 49123 3 2.68 1.12 0.23-3.27 0.88

>10 45933 2 3.4 0.59 0.07-2.12 0.55 48427 3 3.56 0.84 0.17-2.46 0.81

See below for legend.

Supplementary Table 11: Relative risk-time course specifics for each time interval. MDS after treatment for localized WDTC cases.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 53068 4 2.05 1.95 0.53-5.00 0.24 31267 2 1 2.00 0.24-7.22 0.43

1 - 2 47760 4 1.98 2.02 0.55-5.17 0.22 28837 1 1 1.00 0.03-5.57 1.00

2 - 3 42962 1 1.88 0.53 0.01-2.96 0.66 26431 2 0.98 2.04 0.25-7.37 0.42

3 - 6 103262 5 4.87 1.03 0.33-2.40 0.96 64824 2 2.71 0.74 0.09-2.67 0.74

6 - 10 91772 6 4.61 1.30 0.48-2.83 0.57 54813 3 2.72 1.10 0.23-3.22 0.89

>10 153022 10 11.08 0.90 0.43-1.66 0.78 54467 4 3.88 1.03 0.28-2.64 0.96

See below for legend.

Supplementary Table 12: Relative risk-time course specifics for each time interval. MDS after treatment for WDTC cases with regional involvement.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 15437 2 0.55 3.64 0.44-13.14 0.14 29703 1 0.99 1.01 0.03-5.63 0.99

1 - 2 13989 1 0.51 1.96 0.05-10.92 0.64 26659 5 0.96 5.21 1.69-12.15 0.001

2 - 3 12735 1 0.49 2.04 0.05-11.37 0.62 23975 0 0.92 0.00 N/A N/A

3 - 6 31651 3 1.23 2.44 0.50-7.13 0.19 56886 3 2.42 1.24 0.26-3.62 0.76

6 - 10 30081 2 1.22 1.64 0.20-5.92 0.58 47860 4 2.28 1.75 0.48-4.49 0.33

>10 58566 1 3.74 0.27 0.01-1.49 0.34 55350 3 3.46 0.87 0.18-2.53 0.84

See below for legend.

20

Page 21: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 13: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for small WDTC cases (<2 cm).

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 42531 5 1.68 2.98 0.97-6.95 0.03 28532 1 0.92 1.09 0.03-6.06 0.96

1 - 2 37594 1 1.56 0.64 0.02-3.57 0.76 25947 0 0.89 0 N/A N/A

2 - 3 33147 2 1.44 1.39 0.17-5.02 0.72 23442 2 0.85 2.35 0.28-8.50 0.33

3 - 6 76174 2 3.54 0.56 0.07-2.04 0.52 55508 4 2.19 1.83 0.50-4.68 0.30

6 - 10 61129 4 3.08 1.30 0.35-3.33 0.66 43974 3 1.95 1.54 0.32-4.50 0.54

>10 64195 6 4.20 1.43 0.52-3.11 0.44 38358 4 2.14 1.87 0.51-4.79 0.28

See below for legend.

Supplementary Table 14: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for large WDTC cases (≥2 cm).

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 17172 1 0.60 1.67 0.04-9.29 0.72 29102 2 0.99 2.02 0.24-7.30 0.42

1 - 2 15650 0 0.57 0 N/A N/A 26334 2 0.96 2.08 0.25-7.53 0.40

2 - 3 14326 0 0.54 0 N/A N/A 23861 2 0.91 2.20 0.27-7.94 0.37

3 - 6 35601 3 1.39 2.16 0.45-6.31 0.26 57662 2 2.39 0.84 0.10-3.02 0.85

6 - 10 33239 1 1.41 0.71 0.02-3.95 0.81 49123 1 2.28 0.44 0.01-2.44 0.56

>10 45933 4 2.68 1.49 0.41-3.82 0.49 48427 4 2.89 1.38 0.38-3.54 0.58

See below for legend.

Supplementary Table 15: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for localized WDTC cases.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 53068 6 1.92 3.13 1.15-6.80 0.01 31267 0 1.03 0 N/A N/A

1 - 2 47760 1 1.81 0.55 0.01-3.08 0.68 28837 1 1.01 0.99 0.03-5.52 0.99

2 - 3 42962 2 1.68 1.19 0.14-4.30 0.85 26431 4 0.98 4.08 1.11-10.45 0.01

3 - 6 103262 2 4.24 0.47 0.06-1.70 0.39 64824 3 2.62 1.15 0.24-3.35 0.85

6 - 10 91772 5 3.91 1.28 0.42-2.98 0.64 54813 3 2.52 1.19 0.25-3.48 0.81

>10 153022 11 8.50 1.29 0.65-2.32 0.44 54467 4 3.22 1.24 0.34-3.18 0.72

See below for legend.

21

Page 22: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 16: Relative risk-time course specifics for each time interval, Ph- MPN after treatment for WDTC cases with regional involvement.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 15437 0 0.47 0 N/A N/A 29703 3 0.95 3.16 0.65-9.23 0.09

1 - 2 13989 0 0.44 0 N/A N/A 26659 1 0.9 1.11 0.03-6.19 0.94

2 - 3 12735 0 0.41 0 N/A N/A 23975 1 0.85 1.18 0.03-6.55 0.91

3 - 6 31651 3 1.03 2.91 0.60-8.51 0.11 56886 3 2.17 1.38 0.29-4.04 0.64

6 - 10 30081 0 1.01 0 N/A N/A 47860 2 2.00 1.00 0.12-3.61 1.00

>10 58566 4 2.9 1.38 0.38-3.53 0.59 55350 4 2.94 1.36 0.37-3.48 0.60

See below for legend.

Supplementary Table 17: Relative risk-time course specifics for each time interval, MDS after treatment for WDTC cases with regional involvement or metastasized WDTC cases.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 16517 2 0.65 3.08 0.37-11.11 0.20 32169 1 1.12 0.89 0.02-4.97 0.94

1 - 2 14867 1 0.58 1.72 0.04-9.61 0.71 28858 6 1.08 5.56 2.04-12.09 0.0002

2 - 3 13511 1 0.53 1.89 0.05-10.51 0.66 25951 1 1.03 0.97 0.02-5.41 0.98

3 - 6 33477 4 1.33 3.01 0.82-7.70 0.05 61501 5 2.67 1.87 0.61-4.37 0.21

6 - 10 31741 2 1.29 1.55 0.19-5.60 0.63 51670 4 2.49 1.61 0.44-4.11 0.41

>10 62390 1 3.92 0.26 0.01-1.42 0.33 60645 3 3.74 0.80 0.17-2.34 0.76

See below for legend.

Supplementary Table 18: Relative risk-time course specifics for each time interval. Ph- MPN after treatment for WDTC cases with regional involvement or metastasized WDTC cases.

Surgery alone Surgery + RAI

Interval PY O E RR 95% CI P PY O E RR 95% CI P

0 - 1 16517 0 0.53 0 N/A N/A 32169 4 1.05 3.81 1.04-0.75 0.02

1 - 2 14867 0 0.48 0 N/A N/A 28858 1 0.99 1.01 0.03-5.63 0.99

2 - 3 13511 0 0.44 0 N/A N/A 25951 2 0.93 2.15 0.26-7.77 0.38

3 - 6 33477 3 1.11 2.70 0.56-7.90 0.14 61501 3 2.35 1.28 0.26-3.73 0.73

6 - 10 31741 0 1.07 0 N/A N/A 51670 2 2.17 0.92 0.11-3.33 0.93

>10 62390 4 3.04 1.32 0.36-3.37 0.64 60645 5 3.17 1.58 0.51-3.68 0.37

Legend for Supplementary Tables 7-18: Abbreviations: PY, person-years; O, observed MDS/Ph- MPN cases; E, expected MDS/Ph- MPN cases; RR, relative risk; CI, confidence interval.

22

Page 23: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 19: Univariate and multivariate Cox regression tables

Covariate

MDS Ph- MPN

Univariate Multivariate Univariate Multivariate

HR (95% CI) P HR (95%

CI) P HR (95% CI) P HR (95%

CI) P

Age, per year 1.08 (1.04-1.13) <0.0001 1.10 (1.05-

1.14) <0.0001 1.01 (0.96-1.06) 0.71

Race, black vs. white 3.77 (0-N/A) 1 1.95 (0.24-

15.61) 0.53

Race, other vs. white 2.35 (0.78-7.03) 0.13 1.29 (0.16-

10.20) 0.81

Sex: female vs. male 0.61 (0.25-1.46) 0.27 0.72 (0.21-

2.44) 0.59

Year of diagnosis, per year

0.92 (0.79-1.07) 0.27 6.62 (1.94-

22.56) 0.003 5.93 (1.73-20.34) 0.005

Stage, regional vs. localized

1.89 (0.74-4.80) 0.18 0.58 (0.13-

2.70) 0.49

Stage, metastasized vs. localized/regional

6.02 (1.38-26.31) 0.02 N/A N/A

Tumor size, <2 cm vs. >2 cm

6.39 (2.12-19.26) 0.001 1.10 (0.31-

3.89) 0.89

Histology: papillary vs. follicular

0.51 (0.17-1.52) 0.23 N/A N/A

Treatment, RAI vs. no radiation

1.53 (0.63-3.73) 0.36 1.49 (0.42-

5.29) 0.54

RAI dose simulation 1.57 (1.03-2.40) 0.04 1.57 (1.06-

2.32) 0.025 1.14 (0.55-2.38) 0.72 1.09 (0.54-

2.19) 0.81

Control interaction term 1.96 (1.19-3.22) 0.01 1.64 (1.01-

2.64) 0.044 0.56 (0.13-2.44) 0.44 0.51 (0.12-

2.20) 0.37

Covariates (i.e potential confounders for RAI treatment) that were significant in univariate analyses were analyzed in the multivariate analyses. These analyses were performed in WDTC cases diagnosed 2000 and later to ensure adequate capture of secondary MDS/Ph- MPN cases, registration of which started in SEER in 2001. Because these analyses served to validate our risk-time course estimates, we limited the regression analyses to MNs that arose in the second and third year following WDTC treatment. “RAI dose simulation” is an interaction term where the dichotomous administration of RAI (no = 0, yes = 1) was multiplied by the WDTC tumor size in centimeters (rounded up, 0-1 cm = 1, 1-2 cm = 2, 2-3 cm = 3 and 3+ cm = 4) or if tumor size was not available, WDTC disease stage (localized disease = 1, regional disease = 2). All metastatic WDTC cases treated with RAI were given the highest score (i.e. 4). “Control interaction term” serves as validation of our interaction term method and does not include RAI treatment information (i.e. WDTC tumor size and stage only). Since it was less significant than the “RAI dose simulation” interaction term in the MDS multivariate analysis, we concluded that our “RAI dose simulation” judiciously included RAI treatment information and was valid.

23

Page 24: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 20: Characteristics of WDTC cases and controls.

Parameter

WDTC cases that later developed MDS WDTC cases that later developed Ph- MPN

Surgery alone Surgery + RAI Surgery alone Surgery + RAICases (n

= 42)Controls (n = 210)

Cases (n = 35)

Controls (n = 175)

Cases (n = 34)

Controls (n = 170)

Cases (n = 32)

Controls (n = 160)

Age (in years, median [IQR])63 (59-73)

63 (59-73)

65 (52-75)

65 (51-74)

58 (51-68)

56 (51-68)

56 (45-63)

56 (45-63)

GenderMale 9 (21%) 45 (21%) 16 (46%) 79 (45%) 12 (36%) 47 (28%) 12 (38%) 59 (37%)

Female 33 (79%)165 (79%)

19 (54%) 96 (55%) 22 (65%)123 (72%)

20 (63%)101 (63%)

Race

White 37 (88%)172 (82%)

28 (80%)142 (81%)

32 (94%)157 (92%)

26 (81%)138 (86%)

Black 2 (5%) 22 (10%) 2 (6%) 5 (3%) 2 (6%) 5 (3%) 2 (6%) 8 (5%)

Other 3 (7%) 16 (8%) 5 (14%) 28 (16%) 0 8 (5%) 4 (13%) 14 (9%)

Tumor size

<2 cm 23 (68%)115 (55%)

9 (29%) 45 (26%) 20 (67%)100 (59%)

16 (55%) 80 (50%)

≥2 cm 11 (32%) 55 (26%) 22 (71%)110 (63%)

10 (33%) 50 (29%) 13 (45%) 70 (44%)

Unknown 8 (19%) 40 (19%) 4 (11%) 20 (11%) 4 (12%) 20 (12%) 3 (9%) 10 (6%)

Tumor stage

Localized 30 (71%)150 (71%)

14 (40%)70 (40%) 27 (79%) 135

(79%)15 (47%) 75 (47%)

Regional 10 (24%) 50 (24%) 16 (46%) 80 (46%) 7 (21%) 35 (21%) 14 (44%) 70 (44%)

Distant 1 (2%) 5 (10%) 4 (11%) 20 (11%) 0 0 3 (9%) 15 (9%)

Unknown 1 (2%) 5 (10%) 1 (3%) 5 (3%) 0 0 0 0

Histology

Papillary carcinoma, NOS 11 (26%) 55 (26%) 7 (20%) 35 (20%) 5 (15%) 25 (15%) 5 (16%) 25 (16%)

Papillary adenocarcinoma, NOS

15 (36%) 75 (36%) 9 (26%) 45 (26%) 14 (41%) 70 (41%) 14 (44%) 70 (44%)

Oxyphilic adenocarcinoma

4 (10%) 20 (10%) 2 (6%) 10 (6%) 1 (3%) 5 (3%) 0 0

Follicular adenocarcinoma, NOS

1 (2%) 5 (2%) 5 (14%) 25 (14%) 0 0 1 (3%) 5 (3%)

Follicular adenocarcinoma well diff.

1 (2%) 5 (2%) 1 (3%) 5 (3%) 1 (3%) 5 (3%) 1 (3%) 5 (3%)

Follicular adenocarcinoma trabecular

2 (5%) 10 (5%) 0 0 0 0 1 (3%) 5 (3%)

Follicular carcinoma, minimally invasive

2 (5%) 10 (5%) 0 0 0 0 0 0

Papillary carcinoma, follicular variant

7 (17%) 35 (17%) 10 (29%) 50 (29%) 8 (24%) 40 (24%) 6 (19%) 30 (19%)

Papillary microcarcinoma 1 (2%) 5 (2%) 0 0 1 (3%) 5 (3%) 1 (3%) 5 (3%)

Papillary carcinoma, columnar cell

0 0 1 (3%) 5 (3%) 0 0 0 0

Median year of WDTC diagnosis (IQR)

2004 (2000-2007)

2004 (1998-2009)

2002 (2000-2006)

2004 (1999-2008)

2002 (1994-2005)

2003 (1994-2008)

2003 (2000-2006)

2004 (2000-2008)

Median PYs of follow-up (IQR)8.5 (5.0-13.8)

8.7 (4.3-13.9)

8.1 (5.6-11.1)

8.7 (5.1-12.5)

11.6 (6.4-19.6)

9.6 (5.7-18.0)

10.3 (5.8-14.3)

9.3 (5.6-12.5)

Total PYs of follow-up 477 3914 337 1675 473 2100 340 1516

Abbreviations: PY, person-year; RAI, radioactive iodine; WDTC, well-differentiated thyroid cancer.

24

Page 25: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 21: Characteristics of MN cases and controls.

Parameter

MDS cases after treatment for WDTC Ph- MPN cases after treatment for WDTCSurgery alone Surgery + RAI Surgery alone Surgery + RAI

Cases (n = 41)

Controls (n = 205)

Cases (n = 35)

Controls (n = 175)

Cases (n = 34)

Controls (n = 170)

Cases (n = 32)

Controls (n = 160)

Age (in years, median [IQR])

71 (64-79) 71 (64-79) 72 (66-78) 72 (66-78) 70 (61-76) 70 (61-76) 62 (52-70) 62 (52-70)

GenderMale 9 (%) 34 (17%) 16 (46%) 89 (51%) 12 (35%) 53 (31%) 12 (12%) 49 (31%)

Female 32 (%) 171 (83%) 19 (54%) 86 (49%) 22 (65%) 117 (69%) 20 (20%) 111 (69%)

Race

White 36 (%) 194 (95%) 28 (80%) 151 (86%) 32 (94%) 155 (91%) 26 (81%) 136 (85%)

Black 2 (%) 3 (1%) 2 (6%) 10 (6%) 2 (6%) 7 (4%) 2 (6%) 9 (6%)

Other 3 (%) 8 (4%) 5 (14%) 14 (8%) 0 8 (5%) 4 (13%) 15 (9%)

Median year of MDS diagnosis (IQR)

2010 (2007-2012)

2010 (2007-2012)

2008 (2005-2010)

2008 (2005-2010)

2009 (2006-2012)

2009 (2006-2012)

2009 (2007-2012)

2009 (2006-2012)

Median PYs of follow-up (IQR)

1.9 (0.8-3.7)

1.8 (0.8-3.9)

2.9 (1.3-4.3)

3.7 (0.9-6.1)

2.7 (1.5-6.4)

4.1 (1.8-6.5)

3.0 (1.0-6.4)

3.4 (0.7-6.3)

Total PYs of follow-up

108 523 106 698 135 768 135 661

Abbreviations: PY, person-year; RAI, radioactive iodine; WDTC, well-differentiated thyroid cancer.

25

Page 26: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 22: Histologic characteristics of MN cases and controls.

Histologic subtype

MDS cases after treatment for WDTC

Surgery alone Surgery + RAI

Cases (n = 41) Controls (n = 205)Cases (n =

35)Controls (n =

175)Refractory anaemia 5 (12%) 25 6 (17%) 30

Refractory anaemia with sideroblasts 0 0 3 (9%) 15

Refractory anaemia with excess blasts 6 (%) 30 8 (23%) 40

Refractory cytopenia with multilineage dysplasia 3 (%) 15 0 0

Myelodysplastic syndrome with 5q deletion syndrome 1 (2%) 5 0 0

Therapy-related myelodysplastic syndrome, NOS 0 0 1 (3%) 5

Myelodysplastic syndrome, NOS 26 (%) 130 17 (49%) 85

Histologic subtype

Ph- MPN cases after treatment for WDTC

Surgery alone Surgery + RAI

Cases (n = 34) Controls (n = 170) Cases (n = 32)

Controls (n = 160)

Malignant mastocytosis 1 (3%) 5 (3%) 0 0

Chronic myelomonocytic leukaemia (CMML), NOS 5 (15%) 25 (15%) 3 (9%) 15 (9%)

Polycythaemia vera 13 (38%) 65 (38%) 10 (31%) 50 (31%)

Chronic myeloproliferative disease, NOS 2 (6%) 10 (6%) 3 (9%) 15 (9%)

Primary myelofibrosis (PMF)/Myelosclerosis with myeloid metaplasia

2 (6%) 10 (6%) 5 (15%) 25 (15%)

Essential thrombocythemia 11 (32%) 55 (32%) 9 (28%) 45 (28%)

Chronic neutrophilic leukaemia (CNL) 0 0 1 (3%) 5 (3%)

Myeloproliferative neoplasm, unclassifiable 0 0 1 (3%) 5 (3%)

Abbreviations: PY, person-year; RAI, radioactive iodine; WDTC, well-differentiated thyroid cancer.

26

Page 27: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Supplementary Table 23: WDTC cases with RAI exposure and subsequent cytopenias and MDS

Prevalence of any cytopenias after RAI treatment Number (%)

Total thyroid cancer patient with RAI 12230

Any cytopenias present after at least 6 months 2350 (19%)

Any cytopenias after at least 12 months 2080 (17%)

Any cytopenias after at least 18 months 1820 (15%)

Any cytopenias after at least 24 months 1600 (13%)

Prevalence of bicytopenias after RAI treatment

Total thyroid cancer patient with RAI 12230

Any bicytopenia after at least 6 months 350 (2.9%)

Any bicytopenia after at least 12 months 300 (2.5%)

Any bicytopenia after at least 18 months 260 (2.1%)

Any bicytopenia after at least 24 months 210 (1.7%)

Prevalence of pancytopenias after RAI treatment

Total thyroid cancer patient with RAI 12230

Pancytopenia after at least 6 months 50 (0.41%)

Pancytopenia after at least 12 months 40 (0.33%)

Pancytopenias after at least 18 months 30 (0.25%)

Pancytopenias after at least 24 months 30 (0.25%)

Thyroid Cancer with RAI with pancytopenia

Total thyroid cancer patient with RAI 12230

MDS after 6 months of cancer diagnosis 20 (0.16%)

MDS after 12 months of cancer diagnosis 20 (0.16%)

MDS after 18 months of cancer diagnosis 20 (0.16%)

MDS after 24 months of cancer diagnosis 10 (0.08%)

See the Supplementary Methods (page 10 of this Appendix) for more details on these analyses.

27

Page 28: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

Appendix. R scripts for extracting and generating data from SEER files.# Functions will be explained in comments at first occurence in this script (so, duplicate functions in later figures will not be explained again).

# SEERaBomb is maintained on github. You can install the current github version using:install.packages("devtools") #if it isn't already installedlibrary(devtools)install_github("radivot/SEERaBomb",subdir="SEERaBomb", force=TRUE)

# As a backup to this github/devtools approach, every ~6 months Windows SEERaBomb binary is produced via:install.packages(c("LaF","RSQLite","dplyr","XLConnect","Rcpp","rgl","reshape2","mgcv","DBI","bbmle")) # first get dependencies from CRANinstall.packages("SEERaBomb",repos="http://epbi-radivot.cwru.edu") #need line above since only SEERaBomb is in the repository

# Finally, once each year, after testing it against the most recent SEER data release (typically in April-May), a novel version of SEERaBomb is uploaded to CRAN. The CRAN version should be stable. It can be installed via:install.packages("SEERaBomb")# If important bugs are reported I will fix and update the CRAN version, otherwise, to install new versions with minor bug fixes and/or new features, please use one of the other approaches. I will try to assure that the CRAN version works on indows, mac and ubuntu.# After installation SEERaBomb help pages can be reached by: library(SEERaBomb);help(pack="SEERaBomb")

# First make a database named cancTumSz.RData using SEERaBomb's function "mkSEER".# cancTumSz differs from cancDef (SEERaBomb's pickFields() default) in that in includes tumor size and stage data.rm(list=ls())library(dplyr)library(SEERaBomb)library(dbplyr)(df=getFields("~/data/SEER")) # This is where you should unpack the ASCII .zip-file from the SEER website.picks=c("casenum","reg","race","sex","agedx","yrbrth", "seqnum","modx","yrdx","lateral","histo3", "eod10sz","eod4","eodcode","cstumsiz", # eod10sz, eod2, eod4, eodcode and cstumsiz contain the "ICD9","ICD10","hststga","COD","surv","radiatn","chemo") # data necessary to analyze tumor sizes.(rdf=pickFields(df,picks))mkSEER(rdf,outFile="cancTumSz",seerHome="~/data/SEER") # This merges all cancer binaries in SEER data folder mrgd.

# Now, we will categorize tumor sizes. eod10, eod4 and cstumsiz definitions were derived from the SEER data dictionary (URL = https://seer.cancer.gov/data/seerstat/nov2016/TextData.FileDescription.pdf)rm(list=ls())library(SEERaBomb)library(dplyr)load("~/data/SEER/mrgd/cancTumSz.RData")canc$obs <- 1:nrow(canc) # we will need this below.

thy=canc%>%filter(cancer=="thyroid")thy$eod4sz=substr(thy$eod4,1,nchar(thy$eod4)-2) # In eod4, the first 2 digits are the size, so discard the rest.

thy_cs <- thy[is.na(thy$eodcode),] # Make separate data frames to makes things easier below, we will join (rbind) them later.thy_eod10=thy%>%filter(eodcode==4)thy_eod4=thy%>%filter(eodcode==3)

28

Page 29: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

thy_cs=thy_cs%>%filter(!(thy_cs$cstumsiz>=201 & thy_cs$cstumsiz<=989),thy_cs$cstumsiz!=000,thy_cs$cstumsiz!=999) #201-989 mm is too large and probably reflect data entry errors. 000 = no tumor. 999 = missing tumour size. We discard those. thy_cs$cstumsiz[thy_cs$cstumsiz%in%c(001:009,990,991)]=0 #recode the values to <2 cm and >2 cm.thy_cs$cstumsiz[thy_cs$cstumsiz%in%c(010:019,992)]=1 #recode the values to <2 cm and >2 cm.thy_cs$cstumsiz[thy_cs$cstumsiz%in%c(020:029,993)]=2thy_cs$cstumsiz[thy_cs$cstumsiz%in%c(030:200,994:996)]=3thy_eod10=thy_eod10%>%filter(!(thy_eod10$eod10sz>=201 & thy_eod10$eod10sz<=999),thy_eod10$eod10sz!=000) # Same as with cstumsiz. We discard those as well.thy_eod10$eod10sz[thy_eod10$eod10sz%in%c(001:009)]=0thy_eod10$eod10sz[thy_eod10$eod10sz%in%c(010:019)]=1thy_eod10$eod10sz[thy_eod10$eod10sz%in%c(020:029)]=2thy_eod10$eod10sz[thy_eod10$eod10sz%in%c(030:200)]=3thy_eod4=thy_eod4%>%filter(thy_eod4$eod4sz!=99,thy_eod4$eod4sz!=00) # 00 = no tumour. 99 = missing size. We discard those as well.thy_eod4=thy_eod4%>%filter(!(is.na(thy_eod4$eod4sz) | thy_eod4$eod4sz==""))thy_eod4$eod4sz[thy_eod4$eod4sz%in%c(01:10)]=0thy_eod4$eod4sz[thy_eod4$eod4sz%in%c(10:19)]=1thy_eod4$eod4sz[thy_eod4$eod4sz%in%c(20:29)]=2thy_eod4$eod4sz[thy_eod4$eod4sz%in%c(30:97)]=3

thy_cs$tumsz=thy_cs$cstumsiz # Rename the new size columns to the new column "tumsz" before rbinding.thy_eod10$tumsz=thy_eod10$eod10szthy_eod4$tumsz=thy_eod4$eod4sz

thySz=rbind(thy_cs,thy_eod10,thy_eod4) # Now, we have 1 large database with all tumours with known tumour sizes again.thySz=thySz%>%select(-eod10sz, -eod4, -eodcode, -cstumsiz, -eod4sz) # Get rid of columns we don't need anymore.canc=canc%>%select(-eod10sz, -eod4, -eodcode, -cstumsiz)canc$tumsz=NAobsunique=intersect(canc$obs,thySz$obs) # We use column "obs" to prevent duplicates below. cancnoSz=subset(canc,!(canc$obs%in%obsunique))cancTumSz=rbind(cancnoSz,thySz)canc=cancTumSz%>%select(-obs)

# To conform to the WHO 2016 classification, we will change the ICD-O-3 codes that are in canc$cancer==MPN.canc$cancer=as.character(canc$cancer)canc$cancer[canc$cancer=="MPN"]="CMML" # CMML is a placeholder for now, we will put all correct ICD-O-3 codes in MPN below.MPNWHO2016=c(9740:9742,9876,9945,9946,9950,9960:9964,9975) # These are the ICD-O-3 codes for MPN according to the WHO 2016 classification.canc$cancer[canc$cancer=="CMML" & canc$histo3%in%MPNWHO2016]="MPN" # Other codes are left as CMML but will not be used.# We also make some columns that we will need throughout the script.canc$trt="nr" # nr = no radiation. Will be left as 0 (no radiation) and 7 (radiation recommended but refused). Do it this way to initialize the vector.canc$trt[canc$radiatn%in%c(8)]="uk" # uk = unknown.canc$trt[canc$radiatn%in%c(1,4)]="eb" # eb = external beam radiotherapy.canc$trt[canc$radiatn%in%c(2,3,5,6)]="ii" # ii = radioactive isotopes. In the case of WDTC, these all concern radioactive iodine (RAI) but most will be "3".canc$trt=factor(canc$trt,levels=c("nr","ii","eb","uk"))canc$yrmodx=(round(canc$yrdx+((canc$modx-0.5)/12),3)) # Make yrmodx to improve resolution over yrdx: 2014.0 is January 2014, 2014.5 is July 2014.canc$cancNo="cg2" # Do this to initialize the vector, cg2 = greater than 2.canc$cancNo[canc$seqnum==2]="c2"

29

Page 30: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

canc$cancNo[canc$seqnum<2]="c1"canc$cancNo=factor(canc$cancNo,levels=c("c1","c2","cg2"))canc$survy=round(((canc$surv+0.5)/12),3)save(canc,file="~/data/SEER/mrgd/cancTumSzCRT.RData") # We finally have the database that we need and are ready to analyze the data.

# Figure 2rm(list=ls()) library(SEERaBomb)library(dplyr)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") # Popsae contains information regarding the population person-years at risk and was made above with mkSEER().papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452) # These are the ICD-O-3 codes for papillary and follicular thyroid cancer (WDTC).canc$cancer=as.character(canc$cancer)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$chemo!="1"]="pfThyroid" # canc$chemo!="1" is to exclude WDTC patients that received chemotherapy.canc$cancer=factor(canc$cancer)

# Figure 2a: generate data on total number of person years (PYs) at risk in SEERaBomb and SEER18, the "best" SEER*Stat MP-SIR setting.popsae$ak="noAK" # Alaska cannot be included in SEER*Stat MP-SIR analyses, so we separate Alaska from the other registries first.popsae$ak[popsae$reg=="AK"]="AK"popsa=popsae%>%group_by(db,year,ak)%>%summarize(npy=sum(py))write.csv(popsa,file="~/results/thyrMDS/Fig2a_totalPYs.csv") # All results will be written to this folder.

# Figure 2b: generate data on cumulative PYs at risk for a second cancer after a WDTC as first cancer.canc$ak="noAK" # Same as in Figure 1a.canc$ak[canc$reg=="AK"]="AK"thy=canc%>%filter(cancer=="pfThyroid",cancNo=="c1",trt!="uk",trt!="eb")thy=thy%>%filter(seqnum<2) # We only select WDTC first cancers.thy=thy%>%filter(surv<9999) # We discard WDTC patients with unknown survival (labeled as "9999" in SEER), else this messes up the cumulative person years (PYs) at risk.thy$survy=round(((thy$surv+0.5)/12),3) # surv is given in months, so recode to years to get PYs at risk.thyPY=thy%>%group_by(db,yrdx,ak)%>%summarize(py=sum(survy))write.csv(thyPY,file="~/results/thyrMDS/Fig2b_WDTC_PYs.csv")

#Figure 2c: generate data on the number of MDS second cancer cases after a WDTC as first cancer per SEER*Stat MP-SIR setting (limited cases) and in SEERaBomb (all cases).(thy=canc%>%filter(cancer=="pfThyroid",cancNo=="c1",trt!="uk",trt!="eb")) # WDTC first cancers of interest, treated with either surgery alone or surgery + RAI.(mds=canc%>%filter(cancer=="MDS",cancNo=="c2")) # MDS second cancers after any first cancer.mrn=intersect(thy$casenum,mds$casenum) # To select WDTC 1st cancer and MDS 2nd cancer combinations.thy1=thy[thy$casenum%in%mrn,]mds2=mds[mds$casenum%in%mrn,]thy1[mds2$agedx-thy1$agedx==0,]mds2[mds2$agedx-thy1$agedx==0,]thy1$casenum=as.numeric(thy1$casenum)mds2$casenum=as.numeric(mds2$casenum)thy1=thy1[order(thy1$casenum),] mds2=mds2[order(mds2$casenum),]mds2$yrdxthy=thy1$yrmodx # Cases were ordered above so this does not mess up.mds2$SEER9=0

30

Page 31: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

mds2$SEER9[mds2$db==73]=1 # Because SEER9 setting in SEER*Stat only captures cases from the initial 9 SEER registries.mds2$SEER13=0mds2$SEER13[(mds2$db==73 | mds2$db==93) & mds2$yrdxthy>=1993 & mds2$reg!="AK"]=1 # Because SEER13 setting in SEER*Stat only captures cases from the initial 13 SEER registries diagnosed 1993-2014, ex Alaska.mds2$SEER18=0mds2$SEER18[mds2$yrdxthy>=2000 & mds2$reg!="AK"]=1 # Because SEER18 setting in SEER*Stat only captures cases diagnosed 2000-2014, ex Alaska.mds2$SEERaBomb=1 # Because SEERaBomb can find all cases of MDS after WDTC.write.csv(mds2,file="~/results/thyrMDS/Fig2c_mdsAfterThy.csv") # Then plot cumulative MDS cases on x,y plot based on yrdxthy and the SEER9, SEER13, SEER18 and SEERaBomb columns (not included in this script).

# How many AML cases grew out the second MDS cases(aml=canc%>%filter(cancer=="AML",cancNo=="cg2")) # MDS second cancers after any first cancer.mrn=intersect(mds2$casenum,aml$casenum) # To select WDTC 1st cancer and MDS 2nd cancer combinations.aml3=aml[aml$casenum%in%mrn,]mds3=mds2[mds2$casenum%in%mrn,]aml3

# Figure 2d: same as above, but now for MPN second cancer cases after WDTC first cancers.(mpn=canc%>%filter(cancer=="MPN",cancNo=="c2"))mrn=intersect(thy$casenum,mpn$casenum)thy1=thy[thy$casenum%in%mrn,]mpn2=mpn[mpn$casenum%in%mrn,]thy1[mpn2$agedx-thy1$agedx==0,]mpn2[mpn2$agedx-thy1$agedx==0,]thy1$casenum=as.numeric(thy1$casenum)mpn2$casenum=as.numeric(mpn2$casenum)thy1=thy1[order(thy1$casenum),] mpn2=mpn2[order(mpn2$casenum),]mpn2$yrdxthy=thy1$yrmodxmpn2$SEER9=0mpn2$SEER9[mpn2$db==73]=1mpn2$SEER13=0mpn2$SEER13[(mpn2$db==73 | mpn2$db==93) & mpn2$yrdxthy>=1993 & mpn2$reg!="AK"]=1mpn2$SEER18=0mpn2$SEER18[mpn2$yrdxthy>=2000 & mpn2$reg!="AK"]=1mpn2$SEERaBomb=1write.csv(mpn2,file="~/results/thyrMDS/Fig2d_mpnAfterThy.csv")

# Data frame for Figure 3a-b:rm(list=ls()) library(SEERaBomb)library(dplyr)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452) canc$cancer=as.character(canc$cancer)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$chemo!="1"]="pfThyroid" canc$cancer=factor(canc$cancer)

# Figure 3a: generate relative risk (RR) table and plot for MDS second cancer cases after a WDTC first cancer, based on WDTC treatment. library(ggplot2)

31

Page 32: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

thyTrts=c("nr","ii") # We are only interested in WDTC cases treated with surgery alone or treated with surgery + RAI. eb has too few cases.brks=c(0,1,2,3,6,10) # These are the time intervals that will be plotted.cols=c("O","E","py") # We will need this below.

(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) # pm = pooled males seerSet.(pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100)) # pf = pooled females seerSet.pm=mk2D(pm,secondS=c("MDS"))pf=mk2D(pf,secondS=c("MDS"))(pm=csd(pm,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))(pf=csd(pf,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))Dm2=pm$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Dm2$tDf2$t # Since time points are close enough, just grab one of the two.(D=cbind(int=Dm2$int,ageg=Dm2$ageG,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E))) # This is the table below the relative risk figure.write.csv2(D,file="~/results/thyrMDS/Fig3a_RRmdsAfterThy.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=D,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since WDTC Diagnosis",ylab="Relative Risk of MDS")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/Fig3a_RRmdsAfterThy.png")

# Figure 3b: same as above, but now for MPN second cancer cases after WDTC first cancers.(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100))(pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100))pm=mk2D(pm,secondS=c("MPN"))pf=mk2D(pf,secondS=c("MPN"))(pm=csd(pm,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))(pf=csd(pf,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))Dm2=pm$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(D=cbind(int=Dm2$int,ageg=Dm2$ageG,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv2(D,file="~/results/thyrMDS/Fig3b_RRmpnAfterThy.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=D,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since WDTC Diagnosis",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))

32

Page 33: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

ggsave("~/results/thyrMDS/Fig3b_RRmpnAfterThy.png")

# Figure 3c-d use different cancer names, so we will reload the database.rm(list=ls()) library(SEERaBomb)library(dplyr)library(ggplot2)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData")papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452)stageslr=c(0,1,2)canc$cancer=as.character(canc$cancer)canc$hststga=as.character(canc$hststga)canc$tumsz=as.character(canc$tumsz)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$tumsz%in%c(0,1) & canc$hststga%in%stageslr & canc$chemo!="1"]="pfThyroidSm" # This groups localized/regional WDTCs [0,2) cm not treated with chemotherapy in pfThyroidSm(all). canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$tumsz%in%c(2,3) & canc$hststga%in%stageslr & canc$chemo!="1"]="pfThyroidLa" # Same as above, but then sizes [2,20) cm in pfThyroidLa(rge).

# Figure 3c (risk of MDS after small WDTC <2 cm).thyTrts=c("nr","ii")brks=c(0,1,2,3,6,10)cols=c("O","E","py")

(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) # pm = pooled males seerSet.(pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100)) # pf = pooled females seerSet.pm=mk2D(pm,secondS=c("MDS"))pf=mk2D(pf,secondS=c("MDS"))(pm=csd(pm,brkst=brks,trts=thyTrts) )(pf=csd(pf,brkst=brks,trts=thyTrts) )Dm2=pm$DF%>%filter(cancer1=="pfThyroidSm")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidSm")%>%select(-cancer1)Dm2$tDf2$t # Since time points are close enough, just grab one of the two.(dSmall=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv2(dSmall,file="~/results/thyrMDS/Fig3a_WDTCsmallMDS.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dSmall,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer <2 cm",ylab="Relative Risk of MDS")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/Fig3a_WDTCsmallMDS.png")

#Figure 3d (risk of MDS after large WDTC >2cm)Dm2=pm$DF%>%filter(cancer1=="pfThyroidLa")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidLa")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.

33

Page 34: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

(dLarge=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv2(dLarge,file="~/results/thyrMDS/Fig3b_WDTClargeMDS.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dLarge,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer >2 cm",ylab="Relative Risk of MDS")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/Fig3b_WDTClargeMDS.png")

# Figure 3e-f need different cancer names, so we will reload again.rm(list=ls()) library(SEERaBomb)library(dplyr)library(ggplot2)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452)stagel=c(0,1)stager=c(2)canc$cancer=as.character(canc$cancer)canc$hststga=as.character(canc$hststga)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$hststga%in%stagel & canc$chemo!="1"]="pfThyroidLoc"canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$hststga%in%stager & canc$chemo!="1"]="pfThyroidReg"canc$cancer=factor(canc$cancer)

# Figure 3e (risk of MDS after localized WDTC).thyTrts=c("nr","ii")brks=c(0,1,2,3,6,10)cols=c("O","E","py")

(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) (pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100)) pm=mk2D(pm,secondS=c("MDS"))pf=mk2D(pf,secondS=c("MDS"))(pm=csd(pm,brkst=brks,trts=thyTrts) )(pf=csd(pf,brkst=brks,trts=thyTrts) )Dm2=pm$DF%>%filter(cancer1=="pfThyroidLoc")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidLoc")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dLoc=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv2(dLoc,file="~/results/thyrMDS/Fig3c_WDTClocMDS.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)),

34

Page 35: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dLoc,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer (localized)",ylab="Relative Risk of MDS")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/Fig3c_WDTClocMDS.png")

#Figure 3f (risk of MDS after regional WDTC).Dm2=pm$DF%>%filter(cancer1=="pfThyroidReg")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidReg")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dReg=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv2(dReg,file="~/results/thyrMDS/Fig3d_WDTCregMDS.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dReg,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer (regional)",ylab="Relative Risk of MDS")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/Fig3d_WDTCregMDS.png")

# Figure: For low-int risk WDTCs.rm(list=ls()) library(SEERaBomb)library(dplyr)library(ggplot2)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData")papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452)canc$cancer=as.character(canc$cancer)canc$tumsz=as.character(canc$tumsz)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$tumsz=="<4" & canc$hststga%in%c(0,1) & canc$chemo!="1" & canc$trt!="eb"]="pfThyroidLI" # This groups localized/regional WDTCs [0,2) cm not treated with chemotherapy in pfThyroidSm(all). canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$hststga==2 & canc$agedx<45 & canc$chemo!="1" & canc$trt!="eb"]="pfThyroidLI" # This groups localized/regional WDTCs [0,2) cm not treated with chemotherapy in pfThyroidSm(all).

thyTrts=c("nr","ii") # We are only interested in WDTC cases treated with surgery alone or treated with surgery + RAI. eb has too few cases.brks=c(0,1,2,3,6,10) # These are the time intervals that will be plotted.cols=c("O","E","py") # We will need this below.

(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) # pm = pooled males seerSet.(pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100)) # pf = pooled females seerSet.pm=mk2D(pm,secondS=c("MDS"))pf=mk2D(pf,secondS=c("MDS"))

35

Page 36: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

(pm=csd(pm,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))(pf=csd(pf,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))Dm2=pm$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Dm2$tDf2$t # Since time points are close enough, just grab one of the two.(D=cbind(int=Dm2$int,ageg=Dm2$ageG,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E))) # This is the table below the relative risk figure.write.csv2(D,file="~/results/thyrMDS/Fig3a_RRmdsAfterThy.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=D,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since WDTC Diagnosis",ylab="Relative Risk of MDS")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/Fig3a_RRmdsAfterThy.png")

# Figure 3b: same as above, but now for MPN second cancer cases after WDTC first cancers.(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100))(pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100))pm=mk2D(pm,secondS=c("MPN"))pf=mk2D(pf,secondS=c("MPN"))(pm=csd(pm,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))(pf=csd(pf,brkst=brks,trts=thyTrts,exclUnkSurv=FALSE))Dm2=pm$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroid")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(D=cbind(int=Dm2$int,ageg=Dm2$ageG,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv2(D,file="~/results/thyrMDS/Fig3b_RRmpnAfterThy.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=D,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since WDTC Diagnosis",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/Fig3b_RRmpnAfterThy.png")

# Figure 4rm(list=ls()) library(SEERaBomb)library(dplyr)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") # Popsae contains information regarding the population person-years at risk and was made above with mkSEER().

36

Page 37: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452) # These are the ICD-O-3 codes for papillary and follicular thyroid cancer (WDTC).canc$cancer=as.character(canc$cancer)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$chemo!="1"]="pfThyroid" # canc$chemo!="1" is to exclude WDTC patients that received chemotherapy.canc$cancer=factor(canc$cancer)canc$dead=0 # SEER Cause of Death recode (URL=https://seer.cancer.gov/codrecode/1969+_d04162012/index.html)canc$dead[canc$COD>0]=1canc$dead[canc$COD==99999]=2(thy=canc%>%filter(cancer=="pfThyroid",cancNo=="c1",trt!="uk",trt!="eb"))

# Figure 4a(mds=canc%>%filter(cancer=="MDS",cancNo=="c2"))mrn=intersect(thy$casenum,mds$casenum)thy1=thy[thy$casenum%in%mrn,]mds2=mds[mds$casenum%in%mrn,]thy1[mds2$agedx-thy1$agedx==0,]mds2[mds2$agedx-thy1$agedx==0,]thy1$casenum=as.numeric(thy1$casenum)mds2$casenum=as.numeric(mds2$casenum)thy1=thy1[order(thy1$casenum),] mds2=mds2[order(mds2$casenum),]mds2$thytrt=thy1$trt

mrnx=intersect(thy$casenum,thy1$casenum)thyNoC2=subset(thy,!(thy$casenum%in%mrnx))thyNoC2$c2occ=0thy1$c2occ=1thyall=rbind(thy1,thyNoC2)thyall=thyall%>%filter(surv<9999)(thyall=thyall%>%select(-radiatn, -yrmodx, -reg, -lateral, -db, -age86, -cancer, -cancNo, -seqnum, -yrbrth, -modx, ICD9, -ICD10, -COD, -chemo))write.csv2(thyall,file="~/results/thyrMDS/Fig4a_thyMDSvsThyNoMDS.csv") # Use this file to make case-control selections (not performed in R).

# Figure 4c(mds0=canc%>%filter(cancer=="MDS",cancNo=="c1"))mds0$thytrt=NAmds02=rbind(mds0,mds2)mds02=mds02%>%filter(surv<9999)(mds02=mds02%>%select(-reg,-yrbrth,-seqnum,-modx,-lateral,-ICD9,-ICD10,-hststga,-db,-age86,-cancer,-tumsz,-yrmodx,-trt))write.csv2(mds02,file="~/results/thyrMDS/Fig4c_tMDSvsDeNovo.csv")

# Figure 4b: same as above, but now for MPN second cancer cases after WDTC first cancers.(mpn=canc%>%filter(cancer=="MPN",cancNo=="c2"))mrn=intersect(thy$casenum,mpn$casenum)thy1=thy[thy$casenum%in%mrn,]mpn2=mpn[mpn$casenum%in%mrn,]thy1[mpn2$agedx-thy1$agedx==0,]mpn2[mpn2$agedx-thy1$agedx==0,]thy1$casenum=as.numeric(thy1$casenum)mpn2$casenum=as.numeric(mpn2$casenum)thy1=thy1[order(thy1$casenum),] mpn2=mpn2[order(mpn2$casenum),]

37

Page 38: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

mpn2$thytrt=thy1$trt

mrnx=intersect(thy$casenum,thy1$casenum)thyNoC2=subset(thy,!(thy$casenum%in%mrnx))thyNoC2$c2occ=0thy1$c2occ=1thyall=rbind(thy1,thyNoC2)thyall=thyall%>%filter(surv<9999)(thyall=thyall%>%select(-radiatn, -yrmodx, -reg, -lateral, -db, -age86, -cancer, -cancNo, -seqnum, -yrbrth, -modx, ICD9, -ICD10, -COD, -chemo))write.csv2(thyall,file="~/results/thyrMDS/Fig4b_thyMPNvsThyNoMPN.csv")

# Figure 4d(mpn0=canc%>%filter(cancer=="MPN",cancNo=="c1"))mpn0$thytrt=NAmpn02=rbind(mpn0,mpn2)mpn02=mpn02%>%filter(surv<9999)(mpn02=mpn02%>%select(-reg,-yrbrth,-seqnum,-modx,-lateral,-ICD9,-ICD10,-hststga,-db,-age86,-cancer,-tumsz,-yrmodx,-trt))write.csv2(mpn02,file="~/results/thyrMDS/Fig4d_tMPNvsDeNovo.csv")

# Table 1rm(list=ls()) library(SEERaBomb)library(dplyr)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData")papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452) canc$cancer=as.character(canc$cancer)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$chemo!="1"]="pfThyroid" canc$cancer=factor(canc$cancer)library(lattice)canc$yrg=cut(canc$yrdx,breaks=c(1972,1980,1990,2000,2010,2015),right=F,dig.lab=4)canc$ageg=cut(canc$age86,breaks=c(0,30,40,50,60,70,120),right=F)canc$histo="other"canc$histo[canc$histo3%in%c(8050,8052,8130,8260,8340:8344,8450,8452)]="pap"canc$histo[canc$histo3%in%c(8290,8330:8332,8335)]="fol"

thy=canc%>%filter(cancer=="pfThyroid"&(trt=="nr"|trt=="ii"))thy=thy%>%filter(seqnum<2)thy=thy%>%filter(chemo=="0")

table(thy$trt)(ty=table(thy$yrg,thy$trt))prop.table(ty,2)(ta=table(thy$ageg,thy$trt))prop.table(ta,2)(ts=table(thy$sex,thy$trt))prop.table(ts,2)(tr=table(thy$race,thy$trt))prop.table(tr,2)(th=table(thy$histo,thy$trt))prop.table(th,2)(tst=table(thy$hststga,thy$trt))(tsz=table(thy$tumsz,thy$trt))thys=thy%>%filter(surv<9999)

38

Page 39: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

tapply(thys$survy, thys$trt, FUN=quantile)tapply(thys$survy, thys$trt, FUN=sum)

# Statistics for Table 1thy$agedx.f=factor(thy$agedx, ordered = TRUE)histogram(~ agedx | trt, data=thy, layout=c(1,2))histogram(~ agedx.f | trt, data=thy, layout=c(1,2)) # Now it follows a normal distribution, so we can do a Wilcoxon-Mann-Whitney test.wilcox.test(agedx ~ trt, data=thy)thy$yrdx.f=factor(thy$agedx, ordered = TRUE)histogram(~ yrdx | trt, data=thy, layout=c(1,2))histogram(~ yrdx.f | trt, data=thy, layout=c(1,2))wilcox.test(yrdx ~ trt, data=thy)thy$surv.f=factor(thy$survy, ordered = TRUE)histogram(~ surv | trt, data=thy, layout=c(1,2))histogram(~ surv.f | trt, data=thy, layout=c(1,2))wilcox.test(survy ~ trt, data=thy)

# Table 2: regression analysislibrary(survival)canc%>%filter(trt=="nr" | trt=="ii")canc$trt=factor(canc$trt,levels=c("nr","ii"))(thy=canc%>%filter(cancer=="pfThyroid",cancNo=="c1")) (all=canc%>%filter(cancer!="pfThyroid",cancNo=="c2"))

(thyDup=thy[duplicated(thy$casenum),])mrndupthy=intersect(thy$casenum,thyDup$casenum)(thyDup=thy[thy$casenum%in%mrndupthy,])(thyDup=thyDup[with(thyDup, order(casenum,-radiatn,-chemo)),])(thyDup=thyDup[c(TRUE,FALSE),])thy=subset(thy,!(thy$casenum%in%mrndupthy))thy=rbind(thy,thyDup)

(allDup=all[duplicated(all$casenum),])mrndupall=intersect(all$casenum,allDup$casenum)(allDup=all[all$casenum%in%mrndupall,])(allDup=allDup[with(allDup, order(casenum,-radiatn,-chemo)),])(allDup=allDup[c(TRUE,FALSE),])all=subset(all,!(all$casenum%in%mrndupall))all=rbind(all,allDup)

mrn=intersect(thy$casenum,all$casenum)thy1=thy[thy$casenum%in%mrn,]all2=all[all$casenum%in%mrn,]thy1[all2$agedx-thy1$agedx==0,]all2[all2$agedx-thy1$agedx==0,]thy1$casenum=as.numeric(thy1$casenum)all2$casenum=as.numeric(all2$casenum)thy1=thy1[order(thy1$casenum),]all2=all2[order(all2$casenum),]all2$trt=thy1$trtall2$yrdiff=all2$yrmodx-thy1$yrmodxthy1$surv=all2$yrdiff*12thy1$cancer2=all2$cancer

mrnx=intersect(thy$casenum,thy1$casenum)

39

Page 40: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

thyNoC2=subset(thy,!(thy$casenum%in%mrnx))thyNoC2$c2occ=0thy1$c2occ=1thyNoC2$cancer2=NAthyall=rbind(thy1,thyNoC2)thyall=thyall%>%filter(surv>=12)thyall=thyall%>%filter(surv<37)thyall=thyall%>%filter(yrdx>1999)thyall$histClss="other"thyall$histClss[thyall$histo3%in%c(8050,8052,8130,8260,8340:8344,8450,8452)]="pap"thyall$histClss[thyall$histo3%in%c(8290,8330:8332,8335)]="fol"thyall$lymph=NAthyall$lymph[thyall$hststga==2]=1thyall$lymph[thyall$hststga==1]=0thyall$meta=NAthyall$meta[thyall$hststga==4]=1thyall$meta[thyall$hststga%in%c(1,2)]=0thyall$mds2=0thyall$mds2[thyall$cancer2=="MDS"]=1thyall$mpn2=0thyall$mpn2[thyall$cancer2=="MPN"]=1thyall$mdsFG=0thyall$mdsFG[thyall$cancer2=="MDS"]=1thyall$mdsFG[thyall$cancer2!="MDS"]=2thyall$mdsFG[thyall$cancer2=="NA"]=0thyall$mpnFG=0thyall$mpnFG[thyall$cancer2=="MPN"]=1thyall$mpnFG[thyall$cancer2!="MPN"]=2thyall$mpnFG[thyall$cancer2=="NA"]=0thyall$hststga[thyall$hststga==9]=NAthyall$tumsz=as.numeric(thyall$tumsz)thyall$tumsz2=NAthyall$tumsz2[thyall$tumsz<2]="<2"thyall$tumsz2[thyall$tumsz>=2]=">2"thyall$tumszII=NAthyall$tumszII[thyall$trt=="nr"]=0thyall$tumszII[thyall$trt=="ii" & thyall$tumsz==0]=1thyall$tumszII[thyall$trt=="ii" & thyall$tumsz==1]=2thyall$tumszII[thyall$trt=="ii" & thyall$tumsz==2]=3thyall$tumszII[thyall$trt=="ii" & thyall$tumsz==3]=4thyall$tumszII[thyall$trt=="ii" & thyall$hststga==1]=1thyall$tumszII[thyall$trt=="ii" & thyall$hststga==2]=2thyall$tumszII[thyall$trt=="ii" & thyall$hststga==4]=4thyall$tumszII[thyall$trt=="nr"]=0thyall$tumszCtrl=NAthyall$tumszCtrl[thyall$tumsz==0]=1thyall$tumszCtrl[thyall$tumsz==1]=2thyall$tumszCtrl[thyall$tumsz==2]=3thyall$tumszCtrl[thyall$tumsz==3]=4thyall$tumszCtrl[thyall$hststga==1]=1thyall$tumszCtrl[thyall$hststga==2]=2thyall$tumszCtrl[thyall$hststga==4]=4(thyall=thyall%>%select(-radiatn, -yrmodx, -reg, -lateral, -db, -age86, -cancer, -cancNo, -seqnum, ICD9, -ICD10, -chemo, -yrbrth, -modx))# save(thyall, file="~/results/thyall.RData") # In case you want to import it into SPSS etc.

40

Page 41: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

thyall$SurvObj=with(thyall, Surv(survy, mds2==1))summary(coxph(SurvObj ~ agedx, data = thyall))summary(coxph(SurvObj ~ race, data = thyall))summary(coxph(SurvObj ~ sex, data = thyall))summary(coxph(SurvObj ~ yrdx, data = thyall))summary(coxph(SurvObj ~ hststga, data = thyall))summary(coxph(SurvObj ~ lymph, data = thyall))summary(coxph(SurvObj ~ meta, data = thyall))summary(coxph(SurvObj ~ tumsz2, data = thyall))summary(coxph(SurvObj ~ histClss, data = thyall))summary(coxph(SurvObj ~ trt, data = thyall))summary(coxph(SurvObj ~ tumszII, data = thyall))summary(coxph(SurvObj ~ tumszCtrl, data = thyall))summary(coxph(SurvObj ~ agedx + tumszII, data = thyall))summary(coxph(SurvObj ~ agedx + tumszCtrl, data = thyall))

(cox.zph(coxph(SurvObj ~ agedx + tumszII, data = thyall))) # Check for proportional hazards violation

thyall$SurvObj=with(thyall, Surv(survy, mpn2==1))summary(coxph(SurvObj ~ agedx, data = thyall))summary(coxph(SurvObj ~ race, data = thyall))summary(coxph(SurvObj ~ sex, data = thyall))summary(coxph(SurvObj ~ yrdx, data = thyall))summary(coxph(SurvObj ~ hststga, data = thyall))summary(coxph(SurvObj ~ lymph, data = thyall))summary(coxph(SurvObj ~ meta, data = thyall))summary(coxph(SurvObj ~ tumsz2, data = thyall))summary(coxph(SurvObj ~ histClss, data = thyall))summary(coxph(SurvObj ~ trt, data = thyall))summary(coxph(SurvObj ~ tumszII, data = thyall))summary(coxph(SurvObj ~ tumszCtrl, data = thyall))summary(coxph(SurvObj ~ yrdx + tumszII, data = thyall))summary(coxph(SurvObj ~ yrdx + tumszCtrl, data = thyall))

(cox.zph(coxph(SurvObj ~ agedx + tumszII, data = thyall))) # Check for proportional hazards violation

# Appendix Tablesrm(list=ls()) library(SEERaBomb)library(dplyr)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452) canc$cancer=as.character(canc$cancer)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$chemo!="1"]="pfThyroid" canc$cancer=factor(canc$cancer)library(lattice)canc$yrg=cut(canc$yrdx,breaks=c(1972,1980,1990,2000,2010,2015),right=F,dig.lab=4)canc$ageg=cut(canc$age86,breaks=c(0,30,40,50,60,70,120),right=F)canc$histo="other"canc$histo[canc$histo3%in%c(8050,8052,8130,8260,8340:8344,8450,8452)]="pap"canc$histo[canc$histo3%in%c(8290,8330:8332,8335)]="fol"

# Appendix Tables 2 and 4: Characteristics of patients that developed MDS or MPN after WDTC.(thy=canc%>%filter(cancer=="pfThyroid",cancNo=="c1",trt!="uk",trt!="eb"))(mds=canc%>%filter(cancer=="MDS",cancNo=="c2"))

41

Page 42: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

mrn=intersect(thy$casenum,mds$casenum)thy1=thy[thy$casenum%in%mrn,]mds2=mds[mds$casenum%in%mrn,]thy1[mds2$agedx-thy1$agedx==0,]mds2[mds2$agedx-thy1$agedx==0,]thy1$casenum=as.numeric(thy1$casenum)mds2$casenum=as.numeric(mds2$casenum)thy1=thy1[order(thy1$casenum),] mds2=mds2[order(mds2$casenum),]mds2$yrdxthy=thy1$yrmodxmds2$yrdiff=mds2$yrmodx-mds2$yrdxthymds2$thytrt=thy1$trt

(t1=table(thy1$trt))(ty=table(thy1$yrg,thy1$trt))prop.table(ty,2)(t2=table(thy1$ageg,thy1$trt))prop.table(t2,2)(ts=table(thy1$sex,thy1$trt))prop.table(ts,2)(tr=table(thy1$race,thy1$trt))prop.table(tr,2)(th=table(thy1$histo,thy1$trt))prop.table(th,2)(tst=table(thy1$hststga,thy1$trt))prop.table(tst,2)(tsz=table(thy1$tumsz,thy1$trt))prop.table(tsz,2)thy1s=thy1%>%filter(surv<9999)tapply(thy1s$survy, thy1s$trt, FUN=sum)tapply(thy1s$survy, thy1s$trt, FUN=quantile)

# Statisticswilcox.test(agedx ~ trt, data=thy1)wilcox.test(yrdx ~ trt, data=thy1)wilcox.test(survy ~ trt, data=thy1s)fisher.test(thy1$sex, thy1$trt)fisher.test(thy1$race, thy1$trt)fisher.test(thy1$histo, thy1$trt)fisher.test(thy1$hststga, thy1$trt)fisher.test(thy1$tumsz, thy1$trt)

# WDTC patients that did not develop MDSmrnx=intersect(thy$casenum,thy1$casenum)thy0=subset(thy,!(thy$casenum%in%mrnx))(t1=table(thy0$trt))(ty=table(thy0$yrg,thy0$trt))prop.table(ty,2)(t2=table(thy0$ageg,thy0$trt))prop.table(t2,2)(ts=table(thy0$sex,thy0$trt))prop.table(ts,2)(tr=table(thy0$race,thy0$trt))prop.table(tr,2)(th=table(thy0$histo,thy0$trt))prop.table(th,2)

42

Page 43: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

(tst=table(thy0$hststga,thy0$trt))prop.table(tst,2)(tsz=table(thy0$tumsz,thy0$trt))prop.table(tsz,2)thy0s=thy0%>%filter(surv<9999)tapply(thy0s$survy, thy0s$trt, FUN=sum)tapply(thy0s$survy, thy0s$trt, FUN=quantile)

thy0$MN=0thy1$MN=1thy01=rbind(thy0,thy1)thy01nr=thy01%>%filter(trt=="nr")thy01ii=thy01%>%filter(trt=="ii")

# Statisticswilcox.test(agedx ~ MN, data=thy01nr)fisher.test(thy01nr$sex, thy01nr$MN)fisher.test(thy01nr$race, thy01nr$MN)fisher.test(thy01nr$histo, thy01nr$MN)fisher.test(thy01nr$hststga, thy01nr$MN)fisher.test(thy01nr$tumsz, thy01nr$MN)thy01nrs=thy01nr%>%filter(surv<9999)wilcox.test(survy ~ MN, data=thy01nrs)thy01nry=thy01nr%>%filter(yrdx>2000)wilcox.test(yrdx ~ MN, data=thy01nry)

wilcox.test(agedx ~ MN, data=thy01ii)fisher.test(thy01ii$sex, thy01ii$MN)fisher.test(thy01ii$race, thy01ii$MN)fisher.test(thy01ii$histo, thy01ii$MN)fisher.test(thy01ii$hststga, thy01ii$MN)fisher.test(thy01ii$tumsz, thy01ii$MN)thy01iis=thy01ii%>%filter(surv<9999)wilcox.test(survy ~ MN, data=thy01iis)thy01iiy=thy01ii%>%filter(yrdx>2000)wilcox.test(yrdx ~ MN, data=thy01ii)

# Appendix table MDS after WDTC treatment.(t1=table(mds2$thytrt))(ty=table(mds2$yrg,mds2$thytrt))prop.table(ty,2)(t2=table(mds2$ageg,mds2$thytrt))prop.table(t2,2)(ts=table(mds2$sex,mds2$thytrt))prop.table(ts,2)(tr=table(mds2$race,mds2$thytrt))prop.table(tr,2)(th=table(mds2$histo3,mds2$thytrt))prop.table(th,2)mds2s=mds2%>%filter(surv<9999)tapply(mds2s$survy, mds2s$thytrt, FUN=sum)tapply(mds2s$survy, mds2s$thytrt, FUN=quantile)tapply(mds2s$yrdiff, mds2s$thytrt, FUN=quantile)

# Statisticswilcox.test(agedx ~ thytrt, data=mds2)

43

Page 44: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

wilcox.test(yrdx ~ thytrt, data=mds2)wilcox.test(survy ~ thytrt, data=mds2s)wilcox.test(yrdiff ~ thytrt, data=mds2)fisher.test(mds2$sex, mds2$thytrt)fisher.test(mds2$race, mds2$thytrt)fisher.test(mds2$histo3, mds2$thytrt)

# Select de novo MDS cases.(mds0=canc%>%filter(cancer=="MDS",cancNo=="c1")) (ty=table(mds0$yrg,mds0$cancNo))prop.table(ty,2)(t2=table(mds0$ageg,mds0$cancNo))prop.table(t2,2)(ts=table(mds0$sex,mds0$cancNo))prop.table(ts,2)(tr=table(mds0$race,mds0$cancNo))prop.table(tr,2)(th=table(mds0$histo3,mds0$cancNo))prop.table(th,2)mds0s=mds0%>%filter(surv<9999)tapply(mds0s$survy, mds0s$cancNo, FUN=sum)tapply(mds0s$survy, mds0s$cancNo, FUN=quantile)

mds0$yrdxthy=NAmds0$yrdiff=NAmds0$thytrt=NAmds2nr=mds2%>%filter(thytrt=="nr")mds2ii=mds2%>%filter(thytrt=="ii")mds02nr=rbind(mds0,mds2nr)mds02ii=rbind(mds0,mds2ii)

# Statisticswilcox.test(agedx ~ cancNo, data=mds02nr)wilcox.test(yrdx ~ cancNo, data=mds02nr)fisher.test(mds02nr$sex, mds02nr$cancNo)chisq.test(mds02nr$race, mds02nr$cancNo)fisher.test(mds02nr$histo3, mds02nr$cancNo)mds02nrs=mds02nr%>%filter(surv<9999)wilcox.test(survy ~ cancNo, data=mds02nrs)wilcox.test(agedx ~ cancNo, data=mds02ii)wilcox.test(yrdx ~ cancNo, data=mds02ii)fisher.test(mds02ii$sex, mds02ii$cancNo)chisq.test(mds02ii$race, mds02ii$cancNo)fisher.test(mds02ii$histo3, mds02ii$cancNo)mds02iis=mds02ii%>%filter(surv<9999)wilcox.test(survy ~ cancNo, data=mds02iis)

# Appendix Tables 3 and 5# Same as above, but now for MPN second cancer cases after WDTC first cancers.(mpn=canc%>%filter(cancer=="MPN",cancNo=="c2"))mrn=intersect(thy$casenum,mpn$casenum)thy1=thy[thy$casenum%in%mrn,]mpn2=mpn[mpn$casenum%in%mrn,]thy1[mpn2$agedx-thy1$agedx==0,]mpn2[mpn2$agedx-thy1$agedx==0,]thy1$casenum=as.numeric(thy1$casenum)

44

Page 45: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

mpn2$casenum=as.numeric(mpn2$casenum)thy1=thy1[order(thy1$casenum),] mpn2=mpn2[order(mpn2$casenum),]mpn2$yrdxthy=thy1$yrmodxmpn2$yrdiff=mpn2$yrmodx-mpn2$yrdxthympn2$thytrt=thy1$trt

(t1=table(thy1$trt))(ty=table(thy1$yrg,thy1$trt))prop.table(ty,2)(t2=table(thy1$ageg,thy1$trt))prop.table(t2,2)(ts=table(thy1$sex,thy1$trt))prop.table(ts,2)(tr=table(thy1$race,thy1$trt))prop.table(tr,2)(th=table(thy1$histo,thy1$trt))prop.table(th,2)(tst=table(thy1$hststga,thy1$trt))prop.table(tst,2)(tsz=table(thy1$tumsz,thy1$trt))prop.table(tsz,2)thy1s=thy1%>%filter(surv<9999)tapply(thy1s$survy, thy1s$trt, FUN=sum)tapply(thy1s$survy, thy1s$trt, FUN=quantile)

# Statistics wilcox.test(agedx ~ trt, data=thy1)wilcox.test(yrdx ~ trt, data=thy1)wilcox.test(survy ~ trt, data=thy1)fisher.test(thy1$sex, thy1$trt)fisher.test(thy1$race, thy1$trt)fisher.test(thy1$histo, thy1$trt)fisher.test(thy1$hststga, thy1$trt)fisher.test(thy1$tumsz, thy1$trt)

# WDTC patients that did not develop MPNmrnx=intersect(thy$casenum,thy1$casenum)thy0=subset(thy,!(thy$casenum%in%mrnx))(t1=table(thy0$trt))(ty=table(thy0$yrg,thy0$trt))prop.table(ty,2)(t2=table(thy0$ageg,thy0$trt))prop.table(t2,2)(ts=table(thy0$sex,thy0$trt))prop.table(ts,2)(tr=table(thy0$race,thy0$trt))prop.table(tr,2)(th=table(thy0$histo,thy0$trt))prop.table(th,2)(tst=table(thy0$hststga,thy0$trt))prop.table(tst,2)(tsz=table(thy0$tumsz,thy0$trt))prop.table(tsz,2)thy0s=thy0%>%filter(surv<9999)tapply(thy0s$survy, thy0s$trt, FUN=sum)

45

Page 46: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

tapply(thy0s$survy, thy0s$trt, FUN=quantile)

thy0$MN=0thy1$MN=1thy01=rbind(thy0,thy1)thy01nr=thy01%>%filter(trt=="nr")thy01ii=thy01%>%filter(trt=="ii")

# Statisticswilcox.test(agedx ~ MN, data=thy01nr)fisher.test(thy01nr$sex, thy01nr$MN)fisher.test(thy01nr$race, thy01nr$MN)fisher.test(thy01nr$histo, thy01nr$MN)fisher.test(thy01nr$hststga, thy01nr$MN)fisher.test(thy01nr$tumsz, thy01nr$MN)thy01nrs=thy01nr%>%filter(surv<9999)wilcox.test(survy ~ MN, data=thy01nrs)thy01nry=thy01nr%>%filter(yrdx>2000)wilcox.test(yrdx ~ MN, data=thy01nry)

wilcox.test(agedx ~ MN, data=thy01ii)fisher.test(thy01ii$sex, thy01ii$MN)fisher.test(thy01ii$race, thy01ii$MN)fisher.test(thy01ii$histo, thy01ii$MN)fisher.test(thy01ii$hststga, thy01ii$MN)fisher.test(thy01ii$tumsz, thy01ii$MN)thy01iis=thy01ii%>%filter(surv<9999)wilcox.test(survy ~ MN, data=thy01iis)thy01iiy=thy01ii%>%filter(yrdx>2000)wilcox.test(yrdx ~ MN, data=thy01ii)

# Appendix table MPN after WDTC treatment.(t1=table(mpn2$thytrt))(ty=table(mpn2$yrg,mpn2$thytrt))prop.table(ty,2)(t2=table(mpn2$ageg,mpn2$thytrt))prop.table(t2,2)(ts=table(mpn2$sex,mpn2$thytrt))prop.table(ts,2)(tr=table(mpn2$race,mpn2$thytrt))prop.table(tr,2)(th=table(mpn2$histo3,mpn2$thytrt))prop.table(th,2)mpn2s=mpn2%>%filter(surv<9999)tapply(mpn2s$survy, mpn2s$thytrt, FUN=sum)tapply(mpn2s$survy, mpn2s$thytrt, FUN=quantile)tapply(mpn2s$yrdiff, mpn2s$thytrt, FUN=quantile)

# Statisticswilcox.test(agedx ~ thytrt, data=mpn2)wilcox.test(yrdx ~ thytrt, data=mpn2)wilcox.test(survy ~ thytrt, data=mpn2)wilcox.test(yrdiff ~ thytrt, data=mpn2)fisher.test(mpn2$sex, mpn2$thytrt)fisher.test(mpn2$race, mpn2$thytrt)fisher.test(mpn2$histo3, mpn2$thytrt)

46

Page 47: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

# Select de novo MPN cases.(mpn0=canc%>%filter(cancer=="MPN",cancNo=="c1")) (ty=table(mpn0$yrg,mpn0$cancNo))prop.table(ty,2)(t2=table(mpn0$ageg,mpn0$cancNo))prop.table(t2,2)(ts=table(mpn0$sex,mpn0$cancNo))prop.table(ts,2)(tr=table(mpn0$race,mpn0$cancNo))prop.table(tr,2)(th=table(mpn0$histo3,mpn0$cancNo))prop.table(th,2)mpn0s=mpn0%>%filter(surv<9999)tapply(mpn0s$survy, mpn0s$cancNo, FUN=sum)tapply(mpn0s$survy, mpn0s$cancNo, FUN=quantile)

mpn0$yrdxthy=NAmpn0$yrdiff=NAmpn0$thytrt=NAmpn2nr=mpn2%>%filter(thytrt=="nr")mpn2ii=mpn2%>%filter(thytrt=="ii")mpn02nr=rbind(mpn0,mpn2nr)mpn02ii=rbind(mpn0,mpn2ii)

# Statisticswilcox.test(agedx ~ cancNo, data=mpn02nr)wilcox.test(yrdx ~ cancNo, data=mpn02nr)fisher.test(mpn02nr$sex, mpn02nr$cancNo)chisq.test(mpn02nr$race, mpn02nr$cancNo)fisher.test(mpn02nr$histo3, mpn02nr$cancNo)mpn02nrs=mpn02nr%>%filter(surv<9999)wilcox.test(survy ~ cancNo, data=mpn02nrs)wilcox.test(agedx ~ cancNo, data=mpn02ii)wilcox.test(yrdx ~ cancNo, data=mpn02ii)fisher.test(mpn02ii$sex, mpn02ii$cancNo)chisq.test(mpn02ii$race, mpn02ii$cancNo)fisher.test(mpn02ii$histo3, mpn02ii$cancNo)mpn02iis=mpn02ii%>%filter(surv<9999)wilcox.test(survy ~ cancNo, data=mpn02iis)

# Appendix Figure 5a is the same as Fig 3c, but then for MPN (risk of MPN after small WDTC <2 cm).rm(list=ls()) library(SEERaBomb)library(dplyr)library(ggplot2)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData")papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452)stageslr=c(0,1,2)canc$cancer=as.character(canc$cancer)canc$hststga=as.character(canc$hststga)canc$tumsz=as.character(canc$tumsz)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$tumsz%in%c(0,1) & canc$hststga%in%stageslr & canc$chemo!="1"]="pfThyroidSm" # This groups localized/regional WDTCs [0,2) cm not treated with chemotherapy in pfThyroidSm(all).

47

Page 48: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$tumsz%in%c(2,3) & canc$hststga%in%stageslr & canc$chemo!="1"]="pfThyroidLa" # Same as above, but then sizes [2,20) cm in pfThyroidLa(rge).thyTrts=c("nr","ii")brks=c(0,1,2,3,6,10)cols=c("O","E","py")(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) (pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100)) pm=mk2D(pm,secondS=c("MPN"))pf=mk2D(pf,secondS=c("MPN"))(pm=csd(pm,brkst=brks,trts=thyTrts) )(pf=csd(pf,brkst=brks,trts=thyTrts) )Dm2=pm$DF%>%filter(cancer1=="pfThyroidSm")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidSm")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dSmall=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv(dSmall,file="~/results/thyrMDS/SuppFig_WDTCsmallMPN.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dSmall,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer <2 cm",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/SuppFig_WDTCsmallMPN.png")

#Appendix Figure 5b (risk of MPN after large WDTC >2 cm).Dm2=pm$DF%>%filter(cancer1=="pfThyroidLa")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidLa")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dLarge=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv(dLarge,file="~/results/thyrMDS/SuppFig_WDTClargeMPN.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dLarge,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer >2 cm",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/SuppFig_WDTClargeMPN.png")

# Appendix Figure 5c is the same as Fig 3e, but then for MPN (risk of MPN after localized WDTC).rm(list=ls()) library(SEERaBomb)library(dplyr)

48

Page 49: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

library(ggplot2)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452)stagel=c(0,1)stager=c(2)canc$cancer=as.character(canc$cancer)canc$hststga=as.character(canc$hststga)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$hststga%in%stagel & canc$chemo!="1"]="pfThyroidLoc"canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$hststga%in%stager & canc$chemo!="1"]="pfThyroidReg"canc$cancer=factor(canc$cancer)thyTrts=c("nr","ii")brks=c(0,1,2,3,6,10)cols=c("O","E","py")(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) (pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100)) pm=mk2D(pm,secondS=c("MPN"))pf=mk2D(pf,secondS=c("MPN"))(pm=csd(pm,brkst=brks,trts=thyTrts) )(pf=csd(pf,brkst=brks,trts=thyTrts) )Dm2=pm$DF%>%filter(cancer1=="pfThyroidLoc")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidLoc")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dLoc=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv(dLoc,file="~/results/thyrMDS/SuppFig_WDTClocMPN.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dLoc,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer (localized)",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/SuppFig_WDTClocMPN.png")

#Appendix Figure 5d (risk of MPN after regional WDTC).Dm2=pm$DF%>%filter(cancer1=="pfThyroidReg")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidReg")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dReg=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv(dReg,file="~/results/thyrMDS/SuppFig_WDTCregMPN.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)),

49

Page 50: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dReg,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer (regional)",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/SuppFig_WDTCregMPN.png")

# Appendix Figure 5e-f is for RRs of MDS and MPN after regional or metastasized WDTCs.rm(list=ls()) library(SEERaBomb)library(dplyr)library(ggplot2)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452)stagel=c(0,1)stagesrm=c(2,4)canc$cancer=as.character(canc$cancer)canc$hststga=as.character(canc$hststga)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$hststga%in%stagel & canc$chemo!="1"]="pfThyroidLoc"canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid" & canc$hststga%in%stagesrm & canc$chemo!="1"]="pfThyroidRegMet"canc$cancer=factor(canc$cancer)thyTrts=c("nr","ii")brks=c(0,1,2,3,6,10)cols=c("O","E","py")

(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) (pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100)) pm=mk2D(pm,secondS=c("MDS"))pf=mk2D(pf,secondS=c("MDS"))(pm=csd(pm,brkst=brks,trts=thyTrts) )(pf=csd(pf,brkst=brks,trts=thyTrts) )Dm2=pm$DF%>%filter(cancer1=="pfThyroidRegMet")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidRegMet")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dReg=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv(dReg,file="~/results/thyrMDS/SuppFig_WDTCregmetMDS.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dReg,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer (regional)",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/SuppFig_WDTCregmetMDS.png")

(pm=seerSet(canc,popsae,Sex="male",ageStart=0,ageEnd=100)) (pf=seerSet(canc,popsae,Sex="female",ageStart=0,ageEnd=100))

50

Page 51: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

pm=mk2D(pm,secondS=c("MPN"))pf=mk2D(pf,secondS=c("MPN"))(pm=csd(pm,brkst=brks,trts=thyTrts) )(pf=csd(pf,brkst=brks,trts=thyTrts) )Dm2=pm$DF%>%filter(cancer1=="pfThyroidRegMet")%>%select(-cancer1)Df2=pf$DF%>%filter(cancer1=="pfThyroidRegMet")%>%select(-cancer1)Dm2$tDf2$t # Again, time points are close enough.(dReg=cbind(int=Dm2$int,t=Dm2$t,trt=Dm2$trt,(Dm2[,cols]+Df2[,cols]))%>%mutate(RR=O/E,rrL=qchisq(.025,2*O)/(2*E),rrU=qchisq(.975,2*O+2)/(2*E)))write.csv(dReg,file="~/results/thyrMDS/SuppFig_WDTCregmetMPN.csv")

theme_update(legend.position = c(.4, .8))theme_update(axis.text=element_text(size=rel(1.2)), axis.title=element_text(size=rel(1.3)), legend.title=element_text(size=rel(1.2)), legend.text=element_text(size=rel(1.2)), strip.text = element_text(size = rel(1.5)))g=qplot(x=t,y=RR,data=dReg,col=trt,geom=c("line","point"),#ylim=c(-.1,10), xlab="Years Since Thyroid Cancer (regional)",ylab="Relative Risk of MPN")g=g+geom_abline(intercept=1, slope=0)g+geom_errorbar(aes(ymin=rrL,ymax=rrU,width=.15))ggsave("~/results/thyrMDS/SuppFig_WDTCregmetMPN.png")

# Appendix Figure 2 rm(list=ls()) library(SEERaBomb)library(dplyr)library(ggplot2)load("~/data/SEER/mrgd/cancTumSzCRT.RData")load("~/data/SEER/mrgd/popsae.RData") papFolICD=c(8050,8052,8130,8260,8290,8330:8332,8335,8340:8344,8450,8452)canc$cancer=as.character(canc$cancer)canc$cancer[canc$histo3%in%papFolICD & canc$cancer=="thyroid"]="pfThyroid" # Analyses below do not exclude chemotherapy-treated cases, so we do not exclude chemotherapy-treated cases.canc$cancer=factor(canc$cancer)thy=canc%>%filter(cancer=="pfThyroid")thy=thy%>%filter(seqnum<2)

# Incidencepopsa=popsae%>%group_by(db,race,sex,age,year)%>%summarize(py=sum(py)) # sum on regsm=canc%>%filter(cancer=="pfThyroid")%>%group_by(cancer,yrdx)%>%summarise(cases=n())pops=popsa%>%group_by(year)%>%summarise(py=sum(py))m$year=m$yrdxp=left_join(m,pops)p$incid=p$cases/p$py*100000pwrite.csv(p,file="~/results/thyrMDS/SuppFig_thyrIncidence.csv")

# Treatment: radiation(trtTable=table(thy$trt,thy$yrdx))write.csv(trtTable,file="~/results/thyrMDS/SuppFig_trtTableRadiation.csv")

# Treatment: chemotherapythy$trt="nc" # will be left as 0 and 7. Do it this way to initialize the vectorthy$trt[thy$chemo==1]="chemo"

51

Page 52: media.nature.com · Web viewONLINE SUPPLEMENTS TO. Risk of developing chronic myeloid neoplasms in well-differentiated thyroid cancer patients treated with radioactive iodine: a …

(chemoTable=table(thy$trt,thy$yrdx))write.csv(chemoTable,file="~/results/thyrMDS/SuppFig_trtTableChemoRx.csv")

# 5-year survivalthy$surv5=0thy$surv5[thy$surv>=60]=1thy$surv5[thy$COD%in%c(0,41000,9999) & thy$surv<60]=NA(survTable=table(thy$surv5,thy$yrdx))write.csv(survTable,file="~/results/thyrMDS/SuppFig_5ysurvival.csv")

# Incidence of mortalitythy=thy%>%filter(surv<9999 & COD==32010)thy$mort=1(mortTable=table(thy$mort,thy$yrdx))write.csv(mortTable,file="~/results/thyrMDS/SuppFig_mortalityatyrdx.csv")

52