File size: 1,033 Bytes
1f7599a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Path Configuration
from tools.preprocess import *

# Processing context
trait = "Chronic_Fatigue_Syndrome"

# Input paths
tcga_root_dir = "../DATA/TCGA"

# Output paths
out_data_file = "./output/preprocess/3/Chronic_Fatigue_Syndrome/TCGA.csv"
out_gene_data_file = "./output/preprocess/3/Chronic_Fatigue_Syndrome/gene_data/TCGA.csv"
out_clinical_data_file = "./output/preprocess/3/Chronic_Fatigue_Syndrome/clinical_data/TCGA.csv"
json_path = "./output/preprocess/3/Chronic_Fatigue_Syndrome/cohort_info.json"

# Check available directories 
available_dirs = os.listdir(tcga_root_dir)
available_dirs = [d for d in available_dirs if not d.startswith('.') and not d.endswith('.ipynb')]

# For cardiovascular disease, there is no directly matching cohort in TCGA
# Mark the trait as not available and exit
is_usable = validate_and_save_cohort_info(
    is_final=False,
    cohort="TCGA", 
    info_path=json_path,
    is_gene_available=False,
    is_trait_available=False
)

raise ValueError(f"No suitable TCGA cohort found for {trait}")