# 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 |