# Path Configuration from tools.preprocess import * # Processing context trait = "Large_B-cell_Lymphoma" cohort = "GSE182362" # Input paths in_trait_dir = "../DATA/GEO/Large_B-cell_Lymphoma" in_cohort_dir = "../DATA/GEO/Large_B-cell_Lymphoma/GSE182362" # Output paths out_data_file = "./output/preprocess/3/Large_B-cell_Lymphoma/GSE182362.csv" out_gene_data_file = "./output/preprocess/3/Large_B-cell_Lymphoma/gene_data/GSE182362.csv" out_clinical_data_file = "./output/preprocess/3/Large_B-cell_Lymphoma/clinical_data/GSE182362.csv" json_path = "./output/preprocess/3/Large_B-cell_Lymphoma/cohort_info.json" # Get file paths for soft and matrix files soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir) # Get background info and clinical data from matrix file background_info, clinical_data = get_background_and_clinical_data(matrix_file) # Get unique values for each clinical feature row clinical_features = get_unique_values_by_row(clinical_data) # Print background info print("Background Information:") print(background_info) print("\nClinical Features and Sample Values:") print(json.dumps(clinical_features, indent=2)) # 1. Gene Expression Data Availability # This is a miRNA study on cell lines, not gene expression data is_gene_available = False # 2. Clinical Data Availability and Type Conversion # 2.1 Data rows # Only has treatment data in row 2, but no human trait/age/gender data trait_row = None age_row = None gender_row = None # 2.2 Conversion functions def convert_trait(x): # Not used since trait data not available return None def convert_age(x): # Not used since age data not available return None def convert_gender(x): # Not used since gender data not available return None # 3. Save metadata # trait_row is None so trait data not available is_trait_available = False if trait_row is None else True validate_and_save_cohort_info( is_final=False, cohort=cohort, info_path=json_path, is_gene_available=is_gene_available, is_trait_available=is_trait_available ) # 4. Clinical Feature Extraction # Skip since trait_row is None, indicating no clinical data available