File size: 2,034 Bytes
012bb62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Path Configuration
from tools.preprocess import *

# Processing context
trait = "Sickle_Cell_Anemia"
cohort = "GSE41575"

# Input paths
in_trait_dir = "../DATA/GEO/Sickle_Cell_Anemia"
in_cohort_dir = "../DATA/GEO/Sickle_Cell_Anemia/GSE41575"

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

# Get file paths
soft_file_path, matrix_file_path = geo_get_relevant_filepaths(in_cohort_dir)

# Get background info and clinical data
background_info, clinical_data = get_background_and_clinical_data(matrix_file_path)
print("Background Information:")
print(background_info)
print("\nSample Characteristics:")

# Get dictionary of unique values per row 
unique_values_dict = get_unique_values_by_row(clinical_data)
for row, values in unique_values_dict.items():
    print(f"\n{row}:")
    print(values)
# 1. Gene Expression Data Availability
# This is microRNA data, not gene expression data
is_gene_available = False  

# 2.1 Data Availability
# No trait status data - only control vs miR overexpression
trait_row = None  

# No age data available
age_row = None

# No gender data available 
gender_row = None

# 2.2 Data Type Conversion Functions
def convert_trait(x):
    # Not needed since trait data not available
    return None

def convert_age(x):
    # Not needed since age data not available
    return None

def convert_gender(x):
    # Not needed since gender data not available
    return None

# 3. Save metadata
validate_and_save_cohort_info(is_final=False, 
                            cohort=cohort,
                            info_path=json_path,
                            is_gene_available=is_gene_available,
                            is_trait_available=False)

# 4. Skip clinical feature extraction since trait_row is None