{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "48b3c63d", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:47.516841Z", "iopub.status.busy": "2025-03-25T03:49:47.516685Z", "iopub.status.idle": "2025-03-25T03:49:47.676854Z", "shell.execute_reply": "2025-03-25T03:49:47.676547Z" } }, "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 = \"Retinoblastoma\"\n", "cohort = \"GSE59983\"\n", "\n", "# Input paths\n", "in_trait_dir = \"../../input/GEO/Retinoblastoma\"\n", "in_cohort_dir = \"../../input/GEO/Retinoblastoma/GSE59983\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Retinoblastoma/GSE59983.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Retinoblastoma/gene_data/GSE59983.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Retinoblastoma/clinical_data/GSE59983.csv\"\n", "json_path = \"../../output/preprocess/Retinoblastoma/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "6ff4ff8e", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "27ba8daf", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:47.678271Z", "iopub.status.busy": "2025-03-25T03:49:47.678124Z", "iopub.status.idle": "2025-03-25T03:49:47.935432Z", "shell.execute_reply": "2025-03-25T03:49:47.935086Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Background Information:\n", "!Series_title\t\"Gene expression profiling of primary human retinoblastoma\"\n", "!Series_summary\t\"Background\"\n", "!Series_summary\t\"Retinoblastoma is a pediatric eye cancer associated with RB1 loss or MYCN amplification (RB1+/+MYCNA). There are controversies concerning the existence of molecular subtypes within RB1-/- retinoblastoma. To test whether these molecular subtypes exist, we performed molecular profiling.\"\n", "!Series_summary\t\"\"\n", "!Series_summary\t\"Methods\"\n", "!Series_summary\t\"Genome-wide mRNA expression profiling was performed on 76 primary human retinoblastomas. Expression profiling was complemented by genome-wide DNA profiling and clinical, histopathological, and ex vivo drug sensitivity data.\"\n", "!Series_summary\t\"\"\n", "!Series_summary\t\"Findings\"\n", "!Series_summary\t\"RNA and DNA profiling identified major variability between retinoblastomas. While gene expression differences between RB1+/+MYCNA and RB1-/- tumors seemed more dichotomous, differences within the RB1-/- tumors were gradual. Tumors with high expression of a photoreceptor gene signature were highly differentiated, smaller in volume and diagnosed at younger age compared to tumors with low photoreceptor signature expression. Tumors with lower photoreceptor expression showed increased expression of genes involved in M-phase and mRNA and ribosome synthesis and increased frequencies of somatic copy number alterations.\"\n", "!Series_summary\t\"\"\n", "!Series_summary\t\"Interpretation\"\n", "!Series_summary\t\"Molecular, clinical and histopathological differences between RB1-/- tumors are best explained by tumor progression, reflected by a gradual loss of differentiation and photoreceptor expression signature. Since copy number alterations were more frequent in tumors with less photoreceptorness, genomic alterations might be drivers of tumor progression.\"\n", "!Series_summary\t\"\"\n", "!Series_overall_design\t\"Fresh frozen material from 76 primary human retinoblastoma samples were profiled with Affymetrix human genome u133 plus 2.0 PM microarray\"\n", "Sample Characteristics Dictionary:\n", "{0: ['tissue: primary Rb tissue'], 1: ['uhc-subgroup: group 3', 'uhc-subgroup: group 1', 'uhc-subgroup: group 2']}\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": "79b3b7f7", "metadata": {}, "source": [ "### Step 2: Dataset Analysis and Clinical Feature Extraction" ] }, { "cell_type": "code", "execution_count": 3, "id": "c59ac685", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:47.936744Z", "iopub.status.busy": "2025-03-25T03:49:47.936632Z", "iopub.status.idle": "2025-03-25T03:49:47.942263Z", "shell.execute_reply": "2025-03-25T03:49:47.941974Z" } }, "outputs": [ { "data": { "text/plain": [ "False" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Analyzing the output from previous steps\n", "import pandas as pd\n", "import os\n", "import json\n", "from typing import Callable, Optional, Dict, Any\n", "\n", "# 1. Gene Expression Data Availability\n", "is_gene_available = True # The dataset contains gene expression data (Affymetrix human genome u133 plus 2.0 PM microarray)\n", "\n", "# 2. Variable Availability and Data Type Conversion\n", "# 2.1 Data Availability\n", "# Looking at Sample Characteristics Dictionary:\n", "# {0: ['tissue: primary Rb tissue'], 1: ['uhc-subgroup: group 3', 'uhc-subgroup: group 1', 'uhc-subgroup: group 2']}\n", "\n", "# For trait (Retinoblastoma):\n", "# The dataset is about retinoblastoma samples, but there's no direct indicator of disease status in the sample characteristics\n", "# All samples are from \"primary Rb tissue\" which means all are retinoblastoma cases\n", "# Since all samples have the same value (all have retinoblastoma), this is not useful for association studies\n", "trait_row = None # No variable trait data available\n", "\n", "# For age:\n", "# No age information is provided in the sample characteristics\n", "age_row = None\n", "\n", "# For gender:\n", "# No gender information is provided in the sample characteristics\n", "gender_row = None\n", "\n", "# 2.2 Data Type Conversion\n", "# Since all variables are not available in this dataset, we'll define placeholder conversion functions\n", "\n", "def convert_trait(value):\n", " if value and \":\" in value:\n", " val = value.split(\":\", 1)[1].strip()\n", " if \"rb\" in val.lower() or \"retinoblastoma\" in val.lower():\n", " return 1\n", " else:\n", " return 0\n", " return None\n", "\n", "def convert_age(value):\n", " return None # Not applicable\n", "\n", "def convert_gender(value):\n", " return None # Not applicable\n", "\n", "# 3. Save Metadata\n", "# Determine trait data availability\n", "is_trait_available = trait_row is not None\n", "\n", "# Conduct initial filtering and save information\n", "validate_and_save_cohort_info(\n", " is_final=False,\n", " cohort=cohort,\n", " info_path=json_path,\n", " is_gene_available=is_gene_available,\n", " is_trait_available=is_trait_available\n", ")\n", "\n", "# 4. Clinical Feature Extraction\n", "# Skip this step because trait_row is None (clinical data is not available for association studies)\n" ] }, { "cell_type": "markdown", "id": "554b13e1", "metadata": {}, "source": [ "### Step 3: Gene Data Extraction" ] }, { "cell_type": "code", "execution_count": 4, "id": "69406953", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:47.943377Z", "iopub.status.busy": "2025-03-25T03:49:47.943266Z", "iopub.status.idle": "2025-03-25T03:49:48.363614Z", "shell.execute_reply": "2025-03-25T03:49:48.363238Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Index(['1007_PM_s_at', '1053_PM_at', '117_PM_at', '121_PM_at', '1255_PM_g_at',\n", " '1294_PM_at', '1316_PM_at', '1320_PM_at', '1405_PM_i_at', '1431_PM_at',\n", " '1438_PM_at', '1487_PM_at', '1494_PM_f_at', '1552256_PM_a_at',\n", " '1552257_PM_a_at', '1552258_PM_at', '1552261_PM_at', '1552263_PM_at',\n", " '1552264_PM_a_at', '1552266_PM_at'],\n", " dtype='object', name='ID')\n" ] } ], "source": [ "# 1. First get the file paths\n", "soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)\n", "\n", "# 2. Use the get_genetic_data function from the library to get the gene_data\n", "gene_data = get_genetic_data(matrix_file)\n", "\n", "# 3. Print the first 20 row IDs (gene or probe identifiers) for future observation\n", "print(gene_data.index[:20])\n" ] }, { "cell_type": "markdown", "id": "2f91864d", "metadata": {}, "source": [ "### Step 4: Gene Identifier Review" ] }, { "cell_type": "code", "execution_count": 5, "id": "dcb27036", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:48.364930Z", "iopub.status.busy": "2025-03-25T03:49:48.364805Z", "iopub.status.idle": "2025-03-25T03:49:48.367288Z", "shell.execute_reply": "2025-03-25T03:49:48.367004Z" } }, "outputs": [], "source": [ "# These identifiers are probe IDs from an Affymetrix microarray platform, not standard human gene symbols.\n", "# They need to be mapped to gene symbols for meaningful biological interpretation.\n", "# The \"_PM_\" in the identifiers indicates \"Perfect Match\" probes from an Affymetrix array.\n", "\n", "requires_gene_mapping = True\n" ] }, { "cell_type": "markdown", "id": "aec77a84", "metadata": {}, "source": [ "### Step 5: Gene Annotation" ] }, { "cell_type": "code", "execution_count": 6, "id": "7bce5320", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:48.368406Z", "iopub.status.busy": "2025-03-25T03:49:48.368299Z", "iopub.status.idle": "2025-03-25T03:49:55.150876Z", "shell.execute_reply": "2025-03-25T03:49:55.150445Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gene annotation preview:\n", "{'ID': ['1007_PM_s_at', '1053_PM_at', '117_PM_at', '121_PM_at', '1255_PM_g_at'], 'GB_ACC': ['U48705', 'M87338', 'X51757', 'X69699', 'L36861'], 'SPOT_ID': [nan, nan, nan, nan, nan], 'Species Scientific Name': ['Homo sapiens', 'Homo sapiens', 'Homo sapiens', 'Homo sapiens', 'Homo sapiens'], 'Annotation Date': ['Aug 20, 2010', 'Aug 20, 2010', 'Aug 20, 2010', 'Aug 20, 2010', 'Aug 20, 2010'], 'Sequence Type': ['Exemplar sequence', 'Exemplar sequence', 'Exemplar sequence', 'Exemplar sequence', 'Exemplar sequence'], 'Sequence Source': ['Affymetrix Proprietary Database', 'GenBank', 'Affymetrix Proprietary Database', 'GenBank', 'Affymetrix Proprietary Database'], 'Target Description': ['U48705 /FEATURE=mRNA /DEFINITION=HSU48705 Human receptor tyrosine kinase DDR gene, complete cds', 'M87338 /FEATURE= /DEFINITION=HUMA1SBU Human replication factor C, 40-kDa subunit (A1) mRNA, complete cds', \"X51757 /FEATURE=cds /DEFINITION=HSP70B Human heat-shock protein HSP70B' gene\", 'X69699 /FEATURE= /DEFINITION=HSPAX8A H.sapiens Pax8 mRNA', 'L36861 /FEATURE=expanded_cds /DEFINITION=HUMGCAPB Homo sapiens guanylate cyclase activating protein (GCAP) gene exons 1-4, complete cds'], 'Representative Public ID': ['U48705', 'M87338', 'X51757', 'X69699', 'L36861'], 'Gene Title': ['discoidin domain receptor tyrosine kinase 1', 'replication factor C (activator 1) 2, 40kDa', \"heat shock 70kDa protein 6 (HSP70B')\", 'paired box 8', 'guanylate cyclase activator 1A (retina)'], 'Gene Symbol': ['DDR1', 'RFC2', 'HSPA6', 'PAX8', 'GUCA1A'], 'ENTREZ_GENE_ID': ['780', '5982', '3310', '7849', '2978'], 'RefSeq Transcript ID': ['NM_001954 /// NM_013993 /// NM_013994', 'NM_002914 /// NM_181471', 'NM_002155', 'NM_003466 /// NM_013951 /// NM_013952 /// NM_013953 /// NM_013992', 'NM_000409'], 'Gene Ontology Biological Process': ['0001558 // regulation of cell growth // inferred from electronic annotation /// 0001952 // regulation of cell-matrix adhesion // inferred from electronic annotation /// 0006468 // protein amino acid phosphorylation // inferred from electronic annotation /// 0007155 // cell adhesion // inferred from electronic annotation /// 0007155 // cell adhesion // traceable author statement /// 0007169 // transmembrane receptor protein tyrosine kinase signaling pathway // inferred from electronic annotation /// 0007566 // embryo implantation // inferred from electronic annotation /// 0008285 // negative regulation of cell proliferation // inferred from electronic annotation /// 0018108 // peptidyl-tyrosine phosphorylation // inferred from electronic annotation /// 0031100 // organ regeneration // inferred from electronic annotation /// 0043583 // ear development // inferred from electronic annotation /// 0043588 // skin development // inferred from electronic annotation /// 0051789 // response to protein stimulus // inferred from electronic annotation /// 0060444 // branching involved in mammary gland duct morphogenesis // inferred from electronic annotation /// 0060749 // mammary gland alveolus development // inferred from electronic annotation', '0006260 // DNA replication // not recorded /// 0006260 // DNA replication // inferred from electronic annotation /// 0006297 // nucleotide-excision repair, DNA gap filling // not recorded /// 0015979 // photosynthesis // inferred from electronic annotation /// 0015995 // chlorophyll biosynthetic process // inferred from electronic annotation', '0006950 // response to stress // inferred from electronic annotation /// 0006986 // response to unfolded protein // traceable author statement', '0001656 // metanephros development // inferred from electronic annotation /// 0006350 // transcription // inferred from electronic annotation /// 0007275 // multicellular organismal development // inferred from electronic annotation /// 0009653 // anatomical structure morphogenesis // traceable author statement /// 0030154 // cell differentiation // inferred from electronic annotation /// 0030878 // thyroid gland development // inferred from electronic annotation /// 0045449 // regulation of transcription // inferred from electronic annotation /// 0045893 // positive regulation of transcription, DNA-dependent // inferred from sequence or structural similarity /// 0045893 // positive regulation of transcription, DNA-dependent // inferred from direct assay /// 0045944 // positive regulation of transcription from RNA polymerase II promoter // inferred from electronic annotation', '0007165 // signal transduction // non-traceable author statement /// 0007601 // visual perception // inferred from electronic annotation /// 0007601 // visual perception // traceable author statement /// 0007602 // phototransduction // inferred from electronic annotation /// 0031282 // regulation of guanylate cyclase activity // inferred from electronic annotation /// 0050896 // response to stimulus // inferred from electronic annotation'], 'Gene Ontology Cellular Component': ['0005576 // extracellular region // inferred from electronic annotation /// 0005886 // plasma membrane // inferred from electronic annotation /// 0005887 // integral to plasma membrane // traceable author statement /// 0016020 // membrane // inferred from electronic annotation /// 0016021 // integral to membrane // inferred from electronic annotation /// 0016323 // basolateral plasma membrane // inferred from electronic annotation', '0005634 // nucleus // inferred from electronic annotation /// 0005654 // nucleoplasm // not recorded /// 0005663 // DNA replication factor C complex // inferred from direct assay /// 0005663 // DNA replication factor C complex // inferred from electronic annotation', nan, '0005634 // nucleus // inferred from electronic annotation /// 0005654 // nucleoplasm // inferred from sequence or structural similarity /// 0005654 // nucleoplasm // inferred from electronic annotation', '0016020 // membrane // inferred from electronic annotation'], 'Gene Ontology Molecular Function': ['0000166 // nucleotide binding // inferred from electronic annotation /// 0004672 // protein kinase activity // inferred from electronic annotation /// 0004713 // protein tyrosine kinase activity // inferred from electronic annotation /// 0004714 // transmembrane receptor protein tyrosine kinase activity // inferred from electronic annotation /// 0004714 // transmembrane receptor protein tyrosine kinase activity // traceable author statement /// 0004872 // receptor activity // inferred from electronic annotation /// 0005515 // protein binding // inferred from physical interaction /// 0005515 // protein binding // inferred from electronic annotation /// 0005524 // ATP binding // inferred from electronic annotation /// 0016301 // kinase activity // inferred from electronic annotation /// 0016740 // transferase activity // inferred from electronic annotation', '0000166 // nucleotide binding // inferred from electronic annotation /// 0003677 // DNA binding // inferred from electronic annotation /// 0003689 // DNA clamp loader activity // inferred from electronic annotation /// 0005515 // protein binding // inferred from physical interaction /// 0005524 // ATP binding // inferred from electronic annotation /// 0005524 // ATP binding // traceable author statement /// 0016851 // magnesium chelatase activity // inferred from electronic annotation /// 0017111 // nucleoside-triphosphatase activity // inferred from electronic annotation', '0000166 // nucleotide binding // inferred from electronic annotation /// 0005524 // ATP binding // inferred from electronic annotation', '0003677 // DNA binding // inferred from direct assay /// 0003677 // DNA binding // inferred from electronic annotation /// 0003700 // transcription factor activity // traceable author statement /// 0004996 // thyroid-stimulating hormone receptor activity // traceable author statement /// 0005515 // protein binding // inferred from sequence or structural similarity /// 0005515 // protein binding // inferred from electronic annotation /// 0005515 // protein binding // inferred from physical interaction /// 0016563 // transcription activator activity // inferred from sequence or structural similarity /// 0016563 // transcription activator activity // inferred from direct assay /// 0016563 // transcription activator activity // inferred from electronic annotation /// 0043565 // sequence-specific DNA binding // inferred from electronic annotation', '0005509 // calcium ion binding // inferred from electronic annotation /// 0008048 // calcium sensitive guanylate cyclase activator activity // traceable author statement /// 0008048 // calcium sensitive guanylate cyclase activator activity // inferred from electronic annotation /// 0030249 // guanylate cyclase regulator activity // inferred from electronic annotation']}\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": "1162e4b1", "metadata": {}, "source": [ "### Step 6: Gene Identifier Mapping" ] }, { "cell_type": "code", "execution_count": 7, "id": "b38185ab", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:55.152448Z", "iopub.status.busy": "2025-03-25T03:49:55.152320Z", "iopub.status.idle": "2025-03-25T03:49:55.468335Z", "shell.execute_reply": "2025-03-25T03:49:55.467953Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gene mapping preview:\n", "{'ID': ['1007_PM_s_at', '1053_PM_at', '117_PM_at', '121_PM_at', '1255_PM_g_at'], 'Gene': ['DDR1', 'RFC2', 'HSPA6', 'PAX8', 'GUCA1A']}\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Gene expression data preview (after mapping):\n", "(18989, 76)\n", "Index(['A1BG', 'A1CF', 'A2BP1', 'A2LD1', 'A2M', 'A2ML1', 'A4GALT', 'A4GNT',\n", " 'AAA1', 'AAAS'],\n", " dtype='object', name='Gene')\n" ] } ], "source": [ "# 1. Identify the columns for gene mapping\n", "probe_col = 'ID'\n", "gene_col = 'Gene Symbol'\n", "\n", "# 2. Get gene mapping dataframe by extracting the probe ID and gene symbol columns\n", "gene_mapping = get_gene_mapping(gene_annotation, probe_col, gene_col)\n", "\n", "# Preview the mapping\n", "print(\"Gene mapping preview:\")\n", "print(preview_df(gene_mapping))\n", "\n", "# 3. Apply gene mapping to convert probe-level measurements to gene expression data\n", "gene_data = apply_gene_mapping(gene_data, gene_mapping)\n", "\n", "# Preview the mapped gene expression data\n", "print(\"\\nGene expression data preview (after mapping):\")\n", "print(gene_data.shape)\n", "print(gene_data.index[:10]) # Print first 10 gene symbols\n" ] }, { "cell_type": "markdown", "id": "69b9e966", "metadata": {}, "source": [ "### Step 7: Data Normalization and Linking" ] }, { "cell_type": "code", "execution_count": 8, "id": "71caccca", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T03:49:55.469683Z", "iopub.status.busy": "2025-03-25T03:49:55.469562Z", "iopub.status.idle": "2025-03-25T03:49:56.430480Z", "shell.execute_reply": "2025-03-25T03:49:56.430110Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Normalized gene data shape: (18622, 76)\n", "First few normalized gene symbols: ['A1BG', 'A1BG-AS1', 'A1CF', 'A2M', 'A2ML1', 'A4GALT', 'A4GNT', 'AAA1', 'AAAS', 'AACS']\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Normalized gene data saved to ../../output/preprocess/Retinoblastoma/gene_data/GSE59983.csv\n", "Dataset lacks trait variation for association studies.\n", "All samples are from primary retinoblastoma tissue, without control samples or disease severity indicators.\n", "Abnormality detected in the cohort: GSE59983. Preprocessing failed.\n", "Data quality check completed. The dataset is not suitable for association studies due to lack of trait variation.\n" ] } ], "source": [ "# 1. Normalize gene symbols in the obtained gene expression data\n", "normalized_gene_data = normalize_gene_symbols_in_index(gene_data)\n", "print(f\"Normalized gene data shape: {normalized_gene_data.shape}\")\n", "print(f\"First few normalized gene symbols: {list(normalized_gene_data.index[:10])}\")\n", "\n", "# Save the normalized gene data\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", "# From Step 2, we determined that trait data is not available (trait_row = None)\n", "# Create a sample DataFrame that represents the dataset's structure\n", "# We'll use this for the validation function\n", "sample_df = pd.DataFrame({trait: [1] * 10}, index=normalized_gene_data.index[:10])\n", "\n", "# Print diagnostic information\n", "print(\"Dataset lacks trait variation for association studies.\")\n", "print(\"All samples are from primary retinoblastoma tissue, without control samples or disease severity indicators.\")\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=False,\n", " is_biased=True, # Dataset is biased (all samples have the same trait value)\n", " df=sample_df, # Using sample dataframe for validation\n", " note=\"Dataset contains gene expression data from retinoblastoma samples but lacks trait variation for association studies. All samples are primary retinoblastoma tissue.\"\n", ")\n", "\n", "print(f\"Data quality check completed. The dataset is not suitable for association studies due to lack of trait variation.\")" ] } ], "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 }