{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "fb723723", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:21:44.982488Z", "iopub.status.busy": "2025-03-25T07:21:44.982019Z", "iopub.status.idle": "2025-03-25T07:21:45.150640Z", "shell.execute_reply": "2025-03-25T07:21:45.150279Z" } }, "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 = \"Kidney_Papillary_Cell_Carcinoma\"\n", "cohort = \"GSE68950\"\n", "\n", "# Input paths\n", "in_trait_dir = \"../../input/GEO/Kidney_Papillary_Cell_Carcinoma\"\n", "in_cohort_dir = \"../../input/GEO/Kidney_Papillary_Cell_Carcinoma/GSE68950\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/GSE68950.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/gene_data/GSE68950.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/clinical_data/GSE68950.csv\"\n", "json_path = \"../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "ec986de6", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "735695b3", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:21:45.151943Z", "iopub.status.busy": "2025-03-25T07:21:45.151795Z", "iopub.status.idle": "2025-03-25T07:21:45.550294Z", "shell.execute_reply": "2025-03-25T07:21:45.549942Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Background Information:\n", "!Series_title\t\"caArray_golub-00327: Sanger cell line Affymetrix gene expression project\"\n", "!Series_summary\t\"The microarray gene expression pattern was studied using 798 different cancer cell lines. The cancer cell lines are obtained from different centers. Annotation information were provided in the supplementary file.\"\n", "!Series_overall_design\t\"golub-00327\"\n", "!Series_overall_design\t\"Assay Type: Gene Expression\"\n", "!Series_overall_design\t\"Provider: Affymetrix\"\n", "!Series_overall_design\t\"Array Designs: HT_HG-U133A\"\n", "!Series_overall_design\t\"Organism: Homo sapiens (ncbitax)\"\n", "!Series_overall_design\t\"Tissue Sites: leukemia, Urinary tract, Lung, BiliaryTract, Autonomic Ganglion, Thyroid gland, Stomach, Breast, Pancreas, Head and Neck, Lymphoma, Colorectal, Placenta, Liver, Brain, Bone, pleura, Skin, endometrium, Ovary, cervix, Oesophagus, Connective and Soft Tissue, Muscle, Kidney, Prostate, Adrenal Gland, Eye, Testis, Smooth Muscle Tissue, Vulva, Unknow\"\n", "!Series_overall_design\t\"Material Types: cell, synthetic_RNA, whole_organism, total_RNA, BVG\"\n", "!Series_overall_design\t\"Disease States: M3 acute myeloid leukemia, hairy cell leukemia, transitional cell carcinoma, Adenocarcinoma, B cell lymphoma unspecified, Acute Lymphoblastic Leukemia, blast phase chronic myeloid leukemia, Carcinoma, M6 acute myeloid leukemia, Neuroblastoma, follicular carcinoma, ductal carcinoma, Burkitt Lymphoma, Squamous Cell Carcinoma, M5 acute myeloid leukemia, Mycosis Fungoides and Sezary Syndrome, Acute T-Cell Lymphoblastic Leukemia, Adult T-Cell Leukemia/Lymphoma, M2 Therapy-Related Myeloid Neoplasm, Choriocarcinoma, Plasma Cell Myeloma, Hepatocellular Carcinoma, anaplastic large cell lymphoma, primitive neuroectodermal tumor-medulloblastoma, M4 acute myeloid leukemia, B Acute Lymphoblastic Leukemia, Acute Leukemia of Ambiguous Lineage, Osteosarcoma, Hodgkin Lymphoma, Mesothelioma, chondrosarcoma, Glioblastoma Multiforme, Malignant Melanoma, carcinosarcoma-malignant mesodermal mixed tumor, bronchioloalveolar adenocarcinoma, chronic lymphocytic leukemia-small lymphocytic lymphoma, micropapillary carcinoma, diffuse large B cell lymphoma, myelodysplastic syndrome, giant cell carcinoma, teratoma, multipotential sarcoma, Small Cell Carcinoma, ASTROCYTOMA, Fibrosarcoma, mucoepidermoid carcinoma, Rhabdomyosarcoma, L1 Acute T-Cell Lymphoblastic Leukemia, Glioma, Anaplastic Astrocytoma, Non-small cell carcinoma, Large Cell Carcinoma, mucinous carcinoma, Acute Myeloid Leukemia, malignant fibrous histiocytoma-pleomorphic sarcoma, clear cell carcinoma, B cell lymphoma unspecified, Anaplastic Carcinoma, Ewings sarcoma-peripheral primitive neuroectodermal tumor, undifferentiated carcinoma, Sarcoma, Embryonal Rhabdomyosarcoma, epithelioid sarcoma, renal cell carcinoma, carcinoid-endocrine tumor, Synovial Sarcoma, lymphoid neoplasm, rhabdoid tumor, Refractory Anemia with Excess Blasts, Liposarcoma, biphasic mesothelioma, adrenal cortical carcinoma, adenosquamous carcinoma, L2 Acute T-Cell Lymphoblastic Leukemia, chronic myeloid leukemia, Micropapillary Serous Carcinoma, desmoplastic, acute leukemia, Retinoblastoma, teratocarcinoma, clear cell renal cell carcinoma, Follicular Lymphoma, Wilms Tumor, M7 acute myeloid leukemia, gliosarcoma, embryonal carcinoma, Leiomyosarcoma, medullary carcinoma, granulosa cell tumor, papillary carcinoma, NS Acute Lymphoblastic Leukemia, papillary transitional cell carcinoma, small cell adenocarcinoma, epithelial dysplasia, hyperplasia, tubular adenocarcinoma, metaplasia, papillary ductal carcinoma, chronic eosinophilic leukemia-hypereosinophilic syndrome, #N/A, malignant trichilemmal cyst, Medullary Breast Carcinoma, L2 Acute Lymphoblastic Leukemia, Osteoblastic Osteosarcoma\"\n", "Sample Characteristics Dictionary:\n", "{0: ['cosmic id: 924101', 'cosmic id: 906800', 'cosmic id: 687452', 'cosmic id: 924100', 'cosmic id: 910924', 'cosmic id: 906798', 'cosmic id: 906797', 'cosmic id: 910922', 'cosmic id: 905947', 'cosmic id: 924102', 'cosmic id: 687562', 'cosmic id: 910921', 'cosmic id: 687563', 'cosmic id: 910784', 'cosmic id: 906792', 'cosmic id: 906794', 'cosmic id: 906804', 'cosmic id: 906793', 'cosmic id: 910935', 'cosmic id: 910851', 'cosmic id: 910925', 'cosmic id: 905948', 'cosmic id: 910934', 'cosmic id: 905949', 'cosmic id: 684052', 'cosmic id: 910920', 'cosmic id: 906791', 'cosmic id: 905950', 'cosmic id: 906803', 'cosmic id: 906790'], 1: ['disease state: L2 Acute Lymphoblastic Leukemia', 'disease state: NS Acute Lymphoblastic Leukemia', 'disease state: carcinoma', 'disease state: adenocarcinoma', 'disease state: transitional cell carcinoma', 'disease state: clear cell renal cell carcinoma', 'disease state: anaplastic carcinoma', 'disease state: glioblastoma multiforme', 'disease state: malignant melanoma', 'disease state: rhabdomyosarcoma', 'disease state: mucoepidermoid carcinoma', 'disease state: squamous cell carcinoma', 'disease state: renal cell carcinoma', 'disease state: neuroblastoma', 'disease state: Acute Lymphoblastic Leukemia', 'disease state: M5 acute myeloid leukemia', 'disease state: plasma cell myeloma', 'disease state: L1 Acute T-Cell Lymphoblastic Leukemia', 'disease state: astrocytoma', 'disease state: B Acute Lymphoblastic Leukemia', 'disease state: B cell lymphoma unspecified', 'disease state: papillary carcinoma', 'disease state: papillary transitional cell carcinoma', 'disease state: Burkitt lymphoma', 'disease state: hairy cell leukemia', 'disease state: hyperplasia', 'disease state: papillary ductal carcinoma', 'disease state: blast phase chronic myeloid leukemia', 'disease state: hepatocellular carcinoma', 'disease state: Adult T-Cell Leukemia/Lymphoma'], 2: ['disease location: Hematopoietic and Lymphoid Tissue', 'disease location: bladder', 'disease location: prostate', 'disease location: stomach', 'disease location: ureter', 'disease location: kidney', 'disease location: thyroid', 'disease location: frontal lobe', 'disease location: skin', 'disease location: brain', 'disease location: striated muscle', 'disease location: submaxillary', 'disease location: ovary', 'disease location: lung', 'disease location: autonomic ganglia', 'disease location: endometrium', 'disease location: pancreas', 'disease location: head neck', 'disease location: cervix', 'disease location: breast', 'disease location: colon', 'disease location: liver', 'disease location: gingiva', 'disease location: tongue', 'disease location: vulva', 'disease location: bone', 'disease location: rectum', 'disease location: esophagus', 'disease location: central nervous system', 'disease location: posterior fossa'], 3: ['organism part: Leukemia', 'organism part: Urinary tract', 'organism part: Prostate', 'organism part: Stomach', 'organism part: Kidney', 'organism part: Thyroid Gland', 'organism part: Brain', 'organism part: Skin', 'organism part: Muscle', 'organism part: Head and Neck', 'organism part: Ovary', 'organism part: Lung', 'organism part: Autonomic Ganglion', 'organism part: Endometrium', 'organism part: Pancreas', 'organism part: Cervix', 'organism part: Breast', 'organism part: Colorectal', 'organism part: Liver', 'organism part: Vulva', 'organism part: Bone', 'organism part: Oesophagus', 'organism part: BiliaryTract', 'organism part: Connective and Soft Tissue', 'organism part: Lymphoma', 'organism part: Pleura', 'organism part: Testis', 'organism part: Placenta', 'organism part: Adrenal Gland', 'organism part: Unknow'], 4: ['sample: 736', 'sample: 494', 'sample: 7', 'sample: 746', 'sample: 439', 'sample: 168', 'sample: 152', 'sample: 37', 'sample: 450', 'sample: 42', 'sample: 526', 'sample: 462', 'sample: 451', 'sample: 486', 'sample: 429', 'sample: 47', 'sample: 755', 'sample: 71', 'sample: 72', 'sample: 474', 'sample: 364', 'sample: 537', 'sample: 110', 'sample: 316', 'sample: 33', 'sample: 408', 'sample: 201', 'sample: 38', 'sample: 9', 'sample: 190'], 5: ['cell line code: 749', 'cell line code: 493', 'cell line code: 505', 'cell line code: 760', 'cell line code: 437', 'cell line code: 151', 'cell line code: 134', 'cell line code: 449', 'cell line code: 85', 'cell line code: 529', 'cell line code: 461', 'cell line code: 450', 'cell line code: 485', 'cell line code: 426', 'cell line code: 59', 'cell line code: 769', 'cell line code: 48', 'cell line code: 38', 'cell line code: 473', 'cell line code: 353', 'cell line code: 541', 'cell line code: 54', 'cell line code: 302', 'cell line code: 25', 'cell line code: 402', 'cell line code: 184', 'cell line code: 63', 'cell line code: 29', 'cell line code: 173', 'cell line code: 553'], 6: ['supplier: DSMZ', 'supplier: ATCC', 'supplier: Unspecified', 'supplier: DTP', 'supplier: HSRRB', 'supplier: ICLC', 'supplier: RIKEN', 'supplier: ECCC', 'supplier: JCRB'], 7: ['affy_batch: 1', 'affy_batch: 2'], 8: ['crna plate: 8', 'crna plate: 6', 'crna plate: 11', 'crna plate: 5', 'crna plate: 2', 'crna plate: 12', 'crna plate: 4', 'crna plate: 3', 'crna plate: 7']}\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": "a21f174b", "metadata": {}, "source": [ "### Step 2: Dataset Analysis and Clinical Feature Extraction" ] }, { "cell_type": "code", "execution_count": 3, "id": "2ab3db05", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:21:45.552112Z", "iopub.status.busy": "2025-03-25T07:21:45.551950Z", "iopub.status.idle": "2025-03-25T07:21:45.603507Z", "shell.execute_reply": "2025-03-25T07:21:45.603155Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Preview of clinical features:\n", "{'GSM1687570': [0.0], 'GSM1687571': [0.0], 'GSM1687572': [0.0], 'GSM1687573': [0.0], 'GSM1687574': [0.0], 'GSM1687575': [0.0], 'GSM1687576': [0.0], 'GSM1687577': [0.0], 'GSM1687578': [1.0], 'GSM1687579': [1.0], 'GSM1687580': [0.0], 'GSM1687581': [0.0], 'GSM1687582': [0.0], 'GSM1687583': [0.0], 'GSM1687584': [0.0], 'GSM1687585': [0.0], 'GSM1687586': [0.0], 'GSM1687587': [0.0], 'GSM1687588': [0.0], 'GSM1687589': [0.0], 'GSM1687590': [0.0], 'GSM1687591': [0.0], 'GSM1687592': [0.0], 'GSM1687593': [0.0], 'GSM1687594': [0.0], 'GSM1687595': [0.0], 'GSM1687596': [1.0], 'GSM1687597': [1.0], 'GSM1687598': [0.0], 'GSM1687599': [1.0], 'GSM1687600': [0.0], 'GSM1687601': [0.0], 'GSM1687602': [0.0], 'GSM1687603': [0.0], 'GSM1687604': [0.0], 'GSM1687605': [0.0], 'GSM1687606': [0.0], 'GSM1687607': [0.0], 'GSM1687608': [0.0], 'GSM1687609': [0.0], 'GSM1687610': [0.0], 'GSM1687611': [0.0], 'GSM1687612': [0.0], 'GSM1687613': [0.0], 'GSM1687614': [1.0], 'GSM1687615': [0.0], 'GSM1687616': [0.0], 'GSM1687617': [1.0], 'GSM1687618': [0.0], 'GSM1687619': [0.0], 'GSM1687620': [0.0], 'GSM1687621': [0.0], 'GSM1687622': [1.0], 'GSM1687623': [1.0], 'GSM1687624': [0.0], 'GSM1687625': [0.0], 'GSM1687626': [0.0], 'GSM1687627': [0.0], 'GSM1687628': [0.0], 'GSM1687629': [0.0], 'GSM1687630': [0.0], 'GSM1687631': [0.0], 'GSM1687632': [0.0], 'GSM1687633': [0.0], 'GSM1687634': [0.0], 'GSM1687635': [0.0], 'GSM1687636': [0.0], 'GSM1687637': [0.0], 'GSM1687638': [0.0], 'GSM1687639': [0.0], 'GSM1687640': [0.0], 'GSM1687641': [0.0], 'GSM1687642': [0.0], 'GSM1687643': [0.0], 'GSM1687644': [0.0], 'GSM1687645': [0.0], 'GSM1687646': [0.0], 'GSM1687647': [1.0], 'GSM1687648': [0.0], 'GSM1687649': [0.0], 'GSM1687650': [0.0], 'GSM1687651': [0.0], 'GSM1687652': [0.0], 'GSM1687653': [0.0], 'GSM1687654': [0.0], 'GSM1687655': [1.0], 'GSM1687656': [0.0], 'GSM1687657': [0.0], 'GSM1687658': [0.0], 'GSM1687659': [0.0], 'GSM1687660': [0.0], 'GSM1687661': [0.0], 'GSM1687662': [0.0], 'GSM1687663': [0.0], 'GSM1687664': [0.0], 'GSM1687665': [0.0], 'GSM1687666': [0.0], 'GSM1687667': [0.0], 'GSM1687668': [0.0], 'GSM1687669': [0.0], 'GSM1687670': [0.0], 'GSM1687671': [0.0], 'GSM1687672': [0.0], 'GSM1687673': [0.0], 'GSM1687674': [0.0], 'GSM1687675': [0.0], 'GSM1687676': [0.0], 'GSM1687677': [0.0], 'GSM1687678': [0.0], 'GSM1687679': [0.0], 'GSM1687680': [0.0], 'GSM1687681': [0.0], 'GSM1687682': [0.0], 'GSM1687683': [0.0], 'GSM1687684': [0.0], 'GSM1687685': [0.0], 'GSM1687686': [0.0], 'GSM1687687': [0.0], 'GSM1687688': [0.0], 'GSM1687689': [0.0], 'GSM1687690': [0.0], 'GSM1687691': [0.0], 'GSM1687692': [0.0], 'GSM1687693': [0.0], 'GSM1687694': [0.0], 'GSM1687695': [0.0], 'GSM1687696': [0.0], 'GSM1687697': [0.0], 'GSM1687698': [0.0], 'GSM1687699': [0.0], 'GSM1687700': [0.0], 'GSM1687701': [0.0], 'GSM1687702': [0.0], 'GSM1687703': [0.0], 'GSM1687704': [0.0], 'GSM1687705': [0.0], 'GSM1687706': [0.0], 'GSM1687707': [0.0], 'GSM1687708': [0.0], 'GSM1687709': [0.0], 'GSM1687710': [0.0], 'GSM1687711': [0.0], 'GSM1687712': [0.0], 'GSM1687713': [0.0], 'GSM1687714': [0.0], 'GSM1687715': [0.0], 'GSM1687716': [0.0], 'GSM1687717': [0.0], 'GSM1687718': [0.0], 'GSM1687719': [0.0], 'GSM1687720': [0.0], 'GSM1687721': [0.0], 'GSM1687722': [0.0], 'GSM1687723': [0.0], 'GSM1687724': [0.0], 'GSM1687725': [0.0], 'GSM1687726': [0.0], 'GSM1687727': [0.0], 'GSM1687728': [0.0], 'GSM1687729': [0.0], 'GSM1687730': [0.0], 'GSM1687731': [0.0], 'GSM1687732': [0.0], 'GSM1687733': [0.0], 'GSM1687734': [0.0], 'GSM1687735': [0.0], 'GSM1687736': [0.0], 'GSM1687737': [0.0], 'GSM1687738': [0.0], 'GSM1687739': [0.0], 'GSM1687740': [0.0], 'GSM1687741': [0.0], 'GSM1687742': [0.0], 'GSM1687743': [0.0], 'GSM1687744': [0.0], 'GSM1687745': [0.0], 'GSM1687746': [0.0], 'GSM1687747': [0.0], 'GSM1687748': [0.0], 'GSM1687749': [0.0], 'GSM1687750': [0.0], 'GSM1687751': [0.0], 'GSM1687752': [0.0], 'GSM1687753': [0.0], 'GSM1687754': [0.0], 'GSM1687755': [0.0], 'GSM1687756': [0.0], 'GSM1687757': [0.0], 'GSM1687758': [0.0], 'GSM1687759': [0.0], 'GSM1687760': [0.0], 'GSM1687761': [0.0], 'GSM1687762': [0.0], 'GSM1687763': [0.0], 'GSM1687764': [0.0], 'GSM1687765': [0.0], 'GSM1687766': [0.0], 'GSM1687767': [0.0], 'GSM1687768': [0.0], 'GSM1687769': [0.0]}\n", "Clinical data saved to ../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/clinical_data/GSE68950.csv\n" ] } ], "source": [ "# 1. Gene Expression Data Availability\n", "# Since the data has gene expression data (based on the Series title mentioning \"Affymetrix gene expression project\"),\n", "# this dataset likely contains gene expression data.\n", "is_gene_available = True\n", "\n", "# 2. Variable Availability and Data Type Conversion\n", "\n", "# 2.1 Data Availability\n", "# For trait (kidney cancer), we can use disease state information (row 1)\n", "trait_row = 1\n", "\n", "# Looking at sample characteristics, there's no age information\n", "age_row = None\n", "\n", "# No gender information available\n", "gender_row = None\n", "\n", "# 2.2 Data Type Conversion Functions\n", "def convert_trait(value):\n", " \"\"\"\n", " Convert disease state information to binary trait values.\n", " 1 for Kidney Papillary Cell Carcinoma, 0 for other conditions\n", " \"\"\"\n", " if value is None:\n", " return None\n", " \n", " # Extract the value part after the colon\n", " if ':' in value:\n", " value = value.split(':', 1)[1].strip()\n", " \n", " # Based on the disease state values, identify kidney papillary cell carcinoma\n", " # Looking at disease states, we have \"papillary carcinoma\" and \"renal cell carcinoma\" \n", " # and \"papillary transitional cell carcinoma\" that could be related to kidney papillary cell carcinoma\n", " if \"papillary\" in value.lower() and (\"renal\" in value.lower() or \"kidney\" in value.lower() or \"transitional cell carcinoma\" in value.lower()):\n", " return 1\n", " # If just papillary carcinoma and disease location is kidney, that's likely kidney papillary carcinoma\n", " elif \"papillary carcinoma\" in value.lower():\n", " return 1\n", " # Explicitly mark renal cell carcinoma\n", " elif \"renal cell carcinoma\" in value.lower():\n", " return 1\n", " elif \"papillary transitional cell carcinoma\" in value.lower():\n", " return 1\n", " # Other conditions\n", " else:\n", " return 0\n", "\n", "def convert_age(value):\n", " # No age data available, function provided for consistency\n", " return None\n", "\n", "def convert_gender(value):\n", " # No gender data available, function provided for consistency\n", " return None\n", "\n", "# 3. Save Metadata\n", "# Trait data is available since trait_row is not None\n", "is_trait_available = trait_row is not None\n", "\n", "# Validate and save cohort info\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=is_trait_available\n", ")\n", "\n", "# 4. Clinical Feature Extraction\n", "# Since trait_row is not None, we need to extract clinical features\n", "if trait_row is not None:\n", " # Extract clinical features\n", " clinical_features_df = geo_select_clinical_features(\n", " clinical_df=clinical_data, # Assuming clinical_data is the input dataframe\n", " trait=trait,\n", " trait_row=trait_row,\n", " convert_trait=convert_trait,\n", " age_row=age_row,\n", " convert_age=convert_age,\n", " gender_row=gender_row,\n", " convert_gender=convert_gender\n", " )\n", " \n", " # Preview the dataframe\n", " preview_data = preview_df(clinical_features_df)\n", " print(\"Preview of clinical features:\")\n", " print(preview_data)\n", " \n", " # Create directory if it doesn't exist\n", " os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", " \n", " # Save to CSV\n", " clinical_features_df.to_csv(out_clinical_data_file)\n", " print(f\"Clinical data saved to {out_clinical_data_file}\")\n" ] }, { "cell_type": "markdown", "id": "1f515433", "metadata": {}, "source": [ "### Step 3: Gene Data Extraction" ] }, { "cell_type": "code", "execution_count": 4, "id": "dafc62de", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:21:45.605237Z", "iopub.status.busy": "2025-03-25T07:21:45.605125Z", "iopub.status.idle": "2025-03-25T07:21:46.788390Z", "shell.execute_reply": "2025-03-25T07:21:46.787995Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Examining matrix file structure...\n", "Line 0: !Series_title\t\"caArray_golub-00327: Sanger cell line Affymetrix gene expression project\"\n", "Line 1: !Series_geo_accession\t\"GSE68950\"\n", "Line 2: !Series_status\t\"Public on May 16 2015\"\n", "Line 3: !Series_submission_date\t\"May 15 2015\"\n", "Line 4: !Series_last_update_date\t\"Jan 17 2017\"\n", "Line 5: !Series_summary\t\"The microarray gene expression pattern was studied using 798 different cancer cell lines. The cancer cell lines are obtained from different centers. Annotation information were provided in the supplementary file.\"\n", "Line 6: !Series_overall_design\t\"golub-00327\"\n", "Line 7: !Series_overall_design\t\"Assay Type: Gene Expression\"\n", "Line 8: !Series_overall_design\t\"Provider: Affymetrix\"\n", "Line 9: !Series_overall_design\t\"Array Designs: HT_HG-U133A\"\n", "Found table marker at line 74\n", "First few lines after marker:\n", "\"ID_REF\"\t\"GSM1687570\"\t\"GSM1687571\"\t\"GSM1687572\"\t\"GSM1687573\"\t\"GSM1687574\"\t\"GSM1687575\"\t\"GSM1687576\"\t\"GSM1687577\"\t\"GSM1687578\"\t\"GSM1687579\"\t\"GSM1687580\"\t\"GSM1687581\"\t\"GSM1687582\"\t\"GSM1687583\"\t\"GSM1687584\"\t\"GSM1687585\"\t\"GSM1687586\"\t\"GSM1687587\"\t\"GSM1687588\"\t\"GSM1687589\"\t\"GSM1687590\"\t\"GSM1687591\"\t\"GSM1687592\"\t\"GSM1687593\"\t\"GSM1687594\"\t\"GSM1687595\"\t\"GSM1687596\"\t\"GSM1687597\"\t\"GSM1687598\"\t\"GSM1687599\"\t\"GSM1687600\"\t\"GSM1687601\"\t\"GSM1687602\"\t\"GSM1687603\"\t\"GSM1687604\"\t\"GSM1687605\"\t\"GSM1687606\"\t\"GSM1687607\"\t\"GSM1687608\"\t\"GSM1687609\"\t\"GSM1687610\"\t\"GSM1687611\"\t\"GSM1687612\"\t\"GSM1687613\"\t\"GSM1687614\"\t\"GSM1687615\"\t\"GSM1687616\"\t\"GSM1687617\"\t\"GSM1687618\"\t\"GSM1687619\"\t\"GSM1687620\"\t\"GSM1687621\"\t\"GSM1687622\"\t\"GSM1687623\"\t\"GSM1687624\"\t\"GSM1687625\"\t\"GSM1687626\"\t\"GSM1687627\"\t\"GSM1687628\"\t\"GSM1687629\"\t\"GSM1687630\"\t\"GSM1687631\"\t\"GSM1687632\"\t\"GSM1687633\"\t\"GSM1687634\"\t\"GSM1687635\"\t\"GSM1687636\"\t\"GSM1687637\"\t\"GSM1687638\"\t\"GSM1687639\"\t\"GSM1687640\"\t\"GSM1687641\"\t\"GSM1687642\"\t\"GSM1687643\"\t\"GSM1687644\"\t\"GSM1687645\"\t\"GSM1687646\"\t\"GSM1687647\"\t\"GSM1687648\"\t\"GSM1687649\"\t\"GSM1687650\"\t\"GSM1687651\"\t\"GSM1687652\"\t\"GSM1687653\"\t\"GSM1687654\"\t\"GSM1687655\"\t\"GSM1687656\"\t\"GSM1687657\"\t\"GSM1687658\"\t\"GSM1687659\"\t\"GSM1687660\"\t\"GSM1687661\"\t\"GSM1687662\"\t\"GSM1687663\"\t\"GSM1687664\"\t\"GSM1687665\"\t\"GSM1687666\"\t\"GSM1687667\"\t\"GSM1687668\"\t\"GSM1687669\"\t\"GSM1687670\"\t\"GSM1687671\"\t\"GSM1687672\"\t\"GSM1687673\"\t\"GSM1687674\"\t\"GSM1687675\"\t\"GSM1687676\"\t\"GSM1687677\"\t\"GSM1687678\"\t\"GSM1687679\"\t\"GSM1687680\"\t\"GSM1687681\"\t\"GSM1687682\"\t\"GSM1687683\"\t\"GSM1687684\"\t\"GSM1687685\"\t\"GSM1687686\"\t\"GSM1687687\"\t\"GSM1687688\"\t\"GSM1687689\"\t\"GSM1687690\"\t\"GSM1687691\"\t\"GSM1687692\"\t\"GSM1687693\"\t\"GSM1687694\"\t\"GSM1687695\"\t\"GSM1687696\"\t\"GSM1687697\"\t\"GSM1687698\"\t\"GSM1687699\"\t\"GSM1687700\"\t\"GSM1687701\"\t\"GSM1687702\"\t\"GSM1687703\"\t\"GSM1687704\"\t\"GSM1687705\"\t\"GSM1687706\"\t\"GSM1687707\"\t\"GSM1687708\"\t\"GSM1687709\"\t\"GSM1687710\"\t\"GSM1687711\"\t\"GSM1687712\"\t\"GSM1687713\"\t\"GSM1687714\"\t\"GSM1687715\"\t\"GSM1687716\"\t\"GSM1687717\"\t\"GSM1687718\"\t\"GSM1687719\"\t\"GSM1687720\"\t\"GSM1687721\"\t\"GSM1687722\"\t\"GSM1687723\"\t\"GSM1687724\"\t\"GSM1687725\"\t\"GSM1687726\"\t\"GSM1687727\"\t\"GSM1687728\"\t\"GSM1687729\"\t\"GSM1687730\"\t\"GSM1687731\"\t\"GSM1687732\"\t\"GSM1687733\"\t\"GSM1687734\"\t\"GSM1687735\"\t\"GSM1687736\"\t\"GSM1687737\"\t\"GSM1687738\"\t\"GSM1687739\"\t\"GSM1687740\"\t\"GSM1687741\"\t\"GSM1687742\"\t\"GSM1687743\"\t\"GSM1687744\"\t\"GSM1687745\"\t\"GSM1687746\"\t\"GSM1687747\"\t\"GSM1687748\"\t\"GSM1687749\"\t\"GSM1687750\"\t\"GSM1687751\"\t\"GSM1687752\"\t\"GSM1687753\"\t\"GSM1687754\"\t\"GSM1687755\"\t\"GSM1687756\"\t\"GSM1687757\"\t\"GSM1687758\"\t\"GSM1687759\"\t\"GSM1687760\"\t\"GSM1687761\"\t\"GSM1687762\"\t\"GSM1687763\"\t\"GSM1687764\"\t\"GSM1687765\"\t\"GSM1687766\"\t\"GSM1687767\"\t\"GSM1687768\"\t\"GSM1687769\"\t\"GSM1687770\"\t\"GSM1687771\"\t\"GSM1687772\"\t\"GSM1687773\"\t\"GSM1687774\"\t\"GSM1687775\"\t\"GSM1687776\"\t\"GSM1687777\"\t\"GSM1687778\"\t\"GSM1687779\"\t\"GSM1687780\"\t\"GSM1687781\"\t\"GSM1687782\"\t\"GSM1687783\"\t\"GSM1687784\"\t\"GSM1687785\"\t\"GSM1687786\"\t\"GSM1687787\"\t\"GSM1687788\"\t\"GSM1687789\"\t\"GSM1687790\"\t\"GSM1687791\"\t\"GSM1687792\"\t\"GSM1687793\"\t\"GSM1687794\"\t\"GSM1687795\"\t\"GSM1687796\"\t\"GSM1687797\"\t\"GSM1687798\"\t\"GSM1687799\"\t\"GSM1687800\"\t\"GSM1687801\"\t\"GSM1687802\"\t\"GSM1687803\"\t\"GSM1687804\"\t\"GSM1687805\"\t\"GSM1687806\"\t\"GSM1687807\"\t\"GSM1687808\"\t\"GSM1687809\"\t\"GSM1687810\"\t\"GSM1687811\"\t\"GSM1687812\"\t\"GSM1687813\"\t\"GSM1687814\"\t\"GSM1687815\"\t\"GSM1687816\"\t\"GSM1687817\"\t\"GSM1687818\"\t\"GSM1687819\"\t\"GSM1687820\"\t\"GSM1687821\"\t\"GSM1687822\"\t\"GSM1687823\"\t\"GSM1687824\"\t\"GSM1687825\"\t\"GSM1687826\"\t\"GSM1687827\"\t\"GSM1687828\"\t\"GSM1687829\"\t\"GSM1687830\"\t\"GSM1687831\"\t\"GSM1687832\"\t\"GSM1687833\"\t\"GSM1687834\"\t\"GSM1687835\"\t\"GSM1687836\"\t\"GSM1687837\"\t\"GSM1687838\"\t\"GSM1687839\"\t\"GSM1687840\"\t\"GSM1687841\"\t\"GSM1687842\"\t\"GSM1687843\"\t\"GSM1687844\"\t\"GSM1687845\"\t\"GSM1687846\"\t\"GSM1687847\"\t\"GSM1687848\"\t\"GSM1687849\"\t\"GSM1687850\"\t\"GSM1687851\"\t\"GSM1687852\"\t\"GSM1687853\"\t\"GSM1687854\"\t\"GSM1687855\"\t\"GSM1687856\"\t\"GSM1687857\"\t\"GSM1687858\"\t\"GSM1687859\"\t\"GSM1687860\"\t\"GSM1687861\"\t\"GSM1687862\"\t\"GSM1687863\"\t\"GSM1687864\"\t\"GSM1687865\"\t\"GSM1687866\"\t\"GSM1687867\"\t\"GSM1687868\"\t\"GSM1687869\"\t\"GSM1687870\"\t\"GSM1687871\"\t\"GSM1687872\"\t\"GSM1687873\"\t\"GSM1687874\"\t\"GSM1687875\"\t\"GSM1687876\"\t\"GSM1687877\"\t\"GSM1687878\"\t\"GSM1687879\"\t\"GSM1687880\"\t\"GSM1687881\"\t\"GSM1687882\"\t\"GSM1687883\"\t\"GSM1687884\"\t\"GSM1687885\"\t\"GSM1687886\"\t\"GSM1687887\"\t\"GSM1687888\"\t\"GSM1687889\"\t\"GSM1687890\"\t\"GSM1687891\"\t\"GSM1687892\"\t\"GSM1687893\"\t\"GSM1687894\"\t\"GSM1687895\"\t\"GSM1687896\"\t\"GSM1687897\"\t\"GSM1687898\"\t\"GSM1687899\"\t\"GSM1687900\"\t\"GSM1687901\"\t\"GSM1687902\"\t\"GSM1687903\"\t\"GSM1687904\"\t\"GSM1687905\"\t\"GSM1687906\"\t\"GSM1687907\"\t\"GSM1687908\"\t\"GSM1687909\"\t\"GSM1687910\"\t\"GSM1687911\"\t\"GSM1687912\"\t\"GSM1687913\"\t\"GSM1687914\"\t\"GSM1687915\"\t\"GSM1687916\"\t\"GSM1687917\"\t\"GSM1687918\"\t\"GSM1687919\"\t\"GSM1687920\"\t\"GSM1687921\"\t\"GSM1687922\"\t\"GSM1687923\"\t\"GSM1687924\"\t\"GSM1687925\"\t\"GSM1687926\"\t\"GSM1687927\"\t\"GSM1687928\"\t\"GSM1687929\"\t\"GSM1687930\"\t\"GSM1687931\"\t\"GSM1687932\"\t\"GSM1687933\"\t\"GSM1687934\"\t\"GSM1687935\"\t\"GSM1687936\"\t\"GSM1687937\"\t\"GSM1687938\"\t\"GSM1687939\"\t\"GSM1687940\"\t\"GSM1687941\"\t\"GSM1687942\"\t\"GSM1687943\"\t\"GSM1687944\"\t\"GSM1687945\"\t\"GSM1687946\"\t\"GSM1687947\"\t\"GSM1687948\"\t\"GSM1687949\"\t\"GSM1687950\"\t\"GSM1687951\"\t\"GSM1687952\"\t\"GSM1687953\"\t\"GSM1687954\"\t\"GSM1687955\"\t\"GSM1687956\"\t\"GSM1687957\"\t\"GSM1687958\"\t\"GSM1687959\"\t\"GSM1687960\"\t\"GSM1687961\"\t\"GSM1687962\"\t\"GSM1687963\"\t\"GSM1687964\"\t\"GSM1687965\"\t\"GSM1687966\"\t\"GSM1687967\"\t\"GSM1687968\"\t\"GSM1687969\"\t\"GSM1687970\"\t\"GSM1687971\"\t\"GSM1687972\"\t\"GSM1687973\"\t\"GSM1687974\"\t\"GSM1687975\"\t\"GSM1687976\"\t\"GSM1687977\"\t\"GSM1687978\"\t\"GSM1687979\"\t\"GSM1687980\"\t\"GSM1687981\"\t\"GSM1687982\"\t\"GSM1687983\"\t\"GSM1687984\"\t\"GSM1687985\"\t\"GSM1687986\"\t\"GSM1687987\"\t\"GSM1687988\"\t\"GSM1687989\"\t\"GSM1687990\"\t\"GSM1687991\"\t\"GSM1687992\"\t\"GSM1687993\"\t\"GSM1687994\"\t\"GSM1687995\"\t\"GSM1687996\"\t\"GSM1687997\"\t\"GSM1687998\"\t\"GSM1687999\"\t\"GSM1688000\"\t\"GSM1688001\"\t\"GSM1688002\"\t\"GSM1688003\"\t\"GSM1688004\"\t\"GSM1688005\"\t\"GSM1688006\"\t\"GSM1688007\"\t\"GSM1688008\"\t\"GSM1688009\"\t\"GSM1688010\"\t\"GSM1688011\"\t\"GSM1688012\"\t\"GSM1688013\"\t\"GSM1688014\"\t\"GSM1688015\"\t\"GSM1688016\"\t\"GSM1688017\"\t\"GSM1688018\"\t\"GSM1688019\"\t\"GSM1688020\"\t\"GSM1688021\"\t\"GSM1688022\"\t\"GSM1688023\"\t\"GSM1688024\"\t\"GSM1688025\"\t\"GSM1688026\"\t\"GSM1688027\"\t\"GSM1688028\"\t\"GSM1688029\"\t\"GSM1688030\"\t\"GSM1688031\"\t\"GSM1688032\"\t\"GSM1688033\"\t\"GSM1688034\"\t\"GSM1688035\"\t\"GSM1688036\"\t\"GSM1688037\"\t\"GSM1688038\"\t\"GSM1688039\"\t\"GSM1688040\"\t\"GSM1688041\"\t\"GSM1688042\"\t\"GSM1688043\"\t\"GSM1688044\"\t\"GSM1688045\"\t\"GSM1688046\"\t\"GSM1688047\"\t\"GSM1688048\"\t\"GSM1688049\"\t\"GSM1688050\"\t\"GSM1688051\"\t\"GSM1688052\"\t\"GSM1688053\"\t\"GSM1688054\"\t\"GSM1688055\"\t\"GSM1688056\"\t\"GSM1688057\"\t\"GSM1688058\"\t\"GSM1688059\"\t\"GSM1688060\"\t\"GSM1688061\"\t\"GSM1688062\"\t\"GSM1688063\"\t\"GSM1688064\"\t\"GSM1688065\"\t\"GSM1688066\"\t\"GSM1688067\"\t\"GSM1688068\"\t\"GSM1688069\"\t\"GSM1688070\"\t\"GSM1688071\"\t\"GSM1688072\"\t\"GSM1688073\"\t\"GSM1688074\"\t\"GSM1688075\"\t\"GSM1688076\"\t\"GSM1688077\"\t\"GSM1688078\"\t\"GSM1688079\"\t\"GSM1688080\"\t\"GSM1688081\"\t\"GSM1688082\"\t\"GSM1688083\"\t\"GSM1688084\"\t\"GSM1688085\"\t\"GSM1688086\"\t\"GSM1688087\"\t\"GSM1688088\"\t\"GSM1688089\"\t\"GSM1688090\"\t\"GSM1688091\"\t\"GSM1688092\"\t\"GSM1688093\"\t\"GSM1688094\"\t\"GSM1688095\"\t\"GSM1688096\"\t\"GSM1688097\"\t\"GSM1688098\"\t\"GSM1688099\"\t\"GSM1688100\"\t\"GSM1688101\"\t\"GSM1688102\"\t\"GSM1688103\"\t\"GSM1688104\"\t\"GSM1688105\"\t\"GSM1688106\"\t\"GSM1688107\"\t\"GSM1688108\"\t\"GSM1688109\"\t\"GSM1688110\"\t\"GSM1688111\"\t\"GSM1688112\"\t\"GSM1688113\"\t\"GSM1688114\"\t\"GSM1688115\"\t\"GSM1688116\"\t\"GSM1688117\"\t\"GSM1688118\"\t\"GSM1688119\"\t\"GSM1688120\"\t\"GSM1688121\"\t\"GSM1688122\"\t\"GSM1688123\"\t\"GSM1688124\"\t\"GSM1688125\"\t\"GSM1688126\"\t\"GSM1688127\"\t\"GSM1688128\"\t\"GSM1688129\"\t\"GSM1688130\"\t\"GSM1688131\"\t\"GSM1688132\"\t\"GSM1688133\"\t\"GSM1688134\"\t\"GSM1688135\"\t\"GSM1688136\"\t\"GSM1688137\"\t\"GSM1688138\"\t\"GSM1688139\"\t\"GSM1688140\"\t\"GSM1688141\"\t\"GSM1688142\"\t\"GSM1688143\"\t\"GSM1688144\"\t\"GSM1688145\"\t\"GSM1688146\"\t\"GSM1688147\"\t\"GSM1688148\"\t\"GSM1688149\"\t\"GSM1688150\"\t\"GSM1688151\"\t\"GSM1688152\"\t\"GSM1688153\"\t\"GSM1688154\"\t\"GSM1688155\"\t\"GSM1688156\"\t\"GSM1688157\"\t\"GSM1688158\"\t\"GSM1688159\"\t\"GSM1688160\"\t\"GSM1688161\"\t\"GSM1688162\"\t\"GSM1688163\"\t\"GSM1688164\"\t\"GSM1688165\"\t\"GSM1688166\"\t\"GSM1688167\"\t\"GSM1688168\"\t\"GSM1688169\"\t\"GSM1688170\"\t\"GSM1688171\"\t\"GSM1688172\"\t\"GSM1688173\"\t\"GSM1688174\"\t\"GSM1688175\"\t\"GSM1688176\"\t\"GSM1688177\"\t\"GSM1688178\"\t\"GSM1688179\"\t\"GSM1688180\"\t\"GSM1688181\"\t\"GSM1688182\"\t\"GSM1688183\"\t\"GSM1688184\"\t\"GSM1688185\"\t\"GSM1688186\"\t\"GSM1688187\"\t\"GSM1688188\"\t\"GSM1688189\"\t\"GSM1688190\"\t\"GSM1688191\"\t\"GSM1688192\"\t\"GSM1688193\"\t\"GSM1688194\"\t\"GSM1688195\"\t\"GSM1688196\"\t\"GSM1688197\"\t\"GSM1688198\"\t\"GSM1688199\"\t\"GSM1688200\"\t\"GSM1688201\"\t\"GSM1688202\"\t\"GSM1688203\"\t\"GSM1688204\"\t\"GSM1688205\"\t\"GSM1688206\"\t\"GSM1688207\"\t\"GSM1688208\"\t\"GSM1688209\"\t\"GSM1688210\"\t\"GSM1688211\"\t\"GSM1688212\"\t\"GSM1688213\"\t\"GSM1688214\"\t\"GSM1688215\"\t\"GSM1688216\"\t\"GSM1688217\"\t\"GSM1688218\"\t\"GSM1688219\"\t\"GSM1688220\"\t\"GSM1688221\"\t\"GSM1688222\"\t\"GSM1688223\"\t\"GSM1688224\"\t\"GSM1688225\"\t\"GSM1688226\"\t\"GSM1688227\"\t\"GSM1688228\"\t\"GSM1688229\"\t\"GSM1688230\"\t\"GSM1688231\"\t\"GSM1688232\"\t\"GSM1688233\"\t\"GSM1688234\"\t\"GSM1688235\"\t\"GSM1688236\"\t\"GSM1688237\"\t\"GSM1688238\"\t\"GSM1688239\"\t\"GSM1688240\"\t\"GSM1688241\"\t\"GSM1688242\"\t\"GSM1688243\"\t\"GSM1688244\"\t\"GSM1688245\"\t\"GSM1688246\"\t\"GSM1688247\"\t\"GSM1688248\"\t\"GSM1688249\"\t\"GSM1688250\"\t\"GSM1688251\"\t\"GSM1688252\"\t\"GSM1688253\"\t\"GSM1688254\"\t\"GSM1688255\"\t\"GSM1688256\"\t\"GSM1688257\"\t\"GSM1688258\"\t\"GSM1688259\"\t\"GSM1688260\"\t\"GSM1688261\"\t\"GSM1688262\"\t\"GSM1688263\"\t\"GSM1688264\"\t\"GSM1688265\"\t\"GSM1688266\"\t\"GSM1688267\"\t\"GSM1688268\"\t\"GSM1688269\"\t\"GSM1688270\"\t\"GSM1688271\"\t\"GSM1688272\"\t\"GSM1688273\"\t\"GSM1688274\"\t\"GSM1688275\"\t\"GSM1688276\"\t\"GSM1688277\"\t\"GSM1688278\"\t\"GSM1688279\"\t\"GSM1688280\"\t\"GSM1688281\"\t\"GSM1688282\"\t\"GSM1688283\"\t\"GSM1688284\"\t\"GSM1688285\"\t\"GSM1688286\"\t\"GSM1688287\"\t\"GSM1688288\"\t\"GSM1688289\"\t\"GSM1688290\"\t\"GSM1688291\"\t\"GSM1688292\"\t\"GSM1688293\"\t\"GSM1688294\"\t\"GSM1688295\"\t\"GSM1688296\"\t\"GSM1688297\"\t\"GSM1688298\"\t\"GSM1688299\"\t\"GSM1688300\"\t\"GSM1688301\"\t\"GSM1688302\"\t\"GSM1688303\"\t\"GSM1688304\"\t\"GSM1688305\"\t\"GSM1688306\"\t\"GSM1688307\"\t\"GSM1688308\"\t\"GSM1688309\"\t\"GSM1688310\"\t\"GSM1688311\"\t\"GSM1688312\"\t\"GSM1688313\"\t\"GSM1688314\"\t\"GSM1688315\"\t\"GSM1688316\"\t\"GSM1688317\"\t\"GSM1688318\"\t\"GSM1688319\"\t\"GSM1688320\"\t\"GSM1688321\"\t\"GSM1688322\"\t\"GSM1688323\"\t\"GSM1688324\"\t\"GSM1688325\"\t\"GSM1688326\"\t\"GSM1688327\"\t\"GSM1688328\"\t\"GSM1688329\"\t\"GSM1688330\"\t\"GSM1688331\"\t\"GSM1688332\"\t\"GSM1688333\"\t\"GSM1688334\"\t\"GSM1688335\"\t\"GSM1688336\"\t\"GSM1688337\"\t\"GSM1688338\"\t\"GSM1688339\"\t\"GSM1688340\"\t\"GSM1688341\"\t\"GSM1688342\"\t\"GSM1688343\"\t\"GSM1688344\"\t\"GSM1688345\"\t\"GSM1688346\"\t\"GSM1688347\"\t\"GSM1688348\"\t\"GSM1688349\"\t\"GSM1688350\"\t\"GSM1688351\"\t\"GSM1688352\"\t\"GSM1688353\"\t\"GSM1688354\"\t\"GSM1688355\"\t\"GSM1688356\"\t\"GSM1688357\"\t\"GSM1688358\"\t\"GSM1688359\"\t\"GSM1688360\"\t\"GSM1688361\"\t\"GSM1688362\"\t\"GSM1688363\"\t\"GSM1688364\"\t\"GSM1688365\"\t\"GSM1688366\"\t\"GSM1688367\"\n", "\"1007_s_at\"\t282.4\t109.1\t332.4\t519.1\t1874.4\t358.8\t3092.0\t858.2\t102.6\t60.8\t735.3\t364.9\t719.9\t582.8\t165.4\t498.7\t2722.0\t63.5\t233.7\t16.4\t223.4\t1122.6\t403.1\t68.7\t234.4\t771.3\t1809.2\t446.6\t875.4\t121.7\t163.8\t977.0\t338.9\t189.5\t194.7\t31.5\t952.4\t55.4\t1715.6\t138.9\t899.7\t68.8\t2325.7\t352.3\t518.2\t67.0\t8.6\t633.1\t14.8\t413.0\t365.9\t1301.6\t3450.0\t977.4\t540.0\t818.7\t3731.6\t62.4\t24.7\t108.2\t2531.6\t303.1\t2138.3\t1786.8\t83.4\t68.9\t2621.2\t974.8\t250.4\t174.5\t70.2\t460.6\t165.8\t566.5\t99.0\t326.4\t3558.3\t291.8\t369.7\t1049.4\t839.1\t2137.7\t2563.6\t1208.1\t1304.6\t978.5\t934.6\t108.4\t89.5\t1580.1\t526.4\t233.0\t3077.3\t628.6\t1804.4\t1376.0\t1833.4\t996.3\t878.7\t1056.5\t537.6\t730.0\t2780.8\t10.8\t209.3\t3302.3\t287.5\t1049.3\t1465.2\t81.2\t478.2\t277.0\t1.4\t50.5\t660.6\t170.6\t427.7\t2218.8\t130.7\t1986.6\t121.9\t35.7\t234.8\t593.1\t513.2\t320.9\t178.4\t333.7\t1041.6\t586.5\t104.2\t289.5\t320.7\t140.0\t279.3\t311.8\t579.0\t2.0\t69.1\t86.0\t26.0\t67.1\t972.1\t789.1\t1633.5\t205.2\t378.7\t607.4\t68.6\t128.7\t148.4\t271.7\t156.6\t135.4\t1953.0\t432.1\t1578.8\t64.4\t113.1\t360.8\t54.4\t26.8\t23.2\t1751.3\t109.4\t3936.3\t75.7\t1363.1\t88.5\t207.6\t68.2\t441.2\t382.1\t1057.9\t1490.9\t111.4\t2037.0\t1145.5\t2374.5\t302.1\t486.7\t125.4\t762.1\t237.2\t53.4\t210.2\t57.3\t2274.6\t1604.0\t1243.6\t440.5\t1515.2\t1645.3\t35.4\t479.3\t338.2\t13.5\t1.6\t7.1\t791.9\t152.5\t263.5\t215.5\t184.3\t229.3\t119.0\t1805.7\t1662.5\t748.3\t200.0\t689.0\t184.5\t449.7\t165.8\t297.5\t366.1\t119.1\t251.9\t113.7\t805.5\t966.8\t518.1\t167.2\t730.9\t1192.2\t38.4\t274.2\t1936.0\t1340.1\t365.5\t19.6\t260.5\t250.3\t509.0\t180.3\t137.6\t1169.4\t1082.6\t52.8\t463.3\t343.2\t24.6\t396.7\t99.6\t215.7\t3458.2\t546.3\t391.1\t898.6\t4425.9\t1852.8\t2788.4\t2497.2\t4323.3\t1789.2\t694.6\t2469.0\t2381.1\t615.1\t797.8\t487.2\t311.8\t680.9\t252.4\t108.4\t403.8\t19.1\t24.9\t326.2\t174.8\t71.5\t40.5\t6.6\t1444.7\t563.4\t1509.9\t1365.4\t291.5\t131.0\t741.0\t1437.7\t119.8\t4280.1\t4993.6\t1228.9\t574.5\t135.4\t1027.6\t761.2\t272.7\t2230.1\t299.1\t521.3\t1178.3\t358.8\t946.9\t1191.9\t314.0\t376.7\t153.3\t302.2\t85.7\t32.3\t878.7\t1504.1\t431.8\t283.9\t346.6\t171.7\t86.9\t363.4\t256.0\t455.0\t810.7\t138.2\t843.3\t623.9\t272.7\t649.5\t419.0\t477.5\t85.2\t209.0\t168.2\t198.5\t82.4\t279.2\t112.2\t53.3\t23.4\t103.8\t43.5\t1539.5\t60.1\t28.6\t427.1\t1590.7\t491.3\t436.1\t162.2\t114.4\t216.3\t61.3\t251.9\t107.2\t953.2\t6832.6\t627.6\t12.1\t811.0\t899.7\t130.8\t113.9\t207.9\t215.4\t390.2\t1362.8\t1063.5\t62.3\t1269.9\t2992.0\t729.6\t1980.3\t947.1\t400.0\t910.1\t1466.0\t1270.4\t1391.1\t16.2\t125.1\t41.0\t32.8\t238.9\t161.1\t191.2\t1023.4\t327.8\t634.9\t546.6\t681.2\t228.6\t1004.0\t362.8\t305.3\t3816.8\t94.4\t712.1\t960.6\t127.9\t1738.8\t659.5\t28.6\t1217.7\t303.6\t65.5\t1377.6\t1156.9\t758.1\t2031.6\t1865.9\t421.2\t237.9\t299.3\t1654.3\t359.0\t473.4\t587.1\t152.6\t191.8\t94.0\t579.1\t284.9\t1786.7\t494.5\t968.9\t362.2\t1343.8\t1050.3\t131.1\t2234.3\t4208.6\t899.9\t404.6\t86.5\t662.1\t208.9\t104.9\t92.5\t2022.1\t973.1\t296.7\t1441.1\t332.7\t112.7\t103.8\t162.4\t115.7\t126.5\t147.2\t99.6\t504.9\t90.1\t1109.9\t1625.3\t2015.8\t1115.5\t715.3\t6.3\t225.4\t101.4\t265.3\t552.9\t39.1\t46.4\t67.9\t27.5\t673.7\t2181.8\t323.7\t275.1\t104.6\t1085.9\t584.2\t332.2\t193.2\t76.1\t353.0\t298.6\t239.7\t168.8\t770.1\t85.0\t107.2\t152.6\t50.2\t271.1\t32.9\t265.3\t136.2\t99.5\t941.4\t234.6\t256.4\t271.4\t476.1\t133.2\t308.2\t454.3\t481.0\t305.6\t266.4\t788.3\t866.4\t241.2\t1569.5\t1036.0\t655.1\t693.0\t491.9\t536.4\t280.2\t388.0\t132.8\t1064.0\t91.4\t1713.4\t224.0\t541.5\t790.8\t222.8\t476.6\t469.6\t611.4\t79.6\t375.2\t219.6\t684.7\t574.8\t513.9\t418.5\t86.0\t86.1\t430.9\t731.8\t326.8\t211.6\t558.1\t508.2\t764.6\t374.0\t593.2\t214.3\t520.1\t320.2\t368.5\t312.9\t859.4\t1100.2\t753.8\t410.5\t667.1\t121.4\t67.6\t512.3\t1632.9\t590.3\t441.5\t930.5\t123.7\t1002.1\t153.8\t115.0\t1634.3\t361.0\t287.8\t100.8\t157.9\t38.2\t300.1\t1194.3\t503.6\t255.1\t172.4\t523.9\t507.0\t247.7\t780.4\t1130.6\t794.9\t208.8\t135.6\t80.9\t350.2\t724.1\t17.8\t314.7\t1589.2\t358.0\t99.2\t91.4\t22.8\t3067.3\t371.0\t323.4\t41.3\t29.2\t91.8\t216.9\t2070.0\t206.5\t465.8\t522.6\t1158.8\t31.4\t1302.3\t697.8\t838.1\t1947.9\t4572.3\t30.5\t336.6\t473.9\t263.1\t256.2\t531.1\t438.3\t217.2\t128.6\t16.2\t50.3\t190.1\t780.0\t641.4\t665.4\t896.7\t1540.1\t397.8\t259.6\t750.2\t147.2\t102.4\t503.1\t285.2\t49.0\t75.7\t99.0\t731.3\t920.1\t576.3\t303.1\t79.5\t205.2\t354.9\t158.6\t605.9\t181.7\t171.7\t308.5\t43.5\t1371.5\t325.2\t168.9\t775.8\t31.4\t123.9\t27.1\t121.6\t237.5\t26.3\t965.0\t991.1\t1231.6\t153.9\t153.0\t357.7\t816.0\t324.1\t217.9\t795.2\t1634.0\t141.0\t706.2\t2840.9\t37.2\t316.3\t823.5\t723.9\t259.9\t108.3\t901.4\t92.0\t322.1\t289.1\t335.6\t449.5\t827.4\t964.3\t702.7\t992.3\t382.4\t111.3\t19.9\t236.9\t388.2\t19.6\t113.6\t103.4\t649.3\t111.8\t46.8\t75.5\t494.3\t35.3\t14.2\t417.2\t139.1\t171.4\t312.4\t148.2\t157.6\t530.4\t150.8\t556.6\t571.4\t352.0\t1312.5\t648.5\t2009.7\t3133.4\t1148.0\t1178.3\t4.3\t88.2\t69.7\t24.9\t95.7\t91.8\t521.6\t1232.2\t193.5\t3440.4\t1165.3\t181.6\t631.5\t1519.0\t3703.7\t649.1\t963.5\t213.2\t478.3\t380.4\t1699.9\t1591.5\t389.7\t377.4\t1273.4\t2182.3\t212.5\t540.2\t437.5\t590.7\t837.5\t629.0\t77.8\t25.1\t362.5\t1659.5\t650.7\t835.7\t1741.8\t307.1\t133.4\t2016.7\t3341.2\t155.7\t1154.9\t3060.8\t384.3\t1037.5\t601.8\t1086.5\t1361.3\t188.0\t78.5\t8.2\t264.1\t236.5\t1108.2\t387.8\t6.3\t88.5\t391.8\t169.4\t364.7\t43.4\t2.9\t731.8\t49.6\t170.5\t176.0\t47.0\t912.0\t664.0\t263.8\t323.9\t1389.7\t645.5\t287.3\t433.0\t124.4\t777.6\t55.8\t13.4\t1777.6\t125.8\t226.5\t1193.4\n", "\"1053_at\"\t234.6\t225.3\t203.9\t155.9\t135.9\t126.3\t501.1\t128.3\t105.1\t126.6\t93.1\t96.2\t80.7\t153.8\t49.1\t117.2\t216.9\t104.4\t36.3\t54.8\t85.4\t78.0\t85.0\t88.7\t69.2\t268.8\t211.8\t65.4\t113.5\t76.3\t96.3\t105.3\t79.2\t123.1\t52.3\t95.4\t90.5\t130.9\t258.3\t226.7\t117.9\t125.4\t142.0\t95.4\t156.2\t132.7\t98.3\t59.7\t43.8\t44.4\t40.0\t69.3\t479.7\t80.5\t103.3\t199.7\t205.2\t218.6\t168.9\t98.5\t481.3\t217.7\t311.9\t119.3\t25.9\t231.2\t210.3\t116.1\t323.0\t81.4\t34.4\t90.7\t35.3\t96.5\t192.1\t57.3\t352.3\t38.0\t118.0\t37.7\t307.0\t121.2\t66.9\t50.8\t108.8\t270.2\t100.3\t31.9\t49.9\t128.6\t68.3\t86.4\t66.2\t131.3\t139.1\t91.7\t132.0\t46.9\t176.2\t324.2\t130.9\t168.0\t432.1\t34.6\t133.4\t98.8\t145.8\t162.0\t57.1\t50.0\t82.0\t248.1\t174.2\t125.6\t39.4\t103.8\t274.9\t109.6\t69.7\t137.1\t144.7\t40.6\t275.0\t563.3\t76.8\t54.6\t58.6\t229.9\t92.7\t94.8\t91.1\t204.8\t77.5\t121.6\t382.0\t302.5\t288.7\t68.6\t290.4\t445.6\t92.9\t46.4\t151.8\t177.3\t381.0\t139.7\t285.7\t165.5\t92.4\t222.3\t279.6\t33.6\t383.1\t70.7\t167.1\t427.7\t279.2\t156.1\t440.4\t406.0\t27.9\t27.9\t106.2\t451.3\t186.5\t178.6\t62.2\t34.4\t75.1\t124.3\t70.0\t44.6\t359.6\t145.3\t672.6\t269.7\t72.1\t166.8\t265.0\t207.8\t577.9\t89.3\t103.8\t121.7\t201.0\t36.4\t92.2\t469.8\t107.4\t44.3\t80.1\t169.8\t184.7\t24.0\t46.1\t70.4\t263.3\t33.0\t66.8\t162.6\t260.5\t494.9\t120.8\t366.9\t167.5\t101.6\t272.5\t213.2\t469.6\t157.1\t83.4\t471.8\t137.5\t121.9\t180.2\t503.9\t100.7\t121.1\t31.2\t160.4\t56.5\t421.1\t59.7\t125.5\t132.4\t172.0\t132.7\t176.0\t201.3\t103.3\t105.2\t114.4\t122.2\t292.7\t294.8\t147.6\t51.7\t94.7\t36.2\t138.9\t117.7\t331.0\t221.0\t89.7\t250.1\t185.5\t129.8\t327.9\t144.0\t118.1\t128.1\t284.5\t197.7\t219.4\t19.0\t85.2\t325.1\t319.2\t182.5\t495.5\t97.1\t50.0\t273.3\t88.5\t83.1\t157.5\t101.5\t40.2\t384.8\t145.6\t46.6\t135.8\t70.3\t131.6\t104.4\t130.0\t216.5\t71.7\t88.6\t101.9\t129.8\t22.8\t146.9\t111.8\t49.0\t260.3\t245.4\t103.2\t95.8\t40.2\t176.3\t131.8\t34.9\t108.0\t71.5\t41.1\t155.4\t59.5\t92.5\t113.4\t152.5\t24.2\t182.7\t84.5\t105.1\t344.2\t141.5\t154.8\t90.7\t234.0\t338.8\t58.5\t67.7\t63.2\t197.3\t503.2\t243.7\t168.5\t330.7\t135.2\t204.5\t158.9\t252.0\t267.6\t76.0\t18.3\t88.6\t336.8\t92.1\t43.1\t368.1\t157.6\t130.5\t154.2\t43.3\t42.8\t153.1\t118.0\t44.9\t34.2\t319.4\t436.5\t506.2\t410.0\t810.7\t156.8\t670.6\t158.6\t147.2\t69.7\t300.9\t166.0\t85.3\t187.0\t360.8\t165.7\t313.8\t95.3\t382.9\t157.6\t515.1\t124.6\t377.1\t411.6\t117.0\t281.4\t243.4\t146.7\t384.2\t141.1\t128.5\t422.2\t36.4\t276.4\t168.1\t110.7\t183.1\t37.6\t154.1\t312.9\t281.1\t209.8\t189.1\t228.7\t157.2\t217.4\t160.0\t239.2\t173.8\t126.4\t135.0\t166.0\t97.2\t162.6\t76.7\t131.1\t121.1\t103.7\t53.3\t158.5\t186.2\t130.8\t392.2\t231.4\t141.5\t49.8\t176.9\t210.5\t42.4\t123.3\t121.5\t54.5\t242.7\t237.2\t82.7\t376.3\t66.0\t140.4\t130.3\t60.3\t58.0\t234.6\t68.6\t33.3\t85.2\t247.9\t258.8\t58.0\t43.2\t369.7\t156.5\t171.6\t309.9\t66.0\t40.5\t158.2\t410.0\t67.5\t93.9\t528.0\t49.8\t333.3\t232.9\t230.8\t79.4\t211.2\t166.8\t85.8\t199.3\t258.7\t164.1\t88.1\t602.7\t315.7\t172.0\t32.3\t396.9\t187.4\t299.8\t167.1\t203.9\t355.9\t119.7\t31.1\t462.3\t121.3\t25.1\t190.5\t254.3\t25.2\t43.9\t136.9\t134.5\t82.6\t47.7\t176.8\t649.0\t772.1\t263.0\t34.1\t78.1\t256.0\t314.1\t190.3\t189.2\t197.8\t184.7\t196.2\t272.5\t462.2\t101.1\t47.0\t84.4\t91.0\t184.2\t143.4\t82.4\t33.2\t254.2\t123.9\t86.7\t68.4\t133.2\t123.4\t236.7\t108.8\t198.5\t245.9\t405.3\t179.0\t272.2\t236.6\t149.8\t202.3\t16.5\t664.0\t252.8\t146.6\t90.3\t219.1\t195.4\t43.5\t197.0\t100.7\t195.5\t122.3\t388.5\t71.7\t191.5\t123.7\t289.1\t316.0\t129.7\t57.4\t56.3\t303.5\t127.8\t145.1\t269.1\t238.6\t105.3\t398.1\t59.7\t31.7\t117.5\t102.6\t87.1\t279.4\t207.0\t140.1\t54.2\t137.2\t20.3\t75.5\t201.4\t85.8\t31.7\t184.8\t65.1\t151.9\t147.6\t86.1\t104.9\t49.2\t35.1\t149.1\t157.4\t158.0\t246.9\t66.3\t448.8\t45.0\t167.3\t390.7\t136.5\t113.0\t147.7\t338.5\t207.0\t161.8\t71.0\t210.1\t138.8\t130.4\t176.6\t936.3\t278.9\t176.5\t311.4\t298.9\t34.4\t113.4\t82.4\t614.0\t218.2\t306.9\t89.1\t124.4\t96.3\t206.9\t88.9\t244.1\t56.3\t31.2\t22.7\t19.7\t39.5\t101.5\t121.3\t464.8\t550.2\t77.8\t251.1\t47.8\t83.6\t295.8\t172.2\t91.2\t78.5\t102.9\t111.8\t194.4\t107.7\t77.7\t96.6\t70.8\t98.8\t155.0\t121.5\t173.4\t110.4\t48.0\t228.6\t52.1\t155.8\t363.5\t111.6\t234.1\t163.5\t109.9\t147.0\t31.9\t103.9\t67.9\t91.9\t106.5\t105.9\t447.2\t112.2\t333.8\t91.1\t122.9\t104.8\t56.0\t51.8\t435.0\t311.2\t203.9\t86.0\t102.7\t57.2\t119.3\t146.1\t123.7\t99.1\t70.1\t200.2\t194.7\t83.9\t100.7\t60.6\t92.7\t102.8\t308.3\t67.3\t46.9\t136.2\t201.2\t211.7\t230.1\t312.1\t134.3\t436.7\t37.1\t66.4\t22.6\t95.1\t127.0\t100.1\t36.8\t31.1\t16.3\t500.7\t142.3\t159.7\t236.0\t244.7\t433.5\t275.7\t104.4\t21.1\t273.8\t69.1\t99.0\t79.5\t176.3\t270.9\t212.3\t102.3\t142.8\t40.3\t206.1\t56.7\t232.3\t221.5\t67.8\t453.7\t121.7\t330.4\t112.8\t117.1\t182.6\t67.4\t184.6\t138.4\t214.6\t37.2\t331.6\t123.6\t86.9\t238.7\t199.1\t71.0\t143.4\t220.0\t199.1\t131.2\t226.1\t31.6\t260.2\t29.8\t64.8\t222.1\t80.6\t137.1\t49.8\t165.3\t274.7\t170.8\t352.9\t221.6\t135.7\t11.5\t489.9\t243.2\t79.3\t151.7\t143.7\t221.1\t241.2\t222.1\t146.0\t114.9\t93.5\t48.7\t81.2\t23.6\t56.0\t79.3\t23.4\t67.4\t157.2\t35.0\t153.8\t111.2\t153.1\t26.5\t629.1\t60.6\t39.0\t52.9\t45.3\t99.7\t117.8\t113.6\t67.9\t207.9\t198.0\t165.5\t340.3\t137.3\t240.2\t159.2\t44.0\t390.0\t42.9\t129.4\t155.5\n", "\"117_at\"\t12.6\t85.4\t1.9\t6.0\t6.0\t24.1\t2.0\t2.9\t4.6\t18.3\t6.5\t4.2\t53.4\t4.9\t7.3\t1.3\t1.2\t4.4\t13.8\t34.5\t3.3\t3.0\t1.2\t4.4\t2.2\t4.6\t2.5\t1.1\t2.4\t1.7\t19.8\t14.7\t2.5\t4.4\t5.2\t12.7\t99.3\t11.0\t3.0\t27.9\t4.6\t56.5\t7.2\t2.8\t23.9\t15.7\t1.1\t2.7\t22.4\t1.2\t1.1\t22.2\t12.8\t9.2\t11.6\t4.6\t17.3\t2.7\t1.2\t3.8\t8.9\t243.2\t1.5\t14.4\t0.8\t2.8\t24.2\t1.7\t57.2\t4.9\t7.9\t11.3\t1.1\t2.3\t135.3\t159.4\t5.9\t11.1\t3.3\t3.3\t3.6\t2.3\t2.3\t9.9\t15.2\t2.9\t2.5\t1.1\t1.6\t4.4\t2.1\t35.6\t2.2\t5.3\t4.2\t16.6\t9.4\t13.0\t4.1\t11.4\t4.9\t2.7\t5.5\t181.8\t73.3\t15.8\t4.4\t4.0\t37.3\t2.8\t4.2\t5.8\t6.0\t1.5\t1.7\t45.0\t3.7\t11.8\t15.1\t2.3\t189.4\t55.5\t14.6\t15.0\t9.8\t3.6\t14.7\t43.7\t28.1\t2.8\t94.7\t130.0\t96.8\t16.4\t19.7\t37.6\t1.5\t0.5\t1.0\t713.0\t159.1\t223.4\t4.8\t6.6\t16.0\t2.0\t20.2\t1.9\t2.7\t18.6\t35.2\t2.1\t9.0\t3.1\t1.9\t23.7\t4.2\t3.1\t1.2\t14.8\t4.5\t5.5\t14.1\t5.4\t28.0\t2.3\t345.9\t2.2\t3.4\t9.3\t3.0\t5.6\t12.7\t4.7\t258.4\t13.6\t3.1\t1.3\t5.0\t2.5\t469.0\t72.7\t4.2\t202.2\t13.5\t178.3\t4.4\t1.7\t2.5\t11.3\t2.0\t2.5\t3.5\t19.2\t1.0\t2.5\t14.8\t1.8\t3.8\t1.2\t46.6\t7.9\t101.7\t6.4\t9.4\t23.7\t2.4\t9.9\t11.6\t3.5\t21.6\t99.5\t131.7\t37.0\t98.2\t449.2\t1274.0\t173.2\t61.6\t19.9\t1.9\t6.7\t7.7\t8.1\t9.1\t2.1\t3.3\t6.4\t7.5\t3.2\t3.8\t3.0\t3.7\t15.9\t240.4\t404.4\t4.5\t4.7\t69.5\t3.8\t4.7\t170.6\t13.9\t23.0\t164.4\t3.6\t0.9\t2.1\t2.4\t29.9\t3.2\t6.2\t10.2\t43.3\t8.6\t22.0\t5.1\t8.2\t6.9\t1.2\t2.4\t2.7\t9.5\t7.0\t2.0\t4.6\t53.9\t11.6\t3.2\t5.8\t4.0\t1.7\t6.9\t3.7\t17.6\t1.7\t5.7\t0.8\t2.9\t3.6\t32.7\t0.3\t4.7\t1.9\t2.5\t3.7\t30.8\t7.1\t9.0\t0.7\t3.8\t11.2\t1.7\t1.6\t17.6\t6.5\t4.1\t1.3\t19.9\t3.8\t113.2\t0.7\t29.7\t6.8\t21.1\t6.5\t4.2\t12.3\t1.7\t91.9\t15.8\t4.6\t5.2\t3.4\t7.9\t13.0\t51.5\t21.9\t34.5\t10.2\t122.9\t136.9\t218.0\t452.2\t13.4\t0.9\t4.5\t138.7\t109.4\t58.6\t64.1\t24.5\t1.3\t14.4\t6.0\t1.2\t13.8\t12.2\t1.3\t10.2\t79.7\t83.7\t199.9\t3.4\t7.6\t4.8\t1.9\t14.3\t30.3\t2.4\t12.1\t159.4\t9.0\t393.8\t7.5\t2.9\t7.6\t9.7\t3.1\t2.4\t19.1\t0.8\t2.9\t29.7\t0.5\t4.4\t14.6\t3.8\t20.1\t3.5\t67.2\t50.3\t171.0\t3.1\t130.5\t16.9\t6.8\t1.7\t12.9\t17.5\t7.9\t28.4\t1.2\t7.0\t10.8\t19.3\t257.0\t8.9\t3.6\t3.0\t3.5\t130.4\t1.2\t8.3\t4.4\t35.6\t27.2\t19.3\t1.5\t41.0\t1.6\t8.4\t25.1\t514.6\t40.9\t4.7\t4.9\t3.7\t2.1\t2.1\t37.1\t20.5\t25.3\t18.8\t13.9\t10.7\t2.1\t52.5\t15.0\t2.0\t54.8\t4.4\t3.5\t3.0\t144.5\t64.7\t0.9\t1.7\t13.1\t30.7\t1.9\t2.2\t16.7\t2.3\t3.3\t6.3\t2.2\t3.6\t2.9\t13.2\t36.2\t4.9\t201.1\t3.2\t97.5\t6.2\t22.1\t26.3\t2.4\t12.7\t16.5\t1.7\t29.3\t9.6\t16.4\t16.2\t12.5\t3.9\t78.8\t22.1\t4.0\t873.7\t24.8\t6.9\t57.5\t11.4\t1.1\t2.3\t31.9\t5.8\t5.9\t9.1\t0.7\t166.3\t5.9\t19.8\t19.9\t2.8\t15.8\t36.5\t6.9\t8.1\t4.2\t10.4\t1.2\t0.9\t101.4\t50.2\t32.5\t5.6\t205.7\t11.1\t14.0\t11.9\t4.4\t2.8\t0.7\t0.4\t39.0\t46.7\t9.4\t1.3\t5.7\t56.1\t2.7\t2.8\t15.6\t2.5\t2.7\t1.0\t64.0\t9.2\t6.8\t28.0\t0.4\t1.2\t5.2\t2.5\t110.2\t2.9\t1.8\t25.6\t6.3\t40.9\t81.5\t6.5\t2.4\t2.2\t33.8\t1.1\t111.5\t40.2\t31.7\t44.2\t13.0\t31.9\t2.6\t4.8\t15.5\t29.5\t11.0\t2.0\t32.7\t11.8\t1.3\t1.8\t3.9\t29.1\t25.7\t14.5\t13.0\t17.2\t5.9\t10.3\t35.0\t22.3\t0.9\t16.7\t4.0\t316.9\t2.8\t6.8\t20.6\t14.6\t14.3\t7.4\t49.7\t1.8\t18.2\t168.7\t154.0\t1.0\t8.5\t522.8\t3.2\t5.0\t5.2\t6.4\t30.3\t89.1\t9.5\t26.3\t27.7\t4.5\t8.4\t28.5\t16.2\t2.5\t9.2\t3.8\t4.0\t4.5\t12.7\t3.0\t67.1\t14.0\t3.5\t5.8\t36.4\t1.5\t2.5\t28.2\t2.1\t0.8\t0.7\t0.6\t4.2\t4.9\t156.2\t8.7\t37.9\t15.3\t4.2\t0.9\t2.3\t14.4\t12.7\t26.8\t1.5\t0.7\t69.8\t3.4\t4.4\t9.1\t1.2\t50.7\t1.6\t5.0\t2.0\t30.4\t3.0\t17.8\t21.7\t4.5\t257.0\t2.5\t0.5\t6.2\t3.5\t212.4\t17.7\t11.8\t12.3\t7.6\t18.4\t4.3\t1.7\t34.6\t15.6\t3.9\t1.3\t5.3\t3.6\t1.9\t15.6\t2.3\t23.9\t51.5\t5.9\t3.4\t3.3\t21.1\t3.4\t2.7\t5.0\t8.0\t6.5\t4.0\t3.2\t1.0\t1.3\t0.9\t8.0\t15.7\t26.3\t13.2\t4.2\t11.0\t1.0\t35.2\t21.2\t2.7\t532.5\t89.2\t42.4\t10.7\t12.6\t38.7\t39.0\t28.9\t26.4\t27.4\t3.3\t10.5\t1.0\t2.7\t5.4\t3.1\t18.7\t0.3\t4.8\t32.0\t1.1\t5.5\t7.0\t21.3\t4.7\t2.8\t2.5\t54.4\t15.3\t10.8\t1.8\t3.8\t27.7\t4.3\t2.6\t297.7\t4.7\t6.9\t4.0\t14.4\t1.5\t7.7\t5.2\t3.0\t6.6\t62.8\t13.0\t2.2\t20.6\t11.9\t14.5\t2.9\t0.7\t3.6\t6.7\t7.9\t1.1\t2.7\t25.7\t1.3\t39.5\t3.2\t13.4\t8.8\t2.2\t37.0\t22.0\t14.3\t2.9\t104.5\t51.2\t5.6\t6.0\t2.9\t16.3\t19.1\t6.4\t3.0\t6.5\t13.6\t31.6\t31.2\t18.1\t0.9\t5.4\t2.8\t215.3\t70.1\t24.1\t1.2\t0.6\t11.6\t1.5\t41.7\t11.1\t1.8\t10.2\t4.4\t16.8\t10.5\t2.6\t44.9\t2.1\t1.3\t4.0\t12.4\t2.4\t2624.0\t580.9\t28.9\t6.9\t1.3\t9.3\t0.9\t2.2\t2.0\n", "\"121_at\"\t71.9\t102.1\t57.6\t138.5\t443.9\t112.5\t75.7\t18.1\t2271.1\t403.9\t109.3\t78.4\t117.8\t81.1\t53.7\t23.1\t88.1\t23.0\t38.9\t76.4\t25.5\t74.2\t100.5\t32.6\t46.7\t190.9\t1497.8\t341.9\t37.7\t759.7\t117.5\t69.5\t22.9\t78.0\t106.1\t55.9\t32.8\t28.8\t171.4\t71.3\t89.8\t94.0\t94.2\t164.8\t475.5\t61.4\t26.4\t2223.6\t30.1\t44.1\t24.9\t170.3\t160.1\t33.2\t1831.1\t67.0\t139.4\t60.3\t32.0\t46.5\t933.7\t60.0\t93.3\t103.5\t54.4\t42.0\t122.8\t97.4\t85.7\t47.2\t19.4\t139.1\t67.3\t169.6\t108.0\t59.7\t140.0\t462.1\t149.6\t104.5\t57.6\t83.3\t107.8\t79.5\t780.2\t2514.5\t2653.9\t26.9\t32.9\t60.5\t26.3\t59.6\t213.4\t27.5\t52.3\t611.5\t2478.3\t132.1\t96.6\t85.3\t78.4\t166.9\t100.8\t19.8\t60.8\t88.5\t43.3\t25.5\t141.5\t35.8\t30.7\t60.8\t38.4\t25.5\t126.7\t40.7\t70.8\t75.6\t77.6\t30.4\t28.5\t20.0\t45.1\t82.7\t121.1\t67.8\t14.9\t33.4\t110.6\t51.8\t41.3\t52.2\t43.6\t93.3\t163.3\t221.6\t73.0\t33.4\t66.6\t95.3\t24.5\t53.1\t138.7\t101.3\t133.9\t102.0\t53.2\t105.5\t54.8\t58.7\t59.8\t75.2\t89.4\t52.5\t100.7\t159.4\t105.2\t49.7\t104.7\t58.5\t79.2\t26.1\t35.7\t238.7\t60.7\t92.8\t88.5\t52.6\t18.8\t39.0\t18.0\t36.5\t115.9\t83.0\t195.1\t81.2\t72.1\t562.1\t412.4\t46.5\t88.4\t22.1\t91.9\t75.6\t37.7\t42.3\t66.9\t79.4\t60.3\t27.4\t1285.0\t2735.4\t149.3\t16.1\t37.5\t24.0\t71.5\t33.7\t36.3\t80.6\t100.1\t88.6\t58.7\t123.8\t57.6\t97.4\t74.1\t116.0\t41.8\t86.8\t266.5\t45.6\t88.3\t52.2\t92.9\t94.5\t93.8\t109.7\t39.1\t117.4\t71.9\t224.2\t23.5\t52.7\t64.3\t69.8\t87.5\t116.0\t158.6\t102.6\t111.8\t35.2\t99.5\t418.8\t73.6\t30.9\t79.4\t101.9\t17.9\t94.3\t49.8\t73.7\t482.5\t62.7\t72.6\t65.1\t33.3\t121.8\t51.4\t54.7\t49.0\t74.3\t69.2\t215.8\t56.8\t63.7\t74.8\t80.4\t91.0\t113.8\t52.6\t37.9\t133.8\t41.4\t120.6\t3548.5\t61.7\t40.9\t113.6\t90.1\t27.7\t87.5\t35.1\t205.0\t104.0\t67.9\t74.1\t23.9\t51.1\t60.8\t248.6\t25.7\t144.0\t101.7\t19.7\t34.5\t67.5\t102.8\t82.3\t47.2\t58.2\t71.3\t51.8\t63.0\t101.5\t1085.1\t297.3\t86.7\t61.9\t49.0\t76.2\t33.4\t56.9\t84.6\t33.6\t82.2\t66.2\t99.7\t1421.7\t64.9\t68.7\t49.0\t63.8\t19.4\t63.8\t113.9\t95.9\t113.8\t100.6\t80.0\t57.6\t40.0\t148.8\t86.1\t3106.6\t1354.4\t53.2\t65.8\t70.6\t26.1\t92.4\t57.4\t71.7\t84.4\t22.1\t93.8\t30.2\t394.3\t283.2\t39.1\t63.6\t122.8\t70.2\t95.6\t222.2\t51.4\t96.6\t71.8\t49.9\t26.6\t171.0\t63.9\t37.0\t71.8\t55.5\t61.8\t224.6\t2446.7\t75.1\t416.7\t154.9\t28.6\t76.7\t101.1\t33.0\t67.5\t40.4\t65.4\t90.0\t99.9\t114.5\t66.0\t35.4\t48.1\t75.8\t88.3\t979.4\t328.6\t2836.3\t137.7\t120.9\t70.9\t91.5\t154.7\t768.6\t84.4\t62.8\t147.5\t84.4\t28.8\t75.3\t34.9\t22.8\t70.4\t45.9\t53.8\t89.8\t239.5\t66.0\t163.8\t304.0\t47.7\t51.7\t39.8\t47.0\t117.2\t233.1\t118.5\t35.4\t42.4\t42.0\t40.3\t91.9\t51.8\t41.2\t77.2\t74.5\t55.7\t87.3\t38.5\t93.2\t76.6\t100.2\t53.8\t48.7\t91.0\t118.2\t26.4\t17.5\t5049.2\t80.0\t78.9\t102.9\t28.5\t69.0\t54.5\t37.9\t103.8\t62.2\t108.0\t42.7\t197.8\t52.0\t224.2\t155.4\t179.5\t235.3\t162.9\t48.4\t98.9\t58.1\t33.5\t135.1\t38.9\t50.5\t30.1\t64.2\t132.1\t120.6\t29.8\t382.6\t108.6\t157.0\t59.0\t192.7\t64.3\t27.9\t54.0\t101.9\t24.1\t17.2\t127.1\t37.4\t59.8\t39.0\t85.9\t68.9\t124.4\t134.5\t115.0\t59.2\t128.7\t129.0\t97.8\t481.0\t23.1\t60.7\t78.4\t66.3\t163.5\t103.2\t58.6\t88.8\t71.7\t100.6\t114.3\t73.2\t40.8\t77.4\t32.6\t70.7\t52.4\t69.2\t54.3\t98.1\t45.5\t72.8\t64.9\t163.3\t84.9\t43.7\t151.9\t87.6\t76.3\t10.0\t86.0\t74.8\t47.9\t52.1\t81.3\t90.8\t63.2\t42.1\t47.4\t95.9\t84.7\t88.0\t64.3\t72.0\t37.3\t59.5\t77.1\t29.8\t122.6\t35.1\t118.2\t74.6\t38.1\t119.1\t65.7\t88.7\t139.4\t104.2\t34.4\t1465.4\t105.1\t45.9\t95.8\t61.2\t84.8\t31.4\t95.3\t38.4\t223.2\t74.6\t81.9\t46.7\t54.0\t10.8\t79.5\t94.1\t42.2\t30.4\t15.2\t49.0\t77.8\t51.1\t78.4\t151.4\t89.0\t91.5\t56.1\t23.9\t122.4\t60.5\t95.2\t46.9\t276.3\t79.5\t69.4\t27.9\t48.9\t130.1\t68.4\t79.6\t58.8\t22.2\t43.5\t28.6\t170.3\t72.6\t1119.8\t1943.5\t1683.5\t105.0\t22.9\t85.5\t68.2\t64.5\t62.7\t72.8\t807.4\t1243.3\t634.3\t621.5\t82.3\t53.3\t684.5\t102.3\t52.1\t103.6\t30.6\t166.7\t61.3\t60.8\t118.4\t140.6\t27.7\t23.2\t67.7\t52.4\t57.8\t54.4\t94.8\t42.8\t52.4\t31.4\t2023.4\t48.3\t33.8\t12.2\t23.5\t40.6\t53.5\t54.0\t118.9\t47.4\t114.4\t145.3\t29.5\t367.3\t5398.7\t656.8\t54.5\t28.7\t149.1\t45.8\t73.5\t134.7\t54.9\t63.5\t1888.4\t107.0\t654.0\t1476.3\t126.1\t71.4\t40.3\t79.8\t147.9\t112.3\t63.2\t61.1\t93.8\t54.1\t39.5\t82.5\t71.3\t24.4\t29.0\t62.3\t25.0\t107.7\t91.7\t91.1\t56.9\t90.4\t151.2\t81.9\t114.5\t150.7\t225.4\t75.9\t43.3\t93.3\t31.0\t40.7\t34.3\t146.0\t39.8\t29.0\t24.5\t141.0\t89.5\t91.0\t45.2\t72.0\t106.5\t100.0\t39.9\t677.6\t208.2\t47.8\t43.6\t665.8\t99.0\t171.6\t62.5\t58.9\t126.8\t38.7\t144.3\t37.5\t38.0\t127.9\t40.7\t54.8\t44.7\t71.3\t113.8\t103.5\t92.4\t103.8\t159.4\t1699.6\t111.5\t65.2\t287.6\t62.2\t61.6\t122.7\t136.9\t32.9\t109.0\t71.5\t55.3\t212.1\t80.6\t45.2\t74.2\t3225.0\t24.5\t93.3\t39.2\t53.2\t26.5\t96.3\t121.1\t43.1\t109.3\t130.7\t49.6\t13.9\t169.6\t87.5\t74.8\t115.7\t73.6\t128.7\t66.4\t85.2\t117.8\t71.9\t64.3\t20.3\t54.5\t67.2\t556.7\t66.2\t23.1\t49.5\t32.1\t777.3\t110.6\t32.3\t169.0\t30.4\t111.1\t38.1\t70.8\t26.8\t31.4\t12.6\t62.1\t42.5\t587.7\t97.4\t90.6\t1281.2\t55.6\t18.1\t78.8\t70.6\t16.5\t69.4\t35.7\t40.7\t67.0\n", "Total lines examined: 75\n", "\n", "Attempting to extract gene data from matrix file...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Successfully extracted gene data with 22277 rows\n", "First 20 gene IDs:\n", "Index(['1007_s_at', '1053_at', '117_at', '121_at', '1255_g_at', '1294_at',\n", " '1316_at', '1320_at', '1405_i_at', '1431_at', '1438_at', '1487_at',\n", " '1494_f_at', '1598_g_at', '160020_at', '1729_at', '1773_at', '177_at',\n", " '179_at', '1861_at'],\n", " dtype='object', name='ID')\n", "\n", "Gene expression data available: True\n" ] } ], "source": [ "# 1. Get the file paths for the SOFT file and matrix file\n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", "\n", "# Add diagnostic code to check file content and structure\n", "print(\"Examining matrix file structure...\")\n", "with gzip.open(matrix_file, 'rt') as file:\n", " table_marker_found = False\n", " lines_read = 0\n", " for i, line in enumerate(file):\n", " lines_read += 1\n", " if '!series_matrix_table_begin' in line:\n", " table_marker_found = True\n", " print(f\"Found table marker at line {i}\")\n", " # Read a few lines after the marker to check data structure\n", " next_lines = [next(file, \"\").strip() for _ in range(5)]\n", " print(\"First few lines after marker:\")\n", " for next_line in next_lines:\n", " print(next_line)\n", " break\n", " if i < 10: # Print first few lines to see file structure\n", " print(f\"Line {i}: {line.strip()}\")\n", " if i > 100: # Don't read the entire file\n", " break\n", " \n", " if not table_marker_found:\n", " print(\"Table marker '!series_matrix_table_begin' not found in first 100 lines\")\n", " print(f\"Total lines examined: {lines_read}\")\n", "\n", "# 2. Try extracting gene expression data from the matrix file again with better diagnostics\n", "try:\n", " print(\"\\nAttempting to extract gene data from matrix file...\")\n", " gene_data = get_genetic_data(matrix_file)\n", " if gene_data.empty:\n", " print(\"Extracted gene expression data is empty\")\n", " is_gene_available = False\n", " else:\n", " print(f\"Successfully extracted gene data with {len(gene_data.index)} rows\")\n", " print(\"First 20 gene IDs:\")\n", " print(gene_data.index[:20])\n", " is_gene_available = True\n", "except Exception as e:\n", " print(f\"Error extracting gene data: {str(e)}\")\n", " print(\"This dataset appears to have an empty or malformed gene expression matrix\")\n", " is_gene_available = False\n", "\n", "print(f\"\\nGene expression data available: {is_gene_available}\")\n", "\n", "# If data extraction failed, try an alternative approach using pandas directly\n", "if not is_gene_available:\n", " print(\"\\nTrying alternative approach to read gene expression data...\")\n", " try:\n", " with gzip.open(matrix_file, 'rt') as file:\n", " # Skip lines until we find the marker\n", " for line in file:\n", " if '!series_matrix_table_begin' in line:\n", " break\n", " \n", " # Try to read the data directly with pandas\n", " gene_data = pd.read_csv(file, sep='\\t', index_col=0)\n", " \n", " if not gene_data.empty:\n", " print(f\"Successfully extracted gene data with alternative method: {gene_data.shape}\")\n", " print(\"First 20 gene IDs:\")\n", " print(gene_data.index[:20])\n", " is_gene_available = True\n", " else:\n", " print(\"Alternative extraction method also produced empty data\")\n", " except Exception as e:\n", " print(f\"Alternative extraction failed: {str(e)}\")\n" ] }, { "cell_type": "markdown", "id": "8fddfd76", "metadata": {}, "source": [ "### Step 4: Gene Identifier Review" ] }, { "cell_type": "code", "execution_count": 5, "id": "2de8d207", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:21:46.790153Z", "iopub.status.busy": "2025-03-25T07:21:46.789993Z", "iopub.status.idle": "2025-03-25T07:21:46.792195Z", "shell.execute_reply": "2025-03-25T07:21:46.791886Z" } }, "outputs": [], "source": [ "# Examining the gene identifiers in the first few rows\n", "# These are probe IDs from an Affymetrix HT_HG-U133A array, not standard human gene symbols\n", "# IDs like \"1007_s_at\", \"1053_at\", \"117_at\" are Affymetrix probe identifiers\n", "# They need to be mapped to standard human gene symbols\n", "\n", "requires_gene_mapping = True\n" ] }, { "cell_type": "markdown", "id": "3aaa397a", "metadata": {}, "source": [ "### Step 5: Gene Annotation" ] }, { "cell_type": "code", "execution_count": 6, "id": "ae6c0719", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:21:46.793912Z", "iopub.status.busy": "2025-03-25T07:21:46.793801Z", "iopub.status.idle": "2025-03-25T07:22:11.121370Z", "shell.execute_reply": "2025-03-25T07:22:11.120964Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Extracting gene annotation data from SOFT file...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Successfully extracted gene annotation data with 17800121 rows\n", "\n", "Gene annotation preview (first few rows):\n", "{'ID': ['1007_s_at', '1053_at', '117_at', '121_at', '1255_g_at'], 'GB_ACC': ['U48705', 'M87338', 'X51757', 'X69699', 'L36861'], 'SPOT_ID': [nan, nan, nan, nan, nan], 'Species Scientific Name': ['Homo sapiens', 'Homo sapiens', 'Homo sapiens', 'Homo sapiens', 'Homo sapiens'], 'Annotation Date': ['Mar 8, 2007', 'Mar 8, 2007', 'Mar 8, 2007', 'Mar 8, 2007', 'Mar 8, 2007'], 'Sequence Type': ['Exemplar sequence', 'Exemplar sequence', 'Exemplar sequence', 'Exemplar sequence', 'Exemplar sequence'], 'Sequence Source': [nan, nan, nan, nan, nan], 'Target Description': ['U48705 /FEATURE=mRNA /DEFINITION=HSU48705 Human receptor tyrosine kinase DDR gene, complete cds', 'M87338 /FEATURE= /DEFINITION=HUMA1SBU Human replication factor C, 40-kDa subunit (A1) mRNA, complete cds', \"X51757 /FEATURE=cds /DEFINITION=HSP70B Human heat-shock protein HSP70B' gene\", 'X69699 /FEATURE= /DEFINITION=HSPAX8A H.sapiens Pax8 mRNA', 'L36861 /FEATURE=expanded_cds /DEFINITION=HUMGCAPB Homo sapiens guanylate cyclase activating protein (GCAP) gene exons 1-4, complete cds'], 'Representative Public ID': ['U48705', 'M87338', 'X51757', 'X69699', 'L36861'], 'Gene Title': ['discoidin domain receptor family, member 1', 'replication factor C (activator 1) 2, 40kDa', \"heat shock 70kDa protein 6 (HSP70B')\", 'paired box gene 8', 'guanylate cyclase activator 1A (retina)'], 'Gene Symbol': ['DDR1', 'RFC2', 'HSPA6', 'PAX8', 'GUCA1A'], 'ENTREZ_GENE_ID': ['780', '5982', '3310', '7849', '2978'], 'RefSeq Transcript ID': ['NM_001954 /// NM_013993 /// NM_013994', 'NM_002914 /// NM_181471', 'NM_002155 /// XM_001134322', 'NM_003466 /// NM_013951 /// NM_013952 /// NM_013953 /// NM_013992', 'NM_000409'], 'Gene Ontology Biological Process': ['0006468 // protein amino acid phosphorylation // inferred from electronic annotation /// 0007155 // cell adhesion // inferred from electronic annotation /// 0007155 // cell adhesion // traceable author statement /// 0007169 // transmembrane receptor protein tyrosine kinase signaling pathway // inferred from electronic annotation', '0006260 // DNA replication // inferred from electronic annotation', '0006457 // protein folding // inferred from electronic annotation /// 0006986 // response to unfolded protein // traceable author statement /// 0006986 // response to unfolded protein // inferred from electronic annotation', '0001656 // metanephros development // inferred from electronic annotation /// 0006183 // GTP biosynthesis // inferred from electronic annotation /// 0006228 // UTP biosynthesis // inferred from electronic annotation /// 0006241 // CTP biosynthesis // inferred from electronic annotation /// 0006350 // transcription // inferred from electronic annotation /// 0009887 // organ morphogenesis // inferred from electronic annotation /// 0030154 // cell differentiation // inferred from electronic annotation /// 0045893 // positive regulation of transcription, DNA-dependent // inferred from sequence or structural similarity /// 0006355 // regulation of transcription, DNA-dependent // inferred from electronic annotation /// 0007275 // development // inferred from electronic annotation /// 0009653 // morphogenesis // traceable author statement', '0007165 // signal transduction // non-traceable author statement /// 0007601 // visual perception // traceable author statement /// 0050896 // response to stimulus // inferred from electronic annotation /// 0007601 // visual perception // inferred from electronic annotation'], 'Gene Ontology Cellular Component': ['0005615 // extracellular space // inferred from electronic annotation /// 0005887 // integral to plasma membrane // traceable author statement /// 0016020 // membrane // inferred from electronic annotation /// 0016021 // integral to membrane // inferred from electronic annotation', '0005634 // nucleus // inferred from electronic annotation /// 0005663 // DNA replication factor C complex // traceable author statement /// 0005663 // DNA replication factor C complex // inferred from electronic annotation', nan, '0005634 // nucleus // inferred from electronic annotation /// 0005654 // nucleoplasm // inferred from sequence or structural similarity /// 0005667 // transcription factor complex // inferred from electronic annotation', nan], 'Gene Ontology Molecular Function': ['0000166 // nucleotide binding // inferred from electronic annotation /// 0004674 // protein serine/threonine kinase activity // inferred from electronic annotation /// 0004713 // protein-tyrosine kinase activity // inferred from electronic annotation /// 0004714 // transmembrane receptor protein tyrosine kinase activity // inferred from electronic annotation /// 0004714 // transmembrane receptor protein tyrosine kinase activity // traceable author statement /// 0004872 // receptor activity // inferred from electronic annotation /// 0005524 // ATP binding // inferred from electronic annotation /// 0016740 // transferase activity // inferred from electronic annotation /// 0004672 // protein kinase activity // inferred from electronic annotation /// 0016301 // kinase activity // inferred from electronic annotation', '0000166 // nucleotide binding // inferred from electronic annotation /// 0003677 // DNA binding // inferred from electronic annotation /// 0005515 // protein binding // inferred from physical interaction /// 0005524 // ATP binding // traceable author statement /// 0017111 // nucleoside-triphosphatase activity // inferred from electronic annotation /// 0005524 // ATP binding // inferred from electronic annotation', '0000166 // nucleotide binding // inferred from electronic annotation /// 0005524 // ATP binding // inferred from electronic annotation', '0003700 // transcription factor activity // traceable author statement /// 0004550 // nucleoside diphosphate kinase activity // inferred from electronic annotation /// 0004996 // thyroid-stimulating hormone receptor activity // traceable author statement /// 0005515 // protein binding // inferred from sequence or structural similarity /// 0005524 // ATP binding // inferred from electronic annotation /// 0016563 // transcriptional activator activity // inferred from sequence or structural similarity /// 0003677 // DNA binding // inferred from electronic annotation', '0005509 // calcium ion binding // inferred from electronic annotation /// 0008048 // calcium sensitive guanylate cyclase activator activity // traceable author statement']}\n", "\n", "Column names in gene annotation data:\n", "['ID', 'GB_ACC', 'SPOT_ID', 'Species Scientific Name', 'Annotation Date', 'Sequence Type', 'Sequence Source', 'Target Description', 'Representative Public ID', 'Gene Title', 'Gene Symbol', 'ENTREZ_GENE_ID', 'RefSeq Transcript ID', 'Gene Ontology Biological Process', 'Gene Ontology Cellular Component', 'Gene Ontology Molecular Function']\n", "\n", "The dataset contains GenBank accessions (GB_ACC) that could be used for gene mapping.\n", "Number of rows with GenBank accessions: 17800059 out of 17800121\n", "\n", "The dataset contains genomic regions (SPOT_ID) that could be used for location-based gene mapping.\n", "Example SPOT_ID format: nan\n" ] } ], "source": [ "# 1. Extract gene annotation data from the SOFT file\n", "print(\"Extracting gene annotation data from SOFT file...\")\n", "try:\n", " # Use the library function to extract gene annotation\n", " gene_annotation = get_gene_annotation(soft_file)\n", " print(f\"Successfully extracted gene annotation data with {len(gene_annotation.index)} rows\")\n", " \n", " # Preview the annotation DataFrame\n", " print(\"\\nGene annotation preview (first few rows):\")\n", " print(preview_df(gene_annotation))\n", " \n", " # Show column names to help identify which columns we need for mapping\n", " print(\"\\nColumn names in gene annotation data:\")\n", " print(gene_annotation.columns.tolist())\n", " \n", " # Check for relevant mapping columns\n", " if 'GB_ACC' in gene_annotation.columns:\n", " print(\"\\nThe dataset contains GenBank accessions (GB_ACC) that could be used for gene mapping.\")\n", " # Count non-null values in GB_ACC column\n", " non_null_count = gene_annotation['GB_ACC'].count()\n", " print(f\"Number of rows with GenBank accessions: {non_null_count} out of {len(gene_annotation)}\")\n", " \n", " if 'SPOT_ID' in gene_annotation.columns:\n", " print(\"\\nThe dataset contains genomic regions (SPOT_ID) that could be used for location-based gene mapping.\")\n", " print(\"Example SPOT_ID format:\", gene_annotation['SPOT_ID'].iloc[0])\n", " \n", "except Exception as e:\n", " print(f\"Error processing gene annotation data: {e}\")\n", " is_gene_available = False\n" ] }, { "cell_type": "markdown", "id": "dd22a6f2", "metadata": {}, "source": [ "### Step 6: Gene Identifier Mapping" ] }, { "cell_type": "code", "execution_count": 7, "id": "d6077793", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:22:11.123230Z", "iopub.status.busy": "2025-03-25T07:22:11.123110Z", "iopub.status.idle": "2025-03-25T07:22:17.684256Z", "shell.execute_reply": "2025-03-25T07:22:17.683858Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Creating gene mapping dataframe...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Created gene mapping with 21248 rows\n", "\n", "Preview of gene mapping:\n", "{'ID': ['1007_s_at', '1053_at', '117_at', '121_at', '1255_g_at'], 'Gene': ['DDR1', 'RFC2', 'HSPA6', 'PAX8', 'GUCA1A']}\n", "\n", "Applying gene mapping to convert probe-level data to gene-level data...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Converted gene expression data contains 13046 genes\n", "\n", "Preview of gene expression data (first few genes):\n", "{'GSM1687570': [13.0, 15.4, 1.9, 2.1, 40.4], 'GSM1687571': [20.7, 3.5, 7.8, 34.9, 94.2], 'GSM1687572': [1.9, 2.1, 20.4, 0.4, 30.2], 'GSM1687573': [39.2, 37.6, 4.2, 1.3, 88.0], 'GSM1687574': [51.7, 4.0, 27.1, 16.6, 78.7], 'GSM1687575': [25.5, 24.3, 54.4, 26.0, 181.9], 'GSM1687576': [9.7, 12.2, 18.3, 22.6, 211.5], 'GSM1687577': [2.0, 20.9, 2.8, 6.4, 30.7], 'GSM1687578': [56.9, 5.1, 26.4, 10.5, 177.8], 'GSM1687579': [3.0, 6.3, 3.9, 22.8, 16.3], 'GSM1687580': [35.4, 6.6, 41.3, 4.9, 87.3], 'GSM1687581': [1.3, 14.2, 9.7, 16.8, 71.7], 'GSM1687582': [61.8, 645.8, 8.9, 18.0, 222.5], 'GSM1687583': [6.9, 15.9, 6.6, 5.6, 84.2], 'GSM1687584': [21.5, 9.4, 6.7, 11.6, 67.2], 'GSM1687585': [1.3, 175.8, 1.9, 11.4, 20.4], 'GSM1687586': [22.3, 1.4, 56.3, 12.9, 65.0], 'GSM1687587': [16.1, 0.7, 6.6, 15.5, 50.5], 'GSM1687588': [5.1, 105.2, 23.0, 7.6, 34.4], 'GSM1687589': [4.8, 27.1, 3.1, 14.1, 66.9], 'GSM1687590': [29.0, 12.4, 6.9, 1.2, 128.6], 'GSM1687591': [35.2, 9.0, 18.0, 19.9, 38.5], 'GSM1687592': [11.0, 1.0, 14.4, 3.9, 34.6], 'GSM1687593': [18.2, 270.9, 2.7, 4.4, 143.5], 'GSM1687594': [18.1, 2.3, 14.5, 4.3, 40.3], 'GSM1687595': [6.4, 12.8, 45.6, 8.8, 281.2], 'GSM1687596': [6.9, 34.5, 65.6, 3.5, 101.7], 'GSM1687597': [2.4, 1.6, 17.8, 3.2, 43.5], 'GSM1687598': [1.8, 2.5, 9.2, 2.0, 27.9], 'GSM1687599': [7.3, 0.6, 15.3, 0.8, 22.9], 'GSM1687600': [8.2, 865.3, 5.6, 7.6, 93.7], 'GSM1687601': [17.0, 43.2, 10.7, 1.3, 9.8], 'GSM1687602': [3.6, 7.8, 14.3, 15.4, 17.4], 'GSM1687603': [29.7, 11.7, 13.1, 16.3, 103.0], 'GSM1687604': [98.1, 3.7, 3.0, 13.6, 66.4], 'GSM1687605': [8.0, 25.8, 40.1, 10.3, 44.8], 'GSM1687606': [21.4, 2.5, 31.4, 18.3, 84.5], 'GSM1687607': [3.5, 1.7, 7.3, 6.7, 52.3], 'GSM1687608': [5.0, 35.3, 27.4, 9.4, 139.4], 'GSM1687609': [34.0, 18.4, 31.5, 3.7, 162.4], 'GSM1687610': [48.4, 23.8, 36.9, 25.9, 77.6], 'GSM1687611': [10.1, 28.4, 1.8, 23.4, 107.7], 'GSM1687612': [48.5, 33.2, 75.9, 16.0, 152.9], 'GSM1687613': [7.2, 2.4, 72.7, 8.0, 94.7], 'GSM1687614': [3.1, 32.1, 36.7, 1.4, 29.0], 'GSM1687615': [3.5, 8.3, 16.8, 2.0, 161.1], 'GSM1687616': [2.9, 10.1, 1.0, 9.9, 53.3], 'GSM1687617': [14.2, 1.5, 22.0, 23.4, 72.1], 'GSM1687618': [12.5, 4.9, 6.2, 3.2, 19.9], 'GSM1687619': [11.3, 9.8, 19.3, 0.8, 47.4], 'GSM1687620': [1.6, 21.5, 16.3, 6.8, 35.7], 'GSM1687621': [319.4, 4.8, 11.8, 5.7, 166.4], 'GSM1687622': [6.3, 26.0, 89.7, 4.0, 479.6], 'GSM1687623': [9.3, 0.6, 18.6, 8.8, 80.6], 'GSM1687624': [28.2, 27.2, 9.2, 5.0, 187.5], 'GSM1687625': [18.8, 14.2, 27.6, 1.5, 95.3], 'GSM1687626': [6.7, 40.5, 40.9, 32.5, 134.0], 'GSM1687627': [35.0, 1.1, 6.1, 2.0, 122.9], 'GSM1687628': [8.6, 2.0, 0.9, 20.3, 71.7], 'GSM1687629': [6.9, 22.4, 4.5, 3.0, 59.3], 'GSM1687630': [6.3, 49.1, 37.1, 19.3, 85.6], 'GSM1687631': [6.6, 27.1, 36.3, 23.2, 139.9], 'GSM1687632': [4.3, 18.8, 27.6, 16.9, 8.7], 'GSM1687633': [40.0, 36.1, 20.3, 22.6, 56.3], 'GSM1687634': [3.8, 1.1, 3.8, 1.3, 10.5], 'GSM1687635': [2.0, 5.3, 16.1, 3.8, 132.3], 'GSM1687636': [12.8, 7.4, 85.3, 7.4, 111.3], 'GSM1687637': [33.0, 1.8, 5.2, 16.2, 81.7], 'GSM1687638': [24.4, 4329.1, 2.6, 18.9, 63.3], 'GSM1687639': [11.0, 34.5, 6.5, 11.3, 179.0], 'GSM1687640': [9.0, 24.1, 19.5, 5.7, 78.8], 'GSM1687641': [9.7, 3883.6, 9.0, 10.6, 64.8], 'GSM1687642': [1.2, 1599.7, 11.0, 7.0, 38.4], 'GSM1687643': [3.9, 10.1, 29.3, 21.6, 70.5], 'GSM1687644': [33.1, 2.1, 34.3, 4.1, 110.4], 'GSM1687645': [40.5, 5.0, 41.2, 5.6, 154.7], 'GSM1687646': [7.3, 2.0, 37.6, 10.4, 116.6], 'GSM1687647': [25.8, 2.5, 1.3, 1.0, 22.0], 'GSM1687648': [3.2, 14.9, 25.7, 10.4, 75.0], 'GSM1687649': [7.7, 4.3, 3.1, 21.9, 103.1], 'GSM1687650': [4.7, 14.2, 21.3, 21.1, 53.2], 'GSM1687651': [28.0, 4.9, 13.9, 4.8, 74.4], 'GSM1687652': [7.5, 12.5, 17.6, 25.5, 91.8], 'GSM1687653': [7.3, 16.4, 61.9, 18.3, 68.8], 'GSM1687654': [16.0, 1.7, 46.4, 43.9, 124.9], 'GSM1687655': [20.3, 6.7, 51.1, 29.8, 51.2], 'GSM1687656': [2.7, 4.0, 27.7, 2.1, 118.6], 'GSM1687657': [2.4, 5.1, 1.7, 1.4, 23.8], 'GSM1687658': [11.3, 0.9, 13.5, 10.9, 32.7], 'GSM1687659': [11.8, 174.5, 21.4, 8.0, 41.8], 'GSM1687660': [2.1, 55.4, 17.5, 4.0, 11.1], 'GSM1687661': [31.3, 19.4, 22.4, 3.0, 36.6], 'GSM1687662': [7.6, 2.0, 39.9, 14.3, 79.4], 'GSM1687663': [17.9, 8.0, 32.8, 1.4, 84.7], 'GSM1687664': [5.2, 37.2, 14.1, 33.3, 29.9], 'GSM1687665': [31.6, 3.8, 52.4, 1.8, 133.4], 'GSM1687666': [11.4, 33.3, 22.3, 26.8, 89.7], 'GSM1687667': [22.6, 36.9, 46.0, 38.8, 32.2], 'GSM1687668': [37.3, 23.0, 6.0, 24.4, 83.6], 'GSM1687669': [3.9, 22.5, 20.8, 2.5, 42.4], 'GSM1687670': [45.8, 2.9, 28.6, 11.1, 56.0], 'GSM1687671': [1.9, 10.7, 2.1, 1.3, 36.2], 'GSM1687672': [50.9, 268.2, 7.4, 34.8, 113.6], 'GSM1687673': [7.0, 0.9, 1.1, 4.7, 21.1], 'GSM1687674': [8.9, 14.3, 36.4, 10.8, 118.2], 'GSM1687675': [32.8, 20.9, 55.7, 2.7, 135.8], 'GSM1687676': [29.6, 33.4, 16.8, 24.5, 91.2], 'GSM1687677': [44.4, 2.3, 18.2, 22.8, 128.0], 'GSM1687678': [202.6, 6.6, 33.9, 14.5, 178.4], 'GSM1687679': [106.7, 11.2, 46.7, 1.6, 58.5], 'GSM1687680': [59.8, 27.7, 2.4, 1.8, 95.5], 'GSM1687681': [37.8, 38.8, 16.7, 21.3, 122.1], 'GSM1687682': [6.8, 3.9, 2.2, 4.9, 170.8], 'GSM1687683': [35.7, 22.0, 5.7, 6.6, 101.9], 'GSM1687684': [2.2, 4.8, 0.8, 1.4, 22.2], 'GSM1687685': [6.4, 20.7, 7.3, 2.9, 178.0], 'GSM1687686': [9.3, 10.4, 39.5, 25.6, 35.5], 'GSM1687687': [31.3, 16.9, 24.5, 11.9, 115.0], 'GSM1687688': [2.8, 1496.9, 6.0, 0.9, 11.8], 'GSM1687689': [36.2, 12.3, 18.3, 17.3, 65.5], 'GSM1687690': [44.8, 7.7, 4.8, 6.2, 50.9], 'GSM1687691': [2.8, 1.4, 2.8, 1.8, 18.6], 'GSM1687692': [20.7, 3.7, 15.9, 18.2, 85.8], 'GSM1687693': [13.1, 32.6, 7.3, 16.6, 300.9], 'GSM1687694': [13.4, 1.8, 6.9, 4.9, 39.0], 'GSM1687695': [5.5, 2.0, 0.9, 1.8, 49.9], 'GSM1687696': [0.6, 518.1, 20.3, 0.9, 33.6], 'GSM1687697': [2.3, 686.0, 14.5, 13.0, 33.0], 'GSM1687698': [24.6, 26.4, 6.1, 25.7, 80.4], 'GSM1687699': [1.1, 1.7, 10.9, 6.4, 30.6], 'GSM1687700': [42.1, 9.0, 2.1, 2.7, 82.5], 'GSM1687701': [1394.3, 5.3, 18.8, 3.1, 91.6], 'GSM1687702': [8.9, 21.3, 4.2, 1.1, 79.6], 'GSM1687703': [25.3, 3.7, 6.1, 27.7, 44.3], 'GSM1687704': [37.4, 124.1, 6.5, 16.3, 101.6], 'GSM1687705': [34.2, 2044.4, 10.1, 9.9, 161.8], 'GSM1687706': [209.7, 3.2, 15.6, 1.0, 69.9], 'GSM1687707': [8.8, 3.9, 8.5, 5.4, 37.6], 'GSM1687708': [2.8, 23.5, 11.8, 1.3, 161.3], 'GSM1687709': [38.2, 31.6, 21.1, 5.8, 183.3], 'GSM1687710': [4.0, 2.0, 6.7, 1.2, 33.0], 'GSM1687711': [5.7, 10.1, 5.8, 9.7, 122.0], 'GSM1687712': [5.0, 16.8, 3.7, 10.5, 198.4], 'GSM1687713': [37.5, 2136.8, 36.5, 38.7, 35.5], 'GSM1687714': [3.9, 641.3, 27.0, 18.8, 102.2], 'GSM1687715': [3.9, 21.1, 6.1, 21.8, 73.9], 'GSM1687716': [45.7, 9.9, 50.5, 21.6, 235.7], 'GSM1687717': [2.3, 3575.0, 17.4, 12.9, 161.9], 'GSM1687718': [40.0, 33.2, 8.6, 1.0, 60.3], 'GSM1687719': [20.5, 2889.4, 18.5, 0.8, 58.0], 'GSM1687720': [21.3, 3684.9, 34.2, 26.5, 68.3], 'GSM1687721': [15.0, 15.7, 12.8, 23.7, 73.4], 'GSM1687722': [5.7, 500.1, 7.1, 26.9, 139.2], 'GSM1687723': [40.6, 5.4, 4.8, 2.0, 35.1], 'GSM1687724': [7.5, 6.6, 42.5, 17.8, 60.0], 'GSM1687725': [41.8, 16.9, 58.1, 21.1, 67.6], 'GSM1687726': [5.1, 442.2, 31.3, 16.3, 47.3], 'GSM1687727': [850.8, 7.9, 3.4, 27.9, 48.9], 'GSM1687728': [38.7, 27.2, 1.4, 26.5, 89.9], 'GSM1687729': [19.0, 15.4, 16.7, 2.5, 262.8], 'GSM1687730': [21.2, 11.8, 38.6, 2.8, 57.2], 'GSM1687731': [19.4, 1.9, 35.7, 4.3, 20.3], 'GSM1687732': [21.9, 5.0, 2.5, 12.3, 105.6], 'GSM1687733': [10.0, 153.0, 48.5, 15.9, 305.6], 'GSM1687734': [26.6, 26.1, 14.0, 11.5, 52.0], 'GSM1687735': [6.6, 27.0, 38.0, 32.9, 103.3], 'GSM1687736': [22.9, 26.0, 19.6, 1.4, 77.7], 'GSM1687737': [2.3, 3.5, 15.6, 3.8, 15.7], 'GSM1687738': [4.1, 7.2, 12.0, 3.3, 38.9], 'GSM1687739': [3.2, 30.7, 27.0, 3.2, 301.9], 'GSM1687740': [2.0, 17.8, 5.8, 0.8, 88.4], 'GSM1687741': [81.1, 4.0, 10.0, 0.4, 21.5], 'GSM1687742': [39.9, 25.5, 14.1, 14.8, 204.9], 'GSM1687743': [22.1, 42.9, 60.4, 20.8, 152.9], 'GSM1687744': [1005.7, 3.9, 43.1, 3.4, 106.6], 'GSM1687745': [9.5, 23.9, 17.1, 7.8, 68.1], 'GSM1687746': [14.7, 8.7, 49.5, 3.2, 52.3], 'GSM1687747': [13.3, 23.5, 10.2, 16.7, 61.4], 'GSM1687748': [40.1, 1.7, 100.5, 19.8, 117.4], 'GSM1687749': [13.6, 1.2, 17.4, 5.6, 58.2], 'GSM1687750': [5.4, 49.8, 24.1, 21.2, 40.3], 'GSM1687751': [3.9, 6.9, 3.3, 1.3, 0.9], 'GSM1687752': [6.4, 11.6, 9.4, 22.7, 43.1], 'GSM1687753': [41.1, 72.8, 18.2, 2.0, 110.1], 'GSM1687754': [15.2, 22.4, 2.4, 25.8, 137.0], 'GSM1687755': [73.1, 8.5, 10.2, 8.6, 27.7], 'GSM1687756': [2.7, 25.5, 22.8, 23.4, 86.6], 'GSM1687757': [202.4, 2.6, 18.0, 1.1, 38.8], 'GSM1687758': [3.2, 1.5, 2.9, 1.5, 79.0], 'GSM1687759': [6.1, 3.3, 3.2, 6.4, 72.3], 'GSM1687760': [11.8, 35.5, 38.3, 12.9, 69.9], 'GSM1687761': [6.2, 40.2, 61.1, 4.2, 174.9], 'GSM1687762': [94.4, 1.6, 44.6, 4.6, 123.2], 'GSM1687763': [9.5, 10.3, 9.1, 6.7, 13.4], 'GSM1687764': [10.9, 4.9, 15.1, 9.4, 25.2], 'GSM1687765': [1.6, 9.8, 15.5, 0.3, 16.6], 'GSM1687766': [36.8, 4.9, 9.4, 27.8, 116.5], 'GSM1687767': [3.9, 6.9, 1.0, 1.8, 20.7], 'GSM1687768': [4.5, 1.6, 4.3, 0.7, 22.9], 'GSM1687769': [6.4, 1.2, 7.5, 9.1, 55.4]}\n", "\n", "Saving gene expression data to ../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/gene_data/GSE68950.csv...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gene expression data saved successfully\n" ] } ], "source": [ "# 1. Decide which keys store gene identifiers and gene symbols\n", "# From examining the data:\n", "# - 'ID' column in gene_annotation contains probe identifiers matching those in gene_data (e.g., \"1007_s_at\")\n", "# - 'Gene Symbol' column contains human gene symbols (e.g., \"DDR1\", \"RFC2\")\n", "\n", "# 2. Get gene mapping dataframe by extracting the probe ID and gene symbol columns\n", "print(\"Creating gene mapping dataframe...\")\n", "gene_mapping = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='Gene Symbol')\n", "print(f\"Created gene mapping with {len(gene_mapping)} rows\")\n", "print(\"\\nPreview of gene mapping:\")\n", "print(preview_df(gene_mapping))\n", "\n", "# 3. Convert probe-level measurements to gene expression data\n", "print(\"\\nApplying gene mapping to convert probe-level data to gene-level data...\")\n", "gene_data = apply_gene_mapping(gene_data, gene_mapping)\n", "print(f\"Converted gene expression data contains {len(gene_data)} genes\")\n", "print(\"\\nPreview of gene expression data (first few genes):\")\n", "print(preview_df(gene_data, n=5))\n", "\n", "# Save the gene expression data to file\n", "print(f\"\\nSaving gene expression data to {out_gene_data_file}...\")\n", "os.makedirs(os.path.dirname(out_gene_data_file), exist_ok=True)\n", "gene_data.to_csv(out_gene_data_file)\n", "print(\"Gene expression data saved successfully\")\n" ] }, { "cell_type": "markdown", "id": "70b399d3", "metadata": {}, "source": [ "### Step 7: Data Normalization and Linking" ] }, { "cell_type": "code", "execution_count": 8, "id": "2df1d65a", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T07:22:17.686370Z", "iopub.status.busy": "2025-03-25T07:22:17.686231Z", "iopub.status.idle": "2025-03-25T07:22:43.919830Z", "shell.execute_reply": "2025-03-25T07:22:43.919436Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Loading gene expression data...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Loaded gene data with 13046 genes and 798 samples\n", "\n", "Extracting clinical features...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Sample Characteristics Dictionary:\n", "{0: ['cosmic id: 924101', 'cosmic id: 906800', 'cosmic id: 687452', 'cosmic id: 924100', 'cosmic id: 910924', 'cosmic id: 906798', 'cosmic id: 906797', 'cosmic id: 910922', 'cosmic id: 905947', 'cosmic id: 924102', 'cosmic id: 687562', 'cosmic id: 910921', 'cosmic id: 687563', 'cosmic id: 910784', 'cosmic id: 906792', 'cosmic id: 906794', 'cosmic id: 906804', 'cosmic id: 906793', 'cosmic id: 910935', 'cosmic id: 910851', 'cosmic id: 910925', 'cosmic id: 905948', 'cosmic id: 910934', 'cosmic id: 905949', 'cosmic id: 684052', 'cosmic id: 910920', 'cosmic id: 906791', 'cosmic id: 905950', 'cosmic id: 906803', 'cosmic id: 906790'], 1: ['disease state: L2 Acute Lymphoblastic Leukemia', 'disease state: NS Acute Lymphoblastic Leukemia', 'disease state: carcinoma', 'disease state: adenocarcinoma', 'disease state: transitional cell carcinoma', 'disease state: clear cell renal cell carcinoma', 'disease state: anaplastic carcinoma', 'disease state: glioblastoma multiforme', 'disease state: malignant melanoma', 'disease state: rhabdomyosarcoma', 'disease state: mucoepidermoid carcinoma', 'disease state: squamous cell carcinoma', 'disease state: renal cell carcinoma', 'disease state: neuroblastoma', 'disease state: Acute Lymphoblastic Leukemia', 'disease state: M5 acute myeloid leukemia', 'disease state: plasma cell myeloma', 'disease state: L1 Acute T-Cell Lymphoblastic Leukemia', 'disease state: astrocytoma', 'disease state: B Acute Lymphoblastic Leukemia', 'disease state: B cell lymphoma unspecified', 'disease state: papillary carcinoma', 'disease state: papillary transitional cell carcinoma', 'disease state: Burkitt lymphoma', 'disease state: hairy cell leukemia', 'disease state: hyperplasia', 'disease state: papillary ductal carcinoma', 'disease state: blast phase chronic myeloid leukemia', 'disease state: hepatocellular carcinoma', 'disease state: Adult T-Cell Leukemia/Lymphoma'], 2: ['disease location: Hematopoietic and Lymphoid Tissue', 'disease location: bladder', 'disease location: prostate', 'disease location: stomach', 'disease location: ureter', 'disease location: kidney', 'disease location: thyroid', 'disease location: frontal lobe', 'disease location: skin', 'disease location: brain', 'disease location: striated muscle', 'disease location: submaxillary', 'disease location: ovary', 'disease location: lung', 'disease location: autonomic ganglia', 'disease location: endometrium', 'disease location: pancreas', 'disease location: head neck', 'disease location: cervix', 'disease location: breast', 'disease location: colon', 'disease location: liver', 'disease location: gingiva', 'disease location: tongue', 'disease location: vulva', 'disease location: bone', 'disease location: rectum', 'disease location: esophagus', 'disease location: central nervous system', 'disease location: posterior fossa'], 3: ['organism part: Leukemia', 'organism part: Urinary tract', 'organism part: Prostate', 'organism part: Stomach', 'organism part: Kidney', 'organism part: Thyroid Gland', 'organism part: Brain', 'organism part: Skin', 'organism part: Muscle', 'organism part: Head and Neck', 'organism part: Ovary', 'organism part: Lung', 'organism part: Autonomic Ganglion', 'organism part: Endometrium', 'organism part: Pancreas', 'organism part: Cervix', 'organism part: Breast', 'organism part: Colorectal', 'organism part: Liver', 'organism part: Vulva', 'organism part: Bone', 'organism part: Oesophagus', 'organism part: BiliaryTract', 'organism part: Connective and Soft Tissue', 'organism part: Lymphoma', 'organism part: Pleura', 'organism part: Testis', 'organism part: Placenta', 'organism part: Adrenal Gland', 'organism part: Unknow'], 4: ['sample: 736', 'sample: 494', 'sample: 7', 'sample: 746', 'sample: 439', 'sample: 168', 'sample: 152', 'sample: 37', 'sample: 450', 'sample: 42', 'sample: 526', 'sample: 462', 'sample: 451', 'sample: 486', 'sample: 429', 'sample: 47', 'sample: 755', 'sample: 71', 'sample: 72', 'sample: 474', 'sample: 364', 'sample: 537', 'sample: 110', 'sample: 316', 'sample: 33', 'sample: 408', 'sample: 201', 'sample: 38', 'sample: 9', 'sample: 190'], 5: ['cell line code: 749', 'cell line code: 493', 'cell line code: 505', 'cell line code: 760', 'cell line code: 437', 'cell line code: 151', 'cell line code: 134', 'cell line code: 449', 'cell line code: 85', 'cell line code: 529', 'cell line code: 461', 'cell line code: 450', 'cell line code: 485', 'cell line code: 426', 'cell line code: 59', 'cell line code: 769', 'cell line code: 48', 'cell line code: 38', 'cell line code: 473', 'cell line code: 353', 'cell line code: 541', 'cell line code: 54', 'cell line code: 302', 'cell line code: 25', 'cell line code: 402', 'cell line code: 184', 'cell line code: 63', 'cell line code: 29', 'cell line code: 173', 'cell line code: 553'], 6: ['supplier: DSMZ', 'supplier: ATCC', 'supplier: Unspecified', 'supplier: DTP', 'supplier: HSRRB', 'supplier: ICLC', 'supplier: RIKEN', 'supplier: ECCC', 'supplier: JCRB'], 7: ['affy_batch: 1', 'affy_batch: 2'], 8: ['crna plate: 8', 'crna plate: 6', 'crna plate: 11', 'crna plate: 5', 'crna plate: 2', 'crna plate: 12', 'crna plate: 4', 'crna plate: 3', 'crna plate: 7']}\n", "Clinical data extracted and saved to ../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/clinical_data/GSE68950.csv\n", "Clinical data preview:\n", "{'GSM1687570': [0.0], 'GSM1687571': [0.0], 'GSM1687572': [0.0], 'GSM1687573': [0.0], 'GSM1687574': [0.0], 'GSM1687575': [0.0], 'GSM1687576': [0.0], 'GSM1687577': [0.0], 'GSM1687578': [1.0], 'GSM1687579': [1.0], 'GSM1687580': [0.0], 'GSM1687581': [0.0], 'GSM1687582': [0.0], 'GSM1687583': [0.0], 'GSM1687584': [0.0], 'GSM1687585': [0.0], 'GSM1687586': [0.0], 'GSM1687587': [0.0], 'GSM1687588': [0.0], 'GSM1687589': [0.0], 'GSM1687590': [0.0], 'GSM1687591': [0.0], 'GSM1687592': [1.0], 'GSM1687593': [0.0], 'GSM1687594': [0.0], 'GSM1687595': [0.0], 'GSM1687596': [1.0], 'GSM1687597': [1.0], 'GSM1687598': [0.0], 'GSM1687599': [1.0], 'GSM1687600': [0.0], 'GSM1687601': [0.0], 'GSM1687602': [0.0], 'GSM1687603': [0.0], 'GSM1687604': [0.0], 'GSM1687605': [0.0], 'GSM1687606': [0.0], 'GSM1687607': [0.0], 'GSM1687608': [0.0], 'GSM1687609': [0.0], 'GSM1687610': [0.0], 'GSM1687611': [0.0], 'GSM1687612': [0.0], 'GSM1687613': [0.0], 'GSM1687614': [1.0], 'GSM1687615': [0.0], 'GSM1687616': [0.0], 'GSM1687617': [0.0], 'GSM1687618': [0.0], 'GSM1687619': [0.0], 'GSM1687620': [0.0], 'GSM1687621': [0.0], 'GSM1687622': [0.0], 'GSM1687623': [0.0], 'GSM1687624': [1.0], 'GSM1687625': [0.0], 'GSM1687626': [0.0], 'GSM1687627': [0.0], 'GSM1687628': [0.0], 'GSM1687629': [0.0], 'GSM1687630': [0.0], 'GSM1687631': [0.0], 'GSM1687632': [0.0], 'GSM1687633': [0.0], 'GSM1687634': [0.0], 'GSM1687635': [0.0], 'GSM1687636': [0.0], 'GSM1687637': [0.0], 'GSM1687638': [0.0], 'GSM1687639': [0.0], 'GSM1687640': [0.0], 'GSM1687641': [0.0], 'GSM1687642': [0.0], 'GSM1687643': [0.0], 'GSM1687644': [0.0], 'GSM1687645': [0.0], 'GSM1687646': [0.0], 'GSM1687647': [1.0], 'GSM1687648': [0.0], 'GSM1687649': [0.0], 'GSM1687650': [0.0], 'GSM1687651': [0.0], 'GSM1687652': [0.0], 'GSM1687653': [0.0], 'GSM1687654': [0.0], 'GSM1687655': [1.0], 'GSM1687656': [0.0], 'GSM1687657': [0.0], 'GSM1687658': [0.0], 'GSM1687659': [0.0], 'GSM1687660': [0.0], 'GSM1687661': [0.0], 'GSM1687662': [0.0], 'GSM1687663': [0.0], 'GSM1687664': [0.0], 'GSM1687665': [0.0], 'GSM1687666': [0.0], 'GSM1687667': [0.0], 'GSM1687668': [0.0], 'GSM1687669': [0.0], 'GSM1687670': [0.0], 'GSM1687671': [0.0], 'GSM1687672': [0.0], 'GSM1687673': [0.0], 'GSM1687674': [0.0], 'GSM1687675': [0.0], 'GSM1687676': [0.0], 'GSM1687677': [0.0], 'GSM1687678': [0.0], 'GSM1687679': [0.0], 'GSM1687680': [0.0], 'GSM1687681': [0.0], 'GSM1687682': [0.0], 'GSM1687683': [0.0], 'GSM1687684': [0.0], 'GSM1687685': [0.0], 'GSM1687686': [0.0], 'GSM1687687': [0.0], 'GSM1687688': [0.0], 'GSM1687689': [0.0], 'GSM1687690': [0.0], 'GSM1687691': [0.0], 'GSM1687692': [0.0], 'GSM1687693': [0.0], 'GSM1687694': [0.0], 'GSM1687695': [0.0], 'GSM1687696': [0.0], 'GSM1687697': [0.0], 'GSM1687698': [0.0], 'GSM1687699': [0.0], 'GSM1687700': [0.0], 'GSM1687701': [0.0], 'GSM1687702': [0.0], 'GSM1687703': [0.0], 'GSM1687704': [0.0], 'GSM1687705': [0.0], 'GSM1687706': [0.0], 'GSM1687707': [0.0], 'GSM1687708': [0.0], 'GSM1687709': [0.0], 'GSM1687710': [0.0], 'GSM1687711': [0.0], 'GSM1687712': [0.0], 'GSM1687713': [0.0], 'GSM1687714': [0.0], 'GSM1687715': [0.0], 'GSM1687716': [0.0], 'GSM1687717': [0.0], 'GSM1687718': [0.0], 'GSM1687719': [0.0], 'GSM1687720': [0.0], 'GSM1687721': [0.0], 'GSM1687722': [0.0], 'GSM1687723': [0.0], 'GSM1687724': [0.0], 'GSM1687725': [0.0], 'GSM1687726': [0.0], 'GSM1687727': [0.0], 'GSM1687728': [0.0], 'GSM1687729': [0.0], 'GSM1687730': [0.0], 'GSM1687731': [0.0], 'GSM1687732': [0.0], 'GSM1687733': [0.0], 'GSM1687734': [0.0], 'GSM1687735': [0.0], 'GSM1687736': [0.0], 'GSM1687737': [0.0], 'GSM1687738': [0.0], 'GSM1687739': [0.0], 'GSM1687740': [0.0], 'GSM1687741': [0.0], 'GSM1687742': [0.0], 'GSM1687743': [0.0], 'GSM1687744': [0.0], 'GSM1687745': [0.0], 'GSM1687746': [0.0], 'GSM1687747': [0.0], 'GSM1687748': [0.0], 'GSM1687749': [0.0], 'GSM1687750': [0.0], 'GSM1687751': [0.0], 'GSM1687752': [0.0], 'GSM1687753': [0.0], 'GSM1687754': [0.0], 'GSM1687755': [0.0], 'GSM1687756': [0.0], 'GSM1687757': [0.0], 'GSM1687758': [0.0], 'GSM1687759': [0.0], 'GSM1687760': [0.0], 'GSM1687761': [0.0], 'GSM1687762': [0.0], 'GSM1687763': [0.0], 'GSM1687764': [0.0], 'GSM1687765': [0.0], 'GSM1687766': [0.0], 'GSM1687767': [0.0], 'GSM1687768': [0.0], 'GSM1687769': [0.0]}\n", "\n", "Linking clinical and genetic data...\n", "Linked data shape: (798, 13047)\n", "\n", "Handling missing values...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "After handling missing values, data shape: (798, 13047)\n", "\n", "Checking for bias in features...\n", "For the feature 'Kidney_Papillary_Cell_Carcinoma', the least common label is '1.0' with 24 occurrences. This represents 3.01% of the dataset.\n", "The distribution of the feature 'Kidney_Papillary_Cell_Carcinoma' in this dataset is fine.\n", "\n", "\n", "Performing final validation...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Linked data saved to ../../output/preprocess/Kidney_Papillary_Cell_Carcinoma/GSE68950.csv\n" ] } ], "source": [ "# 1. Normalize gene symbols in the gene expression data\n", "# This was already done and saved in the previous step, verified in the output\n", "# We'll load it to make sure gene_data is available for the rest of the processing\n", "print(\"\\nLoading gene expression data...\")\n", "try:\n", " gene_data = pd.read_csv(out_gene_data_file, index_col=0)\n", " print(f\"Loaded gene data with {gene_data.shape[0]} genes and {gene_data.shape[1]} samples\")\n", "except Exception as e:\n", " print(f\"Error loading gene data: {e}\")\n", " gene_data = pd.DataFrame()\n", "\n", "# 2. Extract clinical features\n", "print(\"\\nExtracting clinical features...\")\n", "try:\n", " # Get the file paths for the SOFT file and matrix file again\n", " soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", " \n", " # Obtain background information and clinical dataframe from matrix file\n", " background_info, clinical_data = get_background_and_clinical_data(\n", " matrix_file, \n", " prefixes_a=['!Series_title', '!Series_summary', '!Series_overall_design'],\n", " prefixes_b=['!Sample_geo_accession', '!Sample_characteristics_ch1']\n", " )\n", " \n", " # For diagnostic purposes, check the unique values in each row\n", " sample_characteristics_dict = get_unique_values_by_row(clinical_data)\n", " print(\"Sample Characteristics Dictionary:\")\n", " print(sample_characteristics_dict)\n", " \n", " # Based on sample_characteristics_dict:\n", " # Row 1 contains disease state info\n", " # Row 2 contains disease location\n", " # We'll use both to identify kidney cancer samples\n", " trait_row = 2 # Use disease location row\n", " \n", " # Define conversion function for the trait (kidney cancer)\n", " def convert_trait(value):\n", " \"\"\"\n", " Convert disease location to binary trait values based on kidney location.\n", " 1 for kidney samples, 0 for other locations\n", " \"\"\"\n", " if value is None:\n", " return None\n", " \n", " # Extract the value part after the colon\n", " if ':' in value:\n", " value = value.split(':', 1)[1].strip()\n", " \n", " # Check if it's a kidney sample\n", " if 'kidney' in value.lower():\n", " return 1 # Kidney samples as cases\n", " else:\n", " return 0 # Other locations as controls\n", "\n", " # Extract clinical features\n", " selected_clinical_df = geo_select_clinical_features(\n", " clinical_df=clinical_data,\n", " trait=trait,\n", " trait_row=trait_row,\n", " convert_trait=convert_trait,\n", " age_row=None, # No age data\n", " convert_age=None,\n", " gender_row=None, # No gender data\n", " convert_gender=None\n", " )\n", " \n", " # Save the clinical data\n", " os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", " selected_clinical_df.to_csv(out_clinical_data_file)\n", " print(f\"Clinical data extracted and saved to {out_clinical_data_file}\")\n", " \n", " # For diagnostic purposes\n", " print(\"Clinical data preview:\")\n", " print(preview_df(selected_clinical_df))\n", " \n", "except Exception as e:\n", " print(f\"Error extracting clinical features: {e}\")\n", " selected_clinical_df = pd.DataFrame()\n", "\n", "# 3. Link clinical and genetic data\n", "print(\"\\nLinking clinical and genetic data...\")\n", "try:\n", " # Check if both datasets are available\n", " if not gene_data.empty and not selected_clinical_df.empty:\n", " # Link clinical and genetic data\n", " linked_data = geo_link_clinical_genetic_data(selected_clinical_df, gene_data)\n", " print(f\"Linked data shape: {linked_data.shape}\")\n", " \n", " # 4. Handle missing values\n", " print(\"\\nHandling missing values...\")\n", " linked_data = handle_missing_values(linked_data, trait)\n", " print(f\"After handling missing values, data shape: {linked_data.shape}\")\n", " \n", " # 5. Determine whether the trait and demographic features are biased\n", " print(\"\\nChecking for bias in features...\")\n", " is_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)\n", " else:\n", " print(\"Clinical data or gene data is not available. Cannot proceed with linking.\")\n", " linked_data = pd.DataFrame()\n", " is_biased = True\n", "except Exception as e:\n", " print(f\"Error in linking data: {e}\")\n", " linked_data = pd.DataFrame()\n", " is_biased = True\n", "\n", "# 6. Final quality validation\n", "print(\"\\nPerforming final validation...\")\n", "note = \"\"\n", "if 'linked_data' not in locals() or linked_data.empty:\n", " note = \"Dataset failed processing: no usable samples remained after filtering.\"\n", " is_biased = True\n", " linked_data = pd.DataFrame() # Ensure linked_data exists for validation\n", "elif linked_data.shape[0] < 10:\n", " note = \"Dataset has too few samples (<10) after filtering for valid analysis.\"\n", " is_biased = True\n", "elif 'is_biased' in locals() and is_biased:\n", " note = \"Dataset has severely biased trait distribution.\"\n", "\n", "is_gene_available = 'gene_data' in locals() and not gene_data.empty\n", "is_trait_available = 'selected_clinical_df' in locals() and not selected_clinical_df.empty\n", "\n", "is_usable = validate_and_save_cohort_info(\n", " is_final=True,\n", " cohort=cohort,\n", " info_path=json_path,\n", " is_gene_available=is_gene_available,\n", " is_trait_available=is_trait_available,\n", " is_biased=is_biased if 'is_biased' in locals() else True,\n", " df=linked_data,\n", " note=note\n", ")\n", "\n", "# 7. Save linked data if usable\n", "if is_usable and 'linked_data' in locals() and not linked_data.empty:\n", " # Create directory if it doesn't exist\n", " os.makedirs(os.path.dirname(out_data_file), exist_ok=True)\n", " \n", " # Save linked data\n", " linked_data.to_csv(out_data_file)\n", " print(f\"Linked data saved to {out_data_file}\")\n", "else:\n", " print(f\"Dataset not usable for {trait} association studies. Data not 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 }