{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "2756e0c1", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:10.554257Z", "iopub.status.busy": "2025-03-25T06:53:10.554050Z", "iopub.status.idle": "2025-03-25T06:53:10.723842Z", "shell.execute_reply": "2025-03-25T06:53:10.723521Z" } }, "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 = \"Autism_spectrum_disorder_(ASD)\"\n", "cohort = \"GSE65106\"\n", "\n", "# Input paths\n", "in_trait_dir = \"../../input/GEO/Autism_spectrum_disorder_(ASD)\"\n", "in_cohort_dir = \"../../input/GEO/Autism_spectrum_disorder_(ASD)/GSE65106\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Autism_spectrum_disorder_(ASD)/GSE65106.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Autism_spectrum_disorder_(ASD)/gene_data/GSE65106.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Autism_spectrum_disorder_(ASD)/clinical_data/GSE65106.csv\"\n", "json_path = \"../../output/preprocess/Autism_spectrum_disorder_(ASD)/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "19e64879", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "1a4bb44e", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:10.725236Z", "iopub.status.busy": "2025-03-25T06:53:10.725091Z", "iopub.status.idle": "2025-03-25T06:53:10.841672Z", "shell.execute_reply": "2025-03-25T06:53:10.841319Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Background Information:\n", "!Series_title\t\"Expression profiling of skin fibroblast, iPSC, iPSC-derived neural progenitors, and iPSC-derived neurons from Autism Spectrum Disorder male patients and their unaffected normal male siblings\"\n", "!Series_summary\t\"Autism spectrum disorder (ASD) is an early onset neurodevelopmental disorder, which is characterized by disturbances of brain function and behavioral deficits in core areas of impaired reciprocal socialization, impairment in communication skills, and repetitive or restrictive interests and behaviors. ASD is known to have a significant genetic risk, but the underlying genetic variation can be attributed to hundreds of genes. The molecular and pathophysiologic basis of ASD remains elusive because of its genetic heterogeneity and complexity, its high comorbidity with other diseases, and the paucity of brain tissue for study. The invasive nature of collecting primary neuronal tissue from patients might be circumvented through reprogramming peripheral cells to induced pluripotent stem cells (iPSCs), which are able to generate live neurons carrying the genetic variants of disease. This breakthrough allows us to access the cellular and molecular phenotypes of patients with ‘intrinsic autism’, that is patients without known genetic disorders or identifiable syndromes or malformations. To do this, we studied a relatively homogeneous patient population of boys with intrinsic autism by excluding patients with known genetic disease or recognizable phenotypes or syndromes, as well as those with profound mental retardation or primary seizure disorders. We generated iPSCs from patients with intrinsic autism, their unaffected male siblings and age-, and sex-matched unaffected controls. And these stem cells were subsequently differentiated into electrophysiologically active neurons. The expression profile for autistic and their unaffected siblings' iPSC-derived neurons were compared. A distinct expression profile was found between autism and sib control. The significantly differentially expressed genes (> 2-fold, FDR < 0.05) in autistic iPSC-derived neurons were significantly enriched for processes related to synaptic transmission, such as neuroactive ligand-receptor signaling and extracellular matrix interactions (FDR < 0.05), and were significantly enriched for genes previously associated with ASD (p < 0.05). Our findings suggest approaches such as iPSC-derived neurons will be an important method to obtain tissue for study that appropriately recapitulates the complex dynamics of an autistic neural cell.\"\n", "!Series_overall_design\t\"We generated induced pluripotent stem cells (iPSCs) from male patients with intrinsic autism, their unaffected male siblings, and age-, and sex-matched unaffected controls. And these stem cells were subsequently differentiated into electrophysiologically active neurons following 80 days of post-mitotic neural differentiation. These samples, including fibroblast, iPSC, iPSC-derived neural progenitors (NPC) and iPSC-derived neurons, were analyzed for the change of gene expression profile by whole genome microarray.\"\n", "Sample Characteristics Dictionary:\n", "{0: ['cell type: Fibroblast', 'cell type: hESC', 'cell type: iPSC', 'cell type: iPSC-derived NPC', 'cell type: iPSC-derived neuron'], 1: ['disease type: ASD', 'disease type: Normal', 'disease type: WT'], 2: ['donor id: AA1', 'donor id: AA2', 'donor id: AA3', 'donor id: AA4', 'donor id: AN1', 'donor id: AN2', 'donor id: AN3', 'donor id: AN4', 'donor id: NN1', 'donor id: NN2', 'donor id: NN3', 'donor id: CT2', 'donor id: ESI-053'], 3: ['donor age: 8', 'donor age: 7', 'donor age: 9', 'donor age: 10', 'donor age: 16', 'donor age: embryonic'], 4: ['donor sex: Male', 'donor sex: Female'], 5: ['batch: 1a', 'batch: 2a', 'batch: 3a', 'batch: 3b', 'batch: 4a', 'cell line: CT2', 'cell line: ESI-053', 'batch: 9a', 'batch: 10a', 'batch: 12a', 'batch: 11a', 'batch: 21a', 'batch: 18a', 'batch: 19a', 'batch: 15a', 'batch: 16b', 'batch: 16a', 'batch: 19b', 'batch: 18b', 'batch: 17a', 'batch: 14d', 'batch: 14a', 'batch: 14c', 'batch: 13b', 'batch: 13a', 'batch: 14b'], 6: [nan, 'batch: 7a', 'batch: 6a']}\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": "be63349b", "metadata": {}, "source": [ "### Step 2: Dataset Analysis and Clinical Feature Extraction" ] }, { "cell_type": "code", "execution_count": 3, "id": "3e1d4e4f", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:10.842912Z", "iopub.status.busy": "2025-03-25T06:53:10.842800Z", "iopub.status.idle": "2025-03-25T06:53:10.855281Z", "shell.execute_reply": "2025-03-25T06:53:10.854982Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Preview of extracted clinical data:\n", "{'GSM1587362': [1.0, 8.0, 1.0], 'GSM1587363': [1.0, 8.0, 1.0], 'GSM1587364': [1.0, 7.0, 1.0], 'GSM1587365': [1.0, 7.0, 1.0], 'GSM1587366': [1.0, 9.0, 1.0], 'GSM1587367': [1.0, 9.0, 1.0], 'GSM1587368': [0.0, 10.0, 1.0], 'GSM1587369': [0.0, 10.0, 1.0], 'GSM1587370': [0.0, 16.0, 1.0], 'GSM1587371': [0.0, 16.0, 1.0], 'GSM1587372': [0.0, 7.0, 1.0], 'GSM1587373': [0.0, 7.0, 1.0], 'GSM1587374': [0.0, 7.0, 1.0], 'GSM1587375': [0.0, 7.0, 1.0], 'GSM1587376': [0.0, 10.0, 1.0], 'GSM1587377': [0.0, 10.0, 1.0], 'GSM1587378': [0.0, nan, 0.0], 'GSM1587379': [0.0, nan, 0.0], 'GSM1587380': [0.0, nan, 0.0], 'GSM1587381': [0.0, nan, 0.0], 'GSM1587382': [1.0, 8.0, 1.0], 'GSM1587383': [1.0, 8.0, 1.0], 'GSM1587384': [1.0, 7.0, 1.0], 'GSM1587385': [1.0, 7.0, 1.0], 'GSM1587386': [1.0, 9.0, 1.0], 'GSM1587387': [0.0, 10.0, 1.0], 'GSM1587388': [0.0, 10.0, 1.0], 'GSM1587389': [0.0, 16.0, 1.0], 'GSM1587390': [0.0, 16.0, 1.0], 'GSM1587391': [0.0, 7.0, 1.0], 'GSM1587392': [0.0, 7.0, 1.0], 'GSM1587393': [0.0, 7.0, 1.0], 'GSM1587394': [0.0, 10.0, 1.0], 'GSM1587395': [1.0, 8.0, 1.0], 'GSM1587396': [1.0, 8.0, 1.0], 'GSM1587397': [1.0, 7.0, 1.0], 'GSM1587398': [1.0, 7.0, 1.0], 'GSM1587399': [1.0, 9.0, 1.0], 'GSM1587400': [0.0, 10.0, 1.0], 'GSM1587401': [0.0, 10.0, 1.0], 'GSM1587402': [0.0, 16.0, 1.0], 'GSM1587403': [0.0, 16.0, 1.0], 'GSM1587404': [0.0, 7.0, 1.0], 'GSM1587405': [0.0, 7.0, 1.0], 'GSM1587406': [0.0, 7.0, 1.0], 'GSM1587407': [0.0, 10.0, 1.0], 'GSM1587408': [1.0, 8.0, 1.0], 'GSM1587409': [1.0, 8.0, 1.0], 'GSM1587410': [1.0, 7.0, 1.0], 'GSM1587411': [1.0, 7.0, 1.0], 'GSM1587412': [1.0, 9.0, 1.0], 'GSM1587413': [0.0, 10.0, 1.0], 'GSM1587414': [0.0, 10.0, 1.0], 'GSM1587415': [0.0, 16.0, 1.0], 'GSM1587416': [0.0, 16.0, 1.0], 'GSM1587417': [0.0, 7.0, 1.0], 'GSM1587418': [0.0, 7.0, 1.0], 'GSM1587419': [0.0, 7.0, 1.0], 'GSM1587420': [0.0, 10.0, 1.0]}\n", "Clinical data saved to: ../../output/preprocess/Autism_spectrum_disorder_(ASD)/clinical_data/GSE65106.csv\n" ] } ], "source": [ "# 1. Gene Expression Data Availability\n", "# Based on the background information, this dataset contains gene expression data from iPSC-derived neurons \n", "# using whole genome microarray, which indicates gene expression data\n", "is_gene_available = True\n", "\n", "# 2. Variable Availability and Data Type Conversion\n", "# 2.1 Data Availability and 2.2 Data Type Conversion\n", "\n", "# For trait (ASD):\n", "# From the sample characteristics, we can see disease type (row 1) indicates ASD vs Normal\n", "trait_row = 1\n", "\n", "def convert_trait(value):\n", " if pd.isna(value):\n", " return None\n", " # Extract the value after the colon\n", " if \":\" in value:\n", " value = value.split(\":\", 1)[1].strip()\n", " \n", " # Convert to binary: ASD = 1, Normal/WT = 0\n", " if value.lower() == \"asd\":\n", " return 1\n", " elif value.lower() in [\"normal\", \"wt\"]:\n", " return 0\n", " else:\n", " return None\n", "\n", "# For age:\n", "# From the sample characteristics, donor age is available in row 3\n", "age_row = 3\n", "\n", "def convert_age(value):\n", " if pd.isna(value):\n", " return None\n", " # Extract the value after the colon\n", " if \":\" in value:\n", " value = value.split(\":\", 1)[1].strip()\n", " \n", " # Handle embryonic age as None since it's not a numeric age\n", " if value.lower() == \"embryonic\":\n", " return None\n", " \n", " # Try to convert to integer\n", " try:\n", " return int(value)\n", " except:\n", " return None\n", "\n", "# For gender:\n", "# From the sample characteristics, donor sex is available in row 4\n", "gender_row = 4\n", "\n", "def convert_gender(value):\n", " if pd.isna(value):\n", " return None\n", " # Extract the value after the colon\n", " if \":\" in value:\n", " value = value.split(\":\", 1)[1].strip()\n", " \n", " # Convert to binary: Female = 0, Male = 1\n", " if value.lower() == \"female\":\n", " return 0\n", " elif value.lower() == \"male\":\n", " return 1\n", " else:\n", " return None\n", "\n", "# 3. Save Metadata\n", "# Check if trait data is available (trait_row is not None)\n", "is_trait_available = trait_row is not None\n", "\n", "# Conduct initial filtering\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", "# Extract clinical features if trait_row is not None\n", "if trait_row is not None:\n", " # Use the provided function to extract clinical features\n", " 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 extracted clinical data\n", " preview = preview_df(clinical_df)\n", " print(\"Preview of extracted clinical data:\")\n", " print(preview)\n", " \n", " # Save the clinical data to CSV\n", " # Create directory if it doesn't exist\n", " os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", " 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": "90db464f", "metadata": {}, "source": [ "### Step 3: Gene Data Extraction" ] }, { "cell_type": "code", "execution_count": 4, "id": "1c110547", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:10.856459Z", "iopub.status.busy": "2025-03-25T06:53:10.856355Z", "iopub.status.idle": "2025-03-25T06:53:11.022400Z", "shell.execute_reply": "2025-03-25T06:53:11.022013Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Index(['7892501', '7892502', '7892503', '7892504', '7892505', '7892506',\n", " '7892507', '7892508', '7892509', '7892510', '7892511', '7892512',\n", " '7892513', '7892514', '7892515', '7892516', '7892517', '7892518',\n", " '7892519', '7892520'],\n", " dtype='object', name='ID')\n" ] } ], "source": [ "# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.\n", "gene_data = get_genetic_data(matrix_file)\n", "\n", "# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.\n", "print(gene_data.index[:20])\n" ] }, { "cell_type": "markdown", "id": "977934bd", "metadata": {}, "source": [ "### Step 4: Gene Identifier Review" ] }, { "cell_type": "code", "execution_count": 5, "id": "00d6167b", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:11.023797Z", "iopub.status.busy": "2025-03-25T06:53:11.023669Z", "iopub.status.idle": "2025-03-25T06:53:11.025645Z", "shell.execute_reply": "2025-03-25T06:53:11.025354Z" } }, "outputs": [], "source": [ "# Examining the gene identifiers from the previous step\n", "# The identifiers appear to be numerical values that look like probe IDs\n", "# These are not standard human gene symbols (which would be alphanumeric like BRCA1, TP53, etc.)\n", "# These appear to be microarray probe IDs which need to be mapped to gene symbols\n", "\n", "requires_gene_mapping = True\n" ] }, { "cell_type": "markdown", "id": "a2244910", "metadata": {}, "source": [ "### Step 5: Gene Annotation" ] }, { "cell_type": "code", "execution_count": 6, "id": "b9900334", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:11.026859Z", "iopub.status.busy": "2025-03-25T06:53:11.026756Z", "iopub.status.idle": "2025-03-25T06:53:14.545606Z", "shell.execute_reply": "2025-03-25T06:53:14.545206Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gene annotation preview:\n", "{'ID': ['7896736', '7896738', '7896740', '7896742', '7896744'], 'GB_LIST': [nan, nan, 'NM_001004195,NM_001005240,NM_001005484,BC136848,BC136867,BC136907,BC136908', 'NR_024437,XM_006711854,XM_006726377,XR_430662,AK298283,AL137655,BC032332,BC118988,BC122537,BC131690,NM_207366,AK301928,BC071667', 'NM_001005221,NM_001005224,NM_001005277,NM_001005504,BC137547,BC137568'], 'SPOT_ID': ['chr1:53049-54936', 'chr1:63015-63887', 'chr1:69091-70008', 'chr1:334129-334296', 'chr1:367659-368597'], 'seqname': ['chr1', 'chr1', 'chr1', 'chr1', 'chr1'], 'RANGE_GB': ['NC_000001.10', 'NC_000001.10', 'NC_000001.10', 'NC_000001.10', 'NC_000001.10'], 'RANGE_STRAND': ['+', '+', '+', '+', '+'], 'RANGE_START': ['53049', '63015', '69091', '334129', '367659'], 'RANGE_STOP': ['54936', '63887', '70008', '334296', '368597'], 'total_probes': [7.0, 31.0, 24.0, 6.0, 36.0], 'gene_assignment': ['---', 'ENST00000328113 // OR4G2P // olfactory receptor, family 4, subfamily G, member 2 pseudogene // --- // --- /// ENST00000492842 // OR4G11P // olfactory receptor, family 4, subfamily G, member 11 pseudogene // --- // --- /// ENST00000588632 // OR4G1P // olfactory receptor, family 4, subfamily G, member 1 pseudogene // --- // ---', 'NM_001004195 // OR4F4 // olfactory receptor, family 4, subfamily F, member 4 // 15q26.3 // 26682 /// NM_001005240 // OR4F17 // olfactory receptor, family 4, subfamily F, member 17 // 19p13.3 // 81099 /// NM_001005484 // OR4F5 // olfactory receptor, family 4, subfamily F, member 5 // 1p36.33 // 79501 /// ENST00000318050 // OR4F17 // olfactory receptor, family 4, subfamily F, member 17 // 19p13.3 // 81099 /// ENST00000326183 // OR4F4 // olfactory receptor, family 4, subfamily F, member 4 // 15q26.3 // 26682 /// ENST00000335137 // OR4F5 // olfactory receptor, family 4, subfamily F, member 5 // 1p36.33 // 79501 /// ENST00000585993 // OR4F17 // olfactory receptor, family 4, subfamily F, member 17 // 19p13.3 // 81099 /// BC136848 // OR4F17 // olfactory receptor, family 4, subfamily F, member 17 // 19p13.3 // 81099 /// BC136867 // OR4F17 // olfactory receptor, family 4, subfamily F, member 17 // 19p13.3 // 81099 /// BC136907 // OR4F4 // olfactory receptor, family 4, subfamily F, member 4 // 15q26.3 // 26682 /// BC136908 // OR4F4 // olfactory receptor, family 4, subfamily F, member 4 // 15q26.3 // 26682', 'NR_024437 // LOC728323 // uncharacterized LOC728323 // 2q37.3 // 728323 /// XM_006711854 // LOC101060626 // F-box only protein 25-like // --- // 101060626 /// XM_006726377 // LOC101060626 // F-box only protein 25-like // --- // 101060626 /// XR_430662 // LOC101927097 // uncharacterized LOC101927097 // --- // 101927097 /// ENST00000279067 // LINC00266-1 // long intergenic non-protein coding RNA 266-1 // 20q13.33 // 140849 /// ENST00000431812 // LOC101928706 // uncharacterized LOC101928706 // --- // 101928706 /// ENST00000431812 // LOC101929823 // uncharacterized LOC101929823 // --- // 101929823 /// ENST00000433444 // LOC728323 // uncharacterized LOC728323 // 2q37.3 // 728323 /// ENST00000436899 // LINC00266-3 // long intergenic non-protein coding RNA 266-3 // --- // --- /// ENST00000445252 // LINC00266-1 // long intergenic non-protein coding RNA 266-1 // 20q13.33 // 140849 /// ENST00000455207 // LOC101928706 // uncharacterized LOC101928706 // --- // 101928706 /// ENST00000455207 // LOC101929823 // uncharacterized LOC101929823 // --- // 101929823 /// ENST00000455464 // LOC101928706 // uncharacterized LOC101928706 // --- // 101928706 /// ENST00000455464 // LOC101929823 // uncharacterized LOC101929823 // --- // 101929823 /// ENST00000456398 // LOC728323 // uncharacterized LOC728323 // 2q37.3 // 728323 /// ENST00000601814 // LOC101928706 // uncharacterized LOC101928706 // --- // 101928706 /// ENST00000601814 // LOC101929823 // uncharacterized LOC101929823 // --- // 101929823 /// AK298283 // LOC728323 // uncharacterized LOC728323 // 2q37.3 // 728323 /// AL137655 // LOC100134822 // uncharacterized LOC100134822 // --- // 100134822 /// BC032332 // PCMTD2 // protein-L-isoaspartate (D-aspartate) O-methyltransferase domain containing 2 // 20q13.33 // 55251 /// BC118988 // LINC00266-1 // long intergenic non-protein coding RNA 266-1 // 20q13.33 // 140849 /// BC122537 // LINC00266-1 // long intergenic non-protein coding RNA 266-1 // 20q13.33 // 140849 /// BC131690 // LOC728323 // uncharacterized LOC728323 // 2q37.3 // 728323 /// NM_207366 // SEPT14 // septin 14 // 7p11.2 // 346288 /// ENST00000388975 // SEPT14 // septin 14 // 7p11.2 // 346288 /// ENST00000427373 // LINC00266-4P // long intergenic non-protein coding RNA 266-4, pseudogene // --- // --- /// ENST00000431796 // LOC728323 // uncharacterized LOC728323 // 2q37.3 // 728323 /// ENST00000509776 // LINC00266-2P // long intergenic non-protein coding RNA 266-2, pseudogene // --- // --- /// ENST00000570230 // LOC101929008 // uncharacterized LOC101929008 // --- // 101929008 /// ENST00000570230 // LOC101929038 // uncharacterized LOC101929038 // --- // 101929038 /// ENST00000570230 // LOC101930130 // uncharacterized LOC101930130 // --- // 101930130 /// ENST00000570230 // LOC101930567 // uncharacterized LOC101930567 // --- // 101930567 /// AK301928 // SEPT14 // septin 14 // 7p11.2 // 346288', 'NM_001005221 // OR4F29 // olfactory receptor, family 4, subfamily F, member 29 // 1p36.33 // 729759 /// NM_001005224 // OR4F3 // olfactory receptor, family 4, subfamily F, member 3 // 5q35.3 // 26683 /// NM_001005277 // OR4F16 // olfactory receptor, family 4, subfamily F, member 16 // 1p36.33 // 81399 /// NM_001005504 // OR4F21 // olfactory receptor, family 4, subfamily F, member 21 // 8p23.3 // 441308 /// ENST00000320901 // OR4F21 // olfactory receptor, family 4, subfamily F, member 21 // 8p23.3 // 441308 /// ENST00000332831 // OR4F3 // olfactory receptor, family 4, subfamily F, member 3 // 5q35.3 // 26683 /// ENST00000332831 // OR4F16 // olfactory receptor, family 4, subfamily F, member 16 // 1p36.33 // 81399 /// ENST00000332831 // OR4F29 // olfactory receptor, family 4, subfamily F, member 29 // 1p36.33 // 729759 /// ENST00000402444 // OR4F7P // olfactory receptor, family 4, subfamily F, member 7 pseudogene // --- // --- /// ENST00000405102 // OR4F1P // olfactory receptor, family 4, subfamily F, member 1 pseudogene // --- // --- /// ENST00000424047 // OR4F2P // olfactory receptor, family 4, subfamily F, member 2 pseudogene // --- // --- /// ENST00000426406 // OR4F3 // olfactory receptor, family 4, subfamily F, member 3 // 5q35.3 // 26683 /// ENST00000426406 // OR4F16 // olfactory receptor, family 4, subfamily F, member 16 // 1p36.33 // 81399 /// ENST00000426406 // OR4F29 // olfactory receptor, family 4, subfamily F, member 29 // 1p36.33 // 729759 /// ENST00000456475 // OR4F3 // olfactory receptor, family 4, subfamily F, member 3 // 5q35.3 // 26683 /// ENST00000456475 // OR4F16 // olfactory receptor, family 4, subfamily F, member 16 // 1p36.33 // 81399 /// ENST00000456475 // OR4F29 // olfactory receptor, family 4, subfamily F, member 29 // 1p36.33 // 729759 /// ENST00000559128 // OR4F28P // olfactory receptor, family 4, subfamily F, member 28 pseudogene // --- // --- /// BC137547 // OR4F3 // olfactory receptor, family 4, subfamily F, member 3 // 5q35.3 // 26683 /// BC137547 // OR4F16 // olfactory receptor, family 4, subfamily F, member 16 // 1p36.33 // 81399 /// BC137547 // OR4F29 // olfactory receptor, family 4, subfamily F, member 29 // 1p36.33 // 729759 /// BC137568 // OR4F3 // olfactory receptor, family 4, subfamily F, member 3 // 5q35.3 // 26683 /// BC137568 // OR4F16 // olfactory receptor, family 4, subfamily F, member 16 // 1p36.33 // 81399 /// BC137568 // OR4F29 // olfactory receptor, family 4, subfamily F, member 29 // 1p36.33 // 729759 /// ENST00000589943 // OR4F8P // olfactory receptor, family 4, subfamily F, member 8 pseudogene // --- // ---'], 'mrna_assignment': ['NONHSAT060105 // NONCODE // Non-coding transcript identified by NONCODE // chr1 // 100 // 100 // 7 // 7 // 0', 'ENST00000328113 // ENSEMBL // havana:known chromosome:GRCh38:15:101926805:101927707:-1 gene:ENSG00000183909 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 100 // 100 // 31 // 31 // 0 /// ENST00000492842 // ENSEMBL // havana:known chromosome:GRCh38:1:62948:63887:1 gene:ENSG00000240361 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 100 // 100 // 31 // 31 // 0 /// ENST00000588632 // ENSEMBL // havana:known chromosome:GRCh38:19:104535:105471:1 gene:ENSG00000267310 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 100 // 100 // 31 // 31 // 0 /// NONHSAT000016 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 31 // 31 // 0 /// NONHSAT051704 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 31 // 31 // 0 /// NONHSAT060106 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 31 // 31 // 0', 'NM_001004195 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 4 (OR4F4), mRNA. // chr1 // 100 // 100 // 24 // 24 // 0 /// NM_001005240 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 17 (OR4F17), mRNA. // chr1 // 100 // 100 // 24 // 24 // 0 /// NM_001005484 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 5 (OR4F5), mRNA. // chr1 // 100 // 100 // 24 // 24 // 0 /// ENST00000318050 // ENSEMBL // ensembl:known chromosome:GRCh38:19:110643:111696:1 gene:ENSG00000176695 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 100 // 100 // 24 // 24 // 0 /// ENST00000326183 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:15:101922042:101923095:-1 gene:ENSG00000177693 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 100 // 100 // 24 // 24 // 0 /// ENST00000335137 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:1:69091:70008:1 gene:ENSG00000186092 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 100 // 100 // 24 // 24 // 0 /// ENST00000585993 // ENSEMBL // havana:known chromosome:GRCh38:19:107461:111696:1 gene:ENSG00000176695 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 100 // 100 // 24 // 24 // 0 /// BC136848 // GenBank // Homo sapiens olfactory receptor, family 4, subfamily F, member 17, mRNA (cDNA clone MGC:168462 IMAGE:9020839), complete cds. // chr1 // 100 // 100 // 24 // 24 // 0 /// BC136867 // GenBank // Homo sapiens olfactory receptor, family 4, subfamily F, member 17, mRNA (cDNA clone MGC:168481 IMAGE:9020858), complete cds. // chr1 // 100 // 100 // 24 // 24 // 0 /// BC136907 // GenBank // Homo sapiens olfactory receptor, family 4, subfamily F, member 4, mRNA (cDNA clone MGC:168521 IMAGE:9020898), complete cds. // chr1 // 100 // 100 // 24 // 24 // 0 /// BC136908 // GenBank // Homo sapiens olfactory receptor, family 4, subfamily F, member 4, mRNA (cDNA clone MGC:168522 IMAGE:9020899), complete cds. // chr1 // 100 // 100 // 24 // 24 // 0 /// ENST00000618231 // ENSEMBL // havana:known chromosome:GRCh38:19:110613:111417:1 gene:ENSG00000176695 gene_biotype:protein_coding transcript_biotype:retained_intron // chr1 // 100 // 88 // 21 // 21 // 0', 'NR_024437 // RefSeq // Homo sapiens uncharacterized LOC728323 (LOC728323), long non-coding RNA. // chr1 // 100 // 100 // 6 // 6 // 0 /// XM_006711854 // RefSeq // PREDICTED: Homo sapiens F-box only protein 25-like (LOC101060626), partial mRNA. // chr1 // 100 // 100 // 6 // 6 // 0 /// XM_006726377 // RefSeq // PREDICTED: Homo sapiens F-box only protein 25-like (LOC101060626), partial mRNA. // chr1 // 100 // 100 // 6 // 6 // 0 /// XR_430662 // RefSeq // PREDICTED: Homo sapiens uncharacterized LOC101927097 (LOC101927097), misc_RNA. // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000279067 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:20:64290385:64303559:1 gene:ENSG00000149656 gene_biotype:processed_transcript transcript_biotype:processed_transcript // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000431812 // ENSEMBL // havana:known chromosome:GRCh38:1:485066:489553:-1 gene:ENSG00000237094 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000433444 // ENSEMBL // havana:putative chromosome:GRCh38:2:242122293:242138888:1 gene:ENSG00000220804 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:processed_transcript // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000436899 // ENSEMBL // havana:known chromosome:GRCh38:6:131910:144885:-1 gene:ENSG00000170590 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000445252 // ENSEMBL // havana:known chromosome:GRCh38:20:64294897:64311371:1 gene:ENSG00000149656 gene_biotype:processed_transcript transcript_biotype:processed_transcript // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000455207 // ENSEMBL // havana:known chromosome:GRCh38:1:373182:485208:-1 gene:ENSG00000237094 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000455464 // ENSEMBL // havana:known chromosome:GRCh38:1:476531:497259:-1 gene:ENSG00000237094 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000456398 // ENSEMBL // havana:known chromosome:GRCh38:2:242088633:242140638:1 gene:ENSG00000220804 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:processed_transcript // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000601814 // ENSEMBL // havana:known chromosome:GRCh38:1:484832:495476:-1 gene:ENSG00000237094 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// AK298283 // GenBank // Homo sapiens cDNA FLJ60027 complete cds, moderately similar to F-box only protein 25. // chr1 // 100 // 100 // 6 // 6 // 0 /// AL137655 // GenBank // Homo sapiens mRNA; cDNA DKFZp434B2016 (from clone DKFZp434B2016). // chr1 // 100 // 100 // 6 // 6 // 0 /// BC032332 // GenBank // Homo sapiens protein-L-isoaspartate (D-aspartate) O-methyltransferase domain containing 2, mRNA (cDNA clone MGC:40288 IMAGE:5169056), complete cds. // chr1 // 100 // 100 // 6 // 6 // 0 /// BC118988 // GenBank // Homo sapiens chromosome 20 open reading frame 69, mRNA (cDNA clone MGC:141807 IMAGE:40035995), complete cds. // chr1 // 100 // 100 // 6 // 6 // 0 /// BC122537 // GenBank // Homo sapiens chromosome 20 open reading frame 69, mRNA (cDNA clone MGC:141808 IMAGE:40035996), complete cds. // chr1 // 100 // 100 // 6 // 6 // 0 /// BC131690 // GenBank // Homo sapiens similar to bA476I15.3 (novel protein similar to septin), mRNA (cDNA clone IMAGE:40119684), partial cds. // chr1 // 100 // 100 // 6 // 6 // 0 /// NM_207366 // RefSeq // Homo sapiens septin 14 (SEPT14), mRNA. // chr1 // 50 // 100 // 3 // 6 // 0 /// ENST00000388975 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:7:55793544:55862789:-1 gene:ENSG00000154997 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 50 // 100 // 3 // 6 // 0 /// ENST00000427373 // ENSEMBL // havana:known chromosome:GRCh38:Y:25378300:25394719:-1 gene:ENSG00000228786 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 67 // 100 // 4 // 6 // 0 /// ENST00000431796 // ENSEMBL // havana:known chromosome:GRCh38:2:242088693:242122405:1 gene:ENSG00000220804 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:processed_transcript // chr1 // 60 // 83 // 3 // 5 // 0 /// ENST00000509776 // ENSEMBL // havana:known chromosome:GRCh38:Y:24278681:24291346:1 gene:ENSG00000248792 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 67 // 100 // 4 // 6 // 0 /// ENST00000570230 // ENSEMBL // havana:known chromosome:GRCh38:16:90157932:90178344:1 gene:ENSG00000260528 gene_biotype:processed_transcript transcript_biotype:processed_transcript // chr1 // 67 // 100 // 4 // 6 // 0 /// AK301928 // GenBank // Homo sapiens cDNA FLJ59065 complete cds, moderately similar to Septin-10. // chr1 // 50 // 100 // 3 // 6 // 0 /// ENST00000413839 // ENSEMBL // havana:known chromosome:GRCh38:7:45816557:45821064:1 gene:ENSG00000226838 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000414688 // ENSEMBL // havana:known chromosome:GRCh38:1:711342:720200:-1 gene:ENSG00000230021 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000419394 // ENSEMBL // havana:known chromosome:GRCh38:1:703685:720194:-1 gene:ENSG00000230021 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000420830 // ENSEMBL // havana:known chromosome:GRCh38:1:243031272:243047869:-1 gene:ENSG00000231512 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000428915 // ENSEMBL // havana:known chromosome:GRCh38:10:38453181:38466176:1 gene:ENSG00000203496 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000439401 // ENSEMBL // havana:known chromosome:GRCh38:3:198228194:198228376:1 gene:ENSG00000226008 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000440200 // ENSEMBL // havana:known chromosome:GRCh38:1:601436:720200:-1 gene:ENSG00000230021 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000441245 // ENSEMBL // havana:known chromosome:GRCh38:1:701936:720150:-1 gene:ENSG00000230021 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 67 // 4 // 4 // 0 /// ENST00000445840 // ENSEMBL // havana:known chromosome:GRCh38:1:485032:485211:-1 gene:ENSG00000224813 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:transcribed_unprocessed_pseudogene // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000447954 // ENSEMBL // havana:known chromosome:GRCh38:1:720058:724550:-1 gene:ENSG00000230021 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000450226 // ENSEMBL // havana:known chromosome:GRCh38:1:243038914:243047875:-1 gene:ENSG00000231512 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000453405 // ENSEMBL // havana:known chromosome:GRCh38:2:242122287:242122469:1 gene:ENSG00000244528 gene_biotype:processed_pseudogene transcript_biotype:processed_pseudogene // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000477740 // ENSEMBL // havana:known chromosome:GRCh38:1:92230:129217:-1 gene:ENSG00000238009 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000508026 // ENSEMBL // havana:known chromosome:GRCh38:8:200385:200562:-1 gene:ENSG00000255464 gene_biotype:processed_pseudogene transcript_biotype:processed_pseudogene // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000509192 // ENSEMBL // havana:known chromosome:GRCh38:5:181329241:181342213:1 gene:ENSG00000250765 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000513445 // ENSEMBL // havana:known chromosome:GRCh38:4:118640673:118640858:1 gene:ENSG00000251155 gene_biotype:processed_pseudogene transcript_biotype:processed_pseudogene // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000523795 // ENSEMBL // havana:known chromosome:GRCh38:8:192091:200563:-1 gene:ENSG00000250210 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000529266 // ENSEMBL // havana:known chromosome:GRCh38:11:121279:125784:-1 gene:ENSG00000254468 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000587432 // ENSEMBL // havana:known chromosome:GRCh38:19:191212:195696:-1 gene:ENSG00000267237 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:processed_transcript // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000610542 // ENSEMBL // ensembl:known chromosome:GRCh38:1:120725:133723:-1 gene:ENSG00000238009 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 83 // 100 // 5 // 6 // 0 /// ENST00000612088 // ENSEMBL // ensembl:known chromosome:GRCh38:10:38453181:38466176:1 gene:ENSG00000203496 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000612214 // ENSEMBL // havana:known chromosome:GRCh38:19:186371:191429:-1 gene:ENSG00000267237 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:processed_transcript // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000613471 // ENSEMBL // ensembl:known chromosome:GRCh38:1:476738:489710:-1 gene:ENSG00000237094 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000615295 // ENSEMBL // ensembl:known chromosome:GRCh38:5:181329241:181342213:1 gene:ENSG00000250765 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000616585 // ENSEMBL // ensembl:known chromosome:GRCh38:1:711715:724707:-1 gene:ENSG00000230021 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000618096 // ENSEMBL // havana:known chromosome:GRCh38:19:191178:191354:-1 gene:ENSG00000267237 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:transcribed_unprocessed_pseudogene // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000618222 // ENSEMBL // ensembl:known chromosome:GRCh38:6:131910:144885:-1 gene:ENSG00000170590 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000622435 // ENSEMBL // havana:known chromosome:GRCh38:2:242088684:242159382:1 gene:ENSG00000220804 gene_biotype:transcribed_unprocessed_pseudogene transcript_biotype:processed_transcript // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000622626 // ENSEMBL // ensembl:known chromosome:GRCh38:11:112967:125927:-1 gene:ENSG00000254468 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 100 // 100 // 6 // 6 // 0 /// GENSCAN00000007486 // ENSEMBL // cdna:genscan chromosome:GRCh38:2:242089132:242175655:1 transcript_biotype:protein_coding // chr1 // 100 // 100 // 6 // 6 // 0 /// GENSCAN00000023775 // ENSEMBL // cdna:genscan chromosome:GRCh38:7:45812479:45856081:1 transcript_biotype:protein_coding // chr1 // 100 // 100 // 6 // 6 // 0 /// GENSCAN00000045845 // ENSEMBL // cdna:genscan chromosome:GRCh38:8:166086:213433:-1 transcript_biotype:protein_coding // chr1 // 100 // 100 // 6 // 6 // 0 /// BC071667 // GenBank HTC // Homo sapiens cDNA clone IMAGE:4384656, **** WARNING: chimeric clone ****. // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT000053 // NONCODE // Non-coding transcript identified by NONCODE: Sense No Exonic // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT000055 // NONCODE // Non-coding transcript identified by NONCODE: Sense No Exonic // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT000063 // NONCODE // Non-coding transcript identified by NONCODE: Sense No Exonic // chr1 // 83 // 100 // 5 // 6 // 0 /// NONHSAT000064 // NONCODE // Non-coding transcript identified by NONCODE // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT000065 // NONCODE // Non-coding transcript identified by NONCODE: Sense No Exonic // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT000086 // NONCODE // Non-coding transcript identified by NONCODE: Sense No Exonic // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT000097 // NONCODE // Non-coding transcript identified by NONCODE: Sense No Exonic // chr1 // 100 // 67 // 4 // 4 // 0 /// NONHSAT000098 // NONCODE // Non-coding transcript identified by NONCODE: Sense No Exonic // chr1 // 83 // 100 // 5 // 6 // 0 /// NONHSAT010578 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 83 // 100 // 5 // 6 // 0 /// NONHSAT012829 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT017180 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT060112 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT078034 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT078035 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT078039 // NONCODE // Non-coding transcript identified by NONCODE // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT078040 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT078041 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT081035 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT081036 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT094494 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT094497 // NONCODE // Non-coding transcript identified by NONCODE // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT098010 // NONCODE // Non-coding transcript identified by NONCODE // chr1 // 83 // 100 // 5 // 6 // 0 /// NONHSAT105956 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT105968 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 100 // 100 // 6 // 6 // 0 /// NONHSAT120472 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 83 // 100 // 5 // 6 // 0 /// NONHSAT124571 // NONCODE // Non-coding transcript identified by NONCODE // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00001800-XLOC_l2_001331 // Broad TUCP // linc-TP53BP2-4 chr1:-:224133091-224222680 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00001926-XLOC_l2_000004 // Broad TUCP // linc-OR4F16-1 chr1:+:329783-334271 // chr1 // 83 // 100 // 5 // 6 // 0 /// TCONS_l2_00001927-XLOC_l2_000004 // Broad TUCP // linc-OR4F16-1 chr1:+:334139-342806 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00002370-XLOC_l2_000720 // Broad TUCP // linc-ZNF692-5 chr1:-:92229-129217 // chr1 // 83 // 100 // 5 // 6 // 0 /// TCONS_l2_00002386-XLOC_l2_000726 // Broad TUCP // linc-OR4F29-1 chr1:-:637315-655530 // chr1 // 100 // 67 // 4 // 4 // 0 /// TCONS_l2_00002387-XLOC_l2_000726 // Broad TUCP // linc-OR4F29-1 chr1:-:639064-655574 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00002388-XLOC_l2_000726 // Broad TUCP // linc-OR4F29-1 chr1:-:646721-655580 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00002389-XLOC_l2_000726 // Broad TUCP // linc-OR4F29-1 chr1:-:655437-659930 // chr1 // 83 // 100 // 5 // 6 // 0 /// TCONS_l2_00002812-XLOC_l2_001398 // Broad TUCP // linc-PLD5-4 chr1:-:243194573-243211171 // chr1 // 83 // 100 // 5 // 6 // 0 /// TCONS_l2_00003949-XLOC_l2_001561 // Broad TUCP // linc-BMS1-9 chr10:+:38742108-38755311 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00003950-XLOC_l2_001561 // Broad TUCP // linc-BMS1-9 chr10:+:38742265-38764837 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014349-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030831-243101574 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014350-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030855-243102147 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014351-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030868-243101569 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014352-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030886-243064759 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014354-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030931-243067562 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014355-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030941-243102157 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014357-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243037045-243101538 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00014358-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243058329-243064628 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00015637-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030783-243082789 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00015638-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030843-243065243 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00015639-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030843-243102469 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00015640-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030843-243102469 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00015641-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243030843-243102469 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00015643-XLOC_l2_007835 // Broad TUCP // linc-ORC6-14 chr2:+:243064443-243081039 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00016828-XLOC_l2_008724 // Broad TUCP // linc-HNF1B-4 chr20:+:62921737-62934707 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00020055-XLOC_l2_010084 // Broad TUCP // linc-MCMBP-2 chr3:+:197937115-197955676 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00025304-XLOC_l2_012836 // Broad TUCP // linc-PDCD2-1 chr6:-:131909-144885 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00025849-XLOC_l2_013383 // Broad TUCP // linc-IGFBP1-1 chr7:+:45831387-45863181 // chr1 // 100 // 100 // 6 // 6 // 0 /// TCONS_l2_00025850-XLOC_l2_013383 // Broad TUCP // linc-IGFBP1-1 chr7:+:45836951-45863174 // chr1 // 100 // 100 // 6 // 6 // 0 /// ENST00000437691 // ENSEMBL // havana:known chromosome:GRCh38:1:243047737:243052252:-1 gene:ENSG00000231512 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 67 // 100 // 4 // 6 // 0 /// ENST00000447236 // ENSEMBL // havana:known chromosome:GRCh38:7:56360362:56360541:-1 gene:ENSG00000231299 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 50 // 100 // 3 // 6 // 0 /// ENST00000453576 // ENSEMBL // havana:known chromosome:GRCh38:1:129081:133566:-1 gene:ENSG00000238009 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 67 // 100 // 4 // 6 // 0 /// ENST00000611754 // ENSEMBL // ensembl:known chromosome:GRCh38:Y:25378671:25391610:-1 gene:ENSG00000228786 gene_biotype:lincRNA transcript_biotype:lincRNA // chr1 // 67 // 100 // 4 // 6 // 0 /// ENST00000617978 // ENSEMBL // havana:known chromosome:GRCh38:1:227980051:227980227:1 gene:ENSG00000274886 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 67 // 100 // 4 // 6 // 0 /// ENST00000621799 // ENSEMBL // ensembl:known chromosome:GRCh38:16:90173217:90186204:1 gene:ENSG00000260528 gene_biotype:processed_transcript transcript_biotype:processed_transcript // chr1 // 67 // 100 // 4 // 6 // 0 /// NONHSAT000022 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 67 // 100 // 4 // 6 // 0 /// NONHSAT010579 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 67 // 100 // 4 // 6 // 0 /// NONHSAT010580 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 67 // 100 // 4 // 6 // 0 /// NONHSAT120743 // NONCODE // Non-coding transcript identified by NONCODE // chr1 // 50 // 100 // 3 // 6 // 0 /// NONHSAT139746 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 67 // 100 // 4 // 6 // 0 /// NONHSAT144650 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 67 // 100 // 4 // 6 // 0 /// NONHSAT144655 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 67 // 100 // 4 // 6 // 0 /// TCONS_l2_00002372-XLOC_l2_000720 // Broad TUCP // linc-ZNF692-5 chr1:-:129080-133566 // chr1 // 67 // 100 // 4 // 6 // 0 /// TCONS_l2_00002813-XLOC_l2_001398 // Broad TUCP // linc-PLD5-4 chr1:-:243202215-243211826 // chr1 // 67 // 100 // 4 // 6 // 0 /// TCONS_l2_00002814-XLOC_l2_001398 // Broad TUCP // linc-PLD5-4 chr1:-:243211038-243215554 // chr1 // 67 // 100 // 4 // 6 // 0 /// TCONS_l2_00010440-XLOC_l2_005352 // Broad TUCP // linc-RBM11-5 chr16:+:90244124-90289080 // chr1 // 67 // 100 // 4 // 6 // 0 /// TCONS_l2_00031062-XLOC_l2_015962 // Broad TUCP // linc-BPY2B-4 chrY:-:27524446-27540866 // chr1 // 67 // 100 // 4 // 6 // 0', 'NM_001005221 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 29 (OR4F29), mRNA. // chr1 // 100 // 100 // 36 // 36 // 0 /// NM_001005224 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 3 (OR4F3), mRNA. // chr1 // 100 // 100 // 36 // 36 // 0 /// NM_001005277 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 16 (OR4F16), mRNA. // chr1 // 100 // 100 // 36 // 36 // 0 /// NM_001005504 // RefSeq // Homo sapiens olfactory receptor, family 4, subfamily F, member 21 (OR4F21), mRNA. // chr1 // 89 // 100 // 32 // 36 // 0 /// ENST00000320901 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:8:166049:167043:-1 gene:ENSG00000176269 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 89 // 100 // 32 // 36 // 0 /// ENST00000332831 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:1:685716:686654:-1 gene:ENSG00000273547 gene_biotype:protein_coding transcript_biotype:protein_coding gene:ENSG00000185097 // chr1 // 100 // 100 // 36 // 36 // 0 /// ENST00000402444 // ENSEMBL // havana:known chromosome:GRCh38:6:170639606:170640536:1 gene:ENSG00000217874 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 78 // 100 // 28 // 36 // 0 /// ENST00000405102 // ENSEMBL // havana:known chromosome:GRCh38:6:105919:106856:-1 gene:ENSG00000220212 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 81 // 100 // 29 // 36 // 0 /// ENST00000424047 // ENSEMBL // havana:known chromosome:GRCh38:11:86649:87586:-1 gene:ENSG00000224777 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 78 // 100 // 28 // 36 // 0 /// ENST00000426406 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:1:450740:451678:-1 gene:ENSG00000278566 gene_biotype:protein_coding transcript_biotype:protein_coding gene:ENSG00000235249 // chr1 // 100 // 100 // 36 // 36 // 0 /// ENST00000456475 // ENSEMBL // ensembl_havana_transcript:known chromosome:GRCh38:5:181367268:181368262:1 gene:ENSG00000230178 gene_biotype:protein_coding transcript_biotype:protein_coding // chr1 // 100 // 100 // 36 // 36 // 0 /// ENST00000559128 // ENSEMBL // havana:known chromosome:GRCh38:15:101875964:101876901:1 gene:ENSG00000257109 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 83 // 100 // 30 // 36 // 0 /// BC137547 // GenBank // Homo sapiens olfactory receptor, family 4, subfamily F, member 3, mRNA (cDNA clone MGC:169170 IMAGE:9021547), complete cds. // chr1 // 100 // 100 // 36 // 36 // 0 /// BC137568 // GenBank // Homo sapiens olfactory receptor, family 4, subfamily F, member 3, mRNA (cDNA clone MGC:169191 IMAGE:9021568), complete cds. // chr1 // 100 // 100 // 36 // 36 // 0 /// ENST00000589943 // ENSEMBL // havana:known chromosome:GRCh38:19:156279:157215:-1 gene:ENSG00000266971 gene_biotype:unprocessed_pseudogene transcript_biotype:unprocessed_pseudogene // chr1 // 72 // 100 // 26 // 36 // 0 /// GENSCAN00000011446 // ENSEMBL // cdna:genscan chromosome:GRCh38:5:181367527:181368225:1 transcript_biotype:protein_coding // chr1 // 100 // 64 // 23 // 23 // 0 /// GENSCAN00000017675 // ENSEMBL // cdna:genscan chromosome:GRCh38:1:685716:686414:-1 transcript_biotype:protein_coding // chr1 // 100 // 64 // 23 // 23 // 0 /// GENSCAN00000017679 // ENSEMBL // cdna:genscan chromosome:GRCh38:1:450740:451438:-1 transcript_biotype:protein_coding // chr1 // 100 // 64 // 23 // 23 // 0 /// GENSCAN00000045845 // ENSEMBL // cdna:genscan chromosome:GRCh38:8:166086:213433:-1 transcript_biotype:protein_coding // chr1 // 87 // 83 // 26 // 30 // 0 /// NONHSAT051700 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 83 // 100 // 30 // 36 // 0 /// NONHSAT051701 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 83 // 100 // 30 // 36 // 0 /// NONHSAT105966 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 81 // 100 // 29 // 36 // 0 /// NONHSAT060109 // NONCODE // Non-coding transcript identified by NONCODE: Linc // chr1 // 72 // 100 // 26 // 36 // 0'], 'category': ['main', 'main', 'main', 'main', 'main']}\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. Use the 'preview_df' function from the library to preview the data and print out the results.\n", "print(\"Gene annotation preview:\")\n", "print(preview_df(gene_annotation))\n" ] }, { "cell_type": "markdown", "id": "be53572c", "metadata": {}, "source": [ "### Step 6: Gene Identifier Mapping" ] }, { "cell_type": "code", "execution_count": 7, "id": "fc9dcec8", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:14.546894Z", "iopub.status.busy": "2025-03-25T06:53:14.546763Z", "iopub.status.idle": "2025-03-25T06:53:15.490320Z", "shell.execute_reply": "2025-03-25T06:53:15.489914Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gene expression data shape after mapping: (117474, 59)\n", "First 10 gene symbols:\n", "Index(['A-', 'A-3-', 'A-52', 'A-E', 'A-I', 'A-II', 'A-IV', 'A-V', 'A0', 'A1'], dtype='object', name='Gene')\n" ] } ], "source": [ "# 1. Identify the columns for probe IDs and gene symbols in the annotation dataframe\n", "# Based on the gene annotation preview, we can see:\n", "# - 'ID' column contains numerical identifiers that match the format in gene_data.index\n", "# - 'gene_assignment' column contains gene symbol information\n", "\n", "# 2. Get a gene mapping dataframe using the appropriate columns\n", "gene_mapping = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='gene_assignment')\n", "\n", "# 3. Apply the gene mapping to convert probe-level measurements to gene expression data\n", "gene_data = apply_gene_mapping(gene_data, gene_mapping)\n", "\n", "# Print information about the resulting gene expression dataframe\n", "print(f\"Gene expression data shape after mapping: {gene_data.shape}\")\n", "print(\"First 10 gene symbols:\")\n", "print(gene_data.index[:10])\n" ] }, { "cell_type": "markdown", "id": "9f9ae058", "metadata": {}, "source": [ "### Step 7: Data Normalization and Linking" ] }, { "cell_type": "code", "execution_count": 8, "id": "2b1cb0de", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:53:15.491760Z", "iopub.status.busy": "2025-03-25T06:53:15.491642Z", "iopub.status.idle": "2025-03-25T06:53:26.053699Z", "shell.execute_reply": "2025-03-25T06:53:26.053301Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Preview of selected clinical features:\n", "{'GSM1587362': [1.0, 8.0, 1.0], 'GSM1587363': [1.0, 8.0, 1.0], 'GSM1587364': [1.0, 7.0, 1.0], 'GSM1587365': [1.0, 7.0, 1.0], 'GSM1587366': [1.0, 9.0, 1.0], 'GSM1587367': [1.0, 9.0, 1.0], 'GSM1587368': [0.0, 10.0, 1.0], 'GSM1587369': [0.0, 10.0, 1.0], 'GSM1587370': [0.0, 16.0, 1.0], 'GSM1587371': [0.0, 16.0, 1.0], 'GSM1587372': [0.0, 7.0, 1.0], 'GSM1587373': [0.0, 7.0, 1.0], 'GSM1587374': [0.0, 7.0, 1.0], 'GSM1587375': [0.0, 7.0, 1.0], 'GSM1587376': [0.0, 10.0, 1.0], 'GSM1587377': [0.0, 10.0, 1.0], 'GSM1587378': [0.0, nan, 0.0], 'GSM1587379': [0.0, nan, 0.0], 'GSM1587380': [0.0, nan, 0.0], 'GSM1587381': [0.0, nan, 0.0], 'GSM1587382': [1.0, 8.0, 1.0], 'GSM1587383': [1.0, 8.0, 1.0], 'GSM1587384': [1.0, 7.0, 1.0], 'GSM1587385': [1.0, 7.0, 1.0], 'GSM1587386': [1.0, 9.0, 1.0], 'GSM1587387': [0.0, 10.0, 1.0], 'GSM1587388': [0.0, 10.0, 1.0], 'GSM1587389': [0.0, 16.0, 1.0], 'GSM1587390': [0.0, 16.0, 1.0], 'GSM1587391': [0.0, 7.0, 1.0], 'GSM1587392': [0.0, 7.0, 1.0], 'GSM1587393': [0.0, 7.0, 1.0], 'GSM1587394': [0.0, 10.0, 1.0], 'GSM1587395': [1.0, 8.0, 1.0], 'GSM1587396': [1.0, 8.0, 1.0], 'GSM1587397': [1.0, 7.0, 1.0], 'GSM1587398': [1.0, 7.0, 1.0], 'GSM1587399': [1.0, 9.0, 1.0], 'GSM1587400': [0.0, 10.0, 1.0], 'GSM1587401': [0.0, 10.0, 1.0], 'GSM1587402': [0.0, 16.0, 1.0], 'GSM1587403': [0.0, 16.0, 1.0], 'GSM1587404': [0.0, 7.0, 1.0], 'GSM1587405': [0.0, 7.0, 1.0], 'GSM1587406': [0.0, 7.0, 1.0], 'GSM1587407': [0.0, 10.0, 1.0], 'GSM1587408': [1.0, 8.0, 1.0], 'GSM1587409': [1.0, 8.0, 1.0], 'GSM1587410': [1.0, 7.0, 1.0], 'GSM1587411': [1.0, 7.0, 1.0], 'GSM1587412': [1.0, 9.0, 1.0], 'GSM1587413': [0.0, 10.0, 1.0], 'GSM1587414': [0.0, 10.0, 1.0], 'GSM1587415': [0.0, 16.0, 1.0], 'GSM1587416': [0.0, 16.0, 1.0], 'GSM1587417': [0.0, 7.0, 1.0], 'GSM1587418': [0.0, 7.0, 1.0], 'GSM1587419': [0.0, 7.0, 1.0], 'GSM1587420': [0.0, 10.0, 1.0]}\n", "Clinical data saved to ../../output/preprocess/Autism_spectrum_disorder_(ASD)/clinical_data/GSE65106.csv\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Normalized gene data saved to ../../output/preprocess/Autism_spectrum_disorder_(ASD)/gene_data/GSE65106.csv\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "For the feature 'Autism_spectrum_disorder_(ASD)', the least common label is '1.0' with 21 occurrences. This represents 35.59% of the dataset.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Quartiles for 'Age':\n", " 25%: 7.0\n", " 50% (Median): 9.0\n", " 75%: 10.0\n", "Min: 7.0\n", "Max: 16.0\n", "For the feature 'Gender', the least common label is '0.0' with 4 occurrences. This represents 6.78% of the dataset.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Linked data saved to ../../output/preprocess/Autism_spectrum_disorder_(ASD)/GSE65106.csv\n" ] } ], "source": [ "# 1. We need to first create the selected_clinical_df using clinical_data from Step 1\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 extracted clinical features\n", "preview = preview_df(selected_clinical_df)\n", "print(\"Preview of selected clinical features:\")\n", "print(preview)\n", "\n", "# Save the clinical data\n", "os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", "selected_clinical_df.to_csv(out_clinical_data_file)\n", "print(f\"Clinical data saved to {out_clinical_data_file}\")\n", "\n", "# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.\n", "normalized_gene_data = normalize_gene_symbols_in_index(gene_data)\n", "# Create directory if it doesn't exist\n", "os.makedirs(os.path.dirname(out_gene_data_file), exist_ok=True)\n", "normalized_gene_data.to_csv(out_gene_data_file)\n", "print(f\"Normalized gene data saved to {out_gene_data_file}\")\n", "\n", "# 2. Link the clinical and genetic data with the 'geo_link_clinical_genetic_data' function from the library.\n", "linked_data = geo_link_clinical_genetic_data(selected_clinical_df, normalized_gene_data)\n", "\n", "# 3. Handle missing values in the linked data\n", "linked_data = handle_missing_values(linked_data, trait)\n", "\n", "# 4. Determine whether the trait and demographic features are severely biased\n", "trait_type = 'binary' if len(linked_data[trait].unique()) <= 2 else 'continuous'\n", "if trait_type == 'binary':\n", " is_trait_biased = judge_binary_variable_biased(linked_data, trait)\n", "else:\n", " is_trait_biased = judge_continuous_variable_biased(linked_data, trait)\n", "\n", "# Remove biased demographic features\n", "unbiased_linked_data = linked_data.copy()\n", "if 'Age' in unbiased_linked_data.columns:\n", " age_biased = judge_continuous_variable_biased(unbiased_linked_data, 'Age')\n", " if age_biased:\n", " unbiased_linked_data = unbiased_linked_data.drop(columns=['Age'])\n", " \n", "if 'Gender' in unbiased_linked_data.columns:\n", " gender_biased = judge_binary_variable_biased(unbiased_linked_data, 'Gender')\n", " if gender_biased:\n", " unbiased_linked_data = unbiased_linked_data.drop(columns=['Gender'])\n", "\n", "# 5. Conduct quality check and save the cohort information.\n", "is_usable = validate_and_save_cohort_info(\n", " is_final=True, \n", " cohort=cohort, \n", " info_path=json_path, \n", " is_gene_available=True, \n", " is_trait_available=True, \n", " is_biased=is_trait_biased, \n", " df=unbiased_linked_data, \n", " note=\"Dataset contains gene expression data from iPSC-derived neurons of ASD patients and unaffected siblings.\"\n", ")\n", "\n", "# 6. If the linked data is usable, save it as a CSV file to 'out_data_file'.\n", "if is_usable:\n", " os.makedirs(os.path.dirname(out_data_file), exist_ok=True)\n", " unbiased_linked_data.to_csv(out_data_file)\n", " print(f\"Linked data saved to {out_data_file}\")\n", "else:\n", " print(\"The dataset was determined to be not usable for analysis.\")" ] } ], "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 }