File size: 966 Bytes
e6817b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 = "Height"

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

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

# Get subdirectories from TCGA root directory 
tcga_subdirs = os.listdir(tcga_root_dir)
tcga_subdirs = [d for d in tcga_subdirs if not d.startswith('.')]

# Review cohort directories for height related data
height_cohorts = [d for d in tcga_subdirs if any(word in d.lower() for word in ['height', 'stature', 'growth'])]

# No suitable cohort found for height - record this and end processing
validate_and_save_cohort_info(
    is_final=False,
    cohort="TCGA", 
    info_path=json_path,
    is_gene_available=True,
    is_trait_available=False
)