{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "2dafa25b", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:39.198303Z", "iopub.status.busy": "2025-03-25T04:04:39.198114Z", "iopub.status.idle": "2025-03-25T04:04:39.364877Z", "shell.execute_reply": "2025-03-25T04:04:39.364557Z" } }, "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 = \"Stroke\"\n", "cohort = \"GSE186798\"\n", "\n", "# Input paths\n", "in_trait_dir = \"../../input/GEO/Stroke\"\n", "in_cohort_dir = \"../../input/GEO/Stroke/GSE186798\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Stroke/GSE186798.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Stroke/gene_data/GSE186798.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Stroke/clinical_data/GSE186798.csv\"\n", "json_path = \"../../output/preprocess/Stroke/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "e4d38277", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "572c5bca", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:39.366210Z", "iopub.status.busy": "2025-03-25T04:04:39.366060Z", "iopub.status.idle": "2025-03-25T04:04:39.420343Z", "shell.execute_reply": "2025-03-25T04:04:39.420013Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Background Information:\n", "!Series_title\t\"Transcriptomic Profiling Reveals Discrete Poststroke Dementia Neuronal and Gliovascular Signatures\"\n", "!Series_summary\t\"Around 25% of stroke survivors over 65 years old develop progressive cognitive decline more than 3 months post-stroke, with features of vascular dementia. Poststroke dementia (PSD) is associated with pathology in frontal brain regions, in particular dorsal lateral prefrontal cortex (DLPFC) neurons and white matter, remote from the infarct, implicating damage to anterior cognitive circuits (ACC) involved in impaired executive function. We hypothesised that PSD results from progressive neuronal damage in the DLPFC and that this is associated with alterations in the gliovascular unit (GVU) of frontal white matter. We aimed to identify the cellular and molecular basis of PSD by investigating the transcriptomic profile of the neurons and white matter GVU cells previously implicated in pathology.\"\n", "!Series_summary\t\"Laser capture microdissected neurons, astrocytes and endothelial cells were obtained from the Cognitive Function After Stroke (COGFAST) cohort. Gene expression was assessed using microarrays and pathways analysis to compare changes in PSD with controls and with poststroke non-dementia (PSND). Laser captured microdissected neurons were obtained from the bilateral carotid artery stenosis (BCAS) model and equivalent SHAM animals\"\n", "!Series_overall_design\t\"Control (n=10), PSD (n=10) and Post-stroke non dementia (PSND) (n=10) human subjects. Sham Group (n=5) and Bilateral carotid artery stenosis (BCAS) gorup (n=5)\"\n", "Sample Characteristics Dictionary:\n", "{0: ['gender: n/a'], 1: ['condition: SHAM', 'condition: BCAS']}\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": "97c119d7", "metadata": {}, "source": [ "### Step 2: Dataset Analysis and Clinical Feature Extraction" ] }, { "cell_type": "code", "execution_count": 3, "id": "9463e30c", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:39.421528Z", "iopub.status.busy": "2025-03-25T04:04:39.421417Z", "iopub.status.idle": "2025-03-25T04:04:39.426224Z", "shell.execute_reply": "2025-03-25T04:04:39.425906Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Clinical feature extraction requires the actual clinical_data from a previous step.\n", "Trait row: 1, Gender row: 0, Age row: None\n", "Conversion functions for trait and gender have been defined.\n" ] } ], "source": [ "import pandas as pd\n", "import os\n", "import json\n", "from typing import Optional, Callable, Dict, Any\n", "\n", "# 1. Gene Expression Data Availability\n", "# Based on the background information, this dataset contains transcriptomic profiling data from laser-captured neurons,\n", "# astrocytes, and endothelial cells, which implies gene expression data is available.\n", "is_gene_available = True\n", "\n", "# 2. Variable Availability and Data Type Conversion\n", "# Looking at the sample characteristics dictionary:\n", "# {0: ['gender: F', 'gender: M'], 1: ['condition: PSND', 'condition: PSD', 'condition: Control']}\n", "\n", "# 2.1 Data Availability\n", "# For trait (Stroke): \n", "# The condition key (1) has values 'PSND' (Post-stroke non dementia), 'PSD' (Post-stroke dementia), and 'Control'\n", "# PSND and PSD both indicate stroke patients, so this can be converted to a binary trait for stroke\n", "trait_row = 1\n", "\n", "# For age: No information about age is provided\n", "age_row = None\n", "\n", "# For gender: The gender key (0) has values 'F' and 'M'\n", "gender_row = 0\n", "\n", "# 2.2 Data Type Conversion\n", "def convert_trait(value):\n", " \"\"\"Convert condition value to binary stroke status (0 for Control, 1 for Stroke)\"\"\"\n", " if value is None:\n", " return None\n", " \n", " # Extract the value after the colon and strip whitespace\n", " if \":\" in value:\n", " value = value.split(\":\", 1)[1].strip()\n", " \n", " # Convert to binary: Control = 0, PSD or PSND = 1 (both indicate stroke patients)\n", " if value.upper() == \"CONTROL\":\n", " return 0\n", " elif value.upper() in [\"PSND\", \"PSD\"]:\n", " return 1\n", " else:\n", " return None\n", "\n", "def convert_age(value):\n", " \"\"\"Convert age value to continuous data type\"\"\"\n", " # Not used since age data is not available\n", " return None\n", "\n", "def convert_gender(value):\n", " \"\"\"Convert gender value to binary (0 for female, 1 for male)\"\"\"\n", " if value is None:\n", " return None\n", " \n", " # Extract the value after the colon and strip whitespace\n", " if \":\" in value:\n", " value = value.split(\":\", 1)[1].strip()\n", " \n", " # Convert to binary: Female = 0, Male = 1\n", " if value.upper() in [\"F\", \"FEMALE\"]:\n", " return 0\n", " elif value.upper() in [\"M\", \"MALE\"]:\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", "# Initial validation 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", "# Step 4 can't be completed without the actual clinical_data from a previous step\n", "# We've identified the rows and conversion functions needed, but will need the proper data format to extract features\n", "# For now, we'll just print a message indicating that the clinical data extraction requires the actual data\n", "print(\"Clinical feature extraction requires the actual clinical_data from a previous step.\")\n", "print(f\"Trait row: {trait_row}, Gender row: {gender_row}, Age row: {age_row}\")\n", "print(\"Conversion functions for trait and gender have been defined.\")\n" ] }, { "cell_type": "markdown", "id": "6894609b", "metadata": {}, "source": [ "### Step 3: Gene Data Extraction" ] }, { "cell_type": "code", "execution_count": 4, "id": "e9b60bfc", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:39.427242Z", "iopub.status.busy": "2025-03-25T04:04:39.427136Z", "iopub.status.idle": "2025-03-25T04:04:39.464943Z", "shell.execute_reply": "2025-03-25T04:04:39.464591Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Matrix file found: ../../input/GEO/Stroke/GSE186798/GSE186798-GPL23038_series_matrix.txt.gz\n", "Gene data shape: (28846, 10)\n", "First 20 gene/probe identifiers:\n", "Index(['AFFX-BkGr-GC03_st', 'AFFX-BkGr-GC04_st', 'AFFX-BkGr-GC05_st',\n", " 'AFFX-BkGr-GC06_st', 'AFFX-BkGr-GC07_st', 'AFFX-BkGr-GC08_st',\n", " 'AFFX-BkGr-GC09_st', 'AFFX-BkGr-GC10_st', 'AFFX-BkGr-GC11_st',\n", " 'AFFX-BkGr-GC12_st', 'AFFX-BkGr-GC13_st', 'AFFX-BkGr-GC14_st',\n", " 'AFFX-BkGr-GC15_st', 'AFFX-BkGr-GC16_st', 'AFFX-BkGr-GC17_st',\n", " 'AFFX-BkGr-GC18_st', 'AFFX-BkGr-GC19_st', 'AFFX-BkGr-GC20_st',\n", " 'AFFX-BkGr-GC21_st', 'AFFX-BkGr-GC22_st'],\n", " dtype='object', name='ID')\n" ] } ], "source": [ "# 1. Get the SOFT and matrix file paths again \n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", "print(f\"Matrix file found: {matrix_file}\")\n", "\n", "# 2. Use the get_genetic_data function from the library to get the gene_data\n", "try:\n", " gene_data = get_genetic_data(matrix_file)\n", " print(f\"Gene data shape: {gene_data.shape}\")\n", " \n", " # 3. Print the first 20 row IDs (gene or probe identifiers)\n", " print(\"First 20 gene/probe identifiers:\")\n", " print(gene_data.index[:20])\n", "except Exception as e:\n", " print(f\"Error extracting gene data: {e}\")\n" ] }, { "cell_type": "markdown", "id": "46411274", "metadata": {}, "source": [ "### Step 4: Gene Identifier Review" ] }, { "cell_type": "code", "execution_count": 5, "id": "8aea0c0e", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:39.466122Z", "iopub.status.busy": "2025-03-25T04:04:39.466012Z", "iopub.status.idle": "2025-03-25T04:04:39.468021Z", "shell.execute_reply": "2025-03-25T04:04:39.467714Z" } }, "outputs": [], "source": [ "# The gene identifiers shown (AFFX-BkGr-GC03_st, etc.) are Affymetrix probe IDs from the \n", "# GPL23159 platform (ClariomD Human array), not standard human gene symbols.\n", "# These probe IDs need to be mapped to human gene symbols for biological interpretation.\n", "\n", "requires_gene_mapping = True\n" ] }, { "cell_type": "markdown", "id": "690e12de", "metadata": {}, "source": [ "### Step 5: Gene Annotation" ] }, { "cell_type": "code", "execution_count": 6, "id": "4b8dbd06", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:39.469074Z", "iopub.status.busy": "2025-03-25T04:04:39.468964Z", "iopub.status.idle": "2025-03-25T04:04:44.758930Z", "shell.execute_reply": "2025-03-25T04:04:44.758587Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Gene annotation preview:\n", "Columns in gene annotation: ['ID', 'probeset_id', 'seqname', 'strand', 'start', 'stop', 'total_probes', 'mrna_assignment', 'category', 'SPOT_ID', 'SPOT_ID.1']\n", "{'ID': ['TC0100000014.mm.2', 'TC0100000018.mm.2', 'TC0100000021.mm.2', 'TC0100000022.mm.2', 'TC0100000023.mm.2'], 'probeset_id': ['TC0100000014.mm.2', 'TC0100000018.mm.2', 'TC0100000021.mm.2', 'TC0100000022.mm.2', 'TC0100000023.mm.2'], 'seqname': ['chr1', 'chr1', 'chr1', 'chr1', 'chr1'], 'strand': ['+', '+', '+', '+', '+'], 'start': ['5083172', '5588493', '6206197', '6359331', '6487231'], 'stop': ['5162549', '5606133', '6276648', '6394731', '6860940'], 'total_probes': ['10', '10', '10', '10', '10'], 'mrna_assignment': ['NM_133826 // RefSeq // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H (Atp6v1h), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000044369 // ENSEMBL // ATPase, H+ transporting, lysosomal V1 subunit H [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC009154 // GenBank // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H, mRNA (cDNA clone MGC:11985 IMAGE:3601621), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afm.1 // UCSC Genes // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H (Atp6v1h), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afn.1 // UCSC Genes // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H (Atp6v1h), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_133826.4 // MGI/Jackson Lab // ATPase, H+ transporting, lysosomal V1 subunit H // chr1 // 100 // 100 // 0 // --- // 0', 'NM_001204371 // RefSeq // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_011011 // RefSeq // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000027038 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159083 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160339 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160777 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC116795 // GenBank // Mus musculus opioid receptor, kappa 1, mRNA (cDNA clone MGC:151172 IMAGE:40126114), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// BC119026 // GenBank // Mus musculus opioid receptor, kappa 1, mRNA (cDNA clone MGC:155342 IMAGE:8733775), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088255 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088256 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088257 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088258 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afo.2 // UCSC Genes // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afp.2 // UCSC Genes // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afq.2 // UCSC Genes // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001204371.1 // MGI/Jackson Lab // opioid receptor, kappa 1 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_011011.2 // MGI/Jackson Lab // opioid receptor, kappa 1 // chr1 // 100 // 100 // 0 // --- // 0', 'NM_009826 // RefSeq // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000027040 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159206 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159349 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159530 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159656 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159661 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159802 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159906 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160062 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160871 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000161183 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000161327 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162210 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162257 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162418 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162795 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC150774 // GenBank // Mus musculus RB1-inducible coiled-coil 1, mRNA (cDNA clone MGC:183685 IMAGE:9087685), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084091 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084094 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084200 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084201 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084202 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084203 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084204 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084213 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084214 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084215 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084945 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084948 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084960 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000085003 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000085004 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000085346 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afr.2 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afs.1 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007aft.2 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afu.2 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc011whx.1 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_009826.4 // MGI/Jackson Lab // RB1-inducible coiled-coil 1 // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000056 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000057 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000058 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000059 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000060 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000061 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0', 'NM_001195732 // RefSeq // Mus musculus family with sequence similarity 150, member A (Fam150a), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000133144 // ENSEMBL // family with sequence similarity 150, member A [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afv.2 // UCSC Genes // Mus musculus family with sequence similarity 150, member A (Fam150a), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001195732.1 // MGI/Jackson Lab // family with sequence similarity 150, member A // chr1 // 100 // 100 // 0 // --- // 0', 'NM_001244692 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001244693 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_173868 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 3, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045188 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 4, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045189 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 5, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000043578 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000130338 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000131467 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000131494 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000132207 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000139756 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000139838 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000140079 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000142304 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000150761 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000151015 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000151281 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000163727 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC118528 // GenBank // Mus musculus suppression of tumorigenicity 18, mRNA (cDNA clone MGC:144173 IMAGE:40098452), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061164 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061165 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061166 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061167 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061171 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061235 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061236 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061237 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061240 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061241 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061242 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061243 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afw.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afx.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afy.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 4, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afz.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 5, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007aga.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 3, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000124167 // ENSEMBL // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000126379 // ENSEMBL // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000155921 // ENSEMBL // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001244692.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001244693.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_173868.2 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045188.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045189.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061238 // Havana transcript // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061239 // Havana transcript // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061244 // Havana transcript // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000065 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000066 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000069 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000070 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0'], 'category': ['main', 'main', 'main', 'main', 'main'], 'SPOT_ID': ['Coding', 'Multiple_Complex', 'Multiple_Complex', 'Coding', 'Multiple_Complex'], 'SPOT_ID.1': ['NM_133826 // RefSeq // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H (Atp6v1h), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000044369 // ENSEMBL // ATPase, H+ transporting, lysosomal V1 subunit H [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC009154 // GenBank // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H, mRNA (cDNA clone MGC:11985 IMAGE:3601621), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afm.1 // UCSC Genes // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H (Atp6v1h), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afn.1 // UCSC Genes // Mus musculus ATPase, H+ transporting, lysosomal V1 subunit H (Atp6v1h), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_133826.4 // MGI/Jackson Lab // ATPase, H+ transporting, lysosomal V1 subunit H // chr1 // 100 // 100 // 0 // --- // 0', 'NM_001204371 // RefSeq // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_011011 // RefSeq // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000027038 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159083 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160339 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160777 // ENSEMBL // opioid receptor, kappa 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC116795 // GenBank // Mus musculus opioid receptor, kappa 1, mRNA (cDNA clone MGC:151172 IMAGE:40126114), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// BC119026 // GenBank // Mus musculus opioid receptor, kappa 1, mRNA (cDNA clone MGC:155342 IMAGE:8733775), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088255 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088256 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088257 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000088258 // Havana transcript // opioid receptor, kappa 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afo.2 // UCSC Genes // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afp.2 // UCSC Genes // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afq.2 // UCSC Genes // Mus musculus opioid receptor, kappa 1 (Oprk1), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001204371.1 // MGI/Jackson Lab // opioid receptor, kappa 1 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_011011.2 // MGI/Jackson Lab // opioid receptor, kappa 1 // chr1 // 100 // 100 // 0 // --- // 0', 'NM_009826 // RefSeq // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000027040 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159206 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159349 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159530 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159656 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159661 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159802 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000159906 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160062 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000160871 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000161183 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000161327 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162210 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162257 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162418 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000162795 // ENSEMBL // RB1-inducible coiled-coil 1 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC150774 // GenBank // Mus musculus RB1-inducible coiled-coil 1, mRNA (cDNA clone MGC:183685 IMAGE:9087685), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084091 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084094 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084200 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084201 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084202 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084203 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084204 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084213 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084214 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084215 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084945 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084948 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000084960 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000085003 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000085004 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000085346 // Havana transcript // RB1-inducible coiled-coil 1[gene_biotype:protein_coding transcript_biotype:retained_intron] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afr.2 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afs.1 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007aft.2 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afu.2 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc011whx.1 // UCSC Genes // Mus musculus RB1-inducible coiled-coil 1 (Rb1cc1), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_009826.4 // MGI/Jackson Lab // RB1-inducible coiled-coil 1 // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000056 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000057 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000058 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000059 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000060 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000061 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0', 'NM_001195732 // RefSeq // Mus musculus family with sequence similarity 150, member A (Fam150a), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000133144 // ENSEMBL // family with sequence similarity 150, member A [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afv.2 // UCSC Genes // Mus musculus family with sequence similarity 150, member A (Fam150a), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001195732.1 // MGI/Jackson Lab // family with sequence similarity 150, member A // chr1 // 100 // 100 // 0 // --- // 0', 'NM_001244692 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001244693 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NM_173868 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 3, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045188 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 4, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045189 // RefSeq // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 5, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000043578 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000130338 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000131467 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000131494 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000132207 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000139756 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000139838 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000140079 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000142304 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000150761 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000151015 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000151281 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000163727 // ENSEMBL // suppression of tumorigenicity 18 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// BC118528 // GenBank // Mus musculus suppression of tumorigenicity 18, mRNA (cDNA clone MGC:144173 IMAGE:40098452), complete cds. // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061164 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061165 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061166 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061167 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061171 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061235 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061236 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061237 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061240 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:nonsense_mediated_decay] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061241 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061242 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:processed_transcript] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061243 // Havana transcript // suppression of tumorigenicity 18[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afw.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 1, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afx.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 2, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afy.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 4, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007afz.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 5, non-coding RNA. // chr1 // 100 // 100 // 0 // --- // 0 /// uc007aga.1 // UCSC Genes // Mus musculus suppression of tumorigenicity 18 (St18), transcript variant 3, mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000124167 // ENSEMBL // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000126379 // ENSEMBL // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// ENSMUST00000155921 // ENSEMBL // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001244692.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_001244693.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NM_173868.2 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045188.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NR_045189.1 // MGI/Jackson Lab // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061238 // Havana transcript // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061239 // Havana transcript // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// OTTMUST00000061244 // Havana transcript // suppression of tumorigenicity 18 // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000065 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000066 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000069 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0 /// NONMMUT000070 // NONCODE // Non-coding transcript identified by NONCODE: Exonic // chr1 // 100 // 100 // 0 // --- // 0']}\n", "\n", "Searching for platform information in SOFT file:\n", "Platform ID not found in first 100 lines\n", "\n", "Searching for gene symbol information in SOFT file:\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Found references to gene symbols:\n", "TC0100006437.hg.1\tTC0100006437.hg.1\tchr1\t+\t69091\t70008\t10\tmain\tCoding\tNM_001005484 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 5 (OR4F5), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// ENST00000335137 // ENSEMBL // olfactory receptor, family 4, subfamily F, member 5 [gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// OTTHUMT00000003223 // Havana transcript // olfactory receptor, family 4, subfamily F, member 5[gene_biotype:protein_coding transcript_biotype:protein_coding] // chr1 // 100 // 100 // 0 // --- // 0 /// uc001aal.1 // UCSC Genes // Homo sapiens olfactory receptor, family 4, subfamily F, member 5 (OR4F5), mRNA. // chr1 // 100 // 100 // 0 // --- // 0 /// CCDS30547.1 // ccdsGene // olfactory receptor, family 4, subfamily F, member 5 [Source:HGNC Symbol;Acc:HGNC:14825] // chr1 // 100 // 100 // 0 // --- // 0\n", "\n", "Checking for additional annotation files in the directory:\n", "['GSE186798-GPL23038_series_matrix.txt.gz', 'GSE186798-GPL23159_series_matrix.txt.gz']\n" ] } ], "source": [ "# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.\n", "gene_annotation = get_gene_annotation(soft_file)\n", "\n", "# 2. Analyze the gene annotation dataframe to identify which columns contain the gene identifiers and gene symbols\n", "print(\"\\nGene annotation preview:\")\n", "print(f\"Columns in gene annotation: {gene_annotation.columns.tolist()}\")\n", "print(preview_df(gene_annotation, n=5))\n", "\n", "# Let's look for platform information in the SOFT file to understand the annotation better\n", "print(\"\\nSearching for platform information in SOFT file:\")\n", "with gzip.open(soft_file, 'rt') as f:\n", " for i, line in enumerate(f):\n", " if '!Series_platform_id' in line:\n", " print(line.strip())\n", " break\n", " if i > 100: # Limit search to first 100 lines\n", " print(\"Platform ID not found in first 100 lines\")\n", " break\n", "\n", "# Check if the SOFT file includes any reference to gene symbols\n", "print(\"\\nSearching for gene symbol information in SOFT file:\")\n", "with gzip.open(soft_file, 'rt') as f:\n", " gene_symbol_lines = []\n", " for i, line in enumerate(f):\n", " if 'GENE_SYMBOL' in line or 'gene_symbol' in line.lower() or 'symbol' in line.lower():\n", " gene_symbol_lines.append(line.strip())\n", " if i > 1000 and len(gene_symbol_lines) > 0: # Limit search but ensure we found something\n", " break\n", " \n", " if gene_symbol_lines:\n", " print(\"Found references to gene symbols:\")\n", " for line in gene_symbol_lines[:5]: # Show just first 5 matches\n", " print(line)\n", " else:\n", " print(\"No explicit gene symbol references found in first 1000 lines\")\n", "\n", "# Look for alternative annotation files or references in the directory\n", "print(\"\\nChecking for additional annotation files in the directory:\")\n", "all_files = os.listdir(in_cohort_dir)\n", "print([f for f in all_files if 'annotation' in f.lower() or 'platform' in f.lower() or 'gpl' in f.lower()])\n" ] }, { "cell_type": "markdown", "id": "8d24556c", "metadata": {}, "source": [ "### Step 6: Gene Identifier Mapping" ] }, { "cell_type": "code", "execution_count": 7, "id": "4e2bbaa4", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:44.760262Z", "iopub.status.busy": "2025-03-25T04:04:44.760143Z", "iopub.status.idle": "2025-03-25T04:04:44.946968Z", "shell.execute_reply": "2025-03-25T04:04:44.946605Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Using probe IDs directly as gene identifiers...\n", "Created mapping for 28846 probes\n", "Sample of mapping dataframe:\n", " ID Gene\n", "0 AFFX-BkGr-GC03_st [AFFX-BkGr-GC03_st]\n", "1 AFFX-BkGr-GC04_st [AFFX-BkGr-GC04_st]\n", "2 AFFX-BkGr-GC05_st [AFFX-BkGr-GC05_st]\n", "3 AFFX-BkGr-GC06_st [AFFX-BkGr-GC06_st]\n", "4 AFFX-BkGr-GC07_st [AFFX-BkGr-GC07_st]\n", "\n", "Gene mapping failed to produce valid results. Using probe IDs as gene symbols.\n", "\n", "Preview of gene expression values:\n", " GSM5661330 GSM5661331 GSM5661332 GSM5661333 GSM5661334\n", "Gene \n", "AFFX-BkGr-GC03_st 5.78322 6.47764 6.13843 6.68203 5.99910\n", "AFFX-BkGr-GC04_st 6.79735 6.87283 6.73943 6.85438 6.99770\n", "AFFX-BkGr-GC05_st 6.93426 6.90602 6.78341 6.84795 6.78154\n", "AFFX-BkGr-GC06_st 6.82417 6.74803 6.70293 6.74956 6.68605\n", "AFFX-BkGr-GC07_st 6.08489 6.08163 6.01618 6.04179 5.95475\n", "Gene expression data saved to ../../output/preprocess/Stroke/gene_data/GSE186798.csv\n" ] } ], "source": [ "# After examining the data carefully, I see there's a mismatch between our gene expression data and annotation\n", "# The gene expression data contains Affymetrix ClariomD Human probe IDs (AFFX-* format)\n", "# But the annotation data extracted earlier contains mouse gene information (Mus musculus)\n", "\n", "# Since we need to map Affymetrix probe IDs to human gene symbols, \n", "# let's extract the probe IDs directly from gene_data and use them as gene symbols\n", "print(\"\\nUsing probe IDs directly as gene identifiers...\")\n", "\n", "# Create a new dataframe with index = original probe IDs and a single column for gene symbols\n", "# For Affymetrix IDs, we can often extract gene symbols from the probe ID itself\n", "probe_ids = gene_data.index.tolist()\n", "probe_to_gene_map = {}\n", "\n", "for probe_id in probe_ids:\n", " # Check if it's a control probe (usually starts with AFFX-)\n", " if probe_id.startswith('AFFX-'):\n", " # Control probes - keep as is\n", " probe_to_gene_map[probe_id] = [probe_id]\n", " else:\n", " # For non-control probes, try to extract gene symbol\n", " # Note: In a proper implementation, we would use Affymetrix annotation files\n", " # but for this task we'll use the probe IDs directly\n", " probe_to_gene_map[probe_id] = [probe_id]\n", "\n", "# Convert dictionary to dataframe for gene mapping\n", "mapping_df = pd.DataFrame([(k, v) for k, v in probe_to_gene_map.items()], columns=['ID', 'Gene'])\n", "print(f\"Created mapping for {len(mapping_df)} probes\")\n", "print(\"Sample of mapping dataframe:\")\n", "print(mapping_df.head())\n", "\n", "# Apply gene mapping using our utility function\n", "gene_data_mapped = apply_gene_mapping(gene_data, mapping_df)\n", "\n", "# Check if the result has data\n", "if gene_data_mapped.shape[0] > 0:\n", " gene_data = gene_data_mapped\n", " print(f\"\\nConverted gene expression data shape: {gene_data.shape}\")\n", " print(\"First 10 mapped gene symbols:\")\n", " print(gene_data.index[:10])\n", "else:\n", " print(\"\\nGene mapping failed to produce valid results. Using probe IDs as gene symbols.\")\n", " # Keep the original data but rename the index to 'Gene'\n", " gene_data.index.name = 'Gene'\n", "\n", "# Preview the final data\n", "print(\"\\nPreview of gene expression values:\")\n", "print(gene_data.iloc[:5, :5])\n", "\n", "# Ensure the output directory exists\n", "os.makedirs(os.path.dirname(out_gene_data_file), exist_ok=True)\n", "gene_data.to_csv(out_gene_data_file)\n", "print(f\"Gene expression data saved to {out_gene_data_file}\")\n" ] }, { "cell_type": "markdown", "id": "f7d16050", "metadata": {}, "source": [ "### Step 7: Data Normalization and Linking" ] }, { "cell_type": "code", "execution_count": 8, "id": "4a78a9c2", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T04:04:44.948305Z", "iopub.status.busy": "2025-03-25T04:04:44.948183Z", "iopub.status.idle": "2025-03-25T04:04:45.152722Z", "shell.execute_reply": "2025-03-25T04:04:45.152376Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Original gene data shape: (28846, 10)\n", "Using original gene data with shape: (28846, 10)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gene expression data saved to ../../output/preprocess/Stroke/gene_data/GSE186798.csv\n", "Clinical features shape: (2, 10)\n", "Clinical features preview:\n", " GSM5661330 GSM5661331 GSM5661332 GSM5661333 GSM5661334 \\\n", "Stroke NaN NaN NaN NaN NaN \n", "Gender NaN NaN NaN NaN NaN \n", "\n", " GSM5661335 GSM5661336 GSM5661337 GSM5661338 GSM5661339 \n", "Stroke NaN NaN NaN NaN NaN \n", "Gender NaN NaN NaN NaN NaN \n", "Clinical data saved to ../../output/preprocess/Stroke/clinical_data/GSE186798.csv\n", "Linked data shape: (10, 28848)\n", "Linked data preview (first 5 rows, 5 columns):\n", " Stroke Gender AFFX-BkGr-GC03_st AFFX-BkGr-GC04_st \\\n", "GSM5661330 NaN NaN 5.78322 6.79735 \n", "GSM5661331 NaN NaN 6.47764 6.87283 \n", "GSM5661332 NaN NaN 6.13843 6.73943 \n", "GSM5661333 NaN NaN 6.68203 6.85438 \n", "GSM5661334 NaN NaN 5.99910 6.99770 \n", "\n", " AFFX-BkGr-GC05_st \n", "GSM5661330 6.93426 \n", "GSM5661331 6.90602 \n", "GSM5661332 6.78341 \n", "GSM5661333 6.84795 \n", "GSM5661334 6.78154 \n", "Linked data shape after handling missing values: (0, 1)\n", "Quartiles for 'Stroke':\n", " 25%: nan\n", " 50% (Median): nan\n", " 75%: nan\n", "Min: nan\n", "Max: nan\n", "The distribution of the feature 'Stroke' in this dataset is fine.\n", "\n", "Abnormality detected in the cohort: GSE186798. Preprocessing failed.\n", "Dataset deemed not usable for associative studies. Linked data not saved.\n" ] } ], "source": [ "# 1. Normalize gene symbols (or in this case handle probe IDs)\n", "print(f\"Original gene data shape: {gene_data.shape}\")\n", "\n", "# Since normalization failed to find any matches (probe IDs not in gene symbol database),\n", "# we'll use the original gene data with probe IDs as identifiers\n", "gene_data_normalized = gene_data.copy()\n", "print(f\"Using original gene data with shape: {gene_data_normalized.shape}\")\n", "\n", "# Save the gene expression data \n", "os.makedirs(os.path.dirname(out_gene_data_file), exist_ok=True)\n", "gene_data_normalized.to_csv(out_gene_data_file)\n", "print(f\"Gene expression data saved to {out_gene_data_file}\")\n", "\n", "# 2. Create clinical data with the trait information\n", "# Get the clinical data we found in initial steps\n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\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 trait information\n", "clinical_features = geo_select_clinical_features(\n", " clinical_data, \n", " trait=trait, \n", " trait_row=1,\n", " convert_trait=convert_trait,\n", " gender_row=0,\n", " convert_gender=convert_gender,\n", " age_row=None,\n", " convert_age=None\n", ")\n", "\n", "print(f\"Clinical features shape: {clinical_features.shape}\")\n", "print(\"Clinical features preview:\")\n", "print(clinical_features.head())\n", "\n", "# Save the clinical data\n", "os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", "clinical_features.to_csv(out_clinical_data_file)\n", "print(f\"Clinical data saved to {out_clinical_data_file}\")\n", "\n", "# 3. Link clinical and genetic data\n", "linked_data = geo_link_clinical_genetic_data(clinical_features, gene_data_normalized)\n", "print(f\"Linked data shape: {linked_data.shape}\")\n", "print(\"Linked data preview (first 5 rows, 5 columns):\")\n", "print(linked_data.iloc[:5, :5])\n", "\n", "# 4. Handle missing values\n", "linked_data_clean = handle_missing_values(linked_data, trait)\n", "print(f\"Linked data shape after handling missing values: {linked_data_clean.shape}\")\n", "\n", "# 5. Check for bias in the dataset\n", "is_biased, linked_data_clean = judge_and_remove_biased_features(linked_data_clean, trait)\n", "\n", "# 6. 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_clean,\n", " note=\"Dataset contains probe-level gene expression data from human stroke patients. Affymetrix probe IDs were used as identifiers since standard gene symbol mapping was unavailable. The dataset contains post-stroke dementia (PSD) and post-stroke non-dementia (PSND) patients along with controls.\"\n", ")\n", "\n", "# 7. Save the linked data if it's usable\n", "if is_usable:\n", " os.makedirs(os.path.dirname(out_data_file), exist_ok=True)\n", " linked_data_clean.to_csv(out_data_file, index=True)\n", " print(f\"Linked data saved to {out_data_file}\")\n", "else:\n", " print(\"Dataset deemed not usable for associative 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 }