{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "79a32728", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:51.265330Z", "iopub.status.busy": "2025-03-25T03:42:51.265214Z", "iopub.status.idle": "2025-03-25T03:42:51.446579Z", "shell.execute_reply": "2025-03-25T03:42:51.446230Z" } }, "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 = \"Psoriasis\"\n", "cohort = \"GSE182740\"\n", "\n", "# Input paths\n", "in_trait_dir = \"../../input/GEO/Psoriasis\"\n", "in_cohort_dir = \"../../input/GEO/Psoriasis/GSE182740\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Psoriasis/GSE182740.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Psoriasis/gene_data/GSE182740.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Psoriasis/clinical_data/GSE182740.csv\"\n", "json_path = \"../../output/preprocess/Psoriasis/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "56a2f19f", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "cc6be732", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:51.448304Z", "iopub.status.busy": "2025-03-25T03:42:51.448157Z", "iopub.status.idle": "2025-03-25T03:42:51.635462Z", "shell.execute_reply": "2025-03-25T03:42:51.635093Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Background Information:\n", "!Series_title\t\"Genomic profiling of the overlap phenotype between psoriasis and atopic dermatitis\"\n", "!Series_summary\t\"Clinical overlaps between psoriasis and atopic dermatitis are sometimes undiscernible, and there is no consensus whether to treat the overlap phenotype as psoriasis or atopic dermatitis. We enrolled patients diagnosed with either psoriasis or atopic dermatitis, and clinically re-stratified them into classic psoriasis, classic atopic dermatitis, and the overlap phenotype between psoriasis and atopic dermatitis. We compared gene expression profiles of lesional and nonlesional skin biopsy tissues between the three comparison groups. Global mRNA expression and T-cell subset cytokine expression in the skin of the overlap phenotype were consistent with the profiles of psoriasis and different from the profiles of atopic dermatitis. Unsupervised k-means clustering indicated that the best number of distinct clusters for the total population of the three comparison groups was two, and the two clusters of psoriasis and atopic dermatitis were differentiated by gene expression. Our study suggests that clinical overlap phenotype between psoriasis and atopic dermatitis has dominant molecular features of psoriasis, and genomic biomarkers can differentiate psoriasis and atopic dermatitis at molecular levels in patients with a spectrum of psoriasis and atopic dermatitis. \"\n", "!Series_overall_design\t\"Whole tissue samples of 20 atopic dermatitis (10 lesional and 10 nonlesional), 33 overlap phenotype of atopic dermatitis and psoriasis (17 lesional and 16 nonlesional), 16 psoriasis (9 lesional and 7 nonlesional), and 6 normal skin (including GSE78097 data) were obtained via skin biopsy and subjected to microarray analysis.\"\n", "Sample Characteristics Dictionary:\n", "{0: ['tissue: skin'], 1: ['disease: Psoriasis', 'disease: Atopic_dermatitis', 'disease: Mixed', 'disease: Normal_skin'], 2: ['lesional (ls) vs. nonlesional (nl) vs. normal: LS', 'lesional (ls) vs. nonlesional (nl) vs. normal: NL', 'lesional (ls) vs. nonlesional (nl) vs. normal: Normal'], 3: ['psoriasis area and diseave severity index (pasi): 10.1', 'psoriasis area and diseave severity index (pasi): 7.9', 'psoriasis area and diseave severity index (pasi): 10.4', 'psoriasis area and diseave severity index (pasi): 9', 'psoriasis area and diseave severity index (pasi): 18.4', 'psoriasis area and diseave severity index (pasi): 11.1', 'psoriasis area and diseave severity index (pasi): 8.5', 'psoriasis area and diseave severity index (pasi): 7.1', 'psoriasis area and diseave severity index (pasi): 6.3', 'psoriasis area and diseave severity index (pasi): 10.8', 'psoriasis area and diseave severity index (pasi): 7.4', 'psoriasis area and diseave severity index (pasi): 3.5', 'psoriasis area and diseave severity index (pasi): 4.7', 'psoriasis area and diseave severity index (pasi): 4', 'psoriasis area and diseave severity index (pasi): 25.4', 'psoriasis area and diseave severity index (pasi): 5.8', 'psoriasis area and diseave severity index (pasi): 6', 'psoriasis area and diseave severity index (pasi): 17.2', 'psoriasis area and diseave severity index (pasi): 7.6', 'psoriasis area and diseave severity index (pasi): 3.6', 'psoriasis area and diseave severity index (pasi): 2.4', 'psoriasis area and diseave severity index (pasi): 2.9', 'psoriasis area and diseave severity index (pasi): 17.9', 'psoriasis area and diseave severity index (pasi): 1.4', 'psoriasis area and diseave severity index (pasi): 18', 'psoriasis area and diseave severity index (pasi): 10.6', 'psoriasis area and diseave severity index (pasi): 11.8', 'psoriasis area and diseave severity index (pasi): 6.6', 'psoriasis area and diseave severity index (pasi): 20.4', 'psoriasis area and diseave severity index (pasi): 17.7'], 4: ['scoring atopic dermatitis (scorad): 19.97', 'scoring atopic dermatitis (scorad): 41.94', 'scoring atopic dermatitis (scorad): 46.98', 'scoring atopic dermatitis (scorad): 36.38', 'scoring atopic dermatitis (scorad): 81.92', 'scoring atopic dermatitis (scorad): 39.24', 'scoring atopic dermatitis (scorad): 51.74', 'scoring atopic dermatitis (scorad): 17.03', 'scoring atopic dermatitis (scorad): 35.2', 'scoring atopic dermatitis (scorad): 29.64', 'scoring atopic dermatitis (scorad): 43.3', 'scoring atopic dermatitis (scorad): 42.97', 'scoring atopic dermatitis (scorad): 13.22', 'scoring atopic dermatitis (scorad): 13.87', 'scoring atopic dermatitis (scorad): 14.29', 'scoring atopic dermatitis (scorad): 36.44', 'scoring atopic dermatitis (scorad): 21.94', 'scoring atopic dermatitis (scorad): 18.62', 'scoring atopic dermatitis (scorad): 30.2', 'scoring atopic dermatitis (scorad): 17.14', 'scoring atopic dermatitis (scorad): 16.99', 'scoring atopic dermatitis (scorad): 14.51', 'scoring atopic dermatitis (scorad): 12.64', 'scoring atopic dermatitis (scorad): 16.33', 'scoring atopic dermatitis (scorad): 32.31', 'scoring atopic dermatitis (scorad): 14.52', 'scoring atopic dermatitis (scorad): 30.49', 'scoring atopic dermatitis (scorad): 29.03', 'scoring atopic dermatitis (scorad): 33.96', 'scoring atopic dermatitis (scorad): 12.76'], 5: ['eczema area and severity index (easi): 9.4', 'eczema area and severity index (easi): 22.65', 'eczema area and severity index (easi): 25.55', 'eczema area and severity index (easi): 25.5', 'eczema area and severity index (easi): 47.65', 'eczema area and severity index (easi): 18.9', 'eczema area and severity index (easi): 28.65', 'eczema area and severity index (easi): 9.6', 'eczema area and severity index (easi): 20.95', 'eczema area and severity index (easi): 23.5', 'eczema area and severity index (easi): 29.6', 'eczema area and severity index (easi): 18.85', 'eczema area and severity index (easi): 5.8', 'eczema area and severity index (easi): 5.4', 'eczema area and severity index (easi): 10.2', 'eczema area and severity index (easi): 33', 'eczema area and severity index (easi): 14.5', 'eczema area and severity index (easi): 16.3', 'eczema area and severity index (easi): 16.8', 'eczema area and severity index (easi): 5.1', 'eczema area and severity index (easi): 2.85', 'eczema area and severity index (easi): 4.8', 'eczema area and severity index (easi): 2.5', 'eczema area and severity index (easi): 3.1', 'eczema area and severity index (easi): 20.6', 'eczema area and severity index (easi): 1.4', 'eczema area and severity index (easi): 20.5', 'eczema area and severity index (easi): 20.3', 'eczema area and severity index (easi): 17.1', 'eczema area and severity index (easi): 4.1'], 6: ['treatment: Pretreatment', 'sample relation with gse78097 (reanalysis): GSM2066662', 'sample relation with gse78097 (reanalysis): GSM2066663', 'sample relation with gse78097 (reanalysis): GSM2066664', 'sample relation with gse78097 (reanalysis): GSM2066665', 'sample relation with gse78097 (reanalysis): GSM2066666', 'sample relation with gse78097 (reanalysis): GSM2066667'], 7: [nan, 'treatment: Pretreatment']}\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": "427ec6a0", "metadata": {}, "source": [ "### Step 2: Dataset Analysis and Clinical Feature Extraction" ] }, { "cell_type": "code", "execution_count": 3, "id": "da90b712", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:51.637337Z", "iopub.status.busy": "2025-03-25T03:42:51.637191Z", "iopub.status.idle": "2025-03-25T03:42:51.647392Z", "shell.execute_reply": "2025-03-25T03:42:51.647108Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Preview of selected clinical features:\n", "{'GSM5535864': [1.0], 'GSM5535865': [0.0], 'GSM5535866': [0.0], 'GSM5535867': [0.0], 'GSM5535868': [0.0], 'GSM5535869': [0.0], 'GSM5535870': [0.0], 'GSM5535871': [0.0], 'GSM5535872': [0.0], 'GSM5535873': [0.0], 'GSM5535874': [0.0], 'GSM5535875': [1.0], 'GSM5535876': [0.0], 'GSM5535877': [0.0], 'GSM5535878': [0.0], 'GSM5535879': [0.0], 'GSM5535880': [0.0], 'GSM5535881': [0.0], 'GSM5535882': [1.0], 'GSM5535883': [1.0], 'GSM5535884': [1.0], 'GSM5535885': [1.0], 'GSM5535886': [1.0], 'GSM5535887': [1.0], 'GSM5535888': [1.0], 'GSM5535889': [1.0], 'GSM5535890': [1.0], 'GSM5535891': [1.0], 'GSM5535892': [1.0], 'GSM5535893': [1.0], 'GSM5535894': [1.0], 'GSM5535895': [1.0], 'GSM5535896': [1.0], 'GSM5535897': [1.0], 'GSM5535898': [1.0], 'GSM5535899': [1.0], 'GSM5535900': [1.0], 'GSM5535901': [1.0], 'GSM5535902': [1.0], 'GSM5535903': [1.0], 'GSM5535904': [1.0], 'GSM5535905': [1.0], 'GSM5535906': [1.0], 'GSM5535907': [1.0], 'GSM5535908': [1.0], 'GSM5535909': [1.0], 'GSM5535910': [1.0], 'GSM5535911': [1.0], 'GSM5535912': [1.0], 'GSM5535913': [1.0], 'GSM5535914': [1.0], 'GSM5535915': [1.0], 'GSM5535916': [1.0], 'GSM5535917': [1.0], 'GSM5535918': [1.0], 'GSM5535919': [0.0], 'GSM5535920': [1.0], 'GSM5535921': [1.0], 'GSM5535922': [1.0], 'GSM5535923': [1.0], 'GSM5535924': [1.0], 'GSM5535925': [1.0], 'GSM5535926': [1.0], 'GSM5535927': [1.0], 'GSM5535928': [0.0], 'GSM5535929': [0.0], 'GSM5535930': [0.0], 'GSM5535931': [1.0], 'GSM5535932': [1.0], 'GSM5535933': [0.0], 'GSM5535934': [0.0], 'GSM5535935': [0.0], 'GSM5535936': [0.0], 'GSM5535937': [0.0], 'GSM5535938': [0.0]}\n", "Clinical data saved to ../../output/preprocess/Psoriasis/clinical_data/GSE182740.csv\n" ] } ], "source": [ "import pandas as pd\n", "import numpy as np\n", "import os\n", "import json\n", "from typing import Optional, Callable, Dict, Any\n", "\n", "# 1. Gene Expression Data Availability\n", "# Looking at the background information, we can see this dataset contains gene expression data\n", "# from microarray analysis of skin tissue samples.\n", "is_gene_available = True\n", "\n", "# 2. Variable Availability and Data Type Conversion\n", "# 2.1 Data Availability\n", "\n", "# For trait (Psoriasis)\n", "# Looking at the sample characteristics dict, disease information is at index 1\n", "# with values like 'disease: Psoriasis', 'disease: Atopic_dermatitis', etc.\n", "trait_row = 1\n", "\n", "# For age\n", "# There's no age information in the sample characteristics dictionary.\n", "age_row = None\n", "\n", "# For gender\n", "# There's no gender information in the sample characteristics dictionary.\n", "gender_row = None\n", "\n", "# 2.2 Data Type Conversion\n", "\n", "def convert_trait(value):\n", " \"\"\"Convert disease value to binary trait status (Psoriasis vs non-Psoriasis).\"\"\"\n", " if not isinstance(value, str):\n", " return None\n", " \n", " # Extract value after the colon\n", " parts = value.split(': ', 1)\n", " if len(parts) != 2:\n", " return None\n", " \n", " disease = parts[1].strip()\n", " \n", " # Convert to binary: 1 for Psoriasis or Mixed (which has psoriasis features), 0 for others\n", " if disease == 'Psoriasis' or disease == 'Mixed':\n", " return 1\n", " elif disease == 'Atopic_dermatitis' or disease == 'Normal_skin':\n", " return 0\n", " else:\n", " return None\n", "\n", "# Although we don't have age data, we'll define the conversion function as a placeholder\n", "def convert_age(value):\n", " \"\"\"Convert age value to numeric.\"\"\"\n", " if not isinstance(value, str):\n", " return None\n", " \n", " parts = value.split(': ', 1)\n", " if len(parts) != 2:\n", " return None\n", " \n", " try:\n", " return float(parts[1].strip())\n", " except ValueError:\n", " return None\n", "\n", "# Although we don't have gender data, we'll define the conversion function as a placeholder\n", "def convert_gender(value):\n", " \"\"\"Convert gender value to binary (0 for female, 1 for male).\"\"\"\n", " if not isinstance(value, str):\n", " return None\n", " \n", " parts = value.split(': ', 1)\n", " if len(parts) != 2:\n", " return None\n", " \n", " gender = parts[1].strip().lower()\n", " \n", " if gender in ['female', 'f']:\n", " return 0\n", " elif gender in ['male', 'm']:\n", " return 1\n", " else:\n", " return None\n", "\n", "# 3. Save Metadata\n", "# Determine trait data availability\n", "is_trait_available = trait_row is not None\n", "\n", "# Conduct initial filtering on the usability of the dataset and save relevant information\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, clinical data is available\n", "if trait_row is not None:\n", " # Create directories if they don't exist\n", " os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", " \n", " # Use clinical_data variable that should be available from previous steps\n", " # We'll assume it's already in the correct format with all sample characteristics\n", " # Extract clinical features using the function from the library\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=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 = preview_df(selected_clinical_df)\n", " print(\"Preview of selected clinical features:\")\n", " print(preview)\n", " \n", " # Save the processed clinical data\n", " selected_clinical_df.to_csv(out_clinical_data_file, index=False)\n", " print(f\"Clinical data saved to {out_clinical_data_file}\")\n" ] }, { "cell_type": "markdown", "id": "aff06551", "metadata": {}, "source": [ "### Step 3: Gene Data Extraction" ] }, { "cell_type": "code", "execution_count": 4, "id": "64ff351b", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:51.648693Z", "iopub.status.busy": "2025-03-25T03:42:51.648591Z", "iopub.status.idle": "2025-03-25T03:42:51.988655Z", "shell.execute_reply": "2025-03-25T03:42:51.988294Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "First 20 gene/probe identifiers:\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', '1552256_a_at', '1552257_a_at', '1552258_at', '1552261_at',\n", " '1552263_at', '1552264_a_at', '1552266_at'],\n", " dtype='object', name='ID')\n", "\n", "Gene data dimensions: 54675 genes × 75 samples\n" ] } ], "source": [ "# 1. Re-identify the SOFT and matrix files to ensure we have the correct paths\n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", "\n", "# 2. Extract the gene expression data from the matrix file\n", "gene_data = get_genetic_data(matrix_file)\n", "\n", "# 3. Print the first 20 row IDs (gene or probe identifiers)\n", "print(\"\\nFirst 20 gene/probe identifiers:\")\n", "print(gene_data.index[:20])\n", "\n", "# 4. Print the dimensions of the gene expression data\n", "print(f\"\\nGene data dimensions: {gene_data.shape[0]} genes × {gene_data.shape[1]} samples\")\n", "\n", "# Note: we keep is_gene_available as True since we successfully extracted gene expression data\n", "is_gene_available = True\n" ] }, { "cell_type": "markdown", "id": "988df3d6", "metadata": {}, "source": [ "### Step 4: Gene Identifier Review" ] }, { "cell_type": "code", "execution_count": 5, "id": "3c59e9bd", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:51.989977Z", "iopub.status.busy": "2025-03-25T03:42:51.989862Z", "iopub.status.idle": "2025-03-25T03:42:51.991756Z", "shell.execute_reply": "2025-03-25T03:42:51.991455Z" } }, "outputs": [], "source": [ "# The gene identifiers appear to be Affymetrix probe IDs (e.g., '1007_s_at', '1053_at'),\n", "# not standard human gene symbols like BRCA1 or TNF.\n", "# These are microarray probe identifiers that need to be mapped to actual gene symbols.\n", "\n", "requires_gene_mapping = True\n" ] }, { "cell_type": "markdown", "id": "2baf48e6", "metadata": {}, "source": [ "### Step 5: Gene Annotation" ] }, { "cell_type": "code", "execution_count": 6, "id": "925969a4", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:51.992766Z", "iopub.status.busy": "2025-03-25T03:42:51.992661Z", "iopub.status.idle": "2025-03-25T03:42:58.354167Z", "shell.execute_reply": "2025-03-25T03:42:58.353829Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Preview of SOFT file content:\n", "^DATABASE = GeoMiame\n", "!Database_name = Gene Expression Omnibus (GEO)\n", "!Database_institute = NCBI NLM NIH\n", "!Database_web_link = http://www.ncbi.nlm.nih.gov/geo\n", "!Database_email = geo@ncbi.nlm.nih.gov\n", "^SERIES = GSE182740\n", "!Series_title = Genomic profiling of the overlap phenotype between psoriasis and atopic dermatitis\n", "!Series_geo_accession = GSE182740\n", "!Series_status = Public on Jun 24 2023\n", "!Series_submission_date = Aug 25 2021\n", "!Series_last_update_date = Mar 05 2024\n", "!Series_pubmed_id = 37419444\n", "!Series_summary = Clinical overlaps between psoriasis and atopic dermatitis are sometimes undiscernible, and there is no consensus whether to treat the overlap phenotype as psoriasis or atopic dermatitis. We enrolled patients diagnosed with either psoriasis or atopic dermatitis, and clinically re-stratified them into classic psoriasis, classic atopic dermatitis, and the overlap phenotype between psoriasis and atopic dermatitis. We compared gene expression profiles of lesional and nonlesional skin biopsy tissues between the three comparison groups. Global mRNA expression and T-cell subset cytokine expression in the skin of the overlap phenotype were consistent with the profiles of psoriasis and different from the profiles of atopic dermatitis. Unsupervised k-means clustering indicated that the best number of distinct clusters for the total population of the three comparison groups was two, and the two clusters of psoriasis and atopic dermatitis were differentiated by gene expression. Our study suggests that clinical overlap phenotype between psoriasis and atopic dermatitis has dominant molecular features of psoriasis, and genomic biomarkers can differentiate psoriasis and atopic dermatitis at molecular levels in patients with a spectrum of psoriasis and atopic dermatitis.\n", "!Series_overall_design = Whole tissue samples of 20 atopic dermatitis (10 lesional and 10 nonlesional), 33 overlap phenotype of atopic dermatitis and psoriasis (17 lesional and 16 nonlesional), 16 psoriasis (9 lesional and 7 nonlesional), and 6 normal skin (including GSE78097 data) were obtained via skin biopsy and subjected to microarray analysis.\n", "!Series_type = Expression profiling by array\n", "!Series_contributor = James,G,Krueger\n", "!Series_contributor = Jaehwan,,Kim\n", "!Series_contributor = Jeong,E,Kim\n", "!Series_sample_id = GSM5535864\n", "!Series_sample_id = GSM5535865\n", "!Series_sample_id = GSM5535866\n", "...\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gene annotation dataframe using default method:\n", "Shape: (4155375, 16)\n", "Columns: ['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", " ID GB_ACC SPOT_ID Species Scientific Name Annotation Date \\\n", "0 1007_s_at U48705 NaN Homo sapiens Oct 6, 2014 \n", "1 1053_at M87338 NaN Homo sapiens Oct 6, 2014 \n", "2 117_at X51757 NaN Homo sapiens Oct 6, 2014 \n", "\n", " Sequence Type Sequence Source \\\n", "0 Exemplar sequence Affymetrix Proprietary Database \n", "1 Exemplar sequence GenBank \n", "2 Exemplar sequence Affymetrix Proprietary Database \n", "\n", " Target Description Representative Public ID \\\n", "0 U48705 /FEATURE=mRNA /DEFINITION=HSU48705 Huma... U48705 \n", "1 M87338 /FEATURE= /DEFINITION=HUMA1SBU Human re... M87338 \n", "2 X51757 /FEATURE=cds /DEFINITION=HSP70B Human h... X51757 \n", "\n", " Gene Title Gene Symbol \\\n", "0 discoidin domain receptor tyrosine kinase 1 //... DDR1 /// MIR4640 \n", "1 replication factor C (activator 1) 2, 40kDa RFC2 \n", "2 heat shock 70kDa protein 6 (HSP70B') HSPA6 \n", "\n", " ENTREZ_GENE_ID RefSeq Transcript ID \\\n", "0 780 /// 100616237 NM_001202521 /// NM_001202522 /// NM_001202523... \n", "1 5982 NM_001278791 /// NM_001278792 /// NM_001278793... \n", "2 3310 NM_002155 \n", "\n", " Gene Ontology Biological Process \\\n", "0 0001558 // regulation of cell growth // inferr... \n", "1 0000278 // mitotic cell cycle // traceable aut... \n", "2 0000902 // cell morphogenesis // inferred from... \n", "\n", " Gene Ontology Cellular Component \\\n", "0 0005576 // extracellular region // inferred fr... \n", "1 0005634 // nucleus // inferred from electronic... \n", "2 0005737 // cytoplasm // inferred from direct a... \n", "\n", " Gene Ontology Molecular Function \n", "0 0000166 // nucleotide binding // inferred from... \n", "1 0000166 // nucleotide binding // inferred from... \n", "2 0000166 // nucleotide binding // inferred from... \n", "\n", "Searching for platform annotation section in SOFT file...\n", "^PLATFORM = GPL570\n", "!platform_table_begin\n", "ID\tGB_ACC\tSPOT_ID\tSpecies Scientific Name\tAnnotation Date\tSequence Type\tSequence Source\tTarget Description\tRepresentative Public ID\tGene Title\tGene Symbol\tENTREZ_GENE_ID\tRefSeq Transcript ID\tGene Ontology Biological Process\tGene Ontology Cellular Component\tGene Ontology Molecular Function\n", "1007_s_at\tU48705\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tAffymetrix Proprietary Database\tU48705 /FEATURE=mRNA /DEFINITION=HSU48705 Human receptor tyrosine kinase DDR gene, complete cds\tU48705\tdiscoidin domain receptor tyrosine kinase 1 /// microRNA 4640\tDDR1 /// MIR4640\t780 /// 100616237\tNM_001202521 /// NM_001202522 /// NM_001202523 /// NM_001954 /// NM_013993 /// NM_013994 /// NR_039783 /// XM_005249385 /// XM_005249386 /// XM_005249387 /// XM_005249389 /// XM_005272873 /// XM_005272874 /// XM_005272875 /// XM_005272877 /// XM_005275027 /// XM_005275028 /// XM_005275030 /// XM_005275031 /// XM_005275162 /// XM_005275163 /// XM_005275164 /// XM_005275166 /// XM_005275457 /// XM_005275458 /// XM_005275459 /// XM_005275461 /// XM_006715185 /// XM_006715186 /// XM_006715187 /// XM_006715188 /// XM_006715189 /// XM_006715190 /// XM_006725501 /// XM_006725502 /// XM_006725503 /// XM_006725504 /// XM_006725505 /// XM_006725506 /// XM_006725714 /// XM_006725715 /// XM_006725716 /// XM_006725717 /// XM_006725718 /// XM_006725719 /// XM_006725720 /// XM_006725721 /// XM_006725722 /// XM_006725827 /// XM_006725828 /// XM_006725829 /// XM_006725830 /// XM_006725831 /// XM_006725832 /// XM_006726017 /// XM_006726018 /// XM_006726019 /// XM_006726020 /// XM_006726021 /// XM_006726022 /// XR_427836 /// XR_430858 /// XR_430938 /// XR_430974 /// XR_431015\t0001558 // regulation of cell growth // inferred from electronic annotation /// 0001952 // regulation of cell-matrix adhesion // inferred from electronic annotation /// 0006468 // protein phosphorylation // inferred from electronic annotation /// 0007155 // cell adhesion // traceable author statement /// 0007169 // transmembrane receptor protein tyrosine kinase signaling pathway // inferred from electronic annotation /// 0007565 // female pregnancy // inferred from electronic annotation /// 0007566 // embryo implantation // inferred from electronic annotation /// 0007595 // lactation // inferred from electronic annotation /// 0008285 // negative regulation of cell proliferation // inferred from electronic annotation /// 0010715 // regulation of extracellular matrix disassembly // inferred from mutant phenotype /// 0014909 // smooth muscle cell migration // inferred from mutant phenotype /// 0016310 // phosphorylation // inferred from electronic annotation /// 0018108 // peptidyl-tyrosine phosphorylation // inferred from electronic annotation /// 0030198 // extracellular matrix organization // traceable author statement /// 0038063 // collagen-activated tyrosine kinase receptor signaling pathway // inferred from direct assay /// 0038063 // collagen-activated tyrosine kinase receptor signaling pathway // inferred from mutant phenotype /// 0038083 // peptidyl-tyrosine autophosphorylation // inferred from direct assay /// 0043583 // ear development // inferred from electronic annotation /// 0044319 // wound healing, spreading of cells // inferred from mutant phenotype /// 0046777 // protein autophosphorylation // inferred from direct assay /// 0060444 // branching involved in mammary gland duct morphogenesis // inferred from electronic annotation /// 0060749 // mammary gland alveolus development // inferred from electronic annotation /// 0061302 // smooth muscle cell-matrix adhesion // inferred from mutant phenotype\t0005576 // extracellular region // inferred from electronic annotation /// 0005615 // extracellular space // inferred from direct assay /// 0005886 // plasma membrane // traceable author statement /// 0005887 // integral component of plasma membrane // traceable author statement /// 0016020 // membrane // inferred from electronic annotation /// 0016021 // integral component of membrane // inferred from electronic annotation /// 0043235 // receptor complex // inferred from direct assay /// 0070062 // extracellular vesicular exosome // inferred from direct assay\t0000166 // nucleotide binding // inferred from electronic annotation /// 0004672 // protein kinase activity // inferred from electronic annotation /// 0004713 // protein tyrosine kinase activity // inferred from electronic annotation /// 0004714 // transmembrane receptor protein tyrosine kinase activity // traceable author statement /// 0005515 // protein binding // inferred from physical interaction /// 0005518 // collagen binding // inferred from direct assay /// 0005518 // collagen binding // inferred from mutant phenotype /// 0005524 // ATP binding // inferred from electronic annotation /// 0016301 // kinase activity // inferred from electronic annotation /// 0016740 // transferase activity // inferred from electronic annotation /// 0016772 // transferase activity, transferring phosphorus-containing groups // inferred from electronic annotation /// 0038062 // protein tyrosine kinase collagen receptor activity // inferred from direct assay /// 0046872 // metal ion binding // inferred from electronic annotation\n", "1053_at\tM87338\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tGenBank\tM87338 /FEATURE= /DEFINITION=HUMA1SBU Human replication factor C, 40-kDa subunit (A1) mRNA, complete cds\tM87338\treplication factor C (activator 1) 2, 40kDa\tRFC2\t5982\tNM_001278791 /// NM_001278792 /// NM_001278793 /// NM_002914 /// NM_181471 /// XM_006716080\t0000278 // mitotic cell cycle // traceable author statement /// 0000722 // telomere maintenance via recombination // traceable author statement /// 0000723 // telomere maintenance // traceable author statement /// 0006260 // DNA replication // traceable author statement /// 0006271 // DNA strand elongation involved in DNA replication // traceable author statement /// 0006281 // DNA repair // traceable author statement /// 0006283 // transcription-coupled nucleotide-excision repair // traceable author statement /// 0006289 // nucleotide-excision repair // traceable author statement /// 0006297 // nucleotide-excision repair, DNA gap filling // traceable author statement /// 0015979 // photosynthesis // inferred from electronic annotation /// 0015995 // chlorophyll biosynthetic process // inferred from electronic annotation /// 0032201 // telomere maintenance via semi-conservative replication // traceable author statement\t0005634 // nucleus // inferred from electronic annotation /// 0005654 // nucleoplasm // traceable author statement /// 0005663 // DNA replication factor C complex // inferred from direct assay\t0000166 // nucleotide binding // inferred from electronic annotation /// 0003677 // DNA binding // inferred from electronic annotation /// 0005515 // protein binding // inferred from physical interaction /// 0005524 // ATP binding // inferred from electronic annotation /// 0016851 // magnesium chelatase activity // inferred from electronic annotation /// 0017111 // nucleoside-triphosphatase activity // inferred from electronic annotation\n", "117_at\tX51757\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tAffymetrix Proprietary Database\tX51757 /FEATURE=cds /DEFINITION=HSP70B Human heat-shock protein HSP70B' gene\tX51757\theat shock 70kDa protein 6 (HSP70B')\tHSPA6\t3310\tNM_002155\t0000902 // cell morphogenesis // inferred from electronic annotation /// 0006200 // ATP catabolic process // inferred from direct assay /// 0006950 // response to stress // inferred from electronic annotation /// 0006986 // response to unfolded protein // traceable author statement /// 0034605 // cellular response to heat // inferred from direct assay /// 0042026 // protein refolding // inferred from direct assay /// 0070370 // cellular heat acclimation // inferred from mutant phenotype\t0005737 // cytoplasm // inferred from direct assay /// 0005814 // centriole // inferred from direct assay /// 0005829 // cytosol // inferred from direct assay /// 0008180 // COP9 signalosome // inferred from direct assay /// 0070062 // extracellular vesicular exosome // inferred from direct assay /// 0072562 // blood microparticle // inferred from direct assay\t0000166 // nucleotide binding // inferred from electronic annotation /// 0005524 // ATP binding // inferred from electronic annotation /// 0019899 // enzyme binding // inferred from physical interaction /// 0031072 // heat shock protein binding // inferred from physical interaction /// 0042623 // ATPase activity, coupled // inferred from direct assay /// 0051082 // unfolded protein binding // inferred from direct assay\n", "121_at\tX69699\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tGenBank\tX69699 /FEATURE= /DEFINITION=HSPAX8A H.sapiens Pax8 mRNA\tX69699\tpaired box 8\tPAX8\t7849\tNM_003466 /// NM_013951 /// NM_013952 /// NM_013953 /// NM_013992\t0001655 // urogenital system development // inferred from sequence or structural similarity /// 0001656 // metanephros development // inferred from electronic annotation /// 0001658 // branching involved in ureteric bud morphogenesis // inferred from expression pattern /// 0001822 // kidney development // inferred from expression pattern /// 0001823 // mesonephros development // inferred from sequence or structural similarity /// 0003337 // mesenchymal to epithelial transition involved in metanephros morphogenesis // inferred from expression pattern /// 0006351 // transcription, DNA-templated // inferred from direct assay /// 0006355 // regulation of transcription, DNA-templated // inferred from electronic annotation /// 0007275 // multicellular organismal development // inferred from electronic annotation /// 0007417 // central nervous system development // inferred from expression pattern /// 0009653 // anatomical structure morphogenesis // traceable author statement /// 0030154 // cell differentiation // inferred from electronic annotation /// 0030878 // thyroid gland development // inferred from expression pattern /// 0030878 // thyroid gland development // inferred from mutant phenotype /// 0038194 // thyroid-stimulating hormone signaling pathway // traceable author statement /// 0039003 // pronephric field specification // inferred from sequence or structural similarity /// 0042472 // inner ear morphogenesis // inferred from sequence or structural similarity /// 0042981 // regulation of apoptotic process // inferred from sequence or structural similarity /// 0045893 // positive regulation of transcription, DNA-templated // inferred from direct assay /// 0045893 // positive regulation of transcription, DNA-templated // inferred from sequence or structural similarity /// 0045944 // positive regulation of transcription from RNA polymerase II promoter // inferred from direct assay /// 0048793 // pronephros development // inferred from sequence or structural similarity /// 0071371 // cellular response to gonadotropin stimulus // inferred from direct assay /// 0071599 // otic vesicle development // inferred from expression pattern /// 0072050 // S-shaped body morphogenesis // inferred from electronic annotation /// 0072073 // kidney epithelium development // inferred from electronic annotation /// 0072108 // positive regulation of mesenchymal to epithelial transition involved in metanephros morphogenesis // inferred from sequence or structural similarity /// 0072164 // mesonephric tubule development // inferred from electronic annotation /// 0072207 // metanephric epithelium development // inferred from expression pattern /// 0072221 // metanephric distal convoluted tubule development // inferred from sequence or structural similarity /// 0072278 // metanephric comma-shaped body morphogenesis // inferred from expression pattern /// 0072284 // metanephric S-shaped body morphogenesis // inferred from expression pattern /// 0072289 // metanephric nephron tubule formation // inferred from sequence or structural similarity /// 0072305 // negative regulation of mesenchymal cell apoptotic process involved in metanephric nephron morphogenesis // inferred from sequence or structural similarity /// 0072307 // regulation of metanephric nephron tubule epithelial cell differentiation // inferred from sequence or structural similarity /// 0090190 // positive regulation of branching involved in ureteric bud morphogenesis // inferred from sequence or structural similarity /// 1900212 // negative regulation of mesenchymal cell apoptotic process involved in metanephros development // inferred from sequence or structural similarity /// 1900215 // negative regulation of apoptotic process involved in metanephric collecting duct development // inferred from sequence or structural similarity /// 1900218 // negative regulation of apoptotic process involved in metanephric nephron tubule development // inferred from sequence or structural similarity /// 2000594 // positive regulation of metanephric DCT cell differentiation // inferred from sequence or structural similarity /// 2000611 // positive regulation of thyroid hormone generation // inferred from mutant phenotype /// 2000612 // regulation of thyroid-stimulating hormone secretion // inferred from mutant phenotype\t0005634 // nucleus // inferred from direct assay /// 0005654 // nucleoplasm // inferred from sequence or structural similarity /// 0005730 // nucleolus // inferred from direct assay\t0000979 // RNA polymerase II core promoter sequence-specific DNA binding // inferred from direct assay /// 0003677 // DNA binding // inferred from direct assay /// 0003677 // DNA binding // inferred from mutant phenotype /// 0003700 // sequence-specific DNA binding transcription factor activity // inferred from direct assay /// 0004996 // thyroid-stimulating hormone receptor activity // traceable author statement /// 0005515 // protein binding // inferred from physical interaction /// 0044212 // transcription regulatory region DNA binding // inferred from direct assay\n", "1255_g_at\tL36861\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tAffymetrix Proprietary Database\tL36861 /FEATURE=expanded_cds /DEFINITION=HUMGCAPB Homo sapiens guanylate cyclase activating protein (GCAP) gene exons 1-4, complete cds\tL36861\tguanylate cyclase activator 1A (retina)\tGUCA1A\t2978\tNM_000409 /// XM_006715073\t0007165 // signal transduction // non-traceable author statement /// 0007601 // visual perception // inferred from electronic annotation /// 0007602 // phototransduction // inferred from electronic annotation /// 0007603 // phototransduction, visible light // traceable author statement /// 0016056 // rhodopsin mediated signaling pathway // traceable author statement /// 0022400 // regulation of rhodopsin mediated signaling pathway // traceable author statement /// 0030828 // positive regulation of cGMP biosynthetic process // inferred from electronic annotation /// 0031282 // regulation of guanylate cyclase activity // inferred from electronic annotation /// 0031284 // positive regulation of guanylate cyclase activity // inferred from electronic annotation /// 0050896 // response to stimulus // inferred from electronic annotation\t0001750 // photoreceptor outer segment // inferred from electronic annotation /// 0001917 // photoreceptor inner segment // inferred from electronic annotation /// 0005578 // proteinaceous extracellular matrix // inferred from electronic annotation /// 0005886 // plasma membrane // inferred from direct assay /// 0016020 // membrane // inferred from electronic annotation /// 0097381 // photoreceptor disc membrane // traceable author statement\t0005509 // calcium ion binding // inferred from electronic annotation /// 0008048 // calcium sensitive guanylate cyclase activator activity // inferred from electronic annotation /// 0030249 // guanylate cyclase regulator activity // inferred from electronic annotation /// 0046872 // metal ion binding // inferred from electronic annotation\n", "1294_at\tL13852\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tGenBank\tL13852 /FEATURE= /DEFINITION=HUME1URP Homo sapiens ubiquitin-activating enzyme E1 related protein mRNA, complete cds\tL13852\tmicroRNA 5193 /// ubiquitin-like modifier activating enzyme 7\tMIR5193 /// UBA7\t7318 /// 100847079\tNM_003335 /// NR_049825 /// XM_005265430 /// XM_006713321\t0006464 // cellular protein modification process // inferred from direct assay /// 0016567 // protein ubiquitination // not recorded /// 0016567 // protein ubiquitination // inferred from electronic annotation /// 0019221 // cytokine-mediated signaling pathway // traceable author statement /// 0019941 // modification-dependent protein catabolic process // not recorded /// 0032020 // ISG15-protein conjugation // inferred from direct assay /// 0032480 // negative regulation of type I interferon production // traceable author statement /// 0045087 // innate immune response // traceable author statement\t0005634 // nucleus // not recorded /// 0005829 // cytosol // not recorded /// 0005829 // cytosol // traceable author statement\t0000166 // nucleotide binding // inferred from electronic annotation /// 0003824 // catalytic activity // inferred from electronic annotation /// 0004839 // ubiquitin activating enzyme activity // not recorded /// 0004842 // ubiquitin-protein transferase activity // not recorded /// 0005524 // ATP binding // inferred from electronic annotation /// 0008641 // small protein activating enzyme activity // inferred from electronic annotation /// 0016874 // ligase activity // inferred from electronic annotation /// 0019782 // ISG15 activating enzyme activity // inferred from direct assay\n", "1316_at\tX55005\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tAffymetrix Proprietary Database\tX55005 /FEATURE=mRNA /DEFINITION=HSCERBAR Homo sapiens mRNA for thyroid hormone receptor alpha 1 THRA1, (c-erbA-1 gene)\tX55005\tthyroid hormone receptor, alpha\tTHRA\t7067\tNM_001190918 /// NM_001190919 /// NM_003250 /// NM_199334\t0000122 // negative regulation of transcription from RNA polymerase II promoter // inferred from direct assay /// 0000122 // negative regulation of transcription from RNA polymerase II promoter // inferred from mutant phenotype /// 0001502 // cartilage condensation // inferred from electronic annotation /// 0001503 // ossification // inferred from electronic annotation /// 0002155 // regulation of thyroid hormone mediated signaling pathway // inferred from electronic annotation /// 0005978 // glycogen biosynthetic process // inferred from sequence or structural similarity /// 0006351 // transcription, DNA-templated // inferred from electronic annotation /// 0006355 // regulation of transcription, DNA-templated // inferred from electronic annotation /// 0006357 // regulation of transcription from RNA polymerase II promoter // inferred from direct assay /// 0006366 // transcription from RNA polymerase II promoter // inferred from direct assay /// 0006367 // transcription initiation from RNA polymerase II promoter // traceable author statement /// 0007611 // learning or memory // inferred from electronic annotation /// 0007623 // circadian rhythm // inferred from electronic annotation /// 0008016 // regulation of heart contraction // inferred from electronic annotation /// 0008050 // female courtship behavior // inferred from electronic annotation /// 0009409 // response to cold // inferred from electronic annotation /// 0009755 // hormone-mediated signaling pathway // inferred from direct assay /// 0009887 // organ morphogenesis // inferred from electronic annotation /// 0010467 // gene expression // traceable author statement /// 0010498 // proteasomal protein catabolic process // inferred from sequence or structural similarity /// 0010831 // positive regulation of myotube differentiation // inferred from electronic annotation /// 0010871 // negative regulation of receptor biosynthetic process // inferred from mutant phenotype /// 0017055 // negative regulation of RNA polymerase II transcriptional preinitiation complex assembly // inferred from direct assay /// 0019216 // regulation of lipid metabolic process // inferred from sequence or structural similarity /// 0030154 // cell differentiation // inferred from electronic annotation /// 0030218 // erythrocyte differentiation // inferred from electronic annotation /// 0030522 // intracellular receptor signaling pathway // inferred from electronic annotation /// 0030878 // thyroid gland development // inferred from electronic annotation /// 0032922 // circadian regulation of gene expression // inferred from sequence or structural similarity /// 0033032 // regulation of myeloid cell apoptotic process // inferred from electronic annotation /// 0034144 // negative regulation of toll-like receptor 4 signaling pathway // inferred from mutant phenotype /// 0035947 // regulation of gluconeogenesis by regulation of transcription from RNA polymerase II promoter // inferred from mutant phenotype /// 0042752 // regulation of circadian rhythm // inferred from sequence or structural similarity /// 0042994 // cytoplasmic sequestering of transcription factor // inferred from electronic annotation /// 0043401 // steroid hormone mediated signaling pathway // inferred from electronic annotation /// 0044321 // response to leptin // inferred from sequence or structural similarity /// 0045598 // regulation of fat cell differentiation // inferred from sequence or structural similarity /// 0045892 // negative regulation of transcription, DNA-templated // inferred from direct assay /// 0045893 // positive regulation of transcription, DNA-templated // inferred from sequence or structural similarity /// 0045925 // positive regulation of female receptivity // inferred from electronic annotation /// 0045944 // positive regulation of transcription from RNA polymerase II promoter // inferred from electronic annotation /// 0048511 // rhythmic process // inferred from electronic annotation /// 0050994 // regulation of lipid catabolic process // inferred from electronic annotation /// 0060086 // circadian temperature homeostasis // inferred from sequence or structural similarity /// 0060509 // Type I pneumocyte differentiation // inferred from electronic annotation /// 0061178 // regulation of insulin secretion involved in cellular response to glucose stimulus // inferred from sequence or structural similarity /// 0061469 // regulation of type B pancreatic cell proliferation // inferred from sequence or structural similarity /// 0070859 // positive regulation of bile acid biosynthetic process // inferred from sequence or structural similarity /// 0071222 // cellular response to lipopolysaccharide // inferred from mutant phenotype /// 2000143 // negative regulation of DNA-templated transcription, initiation // inferred from direct assay /// 2000188 // regulation of cholesterol homeostasis // inferred from sequence or structural similarity /// 2000189 // positive regulation of cholesterol homeostasis // inferred from direct assay\t0000790 // nuclear chromatin // inferred from direct assay /// 0005634 // nucleus // inferred from direct assay /// 0005654 // nucleoplasm // traceable author statement /// 0005737 // cytoplasm // inferred from electronic annotation /// 0005737 // cytoplasm // inferred from sequence or structural similarity /// 0005829 // cytosol // inferred from direct assay /// 0030425 // dendrite // inferred from electronic annotation /// 0030425 // dendrite // inferred from sequence or structural similarity /// 0042995 // cell projection // inferred from electronic annotation /// 0043197 // dendritic spine // inferred from electronic annotation /// 0043197 // dendritic spine // inferred from sequence or structural similarity\t0000978 // RNA polymerase II core promoter proximal region sequence-specific DNA binding // inferred from mutant phenotype /// 0001046 // core promoter sequence-specific DNA binding // inferred from direct assay /// 0001078 // RNA polymerase II core promoter proximal region sequence-specific DNA binding transcription factor activity involved in negative regulation of transcription // inferred from direct assay /// 0001222 // transcription corepressor binding // inferred from direct assay /// 0001222 // transcription corepressor binding // inferred from mutant phenotype /// 0002153 // steroid receptor RNA activator RNA binding // inferred from electronic annotation /// 0003677 // DNA binding // inferred from electronic annotation /// 0003700 // sequence-specific DNA binding transcription factor activity // inferred from direct assay /// 0003707 // steroid hormone receptor activity // inferred from electronic annotation /// 0003714 // transcription corepressor activity // traceable author statement /// 0003727 // single-stranded RNA binding // inferred from electronic annotation /// 0004879 // ligand-activated sequence-specific DNA binding RNA polymerase II transcription factor activity // traceable author statement /// 0004879 // ligand-activated sequence-specific DNA binding RNA polymerase II transcription factor activity // inferred from electronic annotation /// 0004887 // thyroid hormone receptor activity // inferred from direct assay /// 0005515 // protein binding // inferred from physical interaction /// 0008134 // transcription factor binding // inferred from physical interaction /// 0008270 // zinc ion binding // inferred from electronic annotation /// 0017025 // TBP-class protein binding // inferred from direct assay /// 0019904 // protein domain specific binding // inferred from physical interaction /// 0020037 // heme binding // inferred from direct assay /// 0031490 // chromatin DNA binding // inferred from electronic annotation /// 0032403 // protein complex binding // inferred from electronic annotation /// 0043565 // sequence-specific DNA binding // inferred from electronic annotation /// 0044212 // transcription regulatory region DNA binding // inferred from direct assay /// 0046872 // metal ion binding // inferred from electronic annotation /// 0070324 // thyroid hormone binding // inferred from direct assay /// 0070324 // thyroid hormone binding // inferred from physical interaction\n", "1320_at\tX79510\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tAffymetrix Proprietary Database\tX79510 /FEATURE=cds /DEFINITION=HSPTPD1 H.sapiens mRNA for protein-tyrosine-phosphatase D1\tX79510\tprotein tyrosine phosphatase, non-receptor type 21\tPTPN21\t11099\tNM_007039 /// XM_005267287 /// XM_006720011\t0006470 // protein dephosphorylation // traceable author statement /// 0016311 // dephosphorylation // inferred from electronic annotation /// 0035335 // peptidyl-tyrosine dephosphorylation // inferred from electronic annotation /// 0035335 // peptidyl-tyrosine dephosphorylation // traceable author statement\t0005737 // cytoplasm // inferred from electronic annotation /// 0005856 // cytoskeleton // inferred from electronic annotation\t0004721 // phosphoprotein phosphatase activity // inferred from electronic annotation /// 0004725 // protein tyrosine phosphatase activity // inferred from electronic annotation /// 0005515 // protein binding // inferred from physical interaction /// 0016787 // hydrolase activity // inferred from electronic annotation /// 0016791 // phosphatase activity // inferred from electronic annotation\n", "1405_i_at\tM21121\t\tHomo sapiens\tOct 6, 2014\tExemplar sequence\tGenBank\tM21121 /FEATURE= /DEFINITION=HUMTCSM Human T cell-specific protein (RANTES) mRNA, complete cds\tM21121\tchemokine (C-C motif) ligand 5\tCCL5\t6352\tNM_001278736 /// NM_002985\t0000165 // MAPK cascade // inferred from mutant phenotype /// 0002407 // dendritic cell chemotaxis // traceable author statement /// 0002548 // monocyte chemotaxis // inferred by curator /// 0002676 // regulation of chronic inflammatory response // traceable author statement /// 0006468 // protein phosphorylation // inferred from direct assay /// 0006816 // calcium ion transport // inferred from direct assay /// 0006874 // cellular calcium ion homeostasis // inferred from direct assay /// 0006887 // exocytosis // inferred from direct assay /// 0006935 // chemotaxis // non-traceable author statement /// 0006954 // inflammatory response // inferred from direct assay /// 0006955 // immune response // inferred from electronic annotation /// 0007159 // leukocyte cell-cell adhesion // inferred from direct assay /// 0007267 // cell-cell signaling // inferred from direct assay /// 0009615 // response to virus // traceable author statement /// 0009636 // response to toxic substance // inferred from direct assay /// 0010535 // positive regulation of activation of JAK2 kinase activity // traceable author statement /// 0010759 // positive regulation of macrophage chemotaxis // inferred from direct assay /// 0010820 // positive regulation of T cell chemotaxis // inferred from direct assay /// 0014068 // positive regulation of phosphatidylinositol 3-kinase signaling // inferred from direct assay /// 0014911 // positive regulation of smooth muscle cell migration // inferred from direct assay /// 0030335 // positive regulation of cell migration // inferred from direct assay /// 0031328 // positive regulation of cellular biosynthetic process // inferred from direct assay /// 0031584 // activation of phospholipase D activity // inferred from direct assay /// 0031663 // lipopolysaccharide-mediated signaling pathway // inferred from direct assay /// 0033634 // positive regulation of cell-cell adhesion mediated by integrin // inferred from direct assay /// 0034097 // response to cytokine // inferred from electronic annotation /// 0034112 // positive regulation of homotypic cell-cell adhesion // inferred from direct assay /// 0034612 // response to tumor necrosis factor // inferred from electronic annotation /// 0042102 // positive regulation of T cell proliferation // inferred from direct assay /// 0042119 // neutrophil activation // inferred from direct assay /// 0042327 // positive regulation of phosphorylation // inferred from direct assay /// 0042531 // positive regulation of tyrosine phosphorylation of STAT protein // inferred from direct assay /// 0043491 // protein kinase B signaling // inferred from mutant phenotype /// 0043623 // cellular protein complex assembly // inferred from direct assay /// 0043922 // negative regulation by host of viral transcription // inferred from direct assay /// 0044344 // cellular response to fibroblast growth factor stimulus // inferred from expression pattern /// 0045070 // positive regulation of viral genome replication // traceable author statement /// 0045071 // negative regulation of viral genome replication // inferred from direct assay /// 0045089 // positive regulation of innate immune response // traceable author statement /// 0045744 // negative regulation of G-protein coupled receptor protein signaling pathway // inferred from direct assay /// 0045785 // positive regulation of cell adhesion // inferred from direct assay /// 0045948 // positive regulation of translational initiation // non-traceable author statement /// 0046427 // positive regulation of JAK-STAT cascade // traceable author statement /// 0048245 // eosinophil chemotaxis // inferred from direct assay /// 0048246 // macrophage chemotaxis // traceable author statement /// 0048661 // positive regulation of smooth muscle cell proliferation // inferred from direct assay /// 0050679 // positive regulation of epithelial cell proliferation // inferred from electronic annotation /// 0050863 // regulation of T cell activation // inferred from direct assay /// 0050918 // positive chemotaxis // inferred from direct assay /// 0051262 // protein tetramerization // inferred from direct assay /// 0051928 // positive regulation of calcium ion transport // inferred from direct assay /// 0060326 // cell chemotaxis // inferred from electronic annotation /// 0061098 // positive regulation of protein tyrosine kinase activity // inferred from direct assay /// 0070098 // chemokine-mediated signaling pathway // traceable author statement /// 0070100 // negative regulation of chemokine-mediated signaling pathway // inferred from direct assay /// 0070233 // negative regulation of T cell apoptotic process // inferred from direct assay /// 0070234 // positive regulation of T cell apoptotic process // inferred from direct assay /// 0071346 // cellular response to interferon-gamma // inferred from expression pattern /// 0071347 // cellular response to interleukin-1 // inferred from expression pattern /// 0071356 // cellular response to tumor necrosis factor // inferred from expression pattern /// 0071407 // cellular response to organic cyclic compound // inferred from direct assay /// 0090026 // positive regulation of monocyte chemotaxis // inferred from direct assay /// 2000110 // negative regulation of macrophage apoptotic process // inferred from electronic annotation /// 2000406 // positive regulation of T cell migration // inferred from direct assay /// 2000503 // positive regulation of natural killer cell chemotaxis // inferred from direct assay\t0005576 // extracellular region // traceable author statement /// 0005615 // extracellular space // inferred from electronic annotation /// 0005737 // cytoplasm // inferred from electronic annotation\t0004435 // phosphatidylinositol phospholipase C activity // inferred from direct assay /// 0004672 // protein kinase activity // inferred from direct assay /// 0005125 // cytokine activity // inferred from electronic annotation /// 0005515 // protein binding // inferred from physical interaction /// 0008009 // chemokine activity // inferred from direct assay /// 0008009 // chemokine activity // non-traceable author statement /// 0016004 // phospholipase activator activity // inferred from direct assay /// 0030298 // receptor signaling protein tyrosine kinase activator activity // inferred from direct assay /// 0031726 // CCR1 chemokine receptor binding // inferred from direct assay /// 0031726 // CCR1 chemokine receptor binding // inferred from physical interaction /// 0031726 // CCR1 chemokine receptor binding // traceable author statement /// 0031729 // CCR4 chemokine receptor binding // traceable author statement /// 0031730 // CCR5 chemokine receptor binding // inferred from physical interaction /// 0042056 // chemoattractant activity // inferred from direct assay /// 0042379 // chemokine receptor binding // inferred from physical interaction /// 0042803 // protein homodimerization activity // inferred from direct assay /// 0043621 // protein self-association // inferred from direct assay /// 0046817 // chemokine receptor antagonist activity // inferred from direct assay\n" ] } ], "source": [ "# 1. First get the file paths using geo_get_relevant_filepaths function\n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", "\n", "# 2. Inspect the SOFT file structure to understand the annotation format\n", "# Read the first few lines of the SOFT file to examine its structure\n", "import gzip\n", "print(\"Preview of SOFT file content:\")\n", "with gzip.open(soft_file, 'rt') as f:\n", " for i, line in enumerate(f):\n", " print(line.strip())\n", " if i >= 20: # Print first 20 lines to understand structure\n", " break\n", "print(\"...\\n\")\n", "\n", "# 3. Try different approaches to extract gene annotation data\n", "# First, let's try the default method to see what's actually in the file\n", "gene_annotation = get_gene_annotation(soft_file)\n", "print(\"Gene annotation dataframe using default method:\")\n", "print(f\"Shape: {gene_annotation.shape}\")\n", "print(f\"Columns: {gene_annotation.columns.tolist()}\")\n", "print(gene_annotation.head(3))\n", "\n", "# 4. Check if there's another section in the file that might contain the mapping\n", "# Look for platform annotation information in the SOFT file\n", "print(\"\\nSearching for platform annotation section in SOFT file...\")\n", "with gzip.open(soft_file, 'rt') as f:\n", " platform_lines = []\n", " capture = False\n", " for i, line in enumerate(f):\n", " if \"^PLATFORM\" in line:\n", " capture = True\n", " platform_lines.append(line.strip())\n", " elif capture and line.startswith(\"!platform_table_begin\"):\n", " platform_lines.append(line.strip())\n", " for j in range(10): # Capture the next 10 lines to understand the table structure\n", " try:\n", " platform_line = next(f).strip()\n", " platform_lines.append(platform_line)\n", " except StopIteration:\n", " break\n", " break\n", " \n", " print(\"\\n\".join(platform_lines))\n", "\n", "# Maintain gene availability status as True based on previous steps\n", "is_gene_available = True\n" ] }, { "cell_type": "markdown", "id": "78c788d6", "metadata": {}, "source": [ "### Step 6: Gene Identifier Mapping" ] }, { "cell_type": "code", "execution_count": 7, "id": "273659c7", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:58.355596Z", "iopub.status.busy": "2025-03-25T03:42:58.355476Z", "iopub.status.idle": "2025-03-25T03:42:59.646515Z", "shell.execute_reply": "2025-03-25T03:42:59.646146Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gene mapping dataframe shape: (45782, 2)\n", "First few rows of gene mapping:\n", " ID Gene\n", "0 1007_s_at DDR1 /// MIR4640\n", "1 1053_at RFC2\n", "2 117_at HSPA6\n", "3 121_at PAX8\n", "4 1255_g_at GUCA1A\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Mapped gene expression data dimensions: 21278 genes × 75 samples\n", "First few gene symbols:\n", "Index(['A1BG', 'A1BG-AS1', 'A1CF', 'A2M', 'A2M-AS1', 'A2ML1', 'A2MP1',\n", " 'A4GALT', 'A4GNT', 'AA06'],\n", " dtype='object', name='Gene')\n" ] } ], "source": [ "# 1. Identify which columns in gene annotation data correspond to gene identifiers and gene symbols\n", "# From observing the output, we can see:\n", "# - The gene identifiers (probe IDs) are in the 'ID' column (e.g., '1007_s_at')\n", "# - The gene symbols are in the 'Gene Symbol' column (e.g., 'DDR1 /// MIR4640')\n", "\n", "# 2. Extract the gene mapping dataframe from gene annotation\n", "mapping_df = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='Gene Symbol')\n", "\n", "# Print information about the mapping\n", "print(f\"Gene mapping dataframe shape: {mapping_df.shape}\")\n", "print(\"First few rows of gene mapping:\")\n", "print(mapping_df.head())\n", "\n", "# 3. Apply gene mapping to convert probe-level measurements to gene expression\n", "gene_data = apply_gene_mapping(gene_data, mapping_df)\n", "\n", "# Create directories if they don't exist\n", "os.makedirs(os.path.dirname(out_gene_data_file), exist_ok=True)\n", "\n", "# Save the processed gene expression data\n", "gene_data.to_csv(out_gene_data_file)\n", "\n", "# Print dimensions of the mapped gene expression data\n", "print(f\"\\nMapped gene expression data dimensions: {gene_data.shape[0]} genes × {gene_data.shape[1]} samples\")\n", "print(\"First few gene symbols:\")\n", "print(gene_data.index[:10])\n" ] }, { "cell_type": "markdown", "id": "ccc1d99b", "metadata": {}, "source": [ "### Step 7: Data Normalization and Linking" ] }, { "cell_type": "code", "execution_count": 8, "id": "0661d3d1", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:42:59.648003Z", "iopub.status.busy": "2025-03-25T03:42:59.647883Z", "iopub.status.idle": "2025-03-25T03:43:11.784454Z", "shell.execute_reply": "2025-03-25T03:43:11.784072Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Normalizing gene symbols...\n", "Gene data shape after normalization: 19845 genes × 75 samples\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Normalized gene expression data saved to ../../output/preprocess/Psoriasis/gene_data/GSE182740.csv\n", "Extracting clinical features from the original source...\n", "Extracted clinical features preview:\n", "{'GSM5535864': [1.0], 'GSM5535865': [0.0], 'GSM5535866': [0.0], 'GSM5535867': [0.0], 'GSM5535868': [0.0], 'GSM5535869': [0.0], 'GSM5535870': [0.0], 'GSM5535871': [0.0], 'GSM5535872': [0.0], 'GSM5535873': [0.0], 'GSM5535874': [0.0], 'GSM5535875': [1.0], 'GSM5535876': [0.0], 'GSM5535877': [0.0], 'GSM5535878': [0.0], 'GSM5535879': [0.0], 'GSM5535880': [0.0], 'GSM5535881': [0.0], 'GSM5535882': [1.0], 'GSM5535883': [1.0], 'GSM5535884': [1.0], 'GSM5535885': [1.0], 'GSM5535886': [1.0], 'GSM5535887': [1.0], 'GSM5535888': [1.0], 'GSM5535889': [1.0], 'GSM5535890': [1.0], 'GSM5535891': [1.0], 'GSM5535892': [1.0], 'GSM5535893': [1.0], 'GSM5535894': [1.0], 'GSM5535895': [1.0], 'GSM5535896': [1.0], 'GSM5535897': [1.0], 'GSM5535898': [1.0], 'GSM5535899': [1.0], 'GSM5535900': [1.0], 'GSM5535901': [1.0], 'GSM5535902': [1.0], 'GSM5535903': [1.0], 'GSM5535904': [1.0], 'GSM5535905': [1.0], 'GSM5535906': [1.0], 'GSM5535907': [1.0], 'GSM5535908': [1.0], 'GSM5535909': [1.0], 'GSM5535910': [1.0], 'GSM5535911': [1.0], 'GSM5535912': [1.0], 'GSM5535913': [1.0], 'GSM5535914': [1.0], 'GSM5535915': [1.0], 'GSM5535916': [1.0], 'GSM5535917': [1.0], 'GSM5535918': [1.0], 'GSM5535919': [0.0], 'GSM5535920': [1.0], 'GSM5535921': [1.0], 'GSM5535922': [1.0], 'GSM5535923': [1.0], 'GSM5535924': [1.0], 'GSM5535925': [1.0], 'GSM5535926': [1.0], 'GSM5535927': [1.0], 'GSM5535928': [0.0], 'GSM5535929': [0.0], 'GSM5535930': [0.0], 'GSM5535931': [1.0], 'GSM5535932': [1.0], 'GSM5535933': [0.0], 'GSM5535934': [0.0], 'GSM5535935': [0.0], 'GSM5535936': [0.0], 'GSM5535937': [0.0], 'GSM5535938': [0.0]}\n", "Clinical data shape: (1, 75)\n", "Clinical features saved to ../../output/preprocess/Psoriasis/clinical_data/GSE182740.csv\n", "Linking clinical and genetic data...\n", "Linked data shape: (75, 19846)\n", "Handling missing values...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Data shape after handling missing values: (75, 19846)\n", "\n", "Checking for bias in feature variables:\n", "For the feature 'Psoriasis', the least common label is '0.0' with 26 occurrences. This represents 34.67% of the dataset.\n", "The distribution of the feature 'Psoriasis' in this dataset is fine.\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Linked data saved to ../../output/preprocess/Psoriasis/GSE182740.csv\n", "Final dataset shape: (75, 19846)\n" ] } ], "source": [ "# 1. Check if gene data is available after mapping\n", "if gene_data.shape[0] == 0:\n", " print(\"Error: Gene expression matrix is empty after mapping.\")\n", " # Mark the dataset as not usable due to lack of gene expression data\n", " is_usable = validate_and_save_cohort_info(\n", " is_final=True,\n", " cohort=cohort,\n", " info_path=json_path,\n", " is_gene_available=False, # No usable gene data\n", " is_trait_available=True,\n", " is_biased=True,\n", " df=pd.DataFrame(),\n", " note=\"Failed to map probe IDs to gene symbols. The annotation format may not be compatible with the extraction methods.\"\n", " )\n", " print(\"Dataset deemed not usable due to lack of gene expression data.\")\n", "else:\n", " # Only proceed with normalization if we have gene data\n", " print(\"Normalizing gene symbols...\")\n", " gene_data_normalized = normalize_gene_symbols_in_index(gene_data)\n", " print(f\"Gene data shape after normalization: {gene_data_normalized.shape[0]} genes × {gene_data_normalized.shape[1]} samples\")\n", "\n", " # Save the normalized gene data\n", " os.makedirs(os.path.dirname(out_gene_data_file), exist_ok=True)\n", " gene_data_normalized.to_csv(out_gene_data_file)\n", " print(f\"Normalized gene expression data saved to {out_gene_data_file}\")\n", " \n", " # Extract clinical features from the original data source\n", " print(\"Extracting clinical features from the original source...\")\n", " # Get background information and clinical data again\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", " # 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=age_row,\n", " convert_age=convert_age,\n", " gender_row=gender_row,\n", " convert_gender=convert_gender\n", " )\n", " \n", " print(\"Extracted clinical features preview:\")\n", " print(preview_df(selected_clinical_df))\n", " print(f\"Clinical data shape: {selected_clinical_df.shape}\")\n", " \n", " # Save the extracted clinical features\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 features saved to {out_clinical_data_file}\")\n", " \n", " # Link clinical and genetic data\n", " print(\"Linking clinical and genetic data...\")\n", " linked_data = geo_link_clinical_genetic_data(selected_clinical_df, gene_data_normalized)\n", " print(f\"Linked data shape: {linked_data.shape}\")\n", " \n", " # Check if the linked data has adequate data\n", " if linked_data.shape[0] == 0 or linked_data.shape[1] <= 4: # 4 is an arbitrary small number\n", " print(\"Error: Linked data has insufficient samples or features.\")\n", " is_usable = validate_and_save_cohort_info(\n", " is_final=True,\n", " cohort=cohort,\n", " info_path=json_path,\n", " is_gene_available=True,\n", " is_trait_available=True,\n", " is_biased=True,\n", " df=linked_data,\n", " note=\"Failed to properly link gene expression data with clinical features.\"\n", " )\n", " print(\"Dataset deemed not usable due to linking failure.\")\n", " else:\n", " # Handle missing values systematically\n", " print(\"Handling missing values...\")\n", " linked_data_clean = handle_missing_values(linked_data, trait_col=trait)\n", " print(f\"Data shape after handling missing values: {linked_data_clean.shape}\")\n", " \n", " # Check if there are still samples after missing value handling\n", " if linked_data_clean.shape[0] == 0:\n", " print(\"Error: No samples remain after handling missing values.\")\n", " is_usable = validate_and_save_cohort_info(\n", " is_final=True,\n", " cohort=cohort,\n", " info_path=json_path,\n", " is_gene_available=True,\n", " is_trait_available=True,\n", " is_biased=True,\n", " df=pd.DataFrame(),\n", " note=\"All samples were removed during missing value handling.\"\n", " )\n", " print(\"Dataset deemed not usable as all samples were filtered out.\")\n", " else:\n", " # Check if the dataset is biased\n", " print(\"\\nChecking for bias in feature variables:\")\n", " is_biased, linked_data_final = judge_and_remove_biased_features(linked_data_clean, trait)\n", " \n", " # Conduct final quality validation\n", " is_usable = validate_and_save_cohort_info(\n", " is_final=True,\n", " cohort=cohort,\n", " info_path=json_path,\n", " is_gene_available=True,\n", " is_trait_available=True,\n", " is_biased=is_biased,\n", " df=linked_data_final,\n", " note=\"Dataset contains gene expression data for Crohn's Disease patients, examining response to Infliximab treatment.\"\n", " )\n", " \n", " # Save linked data if usable\n", " if is_usable:\n", " os.makedirs(os.path.dirname(out_data_file), exist_ok=True)\n", " linked_data_final.to_csv(out_data_file)\n", " print(f\"Linked data saved to {out_data_file}\")\n", " print(f\"Final dataset shape: {linked_data_final.shape}\")\n", " else:\n", " print(\"Dataset deemed not usable for trait association studies, linked 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 }