{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "b82219e5", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:07:45.081031Z", "iopub.status.busy": "2025-03-25T07:07:45.080922Z", "iopub.status.idle": "2025-03-25T07:07:45.236870Z", "shell.execute_reply": "2025-03-25T07:07:45.236534Z" } }, "outputs": [], "source": [ "import sys\n", "import os\n", "sys.path.append(os.path.abspath(os.path.join(os.getcwd(), '../..')))\n", "\n", "# Path Configuration\n", "from tools.preprocess import *\n", "\n", "# Processing context\n", "trait = \"Cardiovascular_Disease\"\n", "cohort = \"GSE283522\"\n", "\n", "# Input paths\n", "in_trait_dir = \"../../input/GEO/Cardiovascular_Disease\"\n", "in_cohort_dir = \"../../input/GEO/Cardiovascular_Disease/GSE283522\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Cardiovascular_Disease/GSE283522.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Cardiovascular_Disease/gene_data/GSE283522.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Cardiovascular_Disease/clinical_data/GSE283522.csv\"\n", "json_path = \"../../output/preprocess/Cardiovascular_Disease/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "d343e1f5", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "29721c44", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:07:45.238279Z", "iopub.status.busy": "2025-03-25T07:07:45.238136Z", "iopub.status.idle": "2025-03-25T07:07:45.356714Z", "shell.execute_reply": "2025-03-25T07:07:45.356209Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Background Information:\n", "!Series_title\t\"Development and validation of a spatially informed assay that resolves biomarker discordance and predicts treatment response in breast cancer.\"\n", "!Series_summary\t\"Background: Breast cancer (BCa) is a heterogeneous disease requiring precise diagnostics to guide effective treatment. Current assays fail to adequately address the complex biology of BCa subtypes/risk groups and accurately predict responses to treatments like antibody-drug conjugates (ADCs). To address these limitations, we developed and validated a novel diagnostic, prognostic, and predictive tool, mFISHseq.\"\n", "!Series_summary\t\"Methods: Our approach, mFISHseq, integrates multiplexed RNA fluorescent in situ hybridization with RNA-sequencing, guided by laser capture microdissection. This technique ensures tumor purity, allows unbiased profiling of whole transcriptome data, and explicitly quantifies intratumoral heterogeneity.\"\n", "!Series_summary\t\"Results: In a retrospective cohort study involving 1,082 FFPE breast tumors, mFISHseq demonstrated high analytical validity with 93% accuracy compared to immunohistochemistry across training and test sets. Our consensus subtyping approach provided near-perfect concordance with other molecular classifiers (κ > 0.85) and reclassified 30% of samples into subtypes with distinct prognostic implications. Consensus risk groups mitigated misclassification of single samples and provided prognostic information about both early and late relapse. High risk patients had enriched innate and adaptive immune signatures, which predicted response to neoadjuvant immunotherapy. Furthermore, we identified patients responsive to ADCs, as evidenced by a 19-feature classifier for T-DM1 sensitivity, validated on the multicenter, phase II, prospective I-SPY2 trial. To demonstrate the clinical potential, we deployed mFISHseq as a research use only test on 48 patients, revealing insights into the efficacy of novel targeted therapies, such as CDK4/6 inhibitors, immune checkpoint inhibitors, and ADCs.\"\n", "!Series_summary\t\"Conclusion: The mFISHseq method solves a long-standing challenge in the precise diagnosis and classification of BCa subtypes/prognostic risk groups, and allows accurate response prediction for patients, including those treated with immunotherapies and ADCs.\"\n", "!Series_overall_design\t\"Out of a starting cohort of 1,082 breast samples, we excluded one sample for revoked informed consent, four samples for damaged FFPE blocks or sections rendering them unable to be processed, 63 samples because pathology review revealed benign/healthy tissue or DCIS/LCIS, and one sample had missing clinical data. This left a cohort of 1,013 breast tumors available for later analyses. The published 1,254 breast cancer samples are comprised of 1,014 patients with invasive breast cancer (1 sample has no clinical data), 99 subtype samples from patients who had an extra region of interest (ROI) collected by laser capture microdissection (LCM), 25 patients with in situ carcinoma (24 DCIS/1 LCIS), 24 no tumor tissues (i.e., tissues dissected from tumor specimens that contained only healthy, ductal aplasia, or other benign cells upon pathological review), 12 true healthy samples, 41 scroll samples used for the LCM vs. no LCM experiment, and 39 positive control samples. The Macherey Nagel NucleoSpin total RNA FFPE XS kit was used for RNA isolation. After RNA isolation, RNA quantity was measured using the Qubit RNA HS (High Sensitivity) Assay Kit with a Qubit 4 Fluorometer and RNA quality using the Agilent High Sensitivity RNA ScreenTape with an Agilent 4150 TapeStation. The DV200 value of the sample (i.e., the percentage of fragments more than 200 bases in length) was calculated as recommended by Illumina. Samples with DV200 values over 15% were considered viable samples for library preparation. We used the Takara SMARTer Stranded Total RNA-Seq Kit v3 - Pico Input Mammalian kit to prepare total RNA-SEQ libraries following the manufacturer's instructions. We included a single natural positive control sample in each library preparation batch and a synthetic spike-in control in each sample to control for batch library preparation effects. Following library preparation, the quantity and fragment size range of the library was assessed using both the Qubit dsDNA HS kit (Qubit 4 Fluorometer) and the Agilent High Sensitivity DNA ScreenTape kit (Agilent 4150 TapeStation). Successfully prepared libraries contained sufficient library to pool on an Illumina NovaSeq 6000 sequencing instrument and fragment range spanning 200 - 1,000 bp, with a local maximum of 250 - 350 bp. Depending on pool size, individual sequencing libraries were pooled and sequenced on an Illumina NovaSeq 6000 using SP, S1, S2, or S4 flow cells. Pooled libraries were spiked with 10% PhiX as recommended by both Illumina and Takara for low-complexity libraries sequenced on patterned flow cells. Paired-end sequencing (2 x 100 bp) was conducted to obtain approximately 100 million reads per sample.\"\n", "Sample Characteristics Dictionary:\n", "{0: ['tissue: breast'], 1: ['isolate: breast cancer patient', 'isolate: healthy individual', 'isolate: not applicable'], 2: ['age: 55 - 59', 'age: 70 - 74', 'age: 25 - 29', 'age: 75 - 79', 'age: 40 - 44', 'age: 35 - 39', 'age: 65 - 69', 'age: 60 - 64', 'age: 30 - 34', 'age: 45 - 49', 'age: 50 - 54', 'age: 80 - 84', 'age: 60 -64', 'age: 85 - 89', 'age: 90 - 94', 'age: not applicable'], 3: ['biomaterial provider: hospital (Malaga)', 'biomaterial provider: Precision for Medicine', 'biomaterial provider: GRAZ biobank', 'biomaterial provider: AMSBIO', 'biomaterial provider: PATH biobank', 'biomaterial provider: not applicable'], 4: ['geo loc_name: Spain', 'geo loc_name: missing', 'geo loc_name: Austria: Graz 1st shipment', 'geo loc_name: Austria: Graz 6th shipment', 'geo loc_name: Austria: Graz 2nd shipment', 'geo loc_name: Austria: Graz 3rd shipment', 'geo loc_name: Austria: Graz 4th shipment', 'geo loc_name: Austria: Graz 5th shipment', 'geo loc_name: Germany: sample source BN, PATH 3rd shipment', 'geo loc_name: Germany: sample source DO, PATH 4th shipment', 'geo loc_name: Germany: sample source DO, PATH 5th shipment', 'geo loc_name: Germany: sample source DO, PATH 6th shipment', 'geo loc_name: Germany: sample source DO, PATH 7th shipment', 'geo loc_name: Germany: sample source KS, PATH 3rd shipment', 'geo loc_name: Germany: sample source MR, PATH 1st shipment', 'geo loc_name: Germany: PATH 1st shipment', 'geo loc_name: Germany: sample source MR, PATH', 'geo loc_name: Germany: sample source MR, PATH 2nd shipment', 'geo loc_name: Germany: sample source OF, PATH 3rd shipment', 'geo loc_name: Germany: sample source OF, PATH 5th shipment', 'geo loc_name: Germany: sample source RE, PATH 3rd shipment', 'geo loc_name: not applicable'], 5: ['Sex: missing', 'Sex: female', 'Sex: male'], 6: ['sample category: invasive breast cancer sample', 'sample category: extra ROI - invasive', 'sample category: no tumor', 'sample category: true healthy samples', 'sample category: extra ROI - DCIS', 'sample category: extra ROI - no tumor', 'sample category: extra ROI - LCIS', 'sample category: extra ROI', 'sample category: invasive breast cancer sample (no clinical data)', 'sample category: scroll', 'sample category: DCIS', 'sample category: extra ROI - precursor lesions', 'sample category: no tumor, regressive changes', 'sample category: LCIS', 'sample category: no tumor, inflammation', 'sample category: extra ROI - regressive changes', 'sample category: positive control'], 7: ['menopausal status: inferred postmenopausal', 'menopausal status: inferred premenopausal', 'menopausal status: inferred perimenopausal', 'menopausal status: missing', 'menopausal status: postmenopausal', 'menopausal status: perimenopausal', 'menopausal status: premenopausal', 'menopausal status: not applicable'], 8: ['histopathological tumor_type: Invasive ductal carcinoma', 'histopathological tumor_type: Invasive tubular carcinoma', 'histopathological tumor_type: Invasive lobular carcinoma', 'histopathological tumor_type: Mixed infiltrating carcinoma (ductal and lobular)', 'histopathological tumor_type: healthy', 'histopathological tumor_type: Tubular carcinoma', 'histopathological tumor_type: NST', 'histopathological tumor_type: Mucinous carcinoma', 'histopathological tumor_type: Metaplastic carcinoma', 'histopathological tumor_type: missing', 'histopathological tumor_type: Invasive ductal carcinoma, Invasive lobular carcinoma', 'histopathological tumor_type: Invasive ductal carcinoma, Micropapillary carcinoma', 'histopathological tumor_type: Apocrine carcinoma', 'histopathological tumor_type: Papillary carcinoma', 'histopathological tumor_type: Micropapillary carcinoma', 'histopathological tumor_type: Invasive ductal carcinoma/Invasive lobular carcinoma', 'histopathological tumor_type: Invasive ductal carcinoma/Micropapillary carcinoma', 'histopathological tumor_type: Neuroendocrine', 'histopathological tumor_type: Anaplastic', 'histopathological tumor_type: ductal adenocarcinoma', 'histopathological tumor_type: Invasive ductal carcinoma, Metaplastic carcinoma', 'histopathological tumor_type: Apocrine carcinoma, DCIS', 'histopathological tumor_type: Invasive ductal carcinoma, Invasive lobular carcinoma, Invasive papillary carcinoma, DCIS', 'histopathological tumor_type: Invasive ductal carcinoma, DCIS', 'histopathological tumor_type: Invasive ductal carcinoma, Invasive lobular carcinoma', 'histopathological tumor_type: Invasive lobular carcinoma, Tubular carcinoma', 'histopathological tumor_type: Invasive ductal carcinoma, Medullary carcinoma', 'histopathological tumor_type: Invasive papillary carcinoma', 'histopathological tumor_type: Invasive lobular carcinoma, LCIS', 'histopathological tumor_type: Invasive ductal carcinoma, Morbus Paget'], 9: ['t: missing', 't: not applicable', 't: pT 2', 't: pT 3', 't: pT 1 b', 't: pT 1 c', 't: pT 1 c(m)', 't: pT 1b', 't: pT 2(m)', 't: pT 1c', 't: pT 1a(m)', 't: pT 1 b(m)', 't: pT 1', 't: pT 1 a(m)', 't: pT 1a', 't: pT 1c(m)', 't: pT 1b(m)', 't: pT 1b (multifokal)', 't: pT 4d', 't: pT 4', 't: pT 4b', 't: pT 1 a', 't: pT 1mic'], 10: ['n: missing', 'n: not applicable', 'n: pN 1a', 'n: pN 3a', 'n: pN 1', 'n: pN 0', 'n: pN 1mi', 'n: pN 2a', 'n: pN 3', 'n: pN X', 'n: pN 2', 'n: pN 1mic'], 11: ['node status: missing', 'node status: not applicable', 'node status: node_positive', 'node status: node_negative'], 12: ['g: missing', 'g: not applicable', 'g: G3', 'g: G2', 'g: G1', 'g: G2 und G3', 'g: G4'], 13: ['lymphatic invasion_(l): L0', 'lymphatic invasion_(l): L1', 'lymphatic invasion_(l): not applicable', 'lymphatic invasion_(l): missing'], 14: ['residual tumor_(path_only): R0', 'residual tumor_(path_only): R1', 'residual tumor_(path_only): not applicable', 'residual tumor_(path_only): missing'], 15: ['er negpos: P', 'er negpos: N', 'er negpos: missing', 'er negpos: not applicable'], 16: ['er irs: missing', 'er irs: 0', 'er irs: 12', 'er irs: 4', 'er irs: 9', 'er irs: 1', 'er irs: 8', 'er irs: 6', 'er irs: 7', 'er irs: 2', 'er irs: 3', 'er irs: not applicable'], 17: ['pr negpos: P', 'pr negpos: N', 'pr negpos: missing', 'pr negpos: not applicable'], 18: ['pr irs: missing', 'pr irs: 0', 'pr irs: 12', 'pr irs: 9', 'pr irs: 8', 'pr irs: 1', 'pr irs: 3', 'pr irs: 2', 'pr irs: 4', 'pr irs: 6', 'pr irs: not applicable'], 19: ['her2 negpos: P', 'her2 negpos: N', 'her2 negpos: missing', 'her2 negpos: not applicable'], 20: ['her2 ihc: 2+', 'her2 ihc: 0', 'her2 ihc: missing', 'her2 ihc: 1+', 'her2 ihc: 3+', 'her2 ihc: not applicable'], 21: ['her2 dna_fish: missing', 'her2 dna_fish: N', 'her2 dna_fish: P', 'her2 dna_fish: not applicable'], 22: ['mib1-ki67 (%): missing', 'mib1-ki67 (%): 80', 'mib1-ki67 (%): 75', 'mib1-ki67 (%): 2', 'mib1-ki67 (%): 15', 'mib1-ki67 (%): 8', 'mib1-ki67 (%): 10', 'mib1-ki67 (%): 30', 'mib1-ki67 (%): 20', 'mib1-ki67 (%): 90', 'mib1-ki67 (%): 35', 'mib1-ki67 (%): 5', 'mib1-ki67 (%): 60', 'mib1-ki67 (%): 70', 'mib1-ki67 (%): 25', 'mib1-ki67 (%): 50', 'mib1-ki67 (%): 40', 'mib1-ki67 (%): 12', 'mib1-ki67 (%): 13', 'mib1-ki67 (%): 85', 'mib1-ki67 (%): 1', 'mib1-ki67 (%): 9', 'mib1-ki67 (%): 95', 'mib1-ki67 (%): 45', 'mib1-ki67 (%): 22', 'mib1-ki67 (%): 3', 'mib1-ki67 (%): 34', 'mib1-ki67 (%): 57', 'mib1-ki67 (%): 63', 'mib1-ki67 (%): 18'], 23: ['ihc surrogate_subtype: LumB', 'ihc surrogate_subtype: LumA', 'ihc surrogate_subtype: missing', 'ihc surrogate_subtype: TNBC', 'ihc surrogate_subtype: Her2', 'ihc surrogate_subtype: not applicable'], 24: ['deceased (y/n): missing', 'deceased (y/n): Y', 'deceased (y/n): N', 'deceased (y/n): not applicable'], 25: ['relapse/metastasis: missing', 'relapse/metastasis: not applicable', 'relapse/metastasis: N', 'relapse/metastasis: Y'], 26: ['organ relapse/metastasis: not applicable', 'organ relapse/metastasis: Suspected tibial metastasis, bone, brain, liver, bone marrow', 'organ relapse/metastasis: Bone, brain', 'organ relapse/metastasis: Chest wall, lung', 'organ relapse/metastasis: Retroperitoneum, uterus', 'organ relapse/metastasis: Brain', 'organ relapse/metastasis: Axillary lymph nodes, bone, liver', 'organ relapse/metastasis: Sternum', 'organ relapse/metastasis: Bone', 'organ relapse/metastasis: Liver', 'organ relapse/metastasis: Left Breast', 'organ relapse/metastasis: Bone, lymph node, suspected lung', 'organ relapse/metastasis: Lymph node', 'organ relapse/metastasis: Pleura, bone, lung', 'organ relapse/metastasis: missing', 'organ relapse/metastasis: Liver, bone', 'organ relapse/metastasis: Lymph node, bone, suspected lung and suspected liver', 'organ relapse/metastasis: Lung', 'organ relapse/metastasis: Pleura', 'organ relapse/metastasis: Liver, suspected lung metastasis, bone', 'organ relapse/metastasis: Bone, pleura, lymph nodes', 'organ relapse/metastasis: Lymph node, suspected bone', 'organ relapse/metastasis: Bone, liver', 'organ relapse/metastasis: Bone, lymph node', 'organ relapse/metastasis: Bone, pleura', 'organ relapse/metastasis: Bone, liver, cervical lymph node, lung', 'organ relapse/metastasis: Ovary', 'organ relapse/metastasis: Soft tissue, bone, liver, peritoneum', 'organ relapse/metastasis: Bone, peritoneum, stomach, colon', 'organ relapse/metastasis: axillary lymph node'], 27: ['incidence of_other_tumorous_disease: missing', 'incidence of_other_tumorous_disease: N', 'incidence of_other_tumorous_disease: Y', 'incidence of_other_tumorous_disease: not applicable'], 28: ['organ affected_by_tumorous_disease: not applicable', 'organ affected_by_tumorous_disease: missing', 'organ affected_by_tumorous_disease: Breast (other side, L)', 'organ affected_by_tumorous_disease: Breast (other side, R)', 'organ affected_by_tumorous_disease: Lung', 'organ affected_by_tumorous_disease: Breast (invasive NST; G1; other side, L)', 'organ affected_by_tumorous_disease: Uterus', 'organ affected_by_tumorous_disease: Blood', 'organ affected_by_tumorous_disease: Stomach', 'organ affected_by_tumorous_disease: u+BC1+AY1222219:BP1220'], 29: ['overall survival_(months): missing', 'overall survival_(months): not applicable', 'overall survival_(months): 130', 'overall survival_(months): 123', 'overall survival_(months): 132', 'overall survival_(months): 191', 'overall survival_(months): 184', 'overall survival_(months): 140', 'overall survival_(months): 102', 'overall survival_(months): 88', 'overall survival_(months): 137', 'overall survival_(months): 150', 'overall survival_(months): 19', 'overall survival_(months): 55', 'overall survival_(months): 144', 'overall survival_(months): 139', 'overall survival_(months): 13', 'overall survival_(months): 87', 'overall survival_(months): 37', 'overall survival_(months): 92', 'overall survival_(months): 101', 'overall survival_(months): 71', 'overall survival_(months): 119', 'overall survival_(months): 43', 'overall survival_(months): 78', 'overall survival_(months): 153', 'overall survival_(months): 60', 'overall survival_(months): 112', 'overall survival_(months): 173', 'overall survival_(months): 84'], 30: ['progression free_survival_(months): missing', 'progression free_survival_(months): not applicable', 'progression free_survival_(months): 130', 'progression free_survival_(months): 0', 'progression free_survival_(months): 132', 'progression free_survival_(months): 191', 'progression free_survival_(months): 184', 'progression free_survival_(months): 140', 'progression free_survival_(months): 96', 'progression free_survival_(months): 88', 'progression free_survival_(months): 137', 'progression free_survival_(months): 150', 'progression free_survival_(months): 19', 'progression free_survival_(months): 55', 'progression free_survival_(months): 144', 'progression free_survival_(months): 125', 'progression free_survival_(months): 7', 'progression free_survival_(months): 87', 'progression free_survival_(months): 36', 'progression free_survival_(months): 92', 'progression free_survival_(months): 101', 'progression free_survival_(months): 42', 'progression free_survival_(months): 99', 'progression free_survival_(months): 38', 'progression free_survival_(months): 78', 'progression free_survival_(months): 153', 'progression free_survival_(months): 25', 'progression free_survival_(months): 112', 'progression free_survival_(months): 173', 'progression free_survival_(months): 84'], 31: ['neoadjuvant treatment_(y/n)_-_and_type: N', 'neoadjuvant treatment_(y/n)_-_and_type: missing', 'neoadjuvant treatment_(y/n)_-_and_type: not applicable', 'neoadjuvant treatment_(y/n)_-_and_type: Y - FEC (5-fluorouracil, Epirubicin, Cyclophosphamide) und Taxotere (Docetaxel) bzw.Taxan and Radiotherapy', 'neoadjuvant treatment_(y/n)_-_and_type: Y - letrozole', 'neoadjuvant treatment_(y/n)_-_and_type: Y - Nolvadex (Tamoxifen)', 'neoadjuvant treatment_(y/n)_-_and_type: Y - not specified'], 32: ['chemotherapy (y/n): missing', 'chemotherapy (y/n): not applicable', 'chemotherapy (y/n): Y', 'chemotherapy (y/n): N'], 33: ['ac, ac-t,_tac: missing', 'ac, ac-t,_tac: not applicable', 'ac, ac-t,_tac: N', 'ac, ac-t,_tac: Y'], 34: ['cmf: missing', 'cmf: not applicable', 'cmf: N', 'cmf: Y'], 35: ['cp combo: missing', 'cp combo: not applicable', 'cp combo: N', 'cp combo: Y'], 36: ['ec, ec-t,_etc: missing', 'ec, ec-t,_etc: not applicable', 'ec, ec-t,_etc: N', 'ec, ec-t,_etc: Y'], 37: ['fec, fec-t: missing', 'fec, fec-t: not applicable', 'fec, fec-t: Y', 'fec, fec-t: N'], 38: ['tc: missing', 'tc: not applicable', 'tc: N', 'tc: Y'], 39: ['other: missing', 'other: not applicable', 'other: N', 'other: MCT', 'other: TAC/FEC', 'other: Navelbine / Caelyx (x6)', 'other: ET', 'other: FEC/EC', 'other: ET/EC', 'other: EC/MCT', 'other: EC', 'other: MINDACT', 'other: Paclitaxel', 'other: GAIN', 'other: Docetaxel', 'other: SUCCESS', 'other: SUCCESS-B', 'other: SUCCESS-C', 'other: ICE-II', 'other: anthracycline', 'other: Taxol', 'other: 5-FU'], 40: ['taxane (y/n): missing', 'taxane (y/n): not applicable', 'taxane (y/n): Y', 'taxane (y/n): N'], 41: ['docetaxel (taxotere,_taxan)_(y/n): missing', 'docetaxel (taxotere,_taxan)_(y/n): not applicable', 'docetaxel (taxotere,_taxan)_(y/n): Y', 'docetaxel (taxotere,_taxan)_(y/n): N', 'docetaxel (taxotere,_taxan)_(y/n): ?'], 42: ['docetaxel (taxotere,_taxan)_(cycles): missing', 'docetaxel (taxotere,_taxan)_(cycles): not applicable', 'docetaxel (taxotere,_taxan)_(cycles): 3', 'docetaxel (taxotere,_taxan)_(cycles): 4', 'docetaxel (taxotere,_taxan)_(cycles): 1', 'docetaxel (taxotere,_taxan)_(cycles): 2', 'docetaxel (taxotere,_taxan)_(cycles): 6', 'docetaxel (taxotere,_taxan)_(cycles): 0', 'docetaxel (taxotere,_taxan)_(cycles): 6 to 12', 'docetaxel (taxotere,_taxan)_(cycles): 5?', 'docetaxel (taxotere,_taxan)_(cycles): 8'], 43: ['paclitaxel (abraxane)_(y/n): missing', 'paclitaxel (abraxane)_(y/n): not applicable', 'paclitaxel (abraxane)_(y/n): N', 'paclitaxel (abraxane)_(y/n): Y', 'paclitaxel (abraxane)_(y/n): ?'], 44: ['paclitaxel (abraxane)_(cycles): missing', 'paclitaxel (abraxane)_(cycles): not applicable', 'paclitaxel (abraxane)_(cycles): 12', 'paclitaxel (abraxane)_(cycles): 0', 'paclitaxel (abraxane)_(cycles): 4', 'paclitaxel (abraxane)_(cycles): 8', 'paclitaxel (abraxane)_(cycles): 6'], 45: ['taxol (y/n): missing', 'taxol (y/n): not applicable', 'taxol (y/n): N', 'taxol (y/n): Y', 'taxol (y/n): ?'], 46: ['taxol dosage: missing', 'taxol dosage: not applicable', 'taxol dosage: 1', 'taxol dosage: 5', 'taxol dosage: weekly', 'taxol dosage: weekly? 2x', 'taxol dosage: 2', 'taxol dosage: 3', 'taxol dosage: weekly 3x', 'taxol dosage: 9', 'taxol dosage: 4', 'taxol dosage: 0', 'taxol dosage: 12'], 47: ['anthracycline (y/n): missing', 'anthracycline (y/n): not applicable', 'anthracycline (y/n): Y', 'anthracycline (y/n): N', 'anthracycline (y/n): ?'], 48: ['anthracycline (cycles): missing', 'anthracycline (cycles): not applicable', 'anthracycline (cycles): 0'], 49: ['doxorubicin (adriamycin,_myocet,_caleyx)_(y/n): missing', 'doxorubicin (adriamycin,_myocet,_caleyx)_(y/n): not applicable', 'doxorubicin (adriamycin,_myocet,_caleyx)_(y/n): N', 'doxorubicin (adriamycin,_myocet,_caleyx)_(y/n): Y', 'doxorubicin (adriamycin,_myocet,_caleyx)_(y/n): ?'], 50: ['doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): missing', 'doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): not applicable', 'doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): 1', 'doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): 6', 'doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): 2', 'doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): 3', 'doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): 0', 'doxorubicin (adriamycin,_myocet,_caelyx)_(cycles): 4'], 51: ['epirubicin (y/n): missing', 'epirubicin (y/n): not applicable', 'epirubicin (y/n): Y', 'epirubicin (y/n): N', 'epirubicin (y/n): ?'], 52: ['epirubicin (cycles): missing', 'epirubicin (cycles): not applicable', 'epirubicin (cycles): 3', 'epirubicin (cycles): 4', 'epirubicin (cycles): 6', 'epirubicin (cycles): 5', 'epirubicin (cycles): 6?', 'epirubicin (cycles): 0', 'epirubicin (cycles): 6 to 10', 'epirubicin (cycles): 8'], 53: ['cyclophosphamide (endoxan)_(y/n): missing', 'cyclophosphamide (endoxan)_(y/n): not applicable', 'cyclophosphamide (endoxan)_(y/n): Y', 'cyclophosphamide (endoxan)_(y/n): N', 'cyclophosphamide (endoxan)_(y/n): ?'], 54: ['cyclophosphamide (endoxan)_(cycles): missing', 'cyclophosphamide (endoxan)_(cycles): not applicable', 'cyclophosphamide (endoxan)_(cycles): 3', 'cyclophosphamide (endoxan)_(cycles): 4', 'cyclophosphamide (endoxan)_(cycles): 6', 'cyclophosphamide (endoxan)_(cycles): 1', 'cyclophosphamide (endoxan)_(cycles): 6?', 'cyclophosphamide (endoxan)_(cycles): 2?', 'cyclophosphamide (endoxan)_(cycles): 16', 'cyclophosphamide (endoxan)_(cycles): 0', 'cyclophosphamide (endoxan)_(cycles): 5', 'cyclophosphamide (endoxan)_(cycles): 6 to 12', 'cyclophosphamide (endoxan)_(cycles): 6 to 10', 'cyclophosphamide (endoxan)_(cycles): 5?', 'cyclophosphamide (endoxan)_(cycles): 8?', 'cyclophosphamide (endoxan)_(cycles): 8'], 55: ['antimetabolites: missing', 'antimetabolites: not applicable', 'antimetabolites: Y', 'antimetabolites: N', 'antimetabolites: ?'], 56: ['5-fluorouracil (y/n): missing', '5-fluorouracil (y/n): not applicable', '5-fluorouracil (y/n): Y', '5-fluorouracil (y/n): N', '5-fluorouracil (y/n): ?'], 57: ['5-fluorouracil (cycles): missing', '5-fluorouracil (cycles): not applicable', '5-fluorouracil (cycles): 3', '5-fluorouracil (cycles): 4', '5-fluorouracil (cycles): 6', '5-fluorouracil (cycles): 5', '5-fluorouracil (cycles): 2?', '5-fluorouracil (cycles): 2', '5-fluorouracil (cycles): 16', '5-fluorouracil (cycles): 0', '5-fluorouracil (cycles): 8'], 58: ['methotrexate (y/n): missing', 'methotrexate (y/n): not applicable', 'methotrexate (y/n): N', 'methotrexate (y/n): Y', 'methotrexate (y/n): ?'], 59: ['methotrexate (cycles): missing', 'methotrexate (cycles): not applicable', 'methotrexate (cycles): 6', 'methotrexate (cycles): 2?', 'methotrexate (cycles): 16', 'methotrexate (cycles): 3', 'methotrexate (cycles): 0'], 60: ['xeloda (y/n): missing', 'xeloda (y/n): not applicable', 'xeloda (y/n): N', 'xeloda (y/n): Y'], 61: ['xeloda (duration_in_years): missing', 'xeloda (duration_in_years): not applicable'], 62: ['carboplatinum (y/n): missing', 'carboplatinum (y/n): not applicable', 'carboplatinum (y/n): N', 'carboplatinum (y/n): Y', 'carboplatinum (y/n): ?'], 63: ['carboplatinum (cycles): missing', 'carboplatinum (cycles): not applicable', 'carboplatinum (cycles): 0'], 64: ['cisplatinum (y/n): missing', 'cisplatinum (y/n): not applicable', 'cisplatinum (y/n): N', 'cisplatinum (y/n): Y', 'cisplatinum (y/n): ?'], 65: ['cisplatinum (cycles): missing', 'cisplatinum (cycles): not applicable', 'cisplatinum (cycles): 4?', 'cisplatinum (cycles): 0'], 66: ['navelbine (y/n): missing', 'navelbine (y/n): not applicable', 'navelbine (y/n): N', 'navelbine (y/n): Y', 'navelbine (y/n): ?'], 67: ['navelbine (cycles): missing', 'navelbine (cycles): not applicable', 'navelbine (cycles): 6?', 'navelbine (cycles): 0'], 68: ['avastin (y/n): missing', 'avastin (y/n): not applicable', 'avastin (y/n): N', 'avastin (y/n): Y', 'avastin (y/n): ?'], 69: ['avastin (cycles): missing', 'avastin (cycles): not applicable', 'avastin (cycles): 0'], 70: ['etoposid (y/n): missing', 'etoposid (y/n): not applicable', 'etoposid (y/n): N', 'etoposid (y/n): Y', 'etoposid (y/n): ?'], 71: ['etoposid (cycles): missing', 'etoposid (cycles): not applicable', 'etoposid (cycles): 4', 'etoposid (cycles): 0'], 72: ['radiotherapy: missing', 'radiotherapy: not applicable', 'radiotherapy: Y', 'radiotherapy: N', 'radiotherapy: Y+IORT', 'her2 targeted_therapy_(y/n): N', 'radiotherapy: IORT', 'radiotherapy: IORT,N'], 73: ['her2 targeted_therapy_(y/n): missing', 'her2 targeted_therapy_(y/n): not applicable', 'her2 targeted_therapy_(y/n): N', 'her2 targeted_therapy_(y/n): Y', 'herceptin (y/n): N', 'her2 targeted_therapy_(y/n): missing (recommended, but unclear if patient declined)'], 74: ['herceptin (y/n): missing', 'herceptin (y/n): not applicable', 'herceptin (y/n): N', 'herceptin (y/n): Y', 'herceptin (path: _cycles,_graz:_duration_in_years): not applicable'], 75: ['herceptin (path: _cycles,_graz:_duration_in_years): missing', 'herceptin (path: _cycles,_graz:_duration_in_years): not applicable', 'herceptin (path: _cycles,_graz:_duration_in_years): 0.916666667', 'herceptin (path: _cycles,_graz:_duration_in_years): 1', 'herceptin (path: _cycles,_graz:_duration_in_years): 0.333333333', 'herceptin (path: _cycles,_graz:_duration_in_years): 0.416666667', 'herceptin (path: _cycles,_graz:_duration_in_years): 0.75', 'herceptin (path: _cycles,_graz:_duration_in_years): 0.5', 'trastuzumab (y/n): N', 'herceptin (path: _cycles,_graz:_duration_in_years): 8 infusions', 'herceptin (path: _cycles,_graz:_duration_in_years): 0'], 76: ['trastuzumab (y/n): missing', 'trastuzumab (y/n): not applicable', 'trastuzumab (y/n): N', 'trastuzumab (y/n): Y', 'trastuzumab (path: _cycles,_graz:_duration_in_years): not applicable'], 77: ['trastuzumab (path: _cycles,_graz:_duration_in_years): missing', 'trastuzumab (path: _cycles,_graz:_duration_in_years): not applicable', 'trastuzumab (path: _cycles,_graz:_duration_in_years): 0.666666667', 'pertuzumab (y/n): N', 'trastuzumab (path: _cycles,_graz:_duration_in_years): 17'], 78: ['pertuzumab (y/n): missing', 'pertuzumab (y/n): not applicable', 'pertuzumab (y/n): N', 'pertuzumab (y/n): Y', 'pertuzumab (cycles): not applicable'], 79: ['pertuzumab (cycles): missing', 'pertuzumab (cycles): not applicable', 'pertuzumab (cycles): ?', 'endocrine therapy_-_anti-hormone_and/or_ai_(y/n): Y', 'pertuzumab (cycles): 0'], 80: ['endocrine therapy_-_anti-hormone_and/or_ai_(y/n): missing', 'endocrine therapy_-_anti-hormone_and/or_ai_(y/n): not applicable', 'endocrine therapy_-_anti-hormone_and/or_ai_(y/n): N', 'endocrine therapy_-_anti-hormone_and/or_ai_(y/n): Y', 'anti-hormonal therapy_(y/n): Y'], 81: ['anti-hormonal therapy_(y/n): missing', 'anti-hormonal therapy_(y/n): not applicable', 'anti-hormonal therapy_(y/n): N', 'anti-hormonal therapy_(y/n): Y', 'tamoxifen _(y/n): N'], 82: ['tamoxifen _(y/n): missing', 'tamoxifen _(y/n): not applicable', 'tamoxifen _(y/n): N', 'tamoxifen _(y/n): Y', 'tamoxifen _(duration_in_years): not applicable'], 83: ['tamoxifen _(duration_in_years): missing', 'tamoxifen _(duration_in_years): not applicable', 'tamoxifen _(duration_in_years): 2', 'tamoxifen _(duration_in_years): 1.333333333', 'tamoxifen _(duration_in_years): 0.833333333', 'tamoxifen _(duration_in_years): 0.25', 'tamoxifen _(duration_in_years): 4.833333333', 'tamoxifen _(duration_in_years): 2.916666667', 'tamoxifen _(duration_in_years): 1.916666667', 'tamoxifen _(duration_in_years): 5.083333333', 'tamoxifen _(duration_in_years): 5', 'tamoxifen _(duration_in_years): 0.416666667', 'tamoxifen _(duration_in_years): 4.916666667', 'tamoxifen _(duration_in_years): 4', 'tamoxifen _(duration_in_years): 1.166666667', 'tamoxifen _(duration_in_years): 0', 'tamoxifen _(duration_in_years): 7.916666667', 'tamoxifen _(duration_in_years): 5.75', 'tamoxifen _(duration_in_years): 1.416666667', 'tamoxifen _(duration_in_years): 2.333333333', 'tamoxifen _(duration_in_years): 2.25', 'tamoxifen _(duration_in_years): 1.083333333', 'tamoxifen _(duration_in_years): 6.5', 'tamoxifen _(duration_in_years): 1', 'tamoxifen _(duration_in_years): 6.166666667', 'tamoxifen _(duration_in_years): 4.75', 'tamoxifen _(duration_in_years): 5.166666667', 'tamoxifen _(duration_in_years): 3.333333333', 'tamoxifen _(duration_in_years): 0.583333333', 'tamoxifen _(duration_in_years): 2.583333333'], 84: ['nolvadex (tamoxifen)_(y/n): missing', 'nolvadex (tamoxifen)_(y/n): not applicable', 'nolvadex (tamoxifen)_(y/n): N', 'nolvadex (tamoxifen)_(y/n): Y', 'nolvadex (tamoxifen)(duration_in_years): not applicable'], 85: ['nolvadex (tamoxifen)(duration_in_years): missing', 'nolvadex (tamoxifen)(duration_in_years): not applicable', 'nolvadex (tamoxifen)(duration_in_years): 0.25', 'nolvadex (tamoxifen)(duration_in_years): 2', 'nolvadex (tamoxifen)(duration_in_years): 1.916666667', 'nolvadex (tamoxifen)(duration_in_years): 2.916666667', 'nolvadex (tamoxifen)(duration_in_years): 0.416666667', 'nolvadex (tamoxifen)(duration_in_years): 4', 'nolvadex (tamoxifen)(duration_in_years): 4.916666667', 'nolvadex (tamoxifen)(duration_in_years): 5.083333333', 'nolvadex (tamoxifen)(duration_in_years): 5', 'nolvadex (tamoxifen)(duration_in_years): 2.333333333', 'nolvadex (tamoxifen)(duration_in_years): 1.083333333', 'nolvadex (tamoxifen)(duration_in_years): 1', 'nolvadex (tamoxifen)(duration_in_years): 4.75', 'nolvadex (tamoxifen)(duration_in_years): 3.333333333', 'ebefen (tamoxifen)_(y/n): N'], 86: ['ebefen (tamoxifen)_(y/n): missing', 'ebefen (tamoxifen)_(y/n): not applicable', 'ebefen (tamoxifen)_(y/n): N', 'ebefen (tamoxifen)_(y/n): Y', 'ebefen (tamoxifen)_(duration_in_years): not applicable'], 87: ['ebefen (tamoxifen)_(duration_in_years): missing', 'ebefen (tamoxifen)_(duration_in_years): not applicable', 'ebefen (tamoxifen)_(duration_in_years): 1.166666667', 'aromatase inhibitors_(y/n): Y'], 88: ['aromatase inhibitors_(y/n): missing', 'aromatase inhibitors_(y/n): not applicable', 'aromatase inhibitors_(y/n): N', 'aromatase inhibitors_(y/n): Y', 'aromatase inhibitors_(duration_in_years): 5'], 89: ['aromatase inhibitors_(duration_in_years): missing', 'aromatase inhibitors_(duration_in_years): not applicable', 'aromatase inhibitors_(duration_in_years): 4.916666667', 'aromatase inhibitors_(duration_in_years): 5.083333333', 'aromatase inhibitors_(duration_in_years): 2.416666667', 'aromatase inhibitors_(duration_in_years): 0.5', 'aromatase inhibitors_(duration_in_years): 5', 'aromatase inhibitors_(duration_in_years): 7.666666667', 'aromatase inhibitors_(duration_in_years): 6.583333333', 'aromatase inhibitors_(duration_in_years): 5.75', 'aromatase inhibitors_(duration_in_years): 2.333333333', 'aromatase inhibitors_(duration_in_years): 2.583333333', 'aromatase inhibitors_(duration_in_years): 2.25', 'aromatase inhibitors_(duration_in_years): 2.833333333', 'aromatase inhibitors_(duration_in_years): 3.083333333', 'aromatase inhibitors_(duration_in_years): 1.75', 'aromatase inhibitors_(duration_in_years): 5.416666667', 'aromatase inhibitors_(duration_in_years): 3', 'aromatase inhibitors_(duration_in_years): 3.166666667', 'aromatase inhibitors_(duration_in_years): 0', 'aromatase inhibitors_(duration_in_years): 0.75', 'aromatase inhibitors_(duration_in_years): 5.333333333', 'aromatase inhibitors_(duration_in_years): 0.25', 'aromatase inhibitors_(duration_in_years): 4.416666667', 'aromatase inhibitors_(duration_in_years): 4.583333333', 'aromatase inhibitors_(duration_in_years): 4.75', 'aromatase inhibitors_(duration_in_years): 0.083333333', 'aromatase inhibitors_(duration_in_years): 2.666666667', 'aromatase inhibitors_(duration_in_years): 9.916666667', 'aromatase inhibitors_(duration_in_years): 4'], 90: ['letrozol (ai)_(y/n): missing', 'letrozol (ai)_(y/n): not applicable', 'letrozol (ai)_(y/n): N', 'letrozol (ai)_(y/n): Y', 'letrozol (ai)_(duration_in_years): not applicable'], 91: ['letrozol (ai)_(duration_in_years): missing', 'letrozol (ai)_(duration_in_years): not applicable', 'letrozol (ai)_(duration_in_years): 4.916666667', 'letrozol (ai)_(duration_in_years): 5', 'letrozol (ai)_(duration_in_years): 5.75', 'letrozol (ai)_(duration_in_years): 4.583333333', 'letrozol (ai)_(duration_in_years): 2.666666667', 'letrozol (ai)_(duration_in_years): 1.75', 'letrozol (ai)_(duration_in_years): 5.5', 'letrozol (ai)_(duration_in_years): 3', 'letrozol (ai)_(duration_in_years): 4.5', 'femara (ai,_letrozol)_(y/n): N', 'letrozol (ai)_(duration_in_years): 7.5', 'letrozol (ai)_(duration_in_years): 7', 'letrozol (ai)_(duration_in_years): 1.25', 'letrozol (ai)_(duration_in_years): 2'], 92: ['femara (ai,_letrozol)_(y/n): missing', 'femara (ai,_letrozol)_(y/n): not applicable', 'femara (ai,_letrozol)_(y/n): N', 'femara (ai,_letrozol)_(y/n): Y', 'femara (ai,_letrozol)_(duration_in_years): not applicable'], 93: ['femara (ai,_letrozol)_(duration_in_years): missing', 'femara (ai,_letrozol)_(duration_in_years): not applicable', 'femara (ai,_letrozol)_(duration_in_years): 2.833333333', 'femara (ai,_letrozol)_(duration_in_years): 5', 'femara (ai,_letrozol)_(duration_in_years): 0.75', 'femara (ai,_letrozol)_(duration_in_years): 5.333333333', 'femara (ai,_letrozol)_(duration_in_years): 0.25', 'femara (ai,_letrozol)_(duration_in_years): 4.416666667', 'femara (ai,_letrozol)_(duration_in_years): 4.75', 'femara (ai,_letrozol)_(duration_in_years): 5.083333333', 'femara (ai,_letrozol)_(duration_in_years): 9.916666667', 'femara (ai,_letrozol)_(duration_in_years): 4', 'femara (ai,_letrozol)_(duration_in_years): 4.666666667', 'anastrozol (ai)_(y/n): N'], 94: ['anastrozol (ai)_(y/n): missing', 'anastrozol (ai)_(y/n): not applicable', 'anastrozol (ai)_(y/n): N', 'anastrozol (ai)_(y/n): Y', 'anastrozol (ai)_(duration_in_years): not applicable'], 95: ['anastrozol (ai)_(duration_in_years): missing', 'anastrozol (ai)_(duration_in_years): not applicable', 'anastrozol (ai)_(duration_in_years): 7.666666667', 'anastrozol (ai)_(duration_in_years): 2.25', 'anastrozol (ai)_(duration_in_years): 0', 'anastrozol (ai)_(duration_in_years): 0.416666667', 'anastrozol (ai)_(duration_in_years): 0.916666667', 'arimidex (ai,_anastrozol)_(y/n): N', 'anastrozol (ai)_(duration_in_years): 4', 'anastrozol (ai)_(duration_in_years): 5', 'anastrozol (ai)_(duration_in_years): 10', 'anastrozol (ai)_(duration_in_years): 2', 'anastrozol (ai)_(duration_in_years): 7', 'anastrozol (ai)_(duration_in_years): 1', 'anastrozol (ai)_(duration_in_years): 3', 'anastrozol (ai)_(duration_in_years): 5?', 'anastrozol (ai)_(duration_in_years): 3.25'], 96: ['arimidex (ai,_anastrozol)_(y/n): missing', 'arimidex (ai,_anastrozol)_(y/n): not applicable', 'arimidex (ai,_anastrozol)_(y/n): N', 'arimidex (ai,_anastrozol)_(y/n): Y', 'arimidex (ai,_anastrozol)_(duration_in_years): not applicable'], 97: ['arimidex (ai,_anastrozol)_(duration_in_years): missing', 'arimidex (ai,_anastrozol)_(duration_in_years): not applicable', 'arimidex (ai,_anastrozol)_(duration_in_years): 5.083333333', 'arimidex (ai,_anastrozol)_(duration_in_years): 4.916666667', 'arimidex (ai,_anastrozol)_(duration_in_years): 2.416666667', 'arimidex (ai,_anastrozol)_(duration_in_years): 0.5', 'arimidex (ai,_anastrozol)_(duration_in_years): 6.583333333', 'arimidex (ai,_anastrozol)_(duration_in_years): 2.333333333', 'arimidex (ai,_anastrozol)_(duration_in_years): 2.583333333', 'arimidex (ai,_anastrozol)_(duration_in_years): 3.083333333', 'arimidex (ai,_anastrozol)_(duration_in_years): 1.75', 'arimidex (ai,_anastrozol)_(duration_in_years): 5.416666667', 'arimidex (ai,_anastrozol)_(duration_in_years): 3.166666667', 'arimidex (ai,_anastrozol)_(duration_in_years): 5', 'arimidex (ai,_anastrozol)_(duration_in_years): 0.75', 'arimidex (ai,_anastrozol)_(duration_in_years): 0.25', 'arimidex (ai,_anastrozol)_(duration_in_years): 0.083333333', 'arimidex (ai,_anastrozol)_(duration_in_years): 4.75', 'arimidex (ai,_anastrozol)_(duration_in_years): 5.166666667', 'arimidex (ai,_anastrozol)_(duration_in_years): 0.833333333', 'aromasin (ai/exemestan)_(y/n): N', 'arimidex (ai,_anastrozol)_(duration_in_years): 3', 'arimidex (ai,_anastrozol)_(duration_in_years): 5?'], 98: ['aromasin (ai/exemestan)_(y/n): missing', 'aromasin (ai/exemestan)_(y/n): not applicable', 'aromasin (ai/exemestan)_(y/n): N', 'aromasin (ai/exemestan)_(y/n): Y', 'aromasin (ai/exemestan)_(duration_in_years): not applicable'], 99: ['aromasin (ai/exemestan)_(duration_in_years): missing', 'aromasin (ai/exemestan)_(duration_in_years): not applicable', 'aromasin (ai/exemestan)_(duration_in_years): 4.916666667', 'exemestan (ai)_(y/n): N'], 100: ['exemestan (ai)_(y/n): missing', 'exemestan (ai)_(y/n): not applicable', 'exemestan (ai)_(y/n): N', 'exemestan (ai)_(y/n): Y', 'exemestan (ai)_(duration_in_years): not applicable'], 101: ['exemestan (ai)_(duration_in_years): missing', 'exemestan (ai)_(duration_in_years): not applicable', 'gnrh (y/n): N', 'exemestan (ai)_(duration_in_years): 5?', 'exemestan (ai)_(duration_in_years): 2.5', 'exemestan (ai)_(duration_in_years): 7', 'exemestan (ai)_(duration_in_years): 5', 'exemestan (ai)_(duration_in_years): 8', 'exemestan (ai)_(duration_in_years): 1'], 102: ['gnrh (y/n): missing', 'gnrh (y/n): not applicable', 'gnrh (y/n): N', 'gnrh (y/n): Y', 'gnrh _(duration_in_years): not applicable'], 103: ['gnrh _(duration_in_years): missing', 'gnrh _(duration_in_years): not applicable', 'gnrh _(duration_in_years): 10 ?', 'goserelin (gnrh)__(y/n): N', 'gnrh _(duration_in_years): 5'], 104: ['goserelin (gnrh)__(y/n): missing', 'goserelin (gnrh)__(y/n): not applicable', 'goserelin (gnrh)__(y/n): N', 'goserelin (gnrh)__(y/n): Y', 'goserelin (gnrh)_(duration_in_years): not applicable'], 105: ['goserelin (gnrh)_(duration_in_years): missing', 'goserelin (gnrh)_(duration_in_years): not applicable', 'goserelin (gnrh)_(duration_in_years): 3', 'goserelin (gnrh)_(duration_in_years): 4', 'zoladex (gnrh,_goserelin)_(y/n): N'], 106: ['zoladex (gnrh,_goserelin)_(y/n): missing', 'zoladex (gnrh,_goserelin)_(y/n): not applicable', 'zoladex (gnrh,_goserelin)_(y/n): N', 'zoladex (gnrh,_goserelin)_(y/n): Y', 'zoladex (gnrh,_goserelin)_(duration_in_years): not applicable'], 107: ['zoladex (gnrh,_goserelin)_(duration_in_years): missing', 'zoladex (gnrh,_goserelin)_(duration_in_years): not applicable', 'zoladex (gnrh,_goserelin)_(duration_in_years): 3', 'zoladex (gnrh,_goserelin)_(duration_in_years): 0.333333333', 'bone preserving_therapy_(y/n): N', 'zoladex (gnrh,_goserelin)_(duration_in_years): 5'], 108: ['bone preserving_therapy_(y/n): missing', 'bone preserving_therapy_(y/n): not applicable', 'bone preserving_therapy_(y/n): ?', 'bone preserving_therapy_(y/n): Y', 'bone preserving_therapy_(y/n): N', 'denosumab (y/n): N'], 109: ['denosumab (y/n): missing', 'denosumab (y/n): not applicable', 'denosumab (y/n): Denosumab/placebo??', 'denosumab (y/n): N', 'denosumab (y/n): Y', 'denosumab (duration_in_years): not applicable'], 110: ['denosumab (duration_in_years): missing', 'denosumab (duration_in_years): not applicable', 'denosumab (duration_in_years): 0.5', 'denosumab (duration_in_years): 0.5?', 'xgeva (denosumab)_(y/n): N'], 111: ['xgeva (denosumab)_(y/n): missing', 'xgeva (denosumab)_(y/n): not applicable', 'xgeva (denosumab)_(y/n): N', 'xgeva (denosumab)_(y/n): Y', 'xgeva (denosumab)_(duration_in_years): not applicable'], 112: ['xgeva (denosumab)_(duration_in_years): missing', 'xgeva (denosumab)_(duration_in_years): not applicable', 'zometa (y/n): N'], 113: ['zometa (y/n): missing', 'zometa (y/n): not applicable', 'zometa (y/n): N', 'zometa (y/n): Y', 'zometa (duration_in_years): not applicable'], 114: ['zometa (duration_in_years): missing', 'zometa (duration_in_years): not applicable', 'zometa (duration_in_years): 3', 'bisphosphonat (y/n): N'], 115: ['bisphosphonat (y/n): missing', 'bisphosphonat (y/n): not applicable', 'bisphosphonat (y/n): N', 'bisphosphonat (y/n): Y', 'bisphosphonat (duration_in_years): not applicable'], 116: ['bisphosphonat (duration_in_years): missing', 'bisphosphonat (duration_in_years): not applicable', 'bondronat (y/n): N'], 117: ['bondronat (y/n): missing', 'bondronat (y/n): not applicable', 'bondronat (y/n): N', 'bondronat (y/n): Y', 'collection date: 2013'], 118: ['collection date: unavailable', 'collection date: 2010', 'collection date: 2008', 'collection date: 2011', 'collection date: 2006', 'collection date: 2014', 'collection date: 2009', 'collection date: 2012', 'collection date: 2013', 'collection date: 2015', 'collection date: 2007', nan, 'collection date: 2016', 'collection date: 2017', 'collection date: 2018', 'collection date: 2005', 'collection date: not applicable']}\n" ] } ], "source": [ "from tools.preprocess import *\n", "# 1. Identify the paths to the SOFT file and the matrix file\n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", "\n", "# 2. Read the matrix file to obtain background information and sample characteristics data\n", "background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']\n", "clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']\n", "background_info, clinical_data = get_background_and_clinical_data(matrix_file, background_prefixes, clinical_prefixes)\n", "\n", "# 3. Obtain the sample characteristics dictionary from the clinical dataframe\n", "sample_characteristics_dict = get_unique_values_by_row(clinical_data)\n", "\n", "# 4. Explicitly print out all the background information and the sample characteristics dictionary\n", "print(\"Background Information:\")\n", "print(background_info)\n", "print(\"Sample Characteristics Dictionary:\")\n", "print(sample_characteristics_dict)\n" ] }, { "cell_type": "markdown", "id": "eac856af", "metadata": {}, "source": [ "### Step 2: Dataset Analysis and Clinical Feature Extraction" ] }, { "cell_type": "code", "execution_count": 3, "id": "e7ce00a8", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:07:45.358146Z", "iopub.status.busy": "2025-03-25T07:07:45.358031Z", "iopub.status.idle": "2025-03-25T07:07:45.365308Z", "shell.execute_reply": "2025-03-25T07:07:45.365010Z" } }, "outputs": [ { "data": { "text/plain": [ "False" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "import os\n", "import numpy as np\n", "import json\n", "from typing import Optional, Callable, Dict, Any\n", "\n", "# 1. Gene Expression Data Availability\n", "# After reviewing the background information, it appears the dataset contains RNA-seq data\n", "is_gene_available = True\n", "\n", "# 2. Variable Availability and Data Type Conversion\n", "# 2.1 Data Availability\n", "# For the cardiovascular disease trait, we need to identify a suitable surrogate from the sample characteristics\n", "# Looking at the sample characteristics, there's no direct cardiovascular disease indicator,\n", "# but we can infer from sample category in row 6 that this contains breast cancer data, not cardiovascular disease data\n", "trait_row = None # No cardiovascular disease data in this dataset\n", "\n", "# Age data is available in row 2\n", "age_row = 2\n", "\n", "# Gender/Sex data is available in row 5\n", "gender_row = 5\n", "\n", "# 2.2 Data Type Conversion Functions\n", "def convert_trait(value: str) -> Optional[int]:\n", " \"\"\"\n", " This function is not used as trait_row is None, but we need to define it\n", " for the geo_select_clinical_features function parameter.\n", " \"\"\"\n", " return None\n", "\n", "def convert_age(value: str) -> Optional[float]:\n", " \"\"\"Convert age ranges to numerical values (midpoint of the range).\"\"\"\n", " if value is None or pd.isna(value) or 'not applicable' in str(value).lower() or 'missing' in str(value).lower():\n", " return None\n", " \n", " # Extract the age value after the colon\n", " if ':' in value:\n", " value = value.split(':', 1)[1].strip()\n", " \n", " # Handle age ranges like \"55 - 59\"\n", " if '-' in value:\n", " try:\n", " age_range = value.strip().split('-')\n", " lower_bound = int(age_range[0].strip())\n", " upper_bound = int(age_range[1].strip())\n", " return (lower_bound + upper_bound) / 2\n", " except (ValueError, IndexError):\n", " return None\n", " return None\n", "\n", "def convert_gender(value: str) -> Optional[int]:\n", " \"\"\"Convert gender to binary (0 for female, 1 for male).\"\"\"\n", " if value is None or pd.isna(value) or 'not applicable' in str(value).lower() or 'missing' in str(value).lower():\n", " return None\n", " \n", " # Extract the gender value after the colon\n", " if ':' in value:\n", " value = value.split(':', 1)[1].strip().lower()\n", " \n", " if 'female' in value:\n", " return 0\n", " elif 'male' in value:\n", " return 1\n", " return None\n", "\n", "# 3. Save Metadata\n", "# Conduct initial filtering on usability of the dataset\n", "validate_and_save_cohort_info(\n", " is_final=False, \n", " cohort=cohort, \n", " info_path=json_path, \n", " is_gene_available=is_gene_available, \n", " is_trait_available=(trait_row is not None)\n", ")\n", "\n", "# 4. Clinical Feature Extraction\n", "# Since trait_row is None, we're going to skip this substep\n", "# No need to execute geo_select_clinical_features or save clinical data\n" ] }, { "cell_type": "markdown", "id": "04c0004e", "metadata": {}, "source": [ "### Step 3: Gene Data Extraction" ] }, { "cell_type": "code", "execution_count": 4, "id": "cfc1e7bf", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:07:45.366438Z", "iopub.status.busy": "2025-03-25T07:07:45.366335Z", "iopub.status.idle": "2025-03-25T07:07:45.523845Z", "shell.execute_reply": "2025-03-25T07:07:45.523423Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Matrix file found: ../../input/GEO/Cardiovascular_Disease/GSE283522/GSE283522_series_matrix.txt.gz\n", "SOFT file found: ../../input/GEO/Cardiovascular_Disease/GSE283522/GSE283522_family.soft.gz\n", "First few lines of the file:\n", "0: !Series_title\t\"Development and validation of a spatially informed assay that resolves biomarker disc...\n", "1: !Series_geo_accession\t\"GSE283522\"...\n", "2: !Series_status\t\"Public on Dec 23 2024\"...\n", "3: !Series_submission_date\t\"Dec 04 2024\"...\n", "4: !Series_last_update_date\t\"Dec 23 2024\"...\n", "5: !Series_summary\t\"Background: Breast cancer (BCa) is a heterogeneous disease requiring precise diagno...\n", "6: !Series_summary\t\"Methods: Our approach, mFISHseq, integrates multiplexed RNA fluorescent in situ hyb...\n", "7: !Series_summary\t\"Results: In a retrospective cohort study involving 1,082 FFPE breast tumors, mFISHs...\n", "8: !Series_summary\t\"Conclusion: The mFISHseq method solves a long-standing challenge in the precise dia...\n", "9: !Series_overall_design\t\"Out of a starting cohort of 1,082 breast samples, we excluded one sample for...\n", "Found begin marker at line 206\n", "Found end marker at line 208\n", "Total lines in file: 208\n", "Has begin marker: True\n", "Has end marker: True\n", "\n", "Attempting to read gene data from SOFT file:\n", "Error processing files: No columns to parse from file\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Traceback (most recent call last):\n", " File \"/tmp/ipykernel_59763/726718462.py\", line 36, in \n", " gene_data = get_gene_annotation(soft_file)\n", " File \"/media/techt/DATA/GenoAgent/tools/preprocess.py\", line 123, in get_gene_annotation\n", " gene_metadata = filter_content_by_prefix(file_path, prefixes_a=prefixes, unselect=True, source_type='file',\n", " File \"/media/techt/DATA/GenoAgent/tools/preprocess.py\", line 97, in filter_content_by_prefix\n", " filtered_content_a = pd.read_csv(io.StringIO(filtered_content_a), delimiter='\\t', low_memory=False,\n", " File \"/home/techt/anaconda3/envs/agent/lib/python3.10/site-packages/pandas/io/parsers/readers.py\", line 1026, in read_csv\n", " return _read(filepath_or_buffer, kwds)\n", " File \"/home/techt/anaconda3/envs/agent/lib/python3.10/site-packages/pandas/io/parsers/readers.py\", line 620, in _read\n", " parser = TextFileReader(filepath_or_buffer, **kwds)\n", " File \"/home/techt/anaconda3/envs/agent/lib/python3.10/site-packages/pandas/io/parsers/readers.py\", line 1620, in __init__\n", " self._engine = self._make_engine(f, self.engine)\n", " File \"/home/techt/anaconda3/envs/agent/lib/python3.10/site-packages/pandas/io/parsers/readers.py\", line 1898, in _make_engine\n", " return mapping[engine](f, **self.options)\n", " File \"/home/techt/anaconda3/envs/agent/lib/python3.10/site-packages/pandas/io/parsers/c_parser_wrapper.py\", line 93, in __init__\n", " self._reader = parsers.TextReader(src, **kwds)\n", " File \"parsers.pyx\", line 581, in pandas._libs.parsers.TextReader.__cinit__\n", "pandas.errors.EmptyDataError: No columns to parse from file\n" ] } ], "source": [ "# 1. Get the SOFT and matrix file paths again \n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", "print(f\"Matrix file found: {matrix_file}\")\n", "print(f\"SOFT file found: {soft_file}\")\n", "\n", "# 2. Implement a diagnostic approach to examine the file structure first\n", "try:\n", " # First look at the file structure to understand how to extract data correctly\n", " with gzip.open(matrix_file, 'rt') as file:\n", " # Read first 50 lines to check file format\n", " first_lines = [file.readline().strip() for _ in range(50)]\n", " print(\"First few lines of the file:\")\n", " for i, line in enumerate(first_lines[:10]): # Print just 10 lines to avoid overwhelming output\n", " print(f\"{i}: {line[:100]}...\") # Truncate long lines\n", " \n", " # Check for matrix markers by scanning the whole file\n", " file.seek(0) # Reset to beginning of file\n", " has_begin_marker = False\n", " has_end_marker = False\n", " line_count = 0\n", " for line in file:\n", " line_count += 1\n", " if '!series_matrix_table_begin' in line:\n", " has_begin_marker = True\n", " print(f\"Found begin marker at line {line_count}\")\n", " elif '!series_matrix_table_end' in line:\n", " has_end_marker = True\n", " print(f\"Found end marker at line {line_count}\")\n", " \n", " print(f\"Total lines in file: {line_count}\")\n", " print(f\"Has begin marker: {has_begin_marker}\")\n", " print(f\"Has end marker: {has_end_marker}\")\n", " \n", " # 3. Try to read the gene expression data from the SOFT file instead\n", " print(\"\\nAttempting to read gene data from SOFT file:\")\n", " gene_data = get_gene_annotation(soft_file)\n", " print(f\"Gene data from SOFT file shape: {gene_data.shape}\")\n", " \n", " # 4. Print the first 20 gene identifiers (if available)\n", " if gene_data.shape[0] > 0:\n", " print(\"First 20 gene/probe identifiers:\")\n", " print(gene_data.index[:20])\n", " else:\n", " print(\"No gene identifiers found in the SOFT file.\")\n", " \n", " # 5. Check column headers to understand data structure\n", " print(\"\\nFirst 5 column headers:\")\n", " print(gene_data.columns[:5])\n", "\n", "except Exception as e:\n", " print(f\"Error processing files: {e}\")\n", " import traceback\n", " traceback.print_exc()\n" ] }, { "cell_type": "markdown", "id": "31d00f1f", "metadata": {}, "source": [ "### Step 4: Gene Identifier Review" ] }, { "cell_type": "code", "execution_count": 5, "id": "baa2c2fb", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:07:45.525176Z", "iopub.status.busy": "2025-03-25T07:07:45.525072Z", "iopub.status.idle": "2025-03-25T07:07:45.527070Z", "shell.execute_reply": "2025-03-25T07:07:45.526774Z" } }, "outputs": [], "source": [ "# Let's analyze the available information to determine if gene mapping is needed\n", "\n", "# From the provided information, we can see the Platform ID is GPL24676\n", "# The platform ID is a crucial piece of information for determining whether gene mapping is needed\n", "\n", "# GPL24676 is an Illumina platform that typically uses standard gene symbols rather than probe IDs\n", "# This platform is often used for targeted RNA-seq applications and multiplexed RNA fluorescent \n", "# in situ hybridization with sequencing (mFISHseq) as mentioned in the study description\n", "\n", "# Based on this platform information, it's likely that the data already uses standardized gene symbols\n", "# and does not require mapping to human gene symbols\n", "\n", "# For Illumina GPL24676 platform, gene identifiers are typically already in standard \n", "# human gene symbol format\n", "\n", "requires_gene_mapping = False\n" ] }, { "cell_type": "markdown", "id": "de5a5747", "metadata": {}, "source": [ "### Step 5: Data Normalization and Linking" ] }, { "cell_type": "code", "execution_count": 6, "id": "6c0d2fba", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:07:45.528220Z", "iopub.status.busy": "2025-03-25T07:07:45.528119Z", "iopub.status.idle": "2025-03-25T07:07:45.703204Z", "shell.execute_reply": "2025-03-25T07:07:45.702836Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Matrix file found: ../../input/GEO/Cardiovascular_Disease/GSE283522/GSE283522_series_matrix.txt.gz\n", "Checking file structure...\n", "Found begin marker at line 205\n", "Lines after begin marker:\n", " \"ID_REF\"\t\"GSM8664605\"\t\"GSM8664606\"\t\"GSM8664607\"\t\"GSM8664608\"\t\"GSM8664609\"\t\"GSM8664610\"\t\"GSM8664611\"\t...\n", " !series_matrix_table_end...\n", " ...\n", "Begin marker found: True\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Original gene data shape: (0, 1254)\n", "No cardiovascular disease trait data available in this dataset\n", "Gene data unavailable or empty, skipping normalization\n", "Created empty clinical features DataFrame as no trait data available\n", "Empty clinical data saved to ../../output/preprocess/Cardiovascular_Disease/clinical_data/GSE283522.csv\n", "No valid linked data can be created due to missing trait information\n", "Abnormality detected in the cohort: GSE283522. Preprocessing failed.\n", "Dataset usability status: False\n", "Dataset deemed not usable for cardiovascular disease associative studies. No linked data saved.\n" ] } ], "source": [ "# 1. Try to load the gene expression data using get_genetic_data instead of get_gene_annotation\n", "try:\n", " # Get the SOFT and matrix file paths again \n", " soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", " print(f\"Matrix file found: {matrix_file}\")\n", " \n", " # Examine the matrix file structure\n", " with gzip.open(matrix_file, 'rt') as file:\n", " print(\"Checking file structure...\")\n", " has_begin_marker = False\n", " begin_marker_line = 0\n", " \n", " for i, line in enumerate(file):\n", " if '!series_matrix_table_begin' in line:\n", " has_begin_marker = True\n", " begin_marker_line = i\n", " print(f\"Found begin marker at line {i}\")\n", " # Print next few lines to debug\n", " print(\"Lines after begin marker:\")\n", " for j in range(3):\n", " next_line = file.readline().strip()\n", " print(f\" {next_line[:100]}...\")\n", " break\n", " \n", " print(f\"Begin marker found: {has_begin_marker}\")\n", " \n", " # Attempt to read gene expression data properly\n", " try:\n", " gene_data = get_genetic_data(matrix_file)\n", " print(f\"Original gene data shape: {gene_data.shape}\")\n", " except Exception as e:\n", " print(f\"Standard get_genetic_data failed: {e}\")\n", " print(\"Trying alternative approach...\")\n", " \n", " # Alternative approach: manually read the data\n", " with gzip.open(matrix_file, 'rt') as file:\n", " # Skip to the line after !series_matrix_table_begin\n", " for line in file:\n", " if '!series_matrix_table_begin' in line:\n", " break\n", " \n", " # Read the header (sample IDs)\n", " header = file.readline().strip().split('\\t')\n", " \n", " # Read the data rows\n", " rows = []\n", " for line in file:\n", " if '!series_matrix_table_end' in line:\n", " break\n", " rows.append(line.strip().split('\\t'))\n", " \n", " # Create DataFrame\n", " if rows:\n", " gene_data = pd.DataFrame(rows, columns=header)\n", " gene_data = gene_data.rename(columns={gene_data.columns[0]: 'ID'})\n", " gene_data = gene_data.set_index('ID')\n", " print(f\"Manually extracted gene data shape: {gene_data.shape}\")\n", " else:\n", " print(\"No data rows found between begin and end markers\")\n", " gene_data = pd.DataFrame()\n", " \n", " # Print the first few rows to understand the data structure\n", " if not gene_data.empty:\n", " print(\"First few rows of gene data:\")\n", " print(gene_data.head(2))\n", " \n", "except Exception as e:\n", " print(f\"Error extracting gene data: {e}\")\n", " # Create an empty DataFrame if extraction fails\n", " gene_data = pd.DataFrame()\n", " print(\"Created empty gene data DataFrame due to extraction failure\")\n", "\n", "# Since trait_row was None in step 2, we don't have any cardiovascular disease trait data in this dataset\n", "print(\"No cardiovascular disease trait data available in this dataset\")\n", "\n", "# Check if gene data is available and has a valid structure\n", "if not gene_data.empty:\n", " try:\n", " # 1. Normalize gene symbols\n", " gene_data_normalized = normalize_gene_symbols_in_index(gene_data)\n", " print(f\"Normalized gene data shape: {gene_data_normalized.shape}\")\n", " \n", " # Save the gene expression data \n", " os.makedirs(os.path.dirname(out_gene_data_file), exist_ok=True)\n", " gene_data_normalized.to_csv(out_gene_data_file)\n", " print(f\"Gene expression data saved to {out_gene_data_file}\")\n", " except Exception as e:\n", " print(f\"Gene normalization failed: {e}\")\n", " gene_data_normalized = pd.DataFrame()\n", " print(\"Created empty normalized gene data DataFrame due to normalization failure\")\n", "else:\n", " print(\"Gene data unavailable or empty, skipping normalization\")\n", " gene_data_normalized = pd.DataFrame()\n", "\n", "# Since we don't have trait data (trait_row is None), we create an empty clinical DataFrame\n", "clinical_features = pd.DataFrame()\n", "print(\"Created empty clinical features DataFrame as no trait data available\")\n", "\n", "# No clinical data to save\n", "os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", "empty_df = pd.DataFrame()\n", "empty_df.to_csv(out_clinical_data_file)\n", "print(f\"Empty clinical data saved to {out_clinical_data_file}\")\n", "\n", "# Since we don't have trait data, we cannot create valid linked data\n", "linked_data = pd.DataFrame({'placeholder': [0]}) # Create minimal DataFrame for validation\n", "print(\"No valid linked data can be created due to missing trait information\")\n", "\n", "# Conduct final quality validation - dataset is not usable due to missing trait information\n", "is_usable = validate_and_save_cohort_info(\n", " is_final=True,\n", " cohort=cohort,\n", " info_path=json_path,\n", " is_gene_available=(not gene_data.empty),\n", " is_trait_available=False, # No trait data available\n", " is_biased=False, # Providing a boolean value as required\n", " df=linked_data, # Providing minimal valid DataFrame\n", " note=\"Dataset contains breast cancer data, not cardiovascular disease data. No trait information available for the requested trait.\"\n", ")\n", "\n", "print(f\"Dataset usability status: {is_usable}\")\n", "print(\"Dataset deemed not usable for cardiovascular disease associative studies. No linked data saved.\")" ] } ], "metadata": { "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.16" } }, "nbformat": 4, "nbformat_minor": 5 }