{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "431265e7", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:08.906248Z", "iopub.status.busy": "2025-03-25T06:01:08.906058Z", "iopub.status.idle": "2025-03-25T06:01:09.067051Z", "shell.execute_reply": "2025-03-25T06:01:09.066625Z" } }, "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 = \"Osteoporosis\"\n", "cohort = \"GSE224330\"\n", "\n", "# Input paths\n", "in_trait_dir = \"../../input/GEO/Osteoporosis\"\n", "in_cohort_dir = \"../../input/GEO/Osteoporosis/GSE224330\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Osteoporosis/GSE224330.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Osteoporosis/gene_data/GSE224330.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Osteoporosis/clinical_data/GSE224330.csv\"\n", "json_path = \"../../output/preprocess/Osteoporosis/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "244ea5e6", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "f5b056a2", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:09.068288Z", "iopub.status.busy": "2025-03-25T06:01:09.068144Z", "iopub.status.idle": "2025-03-25T06:01:09.212617Z", "shell.execute_reply": "2025-03-25T06:01:09.212131Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Background Information:\n", "!Series_title\t\"Gene expression of monocytes from rheumatoid arthritis patients treated with bDMARDs and methotrexate.\"\n", "!Series_summary\t\"It is well documented that patients affected by rheumatoid arthritis (RA) have distinct susceptibility to the different biologic Disease-Modifying AntiRheumatic Drugs (bDMARDs) available on the market, probably because of the many facets of the disease. Monocytes are deeply involved in the pathogenesis of RA and we therefore evaluated and compared the transcriptomic profile of monocytes isolated from patients on treatment with methotrexate alone or in combination with tocilizumab, anti-TNFalpha or abatacept, and from healthy donors. Differential expression analysis of whole-genome transcriptomics yielded a list of regulated genes suitable for functional annotation enrichment analysis. Specifically, abatacept, tocilizumab and anti-TNFalpha cohorts were separately compared with methotrexate using a rank-product-based statistical approach, leading to the identification of 78, 6, and 436 differentially expressed genes, respectively.\"\n", "!Series_overall_design\t\"Gene expression profiling was performed on primary monocyte cultures from a total of 31 samples, according to the following experimental design: 10 samples from healthy patients, 6 samples from MTX-, 5 samples from abatacept-, 5 samples from anti-TNFalpha-, and 5 samples from tocilizumab-treated patients.\"\n", "Sample Characteristics Dictionary:\n", "{0: ['tissue: Isolated monocytes'], 1: ['age: 63y', 'age: 64y', 'age: 48y', 'age: 70y', 'age: 62y', 'age: 58y', 'age: 57y', 'age: 60y', 'age: 52y', 'age: 51y', 'age: 53y', 'age: 56y', 'age: 54y', 'age: 61y', 'age: 55y', 'age: 65y', 'age: 84y', 'age: 76y', 'age: 73y', 'age: 71y', 'age: 59y', 'age: 47y'], 2: ['gender: female', 'gender: male'], 3: ['comorbidity: hypothyroidism', 'comorbidity: none', 'comorbidity: osteoporosis', nan, 'comorbidity: schizoaffective disorder\\xa0', 'comorbidity: arthrosis']}\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": "c4b96e4d", "metadata": {}, "source": [ "### Step 2: Dataset Analysis and Clinical Feature Extraction" ] }, { "cell_type": "code", "execution_count": 3, "id": "8a82fa3a", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:09.214141Z", "iopub.status.busy": "2025-03-25T06:01:09.213990Z", "iopub.status.idle": "2025-03-25T06:01:09.224522Z", "shell.execute_reply": "2025-03-25T06:01:09.224149Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Preview of selected clinical features:\n", "{'GSM7019507': [0.0, 63.0, 0.0], 'GSM7019508': [0.0, 64.0, 1.0], 'GSM7019509': [0.0, 63.0, 0.0], 'GSM7019510': [0.0, 48.0, 0.0], 'GSM7019511': [1.0, 70.0, 1.0], 'GSM7019512': [nan, 62.0, 1.0], 'GSM7019513': [nan, 58.0, 1.0], 'GSM7019514': [nan, 57.0, 1.0], 'GSM7019515': [nan, 60.0, 0.0], 'GSM7019516': [nan, 57.0, 0.0], 'GSM7019517': [nan, 52.0, 0.0], 'GSM7019518': [nan, 51.0, 0.0], 'GSM7019519': [nan, 53.0, 0.0], 'GSM7019520': [nan, 56.0, 0.0], 'GSM7019521': [nan, 62.0, 1.0], 'GSM7019522': [0.0, 54.0, 0.0], 'GSM7019523': [0.0, 61.0, 0.0], 'GSM7019524': [1.0, 54.0, 0.0], 'GSM7019525': [0.0, 55.0, 1.0], 'GSM7019526': [0.0, 65.0, 0.0], 'GSM7019527': [0.0, 84.0, 0.0], 'GSM7019528': [1.0, 70.0, 0.0], 'GSM7019529': [0.0, 76.0, 0.0], 'GSM7019530': [0.0, 62.0, 0.0], 'GSM7019531': [0.0, 73.0, 1.0], 'GSM7019532': [0.0, 71.0, 0.0], 'GSM7019533': [0.0, 59.0, 0.0], 'GSM7019534': [0.0, 62.0, 1.0], 'GSM7019535': [0.0, 47.0, 0.0], 'GSM7019536': [1.0, 76.0, 0.0], 'GSM7019537': [0.0, 54.0, 0.0]}\n", "Clinical data saved to ../../output/preprocess/Osteoporosis/clinical_data/GSE224330.csv\n" ] } ], "source": [ "# 1. Determine gene expression data availability\n", "# Based on the Series title and summary, this dataset does include gene expression data from monocytes\n", "is_gene_available = True\n", "\n", "# 2. Determine data availability and create conversion functions\n", "# 2.1 Examining the sample characteristics dictionary\n", "# Trait (Osteoporosis) availability\n", "# Looking at key 3, it contains 'comorbidity' information including 'osteoporosis'\n", "trait_row = 3\n", "\n", "# Age availability (key 1 contains age data)\n", "age_row = 1\n", "\n", "# Gender availability (key 2 contains gender data)\n", "gender_row = 2\n", "\n", "# 2.2 Data type conversion functions\n", "def convert_trait(value):\n", " \"\"\"Convert trait value to binary (0 or 1)\"\"\"\n", " if pd.isna(value):\n", " return None\n", " # Extract value after colon if present\n", " if ':' in value:\n", " value = value.split(':', 1)[1].strip()\n", " \n", " # Check if the value indicates osteoporosis\n", " if 'osteoporosis' in value.lower():\n", " return 1\n", " elif 'none' in value.lower():\n", " return 0\n", " else:\n", " return 0 # Other comorbidities are not osteoporosis\n", "\n", "def convert_age(value):\n", " \"\"\"Convert age value to continuous numeric value\"\"\"\n", " if pd.isna(value):\n", " return None\n", " # Extract value after colon if present\n", " if ':' in value:\n", " value = value.split(':', 1)[1].strip()\n", " \n", " # Extract numeric age from strings like \"63y\"\n", " if 'y' in value:\n", " try:\n", " return int(value.replace('y', ''))\n", " except:\n", " return None\n", " try:\n", " return int(value)\n", " except:\n", " return None\n", "\n", "def convert_gender(value):\n", " \"\"\"Convert gender to binary (0 for female, 1 for male)\"\"\"\n", " if pd.isna(value):\n", " return None\n", " # Extract value after colon if present\n", " if ':' in value:\n", " value = value.split(':', 1)[1].strip()\n", " \n", " if 'female' in value.lower():\n", " return 0\n", " elif 'male' in value.lower():\n", " return 1\n", " else:\n", " return None\n", "\n", "# 3. Save metadata\n", "# Determine if trait data is available\n", "is_trait_available = trait_row is not None\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", "# Only execute if trait_row is not None\n", "if trait_row is not None:\n", " # Create clinical features dataframe\n", " selected_clinical_df = geo_select_clinical_features(\n", " clinical_df=clinical_data, # Assumes clinical_data was defined in previous steps\n", " trait=trait,\n", " trait_row=trait_row,\n", " convert_trait=convert_trait,\n", " age_row=age_row,\n", " convert_age=convert_age,\n", " gender_row=gender_row,\n", " convert_gender=convert_gender\n", " )\n", " \n", " # Preview the dataframe\n", " preview = preview_df(selected_clinical_df)\n", " print(\"Preview of selected clinical features:\")\n", " print(preview)\n", " \n", " # Create output directory if it doesn't exist\n", " os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", " \n", " # Save the clinical data to CSV\n", " selected_clinical_df.to_csv(out_clinical_data_file, index=False)\n", " print(f\"Clinical data saved to {out_clinical_data_file}\")\n" ] }, { "cell_type": "markdown", "id": "7011cef6", "metadata": {}, "source": [ "### Step 3: Gene Data Extraction" ] }, { "cell_type": "code", "execution_count": 4, "id": "e62901a3", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:09.225760Z", "iopub.status.busy": "2025-03-25T06:01:09.225656Z", "iopub.status.idle": "2025-03-25T06:01:09.405270Z", "shell.execute_reply": "2025-03-25T06:01:09.404745Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Index(['A_19_P00315452', 'A_19_P00315492', 'A_19_P00315493', 'A_19_P00315502',\n", " 'A_19_P00315506', 'A_19_P00315518', 'A_19_P00315519', 'A_19_P00315529',\n", " 'A_19_P00315541', 'A_19_P00315543', 'A_19_P00315551', 'A_19_P00315581',\n", " 'A_19_P00315584', 'A_19_P00315593', 'A_19_P00315603', 'A_19_P00315625',\n", " 'A_19_P00315627', 'A_19_P00315631', 'A_19_P00315641', 'A_19_P00315647'],\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": "51a5784d", "metadata": {}, "source": [ "### Step 4: Gene Identifier Review" ] }, { "cell_type": "code", "execution_count": 5, "id": "8f2ec0fe", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:09.406657Z", "iopub.status.busy": "2025-03-25T06:01:09.406546Z", "iopub.status.idle": "2025-03-25T06:01:09.408657Z", "shell.execute_reply": "2025-03-25T06:01:09.408281Z" } }, "outputs": [], "source": [ "# These identifiers (A_19_P00315452, etc.) are Agilent microarray probe IDs, not standard human gene symbols\n", "# They follow the format A_19_P########, which is typical for Agilent technologies microarray probes\n", "# These need to be mapped to standard gene symbols for proper analysis\n", "\n", "requires_gene_mapping = True\n" ] }, { "cell_type": "markdown", "id": "7d3cb5c2", "metadata": {}, "source": [ "### Step 5: Gene Annotation" ] }, { "cell_type": "code", "execution_count": 6, "id": "fd3778e6", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:09.409895Z", "iopub.status.busy": "2025-03-25T06:01:09.409795Z", "iopub.status.idle": "2025-03-25T06:01:12.220660Z", "shell.execute_reply": "2025-03-25T06:01:12.219966Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gene annotation preview:\n", "{'ID': ['GE_BrightCorner', 'DarkCorner', 'A_21_P0014386', 'A_33_P3396872', 'A_33_P3267760'], 'CONTROL_TYPE': ['pos', 'pos', 'FALSE', 'FALSE', 'FALSE'], 'REFSEQ': [nan, nan, nan, 'NM_001105533', nan], 'GB_ACC': [nan, nan, nan, 'NM_001105533', nan], 'LOCUSLINK_ID': [nan, nan, nan, 79974.0, 54880.0], 'GENE_SYMBOL': [nan, nan, nan, 'CPED1', 'BCOR'], 'GENE_NAME': [nan, nan, nan, 'cadherin-like and PC-esterase domain containing 1', 'BCL6 corepressor'], 'UNIGENE_ID': [nan, nan, nan, 'Hs.189652', nan], 'ENSEMBL_ID': [nan, nan, nan, nan, 'ENST00000378463'], 'ACCESSION_STRING': [nan, nan, nan, 'ref|NM_001105533|gb|AK025639|gb|BC030538|tc|THC2601673', 'ens|ENST00000378463'], 'CHROMOSOMAL_LOCATION': [nan, nan, 'unmapped', 'chr7:120901888-120901947', 'chrX:39909128-39909069'], 'CYTOBAND': [nan, nan, nan, 'hs|7q31.31', 'hs|Xp11.4'], 'DESCRIPTION': [nan, nan, nan, 'Homo sapiens cadherin-like and PC-esterase domain containing 1 (CPED1), transcript variant 2, mRNA [NM_001105533]', 'BCL6 corepressor [Source:HGNC Symbol;Acc:HGNC:20893] [ENST00000378463]'], 'GO_ID': [nan, nan, nan, 'GO:0005783(endoplasmic reticulum)', 'GO:0000122(negative regulation of transcription from RNA polymerase II promoter)|GO:0000415(negative regulation of histone H3-K36 methylation)|GO:0003714(transcription corepressor activity)|GO:0004842(ubiquitin-protein ligase activity)|GO:0005515(protein binding)|GO:0005634(nucleus)|GO:0006351(transcription, DNA-dependent)|GO:0007507(heart development)|GO:0008134(transcription factor binding)|GO:0030502(negative regulation of bone mineralization)|GO:0031072(heat shock protein binding)|GO:0031519(PcG protein complex)|GO:0035518(histone H2A monoubiquitination)|GO:0042476(odontogenesis)|GO:0042826(histone deacetylase binding)|GO:0044212(transcription regulatory region DNA binding)|GO:0045892(negative regulation of transcription, DNA-dependent)|GO:0051572(negative regulation of histone H3-K4 methylation)|GO:0060021(palate development)|GO:0065001(specification of axis polarity)|GO:0070171(negative regulation of tooth mineralization)'], 'SEQUENCE': [nan, nan, 'AATACATGTTTTGGTAAACACTCGGTCAGAGCACCCTCTTTCTGTGGAATCAGACTGGCA', 'GCTTATCTCACCTAATACAGGGACTATGCAACCAAGAAACTGGAAATAAAAACAAAGATA', 'CATCAAAGCTACGAGAGATCCTACACACCCAGATTTAAAAAATAATAAAAACTTAAGGGC'], 'SPOT_ID': ['GE_BrightCorner', 'DarkCorner', 'A_21_P0014386', 'A_33_P3396872', 'A_33_P3267760']}\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": "9cb1f071", "metadata": {}, "source": [ "### Step 6: Gene Identifier Mapping" ] }, { "cell_type": "code", "execution_count": 7, "id": "486d917e", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:12.222513Z", "iopub.status.busy": "2025-03-25T06:01:12.222383Z", "iopub.status.idle": "2025-03-25T06:01:12.970406Z", "shell.execute_reply": "2025-03-25T06:01:12.969754Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gene mapping dataframe shape: (48862, 2)\n", "First few rows of mapping data:\n", " ID Gene\n", "3 A_33_P3396872 CPED1\n", "4 A_33_P3267760 BCOR\n", "5 A_32_P194264 CHAC2\n", "6 A_23_P153745 IFI30\n", "10 A_21_P0014180 GPR146\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gene expression dataframe shape after mapping: (29222, 31)\n", "First few gene symbols after mapping:\n", "Index(['A1BG', 'A1BG-AS1', 'A1CF', 'A1CF-2', 'A1CF-3', 'A2M', 'A2M-1',\n", " 'A2M-AS1', 'A2ML1', 'A2MP1'],\n", " dtype='object', name='Gene')\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Gene data saved to ../../output/preprocess/Osteoporosis/gene_data/GSE224330.csv\n" ] } ], "source": [ "# 1. Determine which columns in gene_annotation contain identifiers and gene symbols\n", "# Based on the preview, 'ID' contains the same kind of identifiers as in gene_data (Agilent probe IDs)\n", "# and 'GENE_SYMBOL' contains the gene symbols we need\n", "\n", "# 2. Get the gene mapping dataframe with these two columns\n", "mapping_data = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='GENE_SYMBOL')\n", "print(f\"Gene mapping dataframe shape: {mapping_data.shape}\")\n", "print(\"First few rows of mapping data:\")\n", "print(mapping_data.head())\n", "\n", "# 3. Convert probe-level measurements to gene expression data\n", "gene_data = apply_gene_mapping(gene_data, mapping_data)\n", "print(f\"Gene expression dataframe shape after mapping: {gene_data.shape}\")\n", "print(\"First few gene symbols after mapping:\")\n", "print(gene_data.index[:10])\n", "\n", "# Save the gene data to CSV\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 data saved to {out_gene_data_file}\")\n" ] }, { "cell_type": "markdown", "id": "fe7dbdec", "metadata": {}, "source": [ "### Step 7: Data Normalization and Linking" ] }, { "cell_type": "code", "execution_count": 8, "id": "ae48668b", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:01:12.972249Z", "iopub.status.busy": "2025-03-25T06:01:12.972127Z", "iopub.status.idle": "2025-03-25T06:01:21.732355Z", "shell.execute_reply": "2025-03-25T06:01:21.731629Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Normalized gene data saved to ../../output/preprocess/Osteoporosis/gene_data/GSE224330.csv\n", "Clinical data saved to ../../output/preprocess/Osteoporosis/clinical_data/GSE224330.csv\n", "Linked data shape: (31, 20781)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "For the feature 'Osteoporosis', the least common label is '1.0' with 4 occurrences. This represents 19.05% of the dataset.\n", "The distribution of the feature 'Osteoporosis' in this dataset is fine.\n", "\n", "Quartiles for 'Age':\n", " 25%: 55.0\n", " 50% (Median): 63.0\n", " 75%: 70.0\n", "Min: 47.0\n", "Max: 84.0\n", "The distribution of the feature 'Age' in this dataset is fine.\n", "\n", "For the feature 'Gender', the least common label is '1.0' with 5 occurrences. This represents 23.81% of the dataset.\n", "The distribution of the feature 'Gender' in this dataset is fine.\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Linked data saved to ../../output/preprocess/Osteoporosis/GSE224330.csv\n" ] } ], "source": [ "# 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", "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", "# Create clinical features directly from clinical_data using the conversion functions defined earlier\n", "clinical_features_df = geo_select_clinical_features(\n", " 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", "# Save the clinical data\n", "os.makedirs(os.path.dirname(out_clinical_data_file), exist_ok=True)\n", "clinical_features_df.to_csv(out_clinical_data_file)\n", "print(f\"Clinical data saved to {out_clinical_data_file}\")\n", "\n", "# Now link the clinical and genetic data\n", "linked_data = geo_link_clinical_genetic_data(clinical_features_df, normalized_gene_data)\n", "print(\"Linked data shape:\", linked_data.shape)\n", "\n", "# Handle missing values in the linked data\n", "linked_data = handle_missing_values(linked_data, trait)\n", "\n", "# 4. Determine whether the trait and some demographic features are severely biased, and remove biased features.\n", "is_trait_biased, unbiased_linked_data = judge_and_remove_biased_features(linked_data, trait)\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 from monocytes of rheumatoid arthritis patients, with osteoporosis status included in comorbidity information.\"\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(\"Data was determined to be unusable and was 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 }