Liu-Hy's picture
Add files using upload-large-folder tool
06befd3 verified
# Path Configuration
from tools.preprocess import *
# Processing context
trait = "Hypertension"
# Input paths
tcga_root_dir = "../DATA/TCGA"
# Output paths
out_data_file = "./output/preprocess/3/Hypertension/TCGA.csv"
out_gene_data_file = "./output/preprocess/3/Hypertension/gene_data/TCGA.csv"
out_clinical_data_file = "./output/preprocess/3/Hypertension/clinical_data/TCGA.csv"
json_path = "./output/preprocess/3/Hypertension/cohort_info.json"
# 1. Check if any subdirectory is relevant to Hypertension
subdirectories = os.listdir(tcga_root_dir)
subdirectories = [d for d in subdirectories if os.path.isdir(os.path.join(tcga_root_dir, d))]
# No suitable directory exists in TCGA for Hypertension since it's a cancer database
is_gene_available = False # No relevant gene expression data
is_trait_available = False # No relevant trait data
# Record that this trait cannot be studied with TCGA data
validate_and_save_cohort_info(
is_final=False,
cohort="TCGA",
info_path=json_path,
is_gene_available=is_gene_available,
is_trait_available=is_trait_available
)