# Path Configuration | |
from tools.preprocess import * | |
# Processing context | |
trait = "Atrial_Fibrillation" | |
# Input paths | |
tcga_root_dir = "../DATA/TCGA" | |
# Output paths | |
out_data_file = "./output/preprocess/1/Atrial_Fibrillation/TCGA.csv" | |
out_gene_data_file = "./output/preprocess/1/Atrial_Fibrillation/gene_data/TCGA.csv" | |
out_clinical_data_file = "./output/preprocess/1/Atrial_Fibrillation/clinical_data/TCGA.csv" | |
json_path = "./output/preprocess/1/Atrial_Fibrillation/cohort_info.json" | |
import os | |
# Step 1: Check directories in tcga_root_dir for anything relevant to "Atrial_Fibrillation" | |
dir_list = os.listdir(tcga_root_dir) | |
matching_dir = None | |
# We'll perform a simple match check (case-insensitive) | |
# If we had any subdirectory name containing "atrial" or "fibrillation", we would choose it. | |
for d in dir_list: | |
if "atrial" in d.lower() or "fibrillation" in d.lower(): | |
matching_dir = d | |
break | |
# If no suitable directory is found, mark trait as skipped | |
if matching_dir is None: | |
validate_and_save_cohort_info( | |
is_final=False, | |
cohort="TCGA", | |
info_path=json_path, | |
is_gene_available=False, | |
is_trait_available=False | |
) | |
else: | |
# Normally we'd proceed with file loading, but per instructions, | |
# no directory matches the trait. Thus this block won't execute. | |
pass |