{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "1c9934b6", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:27:36.851445Z", "iopub.status.busy": "2025-03-25T06:27:36.851228Z", "iopub.status.idle": "2025-03-25T06:27:37.020608Z", "shell.execute_reply": "2025-03-25T06:27:37.020250Z" } }, "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 = \"Alzheimers_Disease\"\n", "\n", "# Input paths\n", "tcga_root_dir = \"../../input/TCGA\"\n", "\n", "# Output paths\n", "out_data_file = \"../../output/preprocess/Alzheimers_Disease/TCGA.csv\"\n", "out_gene_data_file = \"../../output/preprocess/Alzheimers_Disease/gene_data/TCGA.csv\"\n", "out_clinical_data_file = \"../../output/preprocess/Alzheimers_Disease/clinical_data/TCGA.csv\"\n", "json_path = \"../../output/preprocess/Alzheimers_Disease/cohort_info.json\"\n" ] }, { "cell_type": "markdown", "id": "b99f31b2", "metadata": {}, "source": [ "### Step 1: Initial Data Loading" ] }, { "cell_type": "code", "execution_count": 2, "id": "71975ea4", "metadata": { "execution": { "iopub.execute_input": "2025-03-25T06:27:37.022138Z", "iopub.status.busy": "2025-03-25T06:27:37.021950Z", "iopub.status.idle": "2025-03-25T06:27:37.027304Z", "shell.execute_reply": "2025-03-25T06:27:37.027012Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Available TCGA subdirectories: ['TCGA_Liver_Cancer_(LIHC)', 'TCGA_Lower_Grade_Glioma_(LGG)', 'TCGA_lower_grade_glioma_and_glioblastoma_(GBMLGG)', 'TCGA_Lung_Adenocarcinoma_(LUAD)', 'TCGA_Lung_Cancer_(LUNG)', 'TCGA_Lung_Squamous_Cell_Carcinoma_(LUSC)', 'TCGA_Melanoma_(SKCM)', 'TCGA_Mesothelioma_(MESO)', 'TCGA_Ocular_melanomas_(UVM)', 'TCGA_Ovarian_Cancer_(OV)', 'TCGA_Pancreatic_Cancer_(PAAD)', 'TCGA_Pheochromocytoma_Paraganglioma_(PCPG)', 'TCGA_Prostate_Cancer_(PRAD)', 'TCGA_Rectal_Cancer_(READ)', 'TCGA_Sarcoma_(SARC)', 'TCGA_Stomach_Cancer_(STAD)', 'TCGA_Testicular_Cancer_(TGCT)', 'TCGA_Thymoma_(THYM)', 'TCGA_Thyroid_Cancer_(THCA)', 'TCGA_Uterine_Carcinosarcoma_(UCS)', '.DS_Store', 'CrawlData.ipynb', 'TCGA_Acute_Myeloid_Leukemia_(LAML)', 'TCGA_Adrenocortical_Cancer_(ACC)', 'TCGA_Bile_Duct_Cancer_(CHOL)', 'TCGA_Bladder_Cancer_(BLCA)', 'TCGA_Breast_Cancer_(BRCA)', 'TCGA_Cervical_Cancer_(CESC)', 'TCGA_Colon_and_Rectal_Cancer_(COADREAD)', 'TCGA_Colon_Cancer_(COAD)', 'TCGA_Endometrioid_Cancer_(UCEC)', 'TCGA_Esophageal_Cancer_(ESCA)', 'TCGA_Glioblastoma_(GBM)', 'TCGA_Head_and_Neck_Cancer_(HNSC)', 'TCGA_Kidney_Chromophobe_(KICH)', 'TCGA_Kidney_Clear_Cell_Carcinoma_(KIRC)', 'TCGA_Kidney_Papillary_Cell_Carcinoma_(KIRP)', 'TCGA_Large_Bcell_Lymphoma_(DLBC)']\n", "No suitable directory found for Alzheimers_Disease. Alzheimer's Disease is not a primary focus of TCGA cancer datasets.\n" ] }, { "data": { "text/plain": [ "False" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import os\n", "\n", "# Step 1: Look for directories related to Alzheimer's Disease\n", "tcga_subdirs = os.listdir(tcga_root_dir)\n", "print(f\"Available TCGA subdirectories: {tcga_subdirs}\")\n", "\n", "# Look for directory related to Alzheimer's Disease\n", "# Alzheimer's Disease is not a cancer type, so we need to assess if any cancer dataset \n", "# has a relationship with Alzheimer's Disease or contains Alzheimer's-related information\n", "target_dir = None\n", "\n", "# For Alzheimer's Disease, GBM (Glioblastoma) and LGG (Lower Grade Glioma) might be relevant for brain-related studies\n", "# but they are cancer types, not neurodegenerative diseases\n", "print(f\"No suitable directory found for {trait}. Alzheimer's Disease is not a primary focus of TCGA cancer datasets.\")\n", "\n", "# Mark the task as completed by creating a JSON record indicating data is not available\n", "validate_and_save_cohort_info(is_final=False, cohort=\"TCGA\", info_path=json_path, \n", " is_gene_available=False, is_trait_available=False)" ] } ], "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 }