Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +15 -0
- p1/preprocess/Cardiovascular_Disease/gene_data/GSE182600.csv +3 -0
- p1/preprocess/Cardiovascular_Disease/gene_data/GSE190042.csv +3 -0
- p1/preprocess/Cardiovascular_Disease/gene_data/GSE235307.csv +3 -0
- p1/preprocess/Celiac_Disease/GSE72625.csv +3 -0
- p1/preprocess/Celiac_Disease/gene_data/GSE138297.csv +3 -0
- p1/preprocess/Celiac_Disease/gene_data/GSE164883.csv +0 -0
- p1/preprocess/Celiac_Disease/gene_data/GSE20332.csv +3 -0
- p1/preprocess/Celiac_Disease/gene_data/GSE72625.csv +3 -0
- p1/preprocess/Cervical_Cancer/GSE63678.csv +0 -0
- p1/preprocess/Cervical_Cancer/GSE75132.csv +0 -0
- p1/preprocess/Cervical_Cancer/code/GSE138080.py +174 -0
- p1/preprocess/Cervical_Cancer/code/GSE163114.py +172 -0
- p1/preprocess/Cervical_Cancer/code/GSE75132.py +160 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE107754.csv +3 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE131027.csv +3 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE138079.csv +3 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE138080.csv +0 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE146114.csv +3 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE163114.csv +0 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE63678.csv +0 -0
- p1/preprocess/Cervical_Cancer/gene_data/GSE75132.csv +0 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/GSE251792.csv +0 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/GSE67311.csv +3 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/clinical_data/GSE251792.csv +4 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/clinical_data/GSE67311.csv +2 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/code/GSE251792.py +225 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/code/GSE39684.py +198 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/code/GSE67311.py +233 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/code/TCGA.py +56 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/cohort_info.json +1 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/gene_data/GSE251792.csv +0 -0
- p1/preprocess/Chronic_Fatigue_Syndrome/gene_data/GSE39684.csv +1 -0
- p1/preprocess/Chronic_kidney_disease/GSE142153.csv +0 -0
- p1/preprocess/Chronic_kidney_disease/GSE66494.csv +3 -0
- p1/preprocess/Chronic_kidney_disease/clinical_data/GSE104948.csv +2 -0
- p1/preprocess/Chronic_kidney_disease/clinical_data/GSE104954.csv +2 -0
- p1/preprocess/Chronic_kidney_disease/clinical_data/GSE127136.csv +2 -0
- p1/preprocess/Chronic_kidney_disease/clinical_data/GSE142153.csv +2 -0
- p1/preprocess/Chronic_kidney_disease/clinical_data/GSE180393.csv +2 -0
- p1/preprocess/Chronic_kidney_disease/clinical_data/GSE180394.csv +2 -0
- p1/preprocess/Chronic_kidney_disease/clinical_data/GSE66494.csv +2 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE104948.py +161 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE104954.py +152 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE127136.py +93 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE142153.py +149 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE180393.py +195 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE180394.py +227 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE45980.py +234 -0
- p1/preprocess/Chronic_kidney_disease/code/GSE60861.py +230 -0
.gitattributes
CHANGED
@@ -1003,3 +1003,18 @@ p1/preprocess/Breast_Cancer/gene_data/GSE153316.csv filter=lfs diff=lfs merge=lf
|
|
1003 |
p1/preprocess/Breast_Cancer/gene_data/GSE234017.csv filter=lfs diff=lfs merge=lfs -text
|
1004 |
p1/preprocess/Cardiovascular_Disease/gene_data/GSE285666.csv filter=lfs diff=lfs merge=lfs -text
|
1005 |
p1/preprocess/Cardiovascular_Disease/gene_data/GSE256539.csv filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1003 |
p1/preprocess/Breast_Cancer/gene_data/GSE234017.csv filter=lfs diff=lfs merge=lfs -text
|
1004 |
p1/preprocess/Cardiovascular_Disease/gene_data/GSE285666.csv filter=lfs diff=lfs merge=lfs -text
|
1005 |
p1/preprocess/Cardiovascular_Disease/gene_data/GSE256539.csv filter=lfs diff=lfs merge=lfs -text
|
1006 |
+
p1/preprocess/Celiac_Disease/GSE72625.csv filter=lfs diff=lfs merge=lfs -text
|
1007 |
+
p1/preprocess/Cardiovascular_Disease/gene_data/GSE190042.csv filter=lfs diff=lfs merge=lfs -text
|
1008 |
+
p1/preprocess/Cardiovascular_Disease/gene_data/GSE182600.csv filter=lfs diff=lfs merge=lfs -text
|
1009 |
+
p1/preprocess/Celiac_Disease/gene_data/GSE72625.csv filter=lfs diff=lfs merge=lfs -text
|
1010 |
+
p1/preprocess/Cardiovascular_Disease/gene_data/GSE235307.csv filter=lfs diff=lfs merge=lfs -text
|
1011 |
+
p1/preprocess/Celiac_Disease/gene_data/GSE138297.csv filter=lfs diff=lfs merge=lfs -text
|
1012 |
+
p1/preprocess/Cervical_Cancer/gene_data/GSE107754.csv filter=lfs diff=lfs merge=lfs -text
|
1013 |
+
p1/preprocess/Cervical_Cancer/gene_data/GSE138079.csv filter=lfs diff=lfs merge=lfs -text
|
1014 |
+
p1/preprocess/Chronic_kidney_disease/GSE66494.csv filter=lfs diff=lfs merge=lfs -text
|
1015 |
+
p1/preprocess/Cervical_Cancer/gene_data/GSE131027.csv filter=lfs diff=lfs merge=lfs -text
|
1016 |
+
p1/preprocess/Cervical_Cancer/gene_data/GSE146114.csv filter=lfs diff=lfs merge=lfs -text
|
1017 |
+
p1/preprocess/Celiac_Disease/gene_data/GSE20332.csv filter=lfs diff=lfs merge=lfs -text
|
1018 |
+
p1/preprocess/Chronic_Fatigue_Syndrome/GSE67311.csv filter=lfs diff=lfs merge=lfs -text
|
1019 |
+
p1/preprocess/Chronic_kidney_disease/gene_data/GSE104948.csv filter=lfs diff=lfs merge=lfs -text
|
1020 |
+
p1/preprocess/Chronic_kidney_disease/gene_data/GSE66494.csv filter=lfs diff=lfs merge=lfs -text
|
p1/preprocess/Cardiovascular_Disease/gene_data/GSE182600.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8ab10642973a2c6ae075b4608278a038bc9bf2ff5fa8d444a21b081ea4467056
|
3 |
+
size 26035031
|
p1/preprocess/Cardiovascular_Disease/gene_data/GSE190042.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ff55ffbfb57b1f26892f2d86fb97d8aa9b8a6e16792e329038b81d52a75178d
|
3 |
+
size 24624180
|
p1/preprocess/Cardiovascular_Disease/gene_data/GSE235307.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9d40bfec5aee125dd279e5a4a5b658d3b8c0ce73e2f05846a13e621756e1927e
|
3 |
+
size 30126272
|
p1/preprocess/Celiac_Disease/GSE72625.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f577d5e55935c47fb2f9b7e6a6247bfd05006613e344f010ebcad22eae390b70
|
3 |
+
size 12147144
|
p1/preprocess/Celiac_Disease/gene_data/GSE138297.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:de9565415a246beb680e5ba05e15de50eccfec4d24f558d0cba022302313ca04
|
3 |
+
size 15408302
|
p1/preprocess/Celiac_Disease/gene_data/GSE164883.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Celiac_Disease/gene_data/GSE20332.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b14885da723a22361e67b291932000bcca46d782922d18d9e505dd11fc7ffbf1
|
3 |
+
size 39152792
|
p1/preprocess/Celiac_Disease/gene_data/GSE72625.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:325807d024ec96bfc7502345547a71e32706a9fa41282e819126c5f7d4b3f51b
|
3 |
+
size 12146945
|
p1/preprocess/Cervical_Cancer/GSE63678.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Cervical_Cancer/GSE75132.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Cervical_Cancer/code/GSE138080.py
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Cervical_Cancer"
|
6 |
+
cohort = "GSE138080"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Cervical_Cancer"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Cervical_Cancer/GSE138080"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Cervical_Cancer/GSE138080.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Cervical_Cancer/gene_data/GSE138080.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Cervical_Cancer/clinical_data/GSE138080.csv"
|
16 |
+
json_path = "./output/preprocess/1/Cervical_Cancer/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
22 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
23 |
+
|
24 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
25 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
26 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
27 |
+
background_info, clinical_data = get_background_and_clinical_data(
|
28 |
+
matrix_file,
|
29 |
+
background_prefixes,
|
30 |
+
clinical_prefixes
|
31 |
+
)
|
32 |
+
|
33 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
34 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
35 |
+
|
36 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
37 |
+
print("Background Information:")
|
38 |
+
print(background_info)
|
39 |
+
print("Sample Characteristics Dictionary:")
|
40 |
+
print(sample_characteristics_dict)
|
41 |
+
# Step: Dataset Analysis and Clinical Feature Extraction
|
42 |
+
|
43 |
+
# 1. Determine if the dataset likely contains gene expression data
|
44 |
+
is_gene_available = True # Based on the "mRNA tissues-Agilent" description
|
45 |
+
|
46 |
+
# 2. Determine availability of variables and write conversion functions
|
47 |
+
|
48 |
+
# From the sample characteristics:
|
49 |
+
# {0: ['cell type: normal cervical squamous epithelium',
|
50 |
+
# 'cell type: cervical intraepithelial neoplasia, grade 2-3',
|
51 |
+
# 'cell type: cervical squamous cell carcinoma'],
|
52 |
+
# 1: ['hpv: high-risk HPV-positive',
|
53 |
+
# 'hpv: HPV-negative']}
|
54 |
+
|
55 |
+
# Observing these, row 0 contains different states of cervical tissue,
|
56 |
+
# which we interpret as relevant to the trait "Cervical_Cancer."
|
57 |
+
# Hence we set:
|
58 |
+
trait_row = 0
|
59 |
+
|
60 |
+
# There is no row indicating age, so:
|
61 |
+
age_row = None
|
62 |
+
|
63 |
+
# There is no row indicating gender, so:
|
64 |
+
gender_row = None
|
65 |
+
|
66 |
+
# Data Type Conversion Functions
|
67 |
+
def convert_trait(value: str):
|
68 |
+
# Extract the text after the colon if present
|
69 |
+
parts = value.split(':', 1)
|
70 |
+
val = parts[1].strip().lower() if len(parts) == 2 else value.strip().lower()
|
71 |
+
# Convert to binary (0 = normal, 1 = pre-cancer or cancer)
|
72 |
+
if "normal" in val:
|
73 |
+
return 0
|
74 |
+
elif "intraepithelial" in val or "carcinoma" in val:
|
75 |
+
return 1
|
76 |
+
return None
|
77 |
+
|
78 |
+
def convert_age(value: str):
|
79 |
+
# Not used since age is unavailable
|
80 |
+
return None
|
81 |
+
|
82 |
+
def convert_gender(value: str):
|
83 |
+
# Not used since gender is unavailable
|
84 |
+
return None
|
85 |
+
|
86 |
+
# 3. Perform initial filtering and save metadata
|
87 |
+
# Trait data is available if trait_row is not None
|
88 |
+
is_trait_available = (trait_row is not None)
|
89 |
+
|
90 |
+
is_usable = validate_and_save_cohort_info(
|
91 |
+
is_final=False,
|
92 |
+
cohort=cohort,
|
93 |
+
info_path=json_path,
|
94 |
+
is_gene_available=is_gene_available,
|
95 |
+
is_trait_available=is_trait_available
|
96 |
+
)
|
97 |
+
|
98 |
+
# 4. Clinical feature extraction if trait data is available
|
99 |
+
if trait_row is not None:
|
100 |
+
selected_clinical_df = geo_select_clinical_features(
|
101 |
+
clinical_df=clinical_data,
|
102 |
+
trait=trait,
|
103 |
+
trait_row=trait_row,
|
104 |
+
convert_trait=convert_trait,
|
105 |
+
age_row=age_row,
|
106 |
+
convert_age=convert_age,
|
107 |
+
gender_row=gender_row,
|
108 |
+
convert_gender=convert_gender
|
109 |
+
)
|
110 |
+
# Preview dataframe
|
111 |
+
preview = preview_df(selected_clinical_df, n=5, max_items=200)
|
112 |
+
print("Preview of selected clinical features:", preview)
|
113 |
+
|
114 |
+
# Save the clinical data
|
115 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
116 |
+
# STEP3
|
117 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
118 |
+
gene_data = get_genetic_data(matrix_file)
|
119 |
+
|
120 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
121 |
+
print(gene_data.index[:20])
|
122 |
+
print("These numeric entries appear to be probe IDs or some numeric references, not standard human gene symbols.\nrequires_gene_mapping = True")
|
123 |
+
# STEP5
|
124 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
125 |
+
gene_annotation = get_gene_annotation(soft_file)
|
126 |
+
|
127 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
128 |
+
print("Gene annotation preview:")
|
129 |
+
print(preview_df(gene_annotation))
|
130 |
+
# STEP: Gene Identifier Mapping
|
131 |
+
|
132 |
+
# 1. Determine which columns in gene_annotation match the probe IDs in gene_data and which store gene symbols.
|
133 |
+
# From the preview, "ID" matches the probe IDs, and "GENE_SYMBOL" corresponds to gene symbols.
|
134 |
+
|
135 |
+
# 2. Create a mapping dataframe from the gene_annotation by extracting the probe ID column and gene symbol column.
|
136 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col="ID", gene_col="GENE_SYMBOL")
|
137 |
+
|
138 |
+
# 3. Convert the probe-level data to gene-level data using the mapping, distributing expression among genes if a probe
|
139 |
+
# maps to multiple genes, and summing across probes for the same gene.
|
140 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
141 |
+
|
142 |
+
# (Optional) Print a brief check of the new gene_data
|
143 |
+
print("Gene data shape after mapping:", gene_data.shape)
|
144 |
+
print("First 20 genes after mapping:", gene_data.index[:20])
|
145 |
+
# STEP 7
|
146 |
+
|
147 |
+
# 1. Normalize gene symbols in the gene_data, then save to CSV.
|
148 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
149 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
150 |
+
|
151 |
+
# 2. Link the clinical and genetic data on sample IDs
|
152 |
+
linked_data = geo_link_clinical_genetic_data(selected_clinical_df, normalized_gene_data)
|
153 |
+
|
154 |
+
# 3. Handle missing values in the linked data
|
155 |
+
linked_data = handle_missing_values(linked_data, trait)
|
156 |
+
|
157 |
+
# 4. Determine whether the trait and demographic features are biased
|
158 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
159 |
+
|
160 |
+
# 5. Conduct final validation and save cohort info
|
161 |
+
is_usable = validate_and_save_cohort_info(
|
162 |
+
is_final=True,
|
163 |
+
cohort=cohort,
|
164 |
+
info_path=json_path,
|
165 |
+
is_gene_available=True,
|
166 |
+
is_trait_available=True,
|
167 |
+
is_biased=trait_biased,
|
168 |
+
df=linked_data,
|
169 |
+
note="Trait is available. Completed linking and QC steps."
|
170 |
+
)
|
171 |
+
|
172 |
+
# 6. If the dataset is usable, save the final linked data
|
173 |
+
if is_usable:
|
174 |
+
linked_data.to_csv(out_data_file)
|
p1/preprocess/Cervical_Cancer/code/GSE163114.py
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Cervical_Cancer"
|
6 |
+
cohort = "GSE163114"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Cervical_Cancer"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Cervical_Cancer/GSE163114"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Cervical_Cancer/GSE163114.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Cervical_Cancer/gene_data/GSE163114.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Cervical_Cancer/clinical_data/GSE163114.csv"
|
16 |
+
json_path = "./output/preprocess/1/Cervical_Cancer/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
22 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
23 |
+
|
24 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
25 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
26 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
27 |
+
background_info, clinical_data = get_background_and_clinical_data(
|
28 |
+
matrix_file,
|
29 |
+
background_prefixes,
|
30 |
+
clinical_prefixes
|
31 |
+
)
|
32 |
+
|
33 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
34 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
35 |
+
|
36 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
37 |
+
print("Background Information:")
|
38 |
+
print(background_info)
|
39 |
+
print("Sample Characteristics Dictionary:")
|
40 |
+
print(sample_characteristics_dict)
|
41 |
+
# Step 1: Gene Expression Data Availability
|
42 |
+
# Based on the background information ("Ki-67 promotes carcinogenesis by enabling global transcriptional programmes")
|
43 |
+
# and the use of the HeLa cell line, it is likely that this dataset contains gene expression data.
|
44 |
+
is_gene_available = True
|
45 |
+
|
46 |
+
# Step 2: Variable Availability and Data Type Conversion
|
47 |
+
|
48 |
+
# From the sample characteristics dictionary:
|
49 |
+
# {0: ['cell line: HeLa'], 1: ['lentivirus: shRNA control', 'lentivirus: shRNA Ki-67']}
|
50 |
+
# - All samples come from the HeLa cell line, which is derived from cervical cancer, but this is a constant feature (no variation).
|
51 |
+
# - There's no row providing age or gender information.
|
52 |
+
# Hence, no variable has meaningful variation. We set rows to None.
|
53 |
+
|
54 |
+
trait_row = None # No row captures a varying cervical cancer trait
|
55 |
+
age_row = None # No row for age
|
56 |
+
gender_row = None # No row for gender
|
57 |
+
|
58 |
+
# Even though these functions won't be used (since trait_row, age_row, gender_row = None),
|
59 |
+
# we provide them per instructions.
|
60 |
+
|
61 |
+
def convert_trait(value: str):
|
62 |
+
"""
|
63 |
+
Convert the trait to the chosen type.
|
64 |
+
Not applicable here, but defined for completeness.
|
65 |
+
"""
|
66 |
+
if not value or ':' not in value:
|
67 |
+
return None
|
68 |
+
val = value.split(':', 1)[-1].strip()
|
69 |
+
return val if val else None
|
70 |
+
|
71 |
+
def convert_age(value: str):
|
72 |
+
"""
|
73 |
+
Convert age data to a continuous type.
|
74 |
+
Not applicable here, but defined for completeness.
|
75 |
+
"""
|
76 |
+
if not value or ':' not in value:
|
77 |
+
return None
|
78 |
+
val = value.split(':', 1)[-1].strip()
|
79 |
+
# We do not actually have numeric values, so just return None.
|
80 |
+
return None
|
81 |
+
|
82 |
+
def convert_gender(value: str):
|
83 |
+
"""
|
84 |
+
Convert gender data to binary.
|
85 |
+
Not applicable here, but defined for completeness.
|
86 |
+
"""
|
87 |
+
if not value or ':' not in value:
|
88 |
+
return None
|
89 |
+
val = value.split(':', 1)[-1].strip().lower()
|
90 |
+
if val in ['male', 'm']:
|
91 |
+
return 1
|
92 |
+
elif val in ['female', 'f']:
|
93 |
+
return 0
|
94 |
+
return None
|
95 |
+
|
96 |
+
# Step 3: Save Metadata
|
97 |
+
# If trait_row is None, trait data is considered unavailable.
|
98 |
+
is_trait_available = (trait_row is not None)
|
99 |
+
|
100 |
+
_ = validate_and_save_cohort_info(
|
101 |
+
is_final=False,
|
102 |
+
cohort=cohort,
|
103 |
+
info_path=json_path,
|
104 |
+
is_gene_available=is_gene_available,
|
105 |
+
is_trait_available=is_trait_available
|
106 |
+
)
|
107 |
+
|
108 |
+
# Step 4: Since trait_row is None, we skip geo_select_clinical_features.
|
109 |
+
# No clinical data extraction is performed because the trait is not available.
|
110 |
+
# STEP3
|
111 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
112 |
+
gene_data = get_genetic_data(matrix_file)
|
113 |
+
|
114 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
115 |
+
print(gene_data.index[:20])
|
116 |
+
# Based on the numeric IDs (1,2,3,...), they do not appear to be standard human gene symbols.
|
117 |
+
# They seem like probe identifiers or some form of numeric reference that would require mapping.
|
118 |
+
print("These numeric IDs likely need mapping to standard gene symbols.")
|
119 |
+
print("requires_gene_mapping = True")
|
120 |
+
# STEP5
|
121 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
122 |
+
gene_annotation = get_gene_annotation(soft_file)
|
123 |
+
|
124 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
125 |
+
print("Gene annotation preview:")
|
126 |
+
print(preview_df(gene_annotation))
|
127 |
+
# STEP: Gene Identifier Mapping
|
128 |
+
|
129 |
+
# 1. Decide which key in the gene annotation dataframe stores the gene identifiers
|
130 |
+
# matching the gene expression data. From the preview, the 'ID' column in gene_annotation
|
131 |
+
# corresponds to the numeric probe IDs in gene_data. For gene symbols, we use 'GENE_SYMBOL'.
|
132 |
+
|
133 |
+
# 2. Get a gene mapping dataframe
|
134 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='GENE_SYMBOL')
|
135 |
+
|
136 |
+
# 3. Convert probe-level measurements to gene expression data
|
137 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
138 |
+
|
139 |
+
# Print a quick check of the mapped dataframe
|
140 |
+
print("Mapped gene_data shape:", gene_data.shape)
|
141 |
+
print("Head of mapped gene_data:")
|
142 |
+
print(gene_data.head())
|
143 |
+
# STEP 7
|
144 |
+
|
145 |
+
# 1. Normalize gene symbols in the gene_data, then save to CSV.
|
146 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
147 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
148 |
+
|
149 |
+
# Since trait_row was None in earlier steps, there is no actual trait data available.
|
150 |
+
# We cannot link clinical data or do trait-based QC. However, the library requires a final
|
151 |
+
# validation with a DataFrame and a Boolean for is_biased.
|
152 |
+
|
153 |
+
# Create an empty DataFrame as a placeholder, and declare is_biased=False by default.
|
154 |
+
placeholder_df = pd.DataFrame()
|
155 |
+
trait_biased = False
|
156 |
+
|
157 |
+
# 2. Perform final validation, marking trait as unavailable but providing the required arguments.
|
158 |
+
is_usable = validate_and_save_cohort_info(
|
159 |
+
is_final=True,
|
160 |
+
cohort=cohort,
|
161 |
+
info_path=json_path,
|
162 |
+
is_gene_available=True, # Gene data is present
|
163 |
+
is_trait_available=False, # Trait is not available
|
164 |
+
is_biased=trait_biased,
|
165 |
+
df=placeholder_df, # Provide a placeholder DataFrame
|
166 |
+
note="No trait data in this series. Final validation with placeholder DataFrame."
|
167 |
+
)
|
168 |
+
|
169 |
+
# 3. If the dataset were usable (it won't be without trait), we would save final linked data.
|
170 |
+
if is_usable:
|
171 |
+
# Typically we would link data and save CSV, but trait is absent. Skipping.
|
172 |
+
pass
|
p1/preprocess/Cervical_Cancer/code/GSE75132.py
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Cervical_Cancer"
|
6 |
+
cohort = "GSE75132"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Cervical_Cancer"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Cervical_Cancer/GSE75132"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Cervical_Cancer/GSE75132.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Cervical_Cancer/gene_data/GSE75132.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Cervical_Cancer/clinical_data/GSE75132.csv"
|
16 |
+
json_path = "./output/preprocess/1/Cervical_Cancer/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
22 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
23 |
+
|
24 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
25 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
26 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
27 |
+
background_info, clinical_data = get_background_and_clinical_data(
|
28 |
+
matrix_file,
|
29 |
+
background_prefixes,
|
30 |
+
clinical_prefixes
|
31 |
+
)
|
32 |
+
|
33 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
34 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
35 |
+
|
36 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
37 |
+
print("Background Information:")
|
38 |
+
print(background_info)
|
39 |
+
print("Sample Characteristics Dictionary:")
|
40 |
+
print(sample_characteristics_dict)
|
41 |
+
# Step 1: Determine if gene expression data is available
|
42 |
+
# Based on the background info (microarray analysis on RNA), we consider this dataset to contain gene expression data.
|
43 |
+
is_gene_available = True
|
44 |
+
|
45 |
+
# Step 2: Assign row keys and define conversion functions for trait, age, and gender
|
46 |
+
|
47 |
+
# Observing the sample characteristics dictionary:
|
48 |
+
# 3: ['disease state: none', 'disease state: moderate dysplasia', 'disease state: severe dysplasia',
|
49 |
+
# 'disease state: CIS', 'disease state: cancer']
|
50 |
+
# We map "none" -> 0 and everything else -> 1 for a binary trait of Cervical_Cancer.
|
51 |
+
|
52 |
+
trait_row = 3
|
53 |
+
def convert_trait(x: str):
|
54 |
+
# Extract the value after the colon
|
55 |
+
parts = x.split(':', 1)
|
56 |
+
val = parts[1].strip() if len(parts) > 1 else None
|
57 |
+
if val is None:
|
58 |
+
return None
|
59 |
+
val_lower = val.lower()
|
60 |
+
if val_lower == 'none':
|
61 |
+
return 0
|
62 |
+
else:
|
63 |
+
return 1
|
64 |
+
|
65 |
+
# No age, no gender data found
|
66 |
+
age_row = None
|
67 |
+
convert_age = None
|
68 |
+
|
69 |
+
gender_row = None
|
70 |
+
convert_gender = None
|
71 |
+
|
72 |
+
# Step 2.1: Data availability
|
73 |
+
is_trait_available = (trait_row is not None)
|
74 |
+
|
75 |
+
# Step 3: Initial filtering and metadata saving
|
76 |
+
validate_and_save_cohort_info(
|
77 |
+
is_final=False,
|
78 |
+
cohort=cohort,
|
79 |
+
info_path=json_path,
|
80 |
+
is_gene_available=is_gene_available,
|
81 |
+
is_trait_available=is_trait_available
|
82 |
+
)
|
83 |
+
|
84 |
+
# Step 4: If trait data is available, extract clinical features
|
85 |
+
if trait_row is not None:
|
86 |
+
selected_clinical_df = geo_select_clinical_features(
|
87 |
+
clinical_df=clinical_data,
|
88 |
+
trait=trait,
|
89 |
+
trait_row=trait_row,
|
90 |
+
convert_trait=convert_trait,
|
91 |
+
age_row=age_row,
|
92 |
+
convert_age=convert_age,
|
93 |
+
gender_row=gender_row,
|
94 |
+
convert_gender=convert_gender
|
95 |
+
)
|
96 |
+
|
97 |
+
# Preview the extracted clinical data
|
98 |
+
clinical_preview = preview_df(selected_clinical_df)
|
99 |
+
print("Clinical Data Preview:", clinical_preview)
|
100 |
+
|
101 |
+
# Save the clinical data to CSV
|
102 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
103 |
+
# STEP3
|
104 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
105 |
+
gene_data = get_genetic_data(matrix_file)
|
106 |
+
|
107 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
108 |
+
print(gene_data.index[:20])
|
109 |
+
print("They appear to be Affymetrix probe set IDs. Hence they are not standard human gene symbols.")
|
110 |
+
print("requires_gene_mapping = True")
|
111 |
+
# STEP5
|
112 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
113 |
+
gene_annotation = get_gene_annotation(soft_file)
|
114 |
+
|
115 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
116 |
+
print("Gene annotation preview:")
|
117 |
+
print(preview_df(gene_annotation))
|
118 |
+
# STEP: Gene Identifier Mapping
|
119 |
+
|
120 |
+
# 1 & 2. Decide which columns in the annotation data correspond to probe IDs and gene symbols.
|
121 |
+
# In this case, the 'ID' column matches our probe identifiers, and the 'Gene Symbol' column are the gene symbols.
|
122 |
+
|
123 |
+
mapping_df = get_gene_mapping(
|
124 |
+
annotation=gene_annotation,
|
125 |
+
prob_col="ID",
|
126 |
+
gene_col="Gene Symbol"
|
127 |
+
)
|
128 |
+
|
129 |
+
# 3. Convert probe-level measurements to gene expression data using the mapping from above.
|
130 |
+
gene_data = apply_gene_mapping(expression_df=gene_data, mapping_df=mapping_df)
|
131 |
+
# STEP 7
|
132 |
+
|
133 |
+
# 1. Normalize gene symbols in the gene_data, then save to CSV.
|
134 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
135 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
136 |
+
|
137 |
+
# 2. Link the clinical and genetic data on sample IDs
|
138 |
+
linked_data = geo_link_clinical_genetic_data(selected_clinical_df, normalized_gene_data)
|
139 |
+
|
140 |
+
# 3. Handle missing values in the linked data
|
141 |
+
linked_data = handle_missing_values(linked_data, trait)
|
142 |
+
|
143 |
+
# 4. Determine whether the trait and demographic features are biased
|
144 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
145 |
+
|
146 |
+
# 5. Conduct final validation and save cohort info
|
147 |
+
is_usable = validate_and_save_cohort_info(
|
148 |
+
is_final=True,
|
149 |
+
cohort=cohort,
|
150 |
+
info_path=json_path,
|
151 |
+
is_gene_available=True,
|
152 |
+
is_trait_available=True,
|
153 |
+
is_biased=trait_biased,
|
154 |
+
df=linked_data,
|
155 |
+
note="Trait is available. Completed linking and QC steps."
|
156 |
+
)
|
157 |
+
|
158 |
+
# 6. If the dataset is usable, save the final linked data
|
159 |
+
if is_usable:
|
160 |
+
linked_data.to_csv(out_data_file)
|
p1/preprocess/Cervical_Cancer/gene_data/GSE107754.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a82da64a5edcbde2a3ccf1c07d005767e02ceeaad822b4ed6217419063405079
|
3 |
+
size 19822703
|
p1/preprocess/Cervical_Cancer/gene_data/GSE131027.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a8582008fe6fc5b90879aea7d12ca4ea58cc0bbe03209acb333425d229be6e33
|
3 |
+
size 24379939
|
p1/preprocess/Cervical_Cancer/gene_data/GSE138079.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ce5db634b575bdbdafa08fb5f64269273ee335c54eee01add0988aeff973e030
|
3 |
+
size 14805206
|
p1/preprocess/Cervical_Cancer/gene_data/GSE138080.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Cervical_Cancer/gene_data/GSE146114.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f1451952dd968a27803c16c51aa325f075ec49a344592f530380fee4e49a2c3f
|
3 |
+
size 18757988
|
p1/preprocess/Cervical_Cancer/gene_data/GSE163114.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Cervical_Cancer/gene_data/GSE63678.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Cervical_Cancer/gene_data/GSE75132.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Chronic_Fatigue_Syndrome/GSE251792.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Chronic_Fatigue_Syndrome/GSE67311.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3fd88a7a15344cf19a61c9934d351b294f98b44901a486e7d317fd15b9567a09
|
3 |
+
size 31000745
|
p1/preprocess/Chronic_Fatigue_Syndrome/clinical_data/GSE251792.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GSM7988184,GSM7988185,GSM7988186,GSM7988187,GSM7988188,GSM7988189,GSM7988190,GSM7988191,GSM7988192,GSM7988193,GSM7988194,GSM7988195,GSM7988196,GSM7988197,GSM7988198,GSM7988199,GSM7988200,GSM7988201,GSM7988202,GSM7988203,GSM7988204,GSM7988205,GSM7988206,GSM7988207,GSM7988208,GSM7988209,GSM7988210,GSM7988211,GSM7988212,GSM7988213,GSM7988214,GSM7988215,GSM7988216,GSM7988217,GSM7988218,GSM7988219,GSM7988220,GSM7988221,GSM7988222,GSM7988223,GSM7988224,GSM7988225,GSM8032049,GSM8032050,GSM8032051,GSM8032052,GSM8032053,GSM8032054,GSM8032055,GSM8032056,GSM8032057,GSM8032058,GSM8032059,GSM8032060,GSM8032061,GSM8032062,GSM8032063,GSM8032064,GSM8032065,GSM8032066,GSM8032067,GSM8032068,GSM8032069,GSM8032070,GSM8032071,GSM8032072,GSM8032073,GSM8032074,GSM8032075,GSM8032076,GSM8032077,GSM8032078,GSM8032079,GSM8032080,GSM8032081,GSM8032082,GSM8032083,GSM8032084,GSM8032085,GSM8032086,GSM8032087,GSM8032088,GSM8032089,GSM8032090
|
2 |
+
1.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0,1.0,0.0,1.0,0.0,1.0,1.0,0.0,1.0,1.0,0.0,1.0,0.0,1.0,0.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,1.0,0.0,0.0,1.0,1.0,0.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,1.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0,1.0,0.0,1.0
|
3 |
+
61.0,37.0,56.0,56.0,24.0,58.0,43.0,26.0,40.0,47.0,22.0,54.0,58.0,44.0,20.0,26.0,23.0,33.0,54.0,25.0,58.0,37.0,23.0,22.0,51.0,48.0,36.0,56.0,38.0,60.0,37.0,25.0,44.0,61.0,50.0,60.0,47.0,49.0,50.0,55.0,60.0,57.0,44.0,60.0,37.0,58.0,60.0,56.0,24.0,50.0,51.0,55.0,48.0,26.0,22.0,38.0,50.0,56.0,33.0,47.0,22.0,23.0,23.0,58.0,54.0,37.0,36.0,61.0,49.0,57.0,60.0,25.0,47.0,44.0,56.0,54.0,58.0,20.0,37.0,26.0,25.0,43.0,40.0,61.0
|
4 |
+
0.0,1.0,0.0,0.0,0.0,1.0,1.0,0.0,1.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,0.0,1.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,1.0,0.0,1.0,0.0,0.0,0.0,1.0,0.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,1.0,1.0,0.0,1.0,1.0,0.0,0.0,0.0,1.0,0.0,1.0,0.0,0.0,0.0,1.0,0.0,1.0,0.0,0.0,1.0,1.0,0.0
|
p1/preprocess/Chronic_Fatigue_Syndrome/clinical_data/GSE67311.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM1644447,GSM1644448,GSM1644449,GSM1644450,GSM1644451,GSM1644452,GSM1644453,GSM1644454,GSM1644455,GSM1644456,GSM1644457,GSM1644458,GSM1644459,GSM1644460,GSM1644461,GSM1644462,GSM1644463,GSM1644464,GSM1644465,GSM1644466,GSM1644467,GSM1644468,GSM1644469,GSM1644470,GSM1644471,GSM1644472,GSM1644473,GSM1644474,GSM1644475,GSM1644476,GSM1644477,GSM1644478,GSM1644479,GSM1644480,GSM1644481,GSM1644482,GSM1644483,GSM1644484,GSM1644485,GSM1644486,GSM1644487,GSM1644488,GSM1644489,GSM1644490,GSM1644491,GSM1644492,GSM1644493,GSM1644494,GSM1644495,GSM1644496,GSM1644497,GSM1644498,GSM1644499,GSM1644500,GSM1644501,GSM1644502,GSM1644503,GSM1644504,GSM1644505,GSM1644506,GSM1644507,GSM1644508,GSM1644509,GSM1644510,GSM1644511,GSM1644512,GSM1644513,GSM1644514,GSM1644515,GSM1644516,GSM1644517,GSM1644518,GSM1644519,GSM1644520,GSM1644521,GSM1644522,GSM1644523,GSM1644524,GSM1644525,GSM1644526,GSM1644527,GSM1644528,GSM1644529,GSM1644530,GSM1644531,GSM1644532,GSM1644533,GSM1644534,GSM1644535,GSM1644536,GSM1644537,GSM1644538,GSM1644539,GSM1644540,GSM1644541,GSM1644542,GSM1644543,GSM1644544,GSM1644545,GSM1644546,GSM1644547,GSM1644548,GSM1644549,GSM1644550,GSM1644551,GSM1644552,GSM1644553,GSM1644554,GSM1644555,GSM1644556,GSM1644557,GSM1644558,GSM1644559,GSM1644560,GSM1644561,GSM1644562,GSM1644563,GSM1644564,GSM1644565,GSM1644566,GSM1644567,GSM1644568,GSM1644569,GSM1644570,GSM1644571,GSM1644572,GSM1644573,GSM1644574,GSM1644575,GSM1644576,GSM1644577,GSM1644578,GSM1644579,GSM1644580,GSM1644581,GSM1644582,GSM1644583,GSM1644584,GSM1644585,GSM1644586,GSM1644587,GSM1644588
|
2 |
+
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,,0.0,,0.0,0.0,0.0,0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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_Fatigue_Syndrome"
|
6 |
+
cohort = "GSE251792"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_Fatigue_Syndrome"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_Fatigue_Syndrome/GSE251792"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/GSE251792.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/gene_data/GSE251792.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/clinical_data/GSE251792.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_Fatigue_Syndrome/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Attempt to identify the paths to the SOFT file and the matrix file
|
22 |
+
try:
|
23 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
24 |
+
except AssertionError:
|
25 |
+
print("[WARNING] Could not find the expected '.soft' or '.matrix' files in the directory.")
|
26 |
+
soft_file, matrix_file = None, None
|
27 |
+
|
28 |
+
if soft_file is None or matrix_file is None:
|
29 |
+
print("[ERROR] Required GEO files are missing. Please check file names in the cohort directory.")
|
30 |
+
else:
|
31 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
32 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
33 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
34 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file,
|
35 |
+
background_prefixes,
|
36 |
+
clinical_prefixes)
|
37 |
+
|
38 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
39 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
40 |
+
|
41 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
42 |
+
print("Background Information:")
|
43 |
+
print(background_info)
|
44 |
+
print("\nSample Characteristics Dictionary:")
|
45 |
+
print(sample_characteristics_dict)
|
46 |
+
# Step 1: Determine gene expression availability
|
47 |
+
is_gene_available = True # Based on the background info, likely gene expression data
|
48 |
+
|
49 |
+
# Step 2: Identify data availability and define keys
|
50 |
+
trait_row = 2 # "group: Patient/Control"
|
51 |
+
age_row = 1 # "age: 61, 37, etc."
|
52 |
+
gender_row = 0 # "Sex: Female/Male"
|
53 |
+
|
54 |
+
# Step 2.2: Define conversion functions
|
55 |
+
def convert_trait(value: str):
|
56 |
+
# Extract substring after ':'
|
57 |
+
parts = value.split(':', 1)
|
58 |
+
if len(parts) < 2:
|
59 |
+
return None
|
60 |
+
val = parts[1].strip().lower()
|
61 |
+
if val == 'patient':
|
62 |
+
return 1
|
63 |
+
elif val == 'control':
|
64 |
+
return 0
|
65 |
+
return None
|
66 |
+
|
67 |
+
def convert_age(value: str):
|
68 |
+
parts = value.split(':', 1)
|
69 |
+
if len(parts) < 2:
|
70 |
+
return None
|
71 |
+
val = parts[1].strip()
|
72 |
+
try:
|
73 |
+
return float(val)
|
74 |
+
except ValueError:
|
75 |
+
return None
|
76 |
+
|
77 |
+
def convert_gender(value: str):
|
78 |
+
parts = value.split(':', 1)
|
79 |
+
if len(parts) < 2:
|
80 |
+
return None
|
81 |
+
val = parts[1].strip().lower()
|
82 |
+
if val == 'female':
|
83 |
+
return 0
|
84 |
+
elif val == 'male':
|
85 |
+
return 1
|
86 |
+
return None
|
87 |
+
|
88 |
+
# Step 3: Save metadata with initial filtering
|
89 |
+
is_trait_available = (trait_row is not None)
|
90 |
+
is_usable = validate_and_save_cohort_info(
|
91 |
+
is_final=False,
|
92 |
+
cohort=cohort,
|
93 |
+
info_path=json_path,
|
94 |
+
is_gene_available=is_gene_available,
|
95 |
+
is_trait_available=is_trait_available
|
96 |
+
)
|
97 |
+
|
98 |
+
# Step 4: Clinical feature extraction if trait_row is not None
|
99 |
+
if trait_row is not None:
|
100 |
+
selected_clinical_df = geo_select_clinical_features(
|
101 |
+
clinical_data,
|
102 |
+
trait='trait',
|
103 |
+
trait_row=trait_row,
|
104 |
+
convert_trait=convert_trait,
|
105 |
+
age_row=age_row,
|
106 |
+
convert_age=convert_age,
|
107 |
+
gender_row=gender_row,
|
108 |
+
convert_gender=convert_gender
|
109 |
+
)
|
110 |
+
# Preview the extracted dataframe
|
111 |
+
preview_result = preview_df(selected_clinical_df)
|
112 |
+
print(preview_result)
|
113 |
+
# Save the clinical data
|
114 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
115 |
+
# STEP3
|
116 |
+
# Attempt to read gene expression data; if the library function yields an empty DataFrame,
|
117 |
+
# try re-reading without ignoring lines that start with '!' (because sometimes GEO data may
|
118 |
+
# place actual expression rows under lines that begin with '!').
|
119 |
+
|
120 |
+
gene_data = get_genetic_data(matrix_file)
|
121 |
+
if gene_data.empty:
|
122 |
+
print("[WARNING] The gene_data is empty. Attempting alternative loading without treating '!' as comments.")
|
123 |
+
import gzip
|
124 |
+
|
125 |
+
# Locate the marker line first
|
126 |
+
skip_rows = 0
|
127 |
+
with gzip.open(matrix_file, 'rt') as file:
|
128 |
+
for i, line in enumerate(file):
|
129 |
+
if "!series_matrix_table_begin" in line:
|
130 |
+
skip_rows = i + 1
|
131 |
+
break
|
132 |
+
|
133 |
+
# Read the data again, this time not treating '!' as comment
|
134 |
+
gene_data = pd.read_csv(
|
135 |
+
matrix_file,
|
136 |
+
compression="gzip",
|
137 |
+
skiprows=skip_rows,
|
138 |
+
delimiter="\t",
|
139 |
+
on_bad_lines="skip"
|
140 |
+
)
|
141 |
+
gene_data = gene_data.rename(columns={"ID_REF": "ID"}).astype({"ID": "str"})
|
142 |
+
gene_data.set_index("ID", inplace=True)
|
143 |
+
|
144 |
+
# Print the first 20 row IDs to confirm data structure
|
145 |
+
print(gene_data.index[:20])
|
146 |
+
# Based on the observed identifiers (e.g., HCE000104, SL000001), they are not conventional human gene symbols.
|
147 |
+
# Therefore, mapping to human gene symbols is required.
|
148 |
+
print("requires_gene_mapping = True")
|
149 |
+
# STEP5
|
150 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
151 |
+
gene_annotation = get_gene_annotation(soft_file)
|
152 |
+
|
153 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
154 |
+
print("Gene annotation preview:")
|
155 |
+
print(preview_df(gene_annotation))
|
156 |
+
# STEP: Gene Identifier Mapping
|
157 |
+
|
158 |
+
# 1. Decide which columns in gene_annotation match the gene expression IDs and gene symbols.
|
159 |
+
# From the preview, 'ID' corresponds to the expression data identifier (like 'SL019100'),
|
160 |
+
# and 'EntrezGeneSymbol' contains the gene symbols (e.g., 'CEBPB').
|
161 |
+
|
162 |
+
# 2. Get a mapping DataFrame from the annotation by specifying these columns.
|
163 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='EntrezGeneSymbol')
|
164 |
+
|
165 |
+
# 3. Convert probe-level measurements to gene-level data using the mapping.
|
166 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
167 |
+
import os
|
168 |
+
import pandas as pd
|
169 |
+
|
170 |
+
# STEP7: Data Normalization and Linking
|
171 |
+
|
172 |
+
# 1) Normalize the gene symbols in the previously obtained gene_data
|
173 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
174 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
175 |
+
|
176 |
+
# 2) Load clinical data only if it exists and is non-empty
|
177 |
+
if os.path.exists(out_clinical_data_file) and os.path.getsize(out_clinical_data_file) > 0:
|
178 |
+
# Read the file
|
179 |
+
clinical_temp = pd.read_csv(out_clinical_data_file)
|
180 |
+
|
181 |
+
# Adjust row index to label the trait, age, and gender properly
|
182 |
+
if clinical_temp.shape[0] == 3:
|
183 |
+
clinical_temp.index = [trait, "Age", "Gender"]
|
184 |
+
elif clinical_temp.shape[0] == 2:
|
185 |
+
clinical_temp.index = [trait, "Age"]
|
186 |
+
elif clinical_temp.shape[0] == 1:
|
187 |
+
clinical_temp.index = [trait]
|
188 |
+
|
189 |
+
# 2) Link the clinical and normalized genetic data
|
190 |
+
linked_data = geo_link_clinical_genetic_data(clinical_temp, normalized_gene_data)
|
191 |
+
|
192 |
+
# 3) Handle missing values
|
193 |
+
linked_data = handle_missing_values(linked_data, trait)
|
194 |
+
|
195 |
+
# 4) Check for severe bias in the trait; remove biased demographic features if present
|
196 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
197 |
+
|
198 |
+
# 5) Final quality validation and save metadata
|
199 |
+
is_usable = validate_and_save_cohort_info(
|
200 |
+
is_final=True,
|
201 |
+
cohort=cohort,
|
202 |
+
info_path=json_path,
|
203 |
+
is_gene_available=True,
|
204 |
+
is_trait_available=True,
|
205 |
+
is_biased=trait_biased,
|
206 |
+
df=linked_data,
|
207 |
+
note=f"Final check on {cohort} with {trait}."
|
208 |
+
)
|
209 |
+
|
210 |
+
# 6) If the linked data is usable, save it
|
211 |
+
if is_usable:
|
212 |
+
linked_data.to_csv(out_data_file)
|
213 |
+
else:
|
214 |
+
# If no valid clinical data file is found, finalize metadata indicating trait unavailability
|
215 |
+
is_usable = validate_and_save_cohort_info(
|
216 |
+
is_final=True,
|
217 |
+
cohort=cohort,
|
218 |
+
info_path=json_path,
|
219 |
+
is_gene_available=True,
|
220 |
+
is_trait_available=False,
|
221 |
+
is_biased=True, # Force a fallback so that it's flagged as unusable
|
222 |
+
df=pd.DataFrame(),
|
223 |
+
note=f"No trait data found for {cohort}, final metadata recorded."
|
224 |
+
)
|
225 |
+
# Per instructions, do not save a final linked data file when trait data is absent.
|
p1/preprocess/Chronic_Fatigue_Syndrome/code/GSE39684.py
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_Fatigue_Syndrome"
|
6 |
+
cohort = "GSE39684"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_Fatigue_Syndrome"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_Fatigue_Syndrome/GSE39684"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/GSE39684.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/gene_data/GSE39684.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/clinical_data/GSE39684.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_Fatigue_Syndrome/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Attempt to identify the paths to the SOFT file and the matrix file
|
22 |
+
try:
|
23 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
24 |
+
except AssertionError:
|
25 |
+
print("[WARNING] Could not find the expected '.soft' or '.matrix' files in the directory.")
|
26 |
+
soft_file, matrix_file = None, None
|
27 |
+
|
28 |
+
if soft_file is None or matrix_file is None:
|
29 |
+
print("[ERROR] Required GEO files are missing. Please check file names in the cohort directory.")
|
30 |
+
else:
|
31 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
32 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
33 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
34 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file,
|
35 |
+
background_prefixes,
|
36 |
+
clinical_prefixes)
|
37 |
+
|
38 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
39 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
40 |
+
|
41 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
42 |
+
print("Background Information:")
|
43 |
+
print(background_info)
|
44 |
+
print("\nSample Characteristics Dictionary:")
|
45 |
+
print(sample_characteristics_dict)
|
46 |
+
# 1. Gene Expression Data Availability
|
47 |
+
is_gene_available = True # It's a microarray (not purely miRNA or methylation), so assume gene data is present.
|
48 |
+
|
49 |
+
# 2. Variable Availability
|
50 |
+
# Inspecting the sample characteristics dictionary shows no entries for the Chronic_Fatigue_Syndrome trait,
|
51 |
+
# no age information, and no gender information. Hence, all of these rows are marked as None.
|
52 |
+
trait_row = None
|
53 |
+
age_row = None
|
54 |
+
gender_row = None
|
55 |
+
|
56 |
+
# 2.2 Data Type Conversion Functions
|
57 |
+
# Although data is unavailable, we still define the required conversion functions.
|
58 |
+
|
59 |
+
def convert_trait(value: str):
|
60 |
+
# No actual data for conversion; return None.
|
61 |
+
# If data existed, we would parse the substring after the colon and apply the logic to return a binary or continuous value.
|
62 |
+
return None
|
63 |
+
|
64 |
+
def convert_age(value: str):
|
65 |
+
# No actual data for conversion; return None.
|
66 |
+
return None
|
67 |
+
|
68 |
+
def convert_gender(value: str):
|
69 |
+
# No actual data for conversion; return None.
|
70 |
+
return None
|
71 |
+
|
72 |
+
# 3. Save Metadata with initial filtering
|
73 |
+
# Trait data is not available because trait_row is None.
|
74 |
+
is_trait_available = (trait_row is not None)
|
75 |
+
|
76 |
+
# Perform initial filtering and save metadata
|
77 |
+
validate_and_save_cohort_info(
|
78 |
+
is_final=False,
|
79 |
+
cohort=cohort,
|
80 |
+
info_path=json_path,
|
81 |
+
is_gene_available=is_gene_available,
|
82 |
+
is_trait_available=is_trait_available
|
83 |
+
)
|
84 |
+
|
85 |
+
# 4. Clinical Feature Extraction
|
86 |
+
# Since trait_row is None, we skip clinical feature extraction.
|
87 |
+
# STEP3
|
88 |
+
# Attempt to read gene expression data; if the library function yields an empty DataFrame,
|
89 |
+
# try re-reading without ignoring lines that start with '!' (because sometimes GEO data may
|
90 |
+
# place actual expression rows under lines that begin with '!').
|
91 |
+
|
92 |
+
gene_data = get_genetic_data(matrix_file)
|
93 |
+
if gene_data.empty:
|
94 |
+
print("[WARNING] The gene_data is empty. Attempting alternative loading without treating '!' as comments.")
|
95 |
+
import gzip
|
96 |
+
|
97 |
+
# Locate the marker line first
|
98 |
+
skip_rows = 0
|
99 |
+
with gzip.open(matrix_file, 'rt') as file:
|
100 |
+
for i, line in enumerate(file):
|
101 |
+
if "!series_matrix_table_begin" in line:
|
102 |
+
skip_rows = i + 1
|
103 |
+
break
|
104 |
+
|
105 |
+
# Read the data again, this time not treating '!' as comment
|
106 |
+
gene_data = pd.read_csv(
|
107 |
+
matrix_file,
|
108 |
+
compression="gzip",
|
109 |
+
skiprows=skip_rows,
|
110 |
+
delimiter="\t",
|
111 |
+
on_bad_lines="skip"
|
112 |
+
)
|
113 |
+
gene_data = gene_data.rename(columns={"ID_REF": "ID"}).astype({"ID": "str"})
|
114 |
+
gene_data.set_index("ID", inplace=True)
|
115 |
+
|
116 |
+
# Print the first 20 row IDs to confirm data structure
|
117 |
+
print(gene_data.index[:20])
|
118 |
+
# Based on inspection, these identifiers (like "10000-V3-70mer-rc") appear to be custom probe IDs
|
119 |
+
# and not standard human gene symbols. Therefore, they need to be mapped to gene symbols.
|
120 |
+
|
121 |
+
print("requires_gene_mapping = True")
|
122 |
+
# STEP5
|
123 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
124 |
+
gene_annotation = get_gene_annotation(soft_file)
|
125 |
+
|
126 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
127 |
+
print("Gene annotation preview:")
|
128 |
+
print(preview_df(gene_annotation))
|
129 |
+
# STEP: Gene Identifier Mapping
|
130 |
+
|
131 |
+
# 1. Determine which columns match.
|
132 |
+
# - "ID" in the annotation dataframe matches the IDs in the gene expression data
|
133 |
+
# - "GeneName" contains the corresponding gene information.
|
134 |
+
|
135 |
+
# 2. Extract the gene mapping dataframe.
|
136 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col="ID", gene_col="GeneName")
|
137 |
+
|
138 |
+
# 3. Convert probe-level data to gene-level data using the mapping.
|
139 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
140 |
+
import os
|
141 |
+
import pandas as pd
|
142 |
+
|
143 |
+
# STEP7: Data Normalization and Linking
|
144 |
+
|
145 |
+
# 1) Normalize the gene symbols in the previously obtained gene_data
|
146 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
147 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
148 |
+
|
149 |
+
# 2) Load clinical data only if it exists and is non-empty
|
150 |
+
if os.path.exists(out_clinical_data_file) and os.path.getsize(out_clinical_data_file) > 0:
|
151 |
+
# Read the file
|
152 |
+
clinical_temp = pd.read_csv(out_clinical_data_file)
|
153 |
+
|
154 |
+
# Adjust row index to label the trait, age, and gender properly
|
155 |
+
if clinical_temp.shape[0] == 3:
|
156 |
+
clinical_temp.index = [trait, "Age", "Gender"]
|
157 |
+
elif clinical_temp.shape[0] == 2:
|
158 |
+
clinical_temp.index = [trait, "Age"]
|
159 |
+
elif clinical_temp.shape[0] == 1:
|
160 |
+
clinical_temp.index = [trait]
|
161 |
+
|
162 |
+
# 2) Link the clinical and normalized genetic data
|
163 |
+
linked_data = geo_link_clinical_genetic_data(clinical_temp, normalized_gene_data)
|
164 |
+
|
165 |
+
# 3) Handle missing values
|
166 |
+
linked_data = handle_missing_values(linked_data, trait)
|
167 |
+
|
168 |
+
# 4) Check for severe bias in the trait; remove biased demographic features if present
|
169 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
170 |
+
|
171 |
+
# 5) Final quality validation and save metadata
|
172 |
+
is_usable = validate_and_save_cohort_info(
|
173 |
+
is_final=True,
|
174 |
+
cohort=cohort,
|
175 |
+
info_path=json_path,
|
176 |
+
is_gene_available=True,
|
177 |
+
is_trait_available=True,
|
178 |
+
is_biased=trait_biased,
|
179 |
+
df=linked_data,
|
180 |
+
note=f"Final check on {cohort} with {trait}."
|
181 |
+
)
|
182 |
+
|
183 |
+
# 6) If the linked data is usable, save it
|
184 |
+
if is_usable:
|
185 |
+
linked_data.to_csv(out_data_file)
|
186 |
+
else:
|
187 |
+
# If no valid clinical data file is found, finalize metadata indicating trait unavailability
|
188 |
+
is_usable = validate_and_save_cohort_info(
|
189 |
+
is_final=True,
|
190 |
+
cohort=cohort,
|
191 |
+
info_path=json_path,
|
192 |
+
is_gene_available=True,
|
193 |
+
is_trait_available=False,
|
194 |
+
is_biased=True, # Force a fallback so that it's flagged as unusable
|
195 |
+
df=pd.DataFrame(),
|
196 |
+
note=f"No trait data found for {cohort}, final metadata recorded."
|
197 |
+
)
|
198 |
+
# Per instructions, do not save a final linked data file when trait data is absent.
|
p1/preprocess/Chronic_Fatigue_Syndrome/code/GSE67311.py
ADDED
@@ -0,0 +1,233 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_Fatigue_Syndrome"
|
6 |
+
cohort = "GSE67311"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_Fatigue_Syndrome"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_Fatigue_Syndrome/GSE67311"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/GSE67311.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/gene_data/GSE67311.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/clinical_data/GSE67311.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_Fatigue_Syndrome/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Attempt to identify the paths to the SOFT file and the matrix file
|
22 |
+
try:
|
23 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
24 |
+
except AssertionError:
|
25 |
+
print("[WARNING] Could not find the expected '.soft' or '.matrix' files in the directory.")
|
26 |
+
soft_file, matrix_file = None, None
|
27 |
+
|
28 |
+
if soft_file is None or matrix_file is None:
|
29 |
+
print("[ERROR] Required GEO files are missing. Please check file names in the cohort directory.")
|
30 |
+
else:
|
31 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
32 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
33 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
34 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file,
|
35 |
+
background_prefixes,
|
36 |
+
clinical_prefixes)
|
37 |
+
|
38 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
39 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
40 |
+
|
41 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
42 |
+
print("Background Information:")
|
43 |
+
print(background_info)
|
44 |
+
print("\nSample Characteristics Dictionary:")
|
45 |
+
print(sample_characteristics_dict)
|
46 |
+
import pandas as pd
|
47 |
+
import numpy as np
|
48 |
+
|
49 |
+
# 1. Gene Expression Data Availability
|
50 |
+
# Based on the background information, this dataset uses an Affymetrix Gene 1.1 ST array,
|
51 |
+
# indicating it is gene expression data.
|
52 |
+
is_gene_available = True
|
53 |
+
|
54 |
+
# 2. Variable Availability and Data Type Conversion
|
55 |
+
|
56 |
+
# From the sample characteristics dictionary in the provided output, we see:
|
57 |
+
# - For "Chronic_Fatigue_Syndrome", data is found at row 8 with multiple values ("Yes", "No", "-", nan).
|
58 |
+
# - No row for "age".
|
59 |
+
# - No row for "gender".
|
60 |
+
|
61 |
+
trait_row = 8
|
62 |
+
age_row = None
|
63 |
+
gender_row = None
|
64 |
+
|
65 |
+
# 2.2 Data Type Conversion
|
66 |
+
# "Chronic_Fatigue_Syndrome" is a binary variable (Yes/No).
|
67 |
+
def convert_trait(value):
|
68 |
+
if not isinstance(value, str):
|
69 |
+
return None
|
70 |
+
parts = value.split(':', 1)
|
71 |
+
if len(parts) < 2:
|
72 |
+
return None
|
73 |
+
val = parts[1].strip().lower()
|
74 |
+
if val == 'yes':
|
75 |
+
return 1
|
76 |
+
elif val == 'no':
|
77 |
+
return 0
|
78 |
+
# Handle missing or ambiguous values
|
79 |
+
return None
|
80 |
+
|
81 |
+
# Since we do not have age or gender data, we define dummy functions returning None.
|
82 |
+
def convert_age(value):
|
83 |
+
return None
|
84 |
+
|
85 |
+
def convert_gender(value):
|
86 |
+
return None
|
87 |
+
|
88 |
+
# 3. Save Metadata with initial filtering
|
89 |
+
is_trait_available = (trait_row is not None)
|
90 |
+
_ = validate_and_save_cohort_info(
|
91 |
+
is_final=False,
|
92 |
+
cohort=cohort,
|
93 |
+
info_path=json_path,
|
94 |
+
is_gene_available=is_gene_available,
|
95 |
+
is_trait_available=is_trait_available
|
96 |
+
)
|
97 |
+
|
98 |
+
# 4. Clinical Feature Extraction (only if trait_row is not None)
|
99 |
+
if trait_row is not None:
|
100 |
+
# Assume "clinical_data" is the DataFrame containing the characteristics, already in scope.
|
101 |
+
selected_clinical_df = geo_select_clinical_features(
|
102 |
+
clinical_df=clinical_data,
|
103 |
+
trait=trait,
|
104 |
+
trait_row=trait_row,
|
105 |
+
convert_trait=convert_trait,
|
106 |
+
age_row=age_row,
|
107 |
+
convert_age=None,
|
108 |
+
gender_row=gender_row,
|
109 |
+
convert_gender=None
|
110 |
+
)
|
111 |
+
preview = preview_df(selected_clinical_df)
|
112 |
+
print("Preview of Clinical Features:")
|
113 |
+
print(preview)
|
114 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
115 |
+
# STEP3
|
116 |
+
# Attempt to read gene expression data; if the library function yields an empty DataFrame,
|
117 |
+
# try re-reading without ignoring lines that start with '!' (because sometimes GEO data may
|
118 |
+
# place actual expression rows under lines that begin with '!').
|
119 |
+
|
120 |
+
gene_data = get_genetic_data(matrix_file)
|
121 |
+
if gene_data.empty:
|
122 |
+
print("[WARNING] The gene_data is empty. Attempting alternative loading without treating '!' as comments.")
|
123 |
+
import gzip
|
124 |
+
|
125 |
+
# Locate the marker line first
|
126 |
+
skip_rows = 0
|
127 |
+
with gzip.open(matrix_file, 'rt') as file:
|
128 |
+
for i, line in enumerate(file):
|
129 |
+
if "!series_matrix_table_begin" in line:
|
130 |
+
skip_rows = i + 1
|
131 |
+
break
|
132 |
+
|
133 |
+
# Read the data again, this time not treating '!' as comment
|
134 |
+
gene_data = pd.read_csv(
|
135 |
+
matrix_file,
|
136 |
+
compression="gzip",
|
137 |
+
skiprows=skip_rows,
|
138 |
+
delimiter="\t",
|
139 |
+
on_bad_lines="skip"
|
140 |
+
)
|
141 |
+
gene_data = gene_data.rename(columns={"ID_REF": "ID"}).astype({"ID": "str"})
|
142 |
+
gene_data.set_index("ID", inplace=True)
|
143 |
+
|
144 |
+
# Print the first 20 row IDs to confirm data structure
|
145 |
+
print(gene_data.index[:20])
|
146 |
+
# Based on biomedical knowledge and the numeric nature of these identifiers,
|
147 |
+
# they are not standard human gene symbols and require mapping to gene symbols.
|
148 |
+
|
149 |
+
requires_gene_mapping = True
|
150 |
+
# STEP5
|
151 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
152 |
+
gene_annotation = get_gene_annotation(soft_file)
|
153 |
+
|
154 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
155 |
+
print("Gene annotation preview:")
|
156 |
+
print(preview_df(gene_annotation))
|
157 |
+
# STEP: Gene Identifier Mapping
|
158 |
+
|
159 |
+
# 1. Identify which columns in the annotation are equivalent to the expression data IDs and which store gene symbols.
|
160 |
+
# From the preview, the "ID" column corresponds to the expression data IDs,
|
161 |
+
# and the "gene_assignment" column contains the gene symbol information.
|
162 |
+
probe_id_column = "ID"
|
163 |
+
gene_symbol_column = "gene_assignment"
|
164 |
+
|
165 |
+
# 2. Get the gene mapping dataframe by extracting these two columns.
|
166 |
+
mapping_df = get_gene_mapping(gene_annotation, probe_id_column, gene_symbol_column)
|
167 |
+
|
168 |
+
# 3. Convert probe-level measurements to gene-level expression data.
|
169 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
170 |
+
|
171 |
+
# For inspection, let's check the shape of the resulting gene_data.
|
172 |
+
print("Mapped gene expression data shape:", gene_data.shape)
|
173 |
+
print("First 5 rows of mapped gene expression data:")
|
174 |
+
print(gene_data.head())
|
175 |
+
import os
|
176 |
+
import pandas as pd
|
177 |
+
|
178 |
+
# STEP7: Data Normalization and Linking
|
179 |
+
|
180 |
+
# 1) Normalize the gene symbols in the previously obtained gene_data
|
181 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
182 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
183 |
+
|
184 |
+
# 2) Load clinical data only if it exists and is non-empty
|
185 |
+
if os.path.exists(out_clinical_data_file) and os.path.getsize(out_clinical_data_file) > 0:
|
186 |
+
# Read the file
|
187 |
+
clinical_temp = pd.read_csv(out_clinical_data_file)
|
188 |
+
|
189 |
+
# Adjust row index to label the trait, age, and gender properly
|
190 |
+
if clinical_temp.shape[0] == 3:
|
191 |
+
clinical_temp.index = [trait, "Age", "Gender"]
|
192 |
+
elif clinical_temp.shape[0] == 2:
|
193 |
+
clinical_temp.index = [trait, "Age"]
|
194 |
+
elif clinical_temp.shape[0] == 1:
|
195 |
+
clinical_temp.index = [trait]
|
196 |
+
|
197 |
+
# 2) Link the clinical and normalized genetic data
|
198 |
+
linked_data = geo_link_clinical_genetic_data(clinical_temp, normalized_gene_data)
|
199 |
+
|
200 |
+
# 3) Handle missing values
|
201 |
+
linked_data = handle_missing_values(linked_data, trait)
|
202 |
+
|
203 |
+
# 4) Check for severe bias in the trait; remove biased demographic features if present
|
204 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
205 |
+
|
206 |
+
# 5) Final quality validation and save metadata
|
207 |
+
is_usable = validate_and_save_cohort_info(
|
208 |
+
is_final=True,
|
209 |
+
cohort=cohort,
|
210 |
+
info_path=json_path,
|
211 |
+
is_gene_available=True,
|
212 |
+
is_trait_available=True,
|
213 |
+
is_biased=trait_biased,
|
214 |
+
df=linked_data,
|
215 |
+
note=f"Final check on {cohort} with {trait}."
|
216 |
+
)
|
217 |
+
|
218 |
+
# 6) If the linked data is usable, save it
|
219 |
+
if is_usable:
|
220 |
+
linked_data.to_csv(out_data_file)
|
221 |
+
else:
|
222 |
+
# If no valid clinical data file is found, finalize metadata indicating trait unavailability
|
223 |
+
is_usable = validate_and_save_cohort_info(
|
224 |
+
is_final=True,
|
225 |
+
cohort=cohort,
|
226 |
+
info_path=json_path,
|
227 |
+
is_gene_available=True,
|
228 |
+
is_trait_available=False,
|
229 |
+
is_biased=True, # Force a fallback so that it's flagged as unusable
|
230 |
+
df=pd.DataFrame(),
|
231 |
+
note=f"No trait data found for {cohort}, final metadata recorded."
|
232 |
+
)
|
233 |
+
# Per instructions, do not save a final linked data file when trait data is absent.
|
p1/preprocess/Chronic_Fatigue_Syndrome/code/TCGA.py
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_Fatigue_Syndrome"
|
6 |
+
|
7 |
+
# Input paths
|
8 |
+
tcga_root_dir = "../DATA/TCGA"
|
9 |
+
|
10 |
+
# Output paths
|
11 |
+
out_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/TCGA.csv"
|
12 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/gene_data/TCGA.csv"
|
13 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_Fatigue_Syndrome/clinical_data/TCGA.csv"
|
14 |
+
json_path = "./output/preprocess/1/Chronic_Fatigue_Syndrome/cohort_info.json"
|
15 |
+
|
16 |
+
import os
|
17 |
+
import pandas as pd
|
18 |
+
|
19 |
+
# Step 1: Check directories in tcga_root_dir for anything relevant to "Chronic_Fatigue_Syndrome"
|
20 |
+
search_terms = [
|
21 |
+
"chronic_fatigue_syndrome",
|
22 |
+
"chronic fatigue syndrome",
|
23 |
+
"myalgic encephalomyelitis",
|
24 |
+
"cfs"
|
25 |
+
]
|
26 |
+
|
27 |
+
dir_list = os.listdir(tcga_root_dir)
|
28 |
+
matching_dir = None
|
29 |
+
|
30 |
+
for d in dir_list:
|
31 |
+
d_lower = d.lower()
|
32 |
+
if any(term in d_lower for term in search_terms):
|
33 |
+
matching_dir = d
|
34 |
+
break
|
35 |
+
|
36 |
+
if matching_dir is None:
|
37 |
+
# No matching directory found for Chronic Fatigue Syndrome, so mark the dataset as skipped.
|
38 |
+
validate_and_save_cohort_info(
|
39 |
+
is_final=False,
|
40 |
+
cohort="TCGA_Chronic_Fatigue_Syndrome",
|
41 |
+
info_path=json_path,
|
42 |
+
is_gene_available=False,
|
43 |
+
is_trait_available=False
|
44 |
+
)
|
45 |
+
else:
|
46 |
+
# 2. Identify the clinicalMatrix and PANCAN files
|
47 |
+
cohort_dir = os.path.join(tcga_root_dir, matching_dir)
|
48 |
+
clinical_file_path, genetic_file_path = tcga_get_relevant_filepaths(cohort_dir)
|
49 |
+
|
50 |
+
# 3. Load both data files
|
51 |
+
clinical_df = pd.read_csv(clinical_file_path, index_col=0, sep='\t')
|
52 |
+
genetic_df = pd.read_csv(genetic_file_path, index_col=0, sep='\t')
|
53 |
+
|
54 |
+
# 4. Print the column names of the clinical data
|
55 |
+
print("Clinical Data Columns:")
|
56 |
+
print(clinical_df.columns.tolist())
|
p1/preprocess/Chronic_Fatigue_Syndrome/cohort_info.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"GSE67311": {"is_usable": true, "is_gene_available": true, "is_trait_available": true, "is_available": true, "is_biased": false, "has_age": false, "has_gender": false, "sample_size": 133, "note": "Final check on GSE67311 with Chronic_Fatigue_Syndrome."}, "GSE39684": {"is_usable": false, "is_gene_available": false, "is_trait_available": false, "is_available": false, "is_biased": null, "has_age": null, "has_gender": null, "sample_size": null, "note": "No trait data found for GSE39684, final metadata recorded."}, "GSE251792": {"is_usable": true, "is_gene_available": true, "is_trait_available": true, "is_available": true, "is_biased": false, "has_age": true, "has_gender": true, "sample_size": 84, "note": "Final check on GSE251792 with Chronic_Fatigue_Syndrome."}, "TCGA_Celiac_Disease": {"is_usable": false, "is_gene_available": false, "is_trait_available": false, "is_available": false, "is_biased": null, "has_age": null, "has_gender": null, "sample_size": null, "note": null}, "TCGA_Chronic_Fatigue_Syndrome": {"is_usable": false, "is_gene_available": false, "is_trait_available": false, "is_available": false, "is_biased": null, "has_age": null, "has_gender": null, "sample_size": null, "note": null}}
|
p1/preprocess/Chronic_Fatigue_Syndrome/gene_data/GSE251792.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Chronic_Fatigue_Syndrome/gene_data/GSE39684.csv
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Gene,GSM977688,GSM977689,GSM977690,GSM977691,GSM977692,GSM977693,GSM977694,GSM977695,GSM977696,GSM977697,GSM977698,GSM977699,GSM977700,GSM977701,GSM977702,GSM977703,GSM977704,GSM977705,GSM977706,GSM977707,GSM977708,GSM977709,GSM977710,GSM977711,GSM977712,GSM977713,GSM977714,GSM977715,GSM977716,GSM977717,GSM977718,GSM977719,GSM977720,GSM977721,GSM977722,GSM977723,GSM977724,GSM977725,GSM977726,GSM977727,GSM977728,GSM977729,GSM977730,GSM977731,GSM977732,GSM977733,GSM977734,GSM977735,GSM977736,GSM977737,GSM977738,GSM977739,GSM977740,GSM977741,GSM977742,GSM977743,GSM977744,GSM977745,GSM977746,GSM977747,GSM977748,GSM977749,GSM977750
|
p1/preprocess/Chronic_kidney_disease/GSE142153.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Chronic_kidney_disease/GSE66494.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6820f7f04e54ec5400be4d4b2d44f52f2b3ba65e7b0b42fd06cb86fd293d8818
|
3 |
+
size 14316050
|
p1/preprocess/Chronic_kidney_disease/clinical_data/GSE104948.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM2810645,GSM2810646,GSM2810647,GSM2810648,GSM2810649,GSM2810650,GSM2810651,GSM2810652,GSM2810653,GSM2810654,GSM2810655,GSM2810656,GSM2810657,GSM2810658,GSM2810659,GSM2810660,GSM2810661,GSM2810662,GSM2810663,GSM2810664,GSM2810665,GSM2810666,GSM2810667,GSM2810668,GSM2810669,GSM2810670,GSM2810671,GSM2810672,GSM2810673,GSM2810674,GSM2810675,GSM2810676,GSM2810677,GSM2810678,GSM2810679,GSM2810680,GSM2810681,GSM2810682,GSM2810683,GSM2810684,GSM2810685,GSM2810686,GSM2810687,GSM2810688,GSM2810689,GSM2810690,GSM2810691,GSM2810692,GSM2810693,GSM2810694,GSM2810695,GSM2810696,GSM2810697,GSM2810698,GSM2810699,GSM2810700,GSM2810701,GSM2810702,GSM2810703,GSM2810704,GSM2810705,GSM2810706,GSM2810707,GSM2810708,GSM2810709,GSM2810710,GSM2810711,GSM2810712,GSM2810713,GSM2810714,GSM2810715,GSM2810716,GSM2810717,GSM2810718,GSM2810719,GSM2810720,GSM2810721,GSM2810722,GSM2810723,GSM2810724,GSM2810725,GSM2810726,GSM2810727,GSM2810728,GSM2810729,GSM2810730,GSM2810731,GSM2810732,GSM2810733,GSM2810734,GSM2810735,GSM2810736,GSM2810737,GSM2810738,GSM2810739,GSM2810740,GSM2810741,GSM2810742,GSM2810743,GSM2810744,GSM2810745,GSM2810746,GSM2810747,GSM2810748,GSM2810749,GSM2810750,GSM2810751,GSM2810752,GSM2810753,GSM2810754,GSM2810755,GSM2810756,GSM2810757,GSM2810758,GSM2810759,GSM2810760,GSM2810761,GSM2810762,GSM2810763,GSM2810764,GSM2810765,GSM2810766,GSM2810767,GSM2810768,GSM2810769
|
2 |
+
1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,,,,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
p1/preprocess/Chronic_kidney_disease/clinical_data/GSE104954.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM2810894,GSM2810895,GSM2810896,GSM2810897,GSM2810898,GSM2810899,GSM2810900,GSM2810901,GSM2810902,GSM2810903,GSM2810904,GSM2810905,GSM2810906,GSM2810907,GSM2810908,GSM2810909,GSM2810910,GSM2810911,GSM2810912,GSM2810913,GSM2810914,GSM2810915,GSM2810916,GSM2810917,GSM2810918,GSM2810919,GSM2810920,GSM2810921,GSM2810922,GSM2810923,GSM2810924,GSM2810925,GSM2810926,GSM2810927,GSM2810928,GSM2810929,GSM2810930,GSM2810931,GSM2810932,GSM2810933,GSM2810934,GSM2810935,GSM2810936,GSM2810937,GSM2810938,GSM2810939,GSM2810940,GSM2810941,GSM2810942,GSM2810943,GSM2810944,GSM2810945,GSM2810946,GSM2810947,GSM2810948,GSM2810949,GSM2810950,GSM2810951,GSM2810952,GSM2810953,GSM2810954,GSM2810955,GSM2810956,GSM2810957,GSM2810958,GSM2810959,GSM2810960,GSM2810961,GSM2810962,GSM2810963,GSM2810964,GSM2810965,GSM2810966,GSM2810967,GSM2810968,GSM2810969,GSM2810970,GSM2810971,GSM2810972,GSM2810973,GSM2810974,GSM2810975,GSM2810976,GSM2810977,GSM2810978,GSM2810979,GSM2810980,GSM2810981,GSM2810982,GSM2810983,GSM2810984,GSM2810985,GSM2810986,GSM2810987,GSM2810988,GSM2810989,GSM2810990,GSM2810991,GSM2810992,GSM2810993,GSM2810994,GSM2810995,GSM2810996,GSM2810997,GSM2810998,GSM2810999,GSM2811000,GSM2811001,GSM2811002,GSM2811003,GSM2811004,GSM2811005,GSM2811006,GSM2811007,GSM2811008,GSM2811009,GSM2811010,GSM2811011,GSM2811012,GSM2811013,GSM2811014,GSM2811015,GSM2811016,GSM2811017,GSM2811018,GSM2811019,GSM2811020,GSM2811021,GSM2811022,GSM2811023,GSM2811024,GSM2811025,GSM2811026,GSM2811027,GSM2811028
|
2 |
+
1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,,,
|
p1/preprocess/Chronic_kidney_disease/clinical_data/GSE127136.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM3625775,GSM3625776,GSM3625777,GSM3625778,GSM3625779,GSM3625780,GSM3625781,GSM3625782,GSM3625783,GSM3625784,GSM3625785,GSM3625786,GSM3625787,GSM3625788,GSM3625789,GSM3625790,GSM3625791,GSM3625792,GSM3625793,GSM3625794,GSM3625795,GSM3625796,GSM3625797,GSM3625798,GSM3625799,GSM3625800,GSM3625801,GSM3625802,GSM3625803,GSM3625804,GSM3625805,GSM3625806,GSM3625807,GSM3625808,GSM3625809,GSM3625810,GSM3625811,GSM3625812,GSM3625813,GSM3625814,GSM3625815,GSM3625816,GSM3625817,GSM3625818,GSM3625819,GSM3625820,GSM3625821,GSM3625822,GSM3625823,GSM3625824,GSM3625825,GSM3625826,GSM3625827,GSM3625828,GSM3625829,GSM3625830,GSM3625831,GSM3625832,GSM3625833,GSM3625834,GSM3625835,GSM3625836,GSM3625837,GSM3625838,GSM3625839,GSM3625840,GSM3625841,GSM3625842,GSM3625843,GSM3625844,GSM3625845,GSM3625846,GSM3625847,GSM3625848,GSM3625849,GSM3625850,GSM3625851,GSM3625852,GSM3625853,GSM3625854,GSM3625855,GSM3625856,GSM3625857,GSM3625858,GSM3625859,GSM3625860,GSM3625861,GSM3625862,GSM3625863,GSM3625864,GSM3625865,GSM3625866,GSM3625867,GSM3625868,GSM3625869,GSM3625870,GSM3625871,GSM3625872,GSM3625873,GSM3625874,GSM3625875,GSM3625876,GSM3625877,GSM3625878,GSM3625879,GSM3625880,GSM3625881,GSM3625882,GSM3625883,GSM3625884,GSM3625885,GSM3625886,GSM3625887,GSM3625888,GSM3625889,GSM3625890,GSM3625891,GSM3625892,GSM3625893,GSM3625894,GSM3625895,GSM3625896,GSM3625897,GSM3625898,GSM3625899,GSM3625900,GSM3625901,GSM3625902,GSM3625903,GSM3625904,GSM3625905,GSM3625906,GSM3625907,GSM3625908,GSM3625909,GSM3625910,GSM3625911,GSM3625912,GSM3625913,GSM3625914,GSM3625915,GSM3625916,GSM3625917,GSM3625918,GSM3625919,GSM3625920,GSM3625921,GSM3625922,GSM3625923,GSM3625924,GSM3625925,GSM3625926,GSM3625927,GSM3625928,GSM3625929,GSM3625930,GSM3625931,GSM3625932,GSM3625933,GSM3625934,GSM3625935,GSM3625936,GSM3625937,GSM3625938,GSM3625939,GSM3625940,GSM3625941,GSM3625942,GSM3625943,GSM3625944,GSM3625945,GSM3625946,GSM3625947,GSM3625948,GSM3625949,GSM3625950,GSM3625951,GSM3625952,GSM3625953,GSM3625954,GSM3625955,GSM3625956,GSM3625957,GSM3625958,GSM3625959,GSM3625960,GSM3625961,GSM3625962,GSM3625963,GSM3625964,GSM3625965,GSM3625966,GSM3625967,GSM3625968,GSM3625969,GSM3625970,GSM3625971,GSM3625972,GSM3625973,GSM3625974,GSM3625975,GSM3625976,GSM3625977,GSM3625978,GSM3625979,GSM3625980,GSM3625981,GSM3625982,GSM3625983,GSM3625984,GSM3625985,GSM3625986,GSM3625987,GSM3625988,GSM3625989,GSM3625990,GSM3625991,GSM3625992,GSM3625993,GSM3625994,GSM3625995,GSM3625996,GSM3625997,GSM3625998,GSM3625999,GSM3626000,GSM3626001,GSM3626002,GSM3626003,GSM3626004,GSM3626005,GSM3626006,GSM3626007,GSM3626008,GSM3626009,GSM3626010,GSM3626011,GSM3626012,GSM3626013,GSM3626014,GSM3626015,GSM3626016,GSM3626017,GSM3626018,GSM3626019,GSM3626020,GSM3626021,GSM3626022,GSM3626023,GSM3626024,GSM3626025,GSM3626026,GSM3626027,GSM3626028,GSM3626029,GSM3626030,GSM3626031,GSM3626032,GSM3626033,GSM3626034,GSM3626035,GSM3626036,GSM3626037,GSM3626038,GSM3626039,GSM3626040,GSM3626041,GSM3626042,GSM3626043,GSM3626044,GSM3626045,GSM3626046,GSM3626047,GSM3626048,GSM3626049,GSM3626050,GSM3626051,GSM3626052,GSM3626053,GSM3626054,GSM3626055,GSM3626056,GSM3626057,GSM3626058,GSM3626059,GSM3626060,GSM3626061,GSM3626062,GSM3626063,GSM3626064,GSM3626065,GSM3626066,GSM3626067,GSM3626068,GSM3626069,GSM3626070,GSM3626071,GSM3626072,GSM3626073,GSM3626074,GSM3626075,GSM3626076,GSM3626077,GSM3626078,GSM3626079,GSM3626080,GSM3626081,GSM3626082,GSM3626083,GSM3626084,GSM3626085,GSM3626086,GSM3626087,GSM3626088,GSM3626089,GSM3626090,GSM3626091,GSM3626092,GSM3626093,GSM3626094,GSM3626095,GSM3626096,GSM3626097,GSM3626098,GSM3626099,GSM3626100,GSM3626101,GSM3626102,GSM3626103,GSM3626104,GSM3626105,GSM3626106,GSM3626107,GSM3626108,GSM3626109,GSM3626110,GSM3626111,GSM3626112,GSM3626113,GSM3626114,GSM3626115,GSM3626116,GSM3626117,GSM3626118,GSM3626119,GSM3626120,GSM3626121,GSM3626122,GSM3626123,GSM3626124,GSM3626125,GSM3626126,GSM3626127,GSM3626128,GSM3626129,GSM3626130,GSM3626131,GSM3626132,GSM3626133,GSM3626134,GSM3626135,GSM3626136,GSM3626137,GSM3626138,GSM3626139,GSM3626140,GSM3626141,GSM3626142,GSM3626143,GSM3626144,GSM3626145,GSM3626146,GSM3626147,GSM3626148,GSM3626149,GSM3626150,GSM3626151,GSM3626152,GSM3626153,GSM3626154,GSM3626155,GSM3626156,GSM3626157,GSM3626158,GSM3626159,GSM3626160,GSM3626161,GSM3626162,GSM3626163,GSM3626164,GSM3626165,GSM3626166,GSM3626167,GSM3626168,GSM3626169,GSM3626170,GSM3626171,GSM3626172,GSM3626173,GSM3626174,GSM3626175,GSM3626176,GSM3626177,GSM3626178,GSM3626179,GSM3626180,GSM3626181,GSM3626182,GSM3626183,GSM3626184,GSM3626185,GSM3626186,GSM3626187,GSM3626188,GSM3626189,GSM3626190,GSM3626191,GSM3626192,GSM3626193,GSM3626194,GSM3626195,GSM3626196,GSM3626197,GSM3626198,GSM3626199,GSM3626200,GSM3626201,GSM3626202,GSM3626203,GSM3626204,GSM3626205,GSM3626206,GSM3626207,GSM3626208,GSM3626209,GSM3626210,GSM3626211,GSM3626212,GSM3626213,GSM3626214,GSM3626215,GSM3626216,GSM3626217,GSM3626218,GSM3626219,GSM3626220,GSM3626221,GSM3626222,GSM3626223,GSM3626224,GSM3626225,GSM3626226,GSM3626227,GSM3626228,GSM3626229,GSM3626230,GSM3626231,GSM3626232,GSM3626233,GSM3626234,GSM3626235,GSM3626236,GSM3626237,GSM3626238,GSM3626239,GSM3626240,GSM3626241,GSM3626242,GSM3626243,GSM3626244,GSM3626245,GSM3626246,GSM3626247,GSM3626248,GSM3626249,GSM3626250,GSM3626251,GSM3626252,GSM3626253,GSM3626254,GSM3626255,GSM3626256,GSM3626257,GSM3626258,GSM3626259,GSM3626260,GSM3626261,GSM3626262,GSM3626263,GSM3626264,GSM3626265,GSM3626266,GSM3626267,GSM3626268,GSM3626269,GSM3626270,GSM3626271,GSM3626272,GSM3626273,GSM3626274,GSM3626275,GSM3626276,GSM3626277,GSM3626278,GSM3626279,GSM3626280,GSM3626281,GSM3626282,GSM3626283,GSM3626284,GSM3626285,GSM3626286,GSM3626287,GSM3626288,GSM3626289,GSM3626290,GSM3626291,GSM3626292,GSM3626293,GSM3626294,GSM3626295,GSM3626296,GSM3626297,GSM3626298,GSM3626299,GSM3626300,GSM3626301,GSM3626302,GSM3626303,GSM3626304,GSM3626305,GSM3626306,GSM3626307,GSM3626308,GSM3626309,GSM3626310,GSM3626311,GSM3626312,GSM3626313,GSM3626314,GSM3626315,GSM3626316,GSM3626317,GSM3626318,GSM3626319,GSM3626320,GSM3626321,GSM3626322,GSM3626323,GSM3626324,GSM3626325,GSM3626326,GSM3626327,GSM3626328,GSM3626329,GSM3626330,GSM3626331,GSM3626332,GSM3626333,GSM3626334,GSM3626335,GSM3626336,GSM3626337,GSM3626338,GSM3626339,GSM3626340,GSM3626341,GSM3626342,GSM3626343,GSM3626344,GSM3626345,GSM3626346,GSM3626347,GSM3626348,GSM3626349,GSM3626350,GSM3626351,GSM3626352,GSM3626353,GSM3626354,GSM3626355,GSM3626356,GSM3626357,GSM3626358,GSM3626359,GSM3626360,GSM3626361,GSM3626362,GSM3626363,GSM3626364,GSM3626365,GSM3626366,GSM3626367,GSM3626368,GSM3626369,GSM3626370,GSM3626371,GSM3626372,GSM3626373,GSM3626374,GSM3626375,GSM3626376,GSM3626377,GSM3626378,GSM3626379,GSM3626380,GSM3626381,GSM3626382,GSM3626383,GSM3626384,GSM3626385,GSM3626386,GSM3626387,GSM3626388,GSM3626389,GSM3626390,GSM3626391,GSM3626392,GSM3626393,GSM3626394,GSM3626395,GSM3626396,GSM3626397,GSM3626398,GSM3626399,GSM3626400,GSM3626401,GSM3626402,GSM3626403,GSM3626404,GSM3626405,GSM3626406,GSM3626407,GSM3626408,GSM3626409,GSM3626410,GSM3626411,GSM3626412,GSM3626413,GSM3626414,GSM3626415,GSM3626416,GSM3626417,GSM3626418,GSM3626419,GSM3626420,GSM3626421,GSM3626422,GSM3626423,GSM3626424,GSM3626425,GSM3626426,GSM3626427,GSM3626428,GSM3626429,GSM3626430,GSM3626431,GSM3626432,GSM3626433,GSM3626434,GSM3626435,GSM3626436,GSM3626437,GSM3626438,GSM3626439,GSM3626440,GSM3626441,GSM3626442,GSM3626443,GSM3626444,GSM3626445,GSM3626446,GSM3626447,GSM3626448,GSM3626449,GSM3626450,GSM3626451,GSM3626452,GSM3626453,GSM3626454,GSM3626455,GSM3626456,GSM3626457,GSM3626458,GSM3626459,GSM3626460,GSM3626461,GSM3626462,GSM3626463,GSM3626464,GSM3626465,GSM3626466,GSM3626467,GSM3626468,GSM3626469,GSM3626470,GSM3626471,GSM3626472,GSM3626473,GSM3626474,GSM3626475,GSM3626476,GSM3626477,GSM3626478,GSM3626479,GSM3626480,GSM3626481,GSM3626482,GSM3626483,GSM3626484,GSM3626485,GSM3626486,GSM3626487,GSM3626488,GSM3626489,GSM3626490,GSM3626491,GSM3626492,GSM3626493,GSM3626494,GSM3626495,GSM3626496,GSM3626497,GSM3626498,GSM3626499,GSM3626500,GSM3626501,GSM3626502,GSM3626503,GSM3626504,GSM3626505,GSM3626506,GSM3626507,GSM3626508,GSM3626509,GSM3626510,GSM3626511,GSM3626512,GSM3626513,GSM3626514,GSM3626515,GSM3626516,GSM3626517,GSM3626518,GSM3626519,GSM3626520,GSM3626521,GSM3626522,GSM3626523,GSM3626524,GSM3626525,GSM3626526,GSM3626527,GSM3626528,GSM3626529,GSM3626530,GSM3626531,GSM3626532,GSM3626533,GSM3626534,GSM3626535,GSM3626536,GSM3626537,GSM3626538,GSM3626539,GSM3626540,GSM3626541,GSM3626542,GSM3626543,GSM3626544,GSM3626545,GSM3626546,GSM3626547,GSM3626548,GSM3626549,GSM3626550,GSM3626551,GSM3626552,GSM3626553,GSM3626554,GSM3626555,GSM3626556,GSM3626557,GSM3626558,GSM3626559,GSM3626560,GSM3626561,GSM3626562,GSM3626563,GSM3626564,GSM3626565,GSM3626566,GSM3626567,GSM3626568,GSM3626569,GSM3626570,GSM3626571,GSM3626572,GSM3626573,GSM3626574,GSM3626575,GSM3626576,GSM3626577,GSM3626578,GSM3626579,GSM3626580,GSM3626581,GSM3626582,GSM3626583,GSM3626584,GSM3626585,GSM3626586,GSM3626587,GSM3626588,GSM3626589,GSM3626590,GSM3626591,GSM3626592,GSM3626593,GSM3626594,GSM3626595,GSM3626596,GSM3626597,GSM3626598,GSM3626599,GSM3626600,GSM3626601,GSM3626603,GSM3626604,GSM3626606,GSM3626607,GSM3626608,GSM3626609,GSM3626610,GSM3626611,GSM3626612,GSM3626613,GSM3626614,GSM3626615,GSM3626616,GSM3626617,GSM3626618,GSM3626619,GSM3626620,GSM3626621,GSM3626622,GSM3626623,GSM3626624,GSM3626625,GSM3626626,GSM3626627,GSM3626628,GSM3626629,GSM3626630,GSM3626631,GSM3626632,GSM3626633,GSM3626634,GSM3626635,GSM3626636,GSM3626637,GSM3626638,GSM3626639,GSM3626640,GSM3626641,GSM3626642,GSM3626643,GSM3626644,GSM3626645,GSM3626646,GSM3626647,GSM3626648,GSM3626649,GSM3626650,GSM3626651,GSM3626652,GSM3626653,GSM3626654,GSM3626655,GSM3626656,GSM3626657,GSM3626658,GSM3626659,GSM3626660,GSM3626661,GSM3626662,GSM3626663,GSM3626664,GSM3626665,GSM3626666,GSM3626667,GSM3626668,GSM3626669,GSM3626670,GSM3626671,GSM3626672,GSM3626673,GSM3626674,GSM3626675,GSM3626676,GSM3626677,GSM3626678,GSM3626679,GSM3626680,GSM3626681,GSM3626682,GSM3626683,GSM3626684,GSM3626685,GSM3626686,GSM3626687,GSM3626688,GSM3626689,GSM3626690,GSM3626691,GSM3626692,GSM3626693,GSM3626694,GSM3626695,GSM3626696,GSM3626697,GSM3626698,GSM3626699,GSM3626700,GSM3626701,GSM3626702,GSM3626703,GSM3626704,GSM3626705,GSM3626706,GSM3626707,GSM3626708,GSM3626709,GSM3626710,GSM3626711,GSM3626712,GSM3626713,GSM3626714,GSM3626715,GSM3626716,GSM3626717,GSM3626718,GSM3626719,GSM3626720,GSM3626721,GSM3626722,GSM3626723,GSM3626724,GSM3626725,GSM3626726,GSM3626727,GSM3626728,GSM3626729,GSM3626730,GSM3626731,GSM3626732,GSM3626733,GSM3626734,GSM3626735,GSM3626736,GSM3626737,GSM3626738,GSM3626739,GSM3626740,GSM3626741,GSM3626742,GSM3626743,GSM3626744,GSM3626745,GSM3626746,GSM3626747,GSM3626748,GSM3626749,GSM3626750,GSM3626751,GSM3626752,GSM3626753,GSM3626754,GSM3626755,GSM3626756,GSM3626757,GSM3626758,GSM3626759,GSM3626760,GSM3626761,GSM3626762,GSM3626763,GSM3626764,GSM3626765,GSM3626766,GSM3626767,GSM3626768,GSM3626769,GSM3626770,GSM3626771,GSM3626772,GSM3626773,GSM3626774,GSM3626775,GSM3626776,GSM3626777,GSM3626778,GSM3626779,GSM3626780,GSM3626781,GSM3626782,GSM3626783,GSM3626784,GSM3626785,GSM3626786,GSM3626787,GSM3626788,GSM3626789,GSM3626790,GSM3626791,GSM3626792,GSM3626793,GSM3626794,GSM3626795,GSM3626796,GSM3626797,GSM3626798,GSM3626799,GSM3626800,GSM3626801,GSM3626802,GSM3626803,GSM3626804,GSM3626805,GSM3626806,GSM3626807,GSM3626808,GSM3626809,GSM3626810,GSM3626811,GSM3626812,GSM3626813,GSM3626814,GSM3626815,GSM3626816,GSM3626817,GSM3626818,GSM3626819,GSM3626820,GSM3626821,GSM3626822,GSM3626823,GSM3626824,GSM3626825,GSM3626826,GSM3626827,GSM3626828,GSM3626829,GSM3626830,GSM3626831,GSM3626832,GSM3626833,GSM3626834,GSM3626835,GSM3626836,GSM3626837,GSM3626838,GSM3626839,GSM3626840,GSM3626841,GSM3626842,GSM3626843,GSM3626844,GSM3626845,GSM3626846,GSM3626847,GSM3626848,GSM3626849,GSM3626850,GSM3626851,GSM3626852,GSM3626853,GSM3626854,GSM3626855,GSM3626856,GSM3626857,GSM3626858,GSM3626859,GSM3626860,GSM3626861,GSM3626862,GSM3626863,GSM3626864,GSM3626865,GSM3626866,GSM3626867,GSM3626868,GSM3626869,GSM3626870,GSM3626871,GSM3626872,GSM3626873,GSM3626874,GSM3626875,GSM3626876,GSM3626877,GSM3626878,GSM3626879,GSM3626880,GSM3626881,GSM3626882,GSM3626883,GSM3626884,GSM3626885,GSM3626886,GSM3626887,GSM3626888,GSM3626889,GSM3626890,GSM3626891,GSM3626892,GSM3626893,GSM3626894,GSM3626895,GSM3626896,GSM3626897,GSM3626898,GSM3626899,GSM3626900,GSM3626901,GSM3626902,GSM3626903,GSM3626904,GSM3626905,GSM3626906,GSM3626907,GSM3626908,GSM3626909,GSM3626910,GSM3626911,GSM3626912,GSM3626913,GSM3626914,GSM3626915,GSM3626916,GSM3626917,GSM3626918,GSM3626919,GSM3626920,GSM3626921,GSM3626922,GSM3626923,GSM3626924,GSM3626925,GSM3626926,GSM3626927,GSM3626928,GSM3626929,GSM3626930,GSM3626931,GSM3626932,GSM3626933,GSM3626934,GSM3626935,GSM3626936,GSM3626937,GSM3626938,GSM3626939,GSM3626940,GSM3626941,GSM3626942,GSM3626943,GSM3626944,GSM3626945,GSM3626946,GSM3626947,GSM3626948,GSM3626949,GSM3626950,GSM3626951,GSM3626952,GSM3626953,GSM3626954,GSM3626955,GSM3626956,GSM3626957,GSM3626958,GSM3626959,GSM3626960,GSM3626961,GSM3626962,GSM3626963,GSM3626964,GSM3626965,GSM3626966,GSM3626967,GSM3626968,GSM3626969,GSM3626970,GSM3626971,GSM3626972,GSM3626973,GSM3626974,GSM3626975,GSM3626976,GSM3626977,GSM3626978,GSM3626979,GSM3626980,GSM3626981,GSM3626982,GSM3626983,GSM3626984,GSM3626985,GSM3626986,GSM3626987,GSM3626988,GSM3626989,GSM3626990,GSM3626991,GSM3626992,GSM3626993,GSM3626994,GSM3626995,GSM3626996,GSM3626997,GSM3626998,GSM3626999,GSM3627000,GSM3627001,GSM3627002,GSM3627003,GSM3627004,GSM3627005,GSM3627006,GSM3627007,GSM3627008,GSM3627009,GSM3627010,GSM3627011,GSM3627012,GSM3627013,GSM3627014,GSM3627015,GSM3627016,GSM3627017,GSM3627018,GSM3627019,GSM3627020,GSM3627021,GSM3627022,GSM3627023,GSM3627024,GSM3627025,GSM3627026,GSM3627027,GSM3627028,GSM3627029,GSM3627030,GSM3627031,GSM3627032,GSM3627033,GSM3627034,GSM3627035,GSM3627036,GSM3627037,GSM3627038,GSM3627039,GSM3627040,GSM3627041,GSM3627042,GSM3627043,GSM3627044,GSM3627045,GSM3627046,GSM3627047,GSM3627048,GSM3627049,GSM3627050,GSM3627051,GSM3627052,GSM3627053,GSM3627054,GSM3627055,GSM3627056,GSM3627057,GSM3627058,GSM3627059,GSM3627060,GSM3627061,GSM3627062,GSM3627063,GSM3627064,GSM3627065,GSM3627066,GSM3627067,GSM3627068,GSM3627069,GSM3627070,GSM3627071,GSM3627072,GSM3627073,GSM3627074,GSM3627075,GSM3627076,GSM3627077,GSM3627078,GSM3627079,GSM3627080,GSM3627081,GSM3627082,GSM3627083,GSM3627084,GSM3627085,GSM3627086,GSM3627087,GSM3627088,GSM3627089,GSM3627090,GSM3627091,GSM3627092,GSM3627093,GSM3627094,GSM3627095,GSM3627096,GSM3627097,GSM3627098,GSM3627099,GSM3627100,GSM3627101,GSM3627102,GSM3627103,GSM3627104,GSM3627105,GSM3627106,GSM3627107,GSM3627108,GSM3627109,GSM3627110,GSM3627111,GSM3627112,GSM3627113,GSM3627114,GSM3627115,GSM3627116,GSM3627117,GSM3627118,GSM3627119,GSM3627120,GSM3627121,GSM3627122,GSM3627123,GSM3627124,GSM3627125,GSM3627126,GSM3627127,GSM3627128,GSM3627129,GSM3627130,GSM3627131,GSM3627132,GSM3627133,GSM3627134,GSM3627135,GSM3627136,GSM3627137,GSM3627138,GSM3627139,GSM3627140,GSM3627141,GSM3627142,GSM3627143,GSM3627144,GSM3627145,GSM3627146,GSM3627147,GSM3627148,GSM3627149,GSM3627150,GSM3627151,GSM3627152,GSM3627153,GSM3627154,GSM3627155,GSM3627156,GSM3627157,GSM3627158,GSM3627159,GSM3627160,GSM3627161,GSM3627162,GSM3627163,GSM3627164,GSM3627165,GSM3627166,GSM3627167,GSM3627168,GSM3627169,GSM3627170,GSM3627171,GSM3627172,GSM3627173,GSM3627174,GSM3627175,GSM3627176,GSM3627177,GSM3627178,GSM3627179,GSM3627180,GSM3627181,GSM3627182,GSM3627183,GSM3627184,GSM3627185,GSM3627186,GSM3627187,GSM3627188,GSM3627189,GSM3627190,GSM3627191,GSM3627192,GSM3627193,GSM3627194,GSM3627195,GSM3627196,GSM3627197,GSM3627198,GSM3627199,GSM3627200,GSM3627201,GSM3627202,GSM3627203,GSM3627204,GSM3627205,GSM3627206,GSM3627207,GSM3627208,GSM3627209,GSM3627210,GSM3627211,GSM3627212,GSM3627213,GSM3627214,GSM3627215,GSM3627216,GSM3627217,GSM3627218,GSM3627219,GSM3627220,GSM3627221,GSM3627222,GSM3627223,GSM3627224,GSM3627225,GSM3627226,GSM3627227,GSM3627228,GSM3627229,GSM3627230,GSM3627231,GSM3627232,GSM3627233,GSM3627234,GSM3627235,GSM3627236,GSM3627237,GSM3627238,GSM3627239,GSM3627240,GSM3627241,GSM3627242,GSM3627243,GSM3627244,GSM3627245,GSM3627246,GSM3627247,GSM3627248,GSM3627249,GSM3627250,GSM3627251,GSM3627252,GSM3627253,GSM3627254,GSM3627255,GSM3627256,GSM3627257,GSM3627258,GSM3627259,GSM3627260,GSM3627261,GSM3627262,GSM3627263,GSM3627264,GSM3627265,GSM3627266,GSM3627267,GSM3627268,GSM3627269,GSM3627270,GSM3627271,GSM3627272,GSM3627273,GSM3627274,GSM3627275,GSM3627276,GSM3627277,GSM3627278,GSM3627279,GSM3627280,GSM3627281,GSM3627282,GSM3627283,GSM3627284,GSM3627285,GSM3627286,GSM3627287,GSM3627288,GSM3627289,GSM3627290,GSM3627291,GSM3627292,GSM3627293,GSM3627294,GSM3627295,GSM3627296,GSM3627297,GSM3627298,GSM3627299,GSM3627300,GSM3627301,GSM3627302,GSM3627303,GSM3627304,GSM3627305,GSM3627306,GSM3627307,GSM3627308,GSM3627309,GSM3627310,GSM3627311,GSM3627312,GSM3627313,GSM3627314,GSM3627315,GSM3627316,GSM3627317,GSM3627318,GSM3627319,GSM3627320,GSM3627321,GSM3627322,GSM3627323,GSM3627324,GSM3627325,GSM3627326,GSM3627327,GSM3627328,GSM3627329,GSM3627330,GSM3627331,GSM3627332,GSM3627333,GSM3627334,GSM3627335,GSM3627336,GSM3627337,GSM3627338,GSM3627339,GSM3627340,GSM3627341,GSM3627342,GSM3627343,GSM3627344,GSM3627345,GSM3627346,GSM3627347,GSM3627348,GSM3627349,GSM3627350,GSM3627351,GSM3627352,GSM3627353,GSM3627354,GSM3627355,GSM3627356,GSM3627357,GSM3627358,GSM3627359,GSM3627360,GSM3627361,GSM3627362,GSM3627363,GSM3627364,GSM3627365,GSM3627366,GSM3627367,GSM3627368,GSM3627369,GSM3627370,GSM3627371,GSM3627372,GSM3627373,GSM3627374,GSM3627375,GSM3627376,GSM3627377,GSM3627378,GSM3627379,GSM3627380,GSM3627381,GSM3627382,GSM3627383,GSM3627384,GSM3627385,GSM3627386,GSM3627387,GSM3627388,GSM3627389,GSM3627390,GSM3627391,GSM3627392,GSM3627393,GSM3627394,GSM3627395,GSM3627396,GSM3627397,GSM3627398,GSM3627399,GSM3627400,GSM3627401,GSM3627402,GSM3627403,GSM3627404,GSM3627405,GSM3627406,GSM3627407,GSM3627408,GSM3627409,GSM3627410,GSM3627411,GSM3627412,GSM3627413,GSM3627414,GSM3627415,GSM3627416,GSM3627417,GSM3627418,GSM3627419,GSM3627420,GSM3627421,GSM3627422,GSM3627423,GSM3627424,GSM3627425,GSM3627426,GSM3627427,GSM3627428,GSM3627429,GSM3627430,GSM3627431,GSM3627432,GSM3627433,GSM3627434,GSM3627435,GSM3627436,GSM3627437,GSM3627438,GSM3627439,GSM3627440,GSM3627441,GSM3627442,GSM3627443,GSM3627444,GSM3627445,GSM3627446,GSM3627447,GSM3627448,GSM3627449,GSM3627450,GSM3627451,GSM3627452,GSM3627453,GSM3627454,GSM3627455,GSM3627456,GSM3627457,GSM3627458,GSM3627459,GSM3627460,GSM3627461,GSM3627462,GSM3627463,GSM3627464,GSM3627465,GSM3627466,GSM3627467,GSM3627468,GSM3627469,GSM3627470,GSM3627471,GSM3627472,GSM3627473,GSM3627474,GSM3627475,GSM3627476,GSM3627477,GSM3627478,GSM3627479,GSM3627480,GSM3627481,GSM3627482,GSM3627483,GSM3627484,GSM3627485,GSM3627486,GSM3627487,GSM3627488,GSM3627489,GSM3627490,GSM3627491,GSM3627492,GSM3627493,GSM3627494,GSM3627495,GSM3627496,GSM3627497,GSM3627498,GSM3627499,GSM3627500,GSM3627501,GSM3627502,GSM3627503,GSM3627504,GSM3627505,GSM3627506,GSM3627507,GSM3627508,GSM3627509,GSM3627510,GSM3627511,GSM3627512,GSM3627513,GSM3627514,GSM3627515,GSM3627516,GSM3627517,GSM3627518,GSM3627519,GSM3627520,GSM3627521,GSM3627522,GSM3627523,GSM3627524,GSM3627525,GSM3627526,GSM3627527,GSM3627528,GSM3627529,GSM3627530,GSM3627531,GSM3627532,GSM3627533,GSM3627534,GSM3627535,GSM3627536,GSM3627537,GSM3627538,GSM3627539,GSM3627540,GSM3627541,GSM3627542,GSM3627543,GSM3627544,GSM3627545,GSM3627546,GSM3627547,GSM3627548,GSM3627549,GSM3627550,GSM3627551,GSM3627552,GSM3627553,GSM3627554,GSM3627555,GSM3627556,GSM3627557,GSM3627558,GSM3627559,GSM3627560,GSM3627561,GSM3627562,GSM3627563,GSM3627564,GSM3627565,GSM3627566,GSM3627567,GSM3627568,GSM3627569,GSM3627570,GSM3627571,GSM3627572,GSM3627573,GSM3627574,GSM3627575,GSM3627576,GSM3627577,GSM3627578,GSM3627579,GSM3627580,GSM3627581,GSM3627582,GSM3627583,GSM3627584,GSM3627585,GSM3627586,GSM3627587,GSM3627588,GSM3627589,GSM3627590,GSM3627591,GSM3627592,GSM3627593,GSM3627594,GSM3627595,GSM3627596,GSM3627597,GSM3627598,GSM3627599,GSM3627600,GSM3627601,GSM3627602,GSM3627603,GSM3627604,GSM3627605,GSM3627606,GSM3627607,GSM3627608,GSM3627609,GSM3627610,GSM3627611,GSM3627612,GSM3627613,GSM3627614,GSM3627615,GSM3627616,GSM3627617,GSM3627618,GSM3627619,GSM3627620,GSM3627621,GSM3627622,GSM3627623,GSM3627624,GSM3627625,GSM3627626,GSM3627627,GSM3627628,GSM3627629,GSM3627630,GSM3627631,GSM3627632,GSM3627633,GSM3627634,GSM3627635,GSM3627636,GSM3627637,GSM3627638,GSM3627639,GSM3627640,GSM3627641,GSM3627642,GSM3627643,GSM3627644,GSM3627645,GSM3627646,GSM3627647,GSM3627648,GSM3627649,GSM3627650,GSM3627651,GSM3627652,GSM3627653,GSM3627654,GSM3627655,GSM3627656,GSM3627657,GSM3627658,GSM3627659,GSM3627660,GSM3627661,GSM3627662,GSM3627663,GSM3627664,GSM3627665,GSM3627666,GSM3627667,GSM3627668,GSM3627669,GSM3627670,GSM3627671,GSM3627672,GSM3627673,GSM3627674,GSM3627675,GSM3627676,GSM3627677,GSM3627678,GSM3627679,GSM3627680,GSM3627681,GSM3627682,GSM3627683,GSM3627684,GSM3627685,GSM3627686,GSM3627687,GSM3627688,GSM3627689,GSM3627690,GSM3627691,GSM3627692,GSM3627693,GSM3627694,GSM3627695,GSM3627696,GSM3627697,GSM3627698,GSM3627699,GSM3627700,GSM3627701,GSM3627702,GSM3627703,GSM3627704,GSM3627705,GSM3627706,GSM3627707,GSM3627708,GSM3627709,GSM3627710,GSM3627711,GSM3627712,GSM3627713,GSM3627714,GSM3627715,GSM3627716,GSM3627717,GSM3627718,GSM3627719,GSM3627720,GSM3627721,GSM3627722,GSM3627723,GSM3627724,GSM3627725,GSM3627726,GSM3627727,GSM3627728,GSM3627729,GSM3627730,GSM3627731,GSM3627732,GSM3627733,GSM3627734,GSM3627735,GSM3627736,GSM3627737,GSM3627738,GSM3627739,GSM3627740,GSM3627741,GSM3627742,GSM3627743,GSM3627744,GSM3627745,GSM3627746,GSM3627747,GSM3627748,GSM3627749,GSM3627750,GSM3627751,GSM3627752,GSM3627753,GSM3627754,GSM3627755,GSM3627756,GSM3627757,GSM3627758,GSM3627759,GSM3627760,GSM3627761,GSM3627762,GSM3627763,GSM3627764,GSM3627765,GSM3627766,GSM3627767,GSM3627768,GSM3627769,GSM3627770,GSM3627771,GSM3627772,GSM3627773,GSM3627774,GSM3627775,GSM3627776,GSM3627777,GSM3627778,GSM3627779,GSM3627780,GSM3627781,GSM3627782,GSM3627783,GSM3627784,GSM3627785,GSM3627786,GSM3627787,GSM3627788,GSM3627789,GSM3627790,GSM3627791,GSM3627792,GSM3627793,GSM3627794,GSM3627795,GSM3627796,GSM3627797,GSM3627798,GSM3627799,GSM3627800,GSM3627801,GSM3627802,GSM3627803,GSM3627804,GSM3627805,GSM3627806,GSM3627807,GSM3627808,GSM3627809,GSM3627810,GSM3627811,GSM3627812,GSM3627813,GSM3627814,GSM3627815,GSM3627816,GSM3627817,GSM3627818,GSM3627819,GSM3627820,GSM3627821,GSM3627822,GSM3627823,GSM3627824,GSM3627825,GSM3627826,GSM3627827,GSM3627828,GSM3627829,GSM3627830,GSM3627831,GSM3627832,GSM3627833,GSM3627834,GSM3627835,GSM3627836,GSM3627837,GSM3627838,GSM3627839,GSM3627840,GSM3627841,GSM3627842,GSM3627843,GSM3627844,GSM3627845,GSM3627846,GSM3627847,GSM3627848,GSM3627849,GSM3627850,GSM3627851,GSM3627852,GSM3627853,GSM3627854,GSM3627855,GSM3627856,GSM3627857,GSM3627858,GSM3627859,GSM3627860,GSM3627861,GSM3627862,GSM3627863,GSM3627864,GSM3627865,GSM3627866,GSM3627867,GSM3627868,GSM3627869,GSM3627870,GSM3627871,GSM3627872,GSM3627873,GSM3627874,GSM3627875,GSM3627876,GSM3627877,GSM3627878,GSM3627879,GSM3627880,GSM3627881,GSM3627882,GSM3627883,GSM3627884,GSM3627885,GSM3627886,GSM3627887,GSM3627888,GSM3627889,GSM3627890,GSM3627891,GSM3627892,GSM3627893,GSM3627894,GSM3627895,GSM3627896,GSM3627897,GSM3627898,GSM3627899,GSM3627900,GSM3627901,GSM3627902,GSM3627903,GSM3627904,GSM3627905,GSM3627906,GSM3627907,GSM3627908,GSM3627909,GSM3627910,GSM3627911,GSM3627912,GSM3627913,GSM3627914,GSM3627915,GSM3627916,GSM3627917,GSM3627918,GSM3627919,GSM3627920,GSM3627921,GSM3627922,GSM3627923,GSM3627924,GSM3627925,GSM3627926,GSM3627927,GSM3627928,GSM3627929,GSM3627930,GSM3627931,GSM3627932,GSM3627933,GSM3627934,GSM3627935,GSM3627936,GSM3627937,GSM3627938,GSM3627939,GSM3627940,GSM3627941,GSM3627942,GSM3627943,GSM3627944,GSM3627945,GSM3627946,GSM3627947,GSM3627948,GSM3627949,GSM3627950,GSM3627951,GSM3627952,GSM3627953,GSM3627954,GSM3627955,GSM3627956,GSM3627957,GSM3627958,GSM3627959,GSM3627960,GSM3627961,GSM3627962,GSM3627963,GSM3627964,GSM3627965,GSM3627966,GSM3627967,GSM3627968,GSM3627969,GSM3627970,GSM3627971,GSM3627972,GSM3627973,GSM3627974,GSM3627975,GSM3627976,GSM3627977,GSM3627978,GSM3627979,GSM3627980,GSM3627981,GSM3627982,GSM3627983,GSM3627984,GSM3627985,GSM3627986,GSM3627987,GSM3627988,GSM3627989,GSM3627990,GSM3627991,GSM3627992,GSM3627993,GSM3627994,GSM3627995,GSM3627996,GSM3627997,GSM3627998,GSM3627999,GSM3628000,GSM3628001,GSM3628002,GSM3628003,GSM3628004,GSM3628005,GSM3628006,GSM3628007,GSM3628008,GSM3628009,GSM3628010,GSM3628011,GSM3628012,GSM3628013,GSM3628014,GSM3628015,GSM3628016,GSM3628017,GSM3628018,GSM3628019,GSM3628020,GSM3628021,GSM3628022,GSM3628023,GSM3628024,GSM3628025,GSM3628026,GSM3628027,GSM3628028,GSM3628029,GSM3628030,GSM3628031,GSM3628032,GSM3628033,GSM3628034,GSM3628035,GSM3628036,GSM3628037,GSM3628038,GSM3628039,GSM3628040,GSM3628041,GSM3628042,GSM3628043,GSM3628044,GSM3628045,GSM3628046,GSM3628047,GSM3628048,GSM3628049,GSM3628050,GSM3628051,GSM3628052,GSM3628053,GSM3628054,GSM3628055,GSM3628056,GSM3628057,GSM3628058,GSM3628059,GSM3628060,GSM3628061,GSM3628062,GSM3628063,GSM3628064,GSM3628065,GSM3628066,GSM3628067,GSM3628068,GSM3628069,GSM3628070,GSM3628071,GSM3628072,GSM3628073,GSM3628074,GSM3628075,GSM3628076,GSM3628077,GSM3628078,GSM3628079,GSM3628080,GSM3628081,GSM3628082,GSM3628083,GSM3628084,GSM3628085,GSM3628086,GSM3628087,GSM3628088,GSM3628089,GSM3628090,GSM3628091,GSM3628092,GSM3628093,GSM3628094,GSM3628095,GSM3628096,GSM3628097,GSM3628098,GSM3628099,GSM3628100,GSM3628101,GSM3628102,GSM3628103,GSM3628104,GSM3628105,GSM3628106,GSM3628107,GSM3628108,GSM3628109,GSM3628110,GSM3628111,GSM3628112,GSM3628113,GSM3628114,GSM3628115,GSM3628116,GSM3628117,GSM3628118,GSM3628119,GSM3628120,GSM3628121,GSM3628122,GSM3628123,GSM3628124,GSM3628125,GSM3628126,GSM3628127,GSM3628128,GSM3628129,GSM3628130,GSM3628131,GSM3628132,GSM3628133,GSM3628134,GSM3628135,GSM3628136,GSM3628137,GSM3628138,GSM3628139,GSM3628140,GSM3628141,GSM3628142,GSM3628143,GSM3628144,GSM3628145,GSM3628146,GSM3628147,GSM3628148,GSM3628149,GSM3628150,GSM3628151,GSM3628152,GSM3628153,GSM3628154,GSM3628155,GSM3628156,GSM3628157,GSM3628158,GSM3628159,GSM3628160,GSM3628161,GSM3628162,GSM3628163,GSM3628164,GSM3628165,GSM3628166,GSM3628167,GSM3628168,GSM3628169,GSM3628170,GSM3628171,GSM3628172,GSM3628173,GSM3628174,GSM3628175,GSM3628176,GSM3628177,GSM3628178,GSM3628179,GSM3628180,GSM3628181,GSM3628182,GSM3628183,GSM3628184,GSM3628185,GSM3628186,GSM3628187,GSM3628188,GSM3628189,GSM3628190,GSM3628191,GSM3628192,GSM3628193,GSM3628194,GSM3628195,GSM3628196,GSM3628197,GSM3628198,GSM3628199,GSM3628200,GSM3628201,GSM3628202,GSM3628203,GSM3628204,GSM3628205,GSM3628206,GSM3628207,GSM3628208,GSM3628209,GSM3628210,GSM3628211,GSM3628212,GSM3628213,GSM3628214,GSM3628215,GSM3628216,GSM3628217,GSM3628218,GSM3628219,GSM3628220,GSM3628221,GSM3628222,GSM3628223,GSM3628224,GSM3628225,GSM3628226,GSM3628227,GSM3628228,GSM3628229,GSM3628230,GSM3628231,GSM3628232,GSM3628233,GSM3628234,GSM3628235,GSM3628236,GSM3628237,GSM3628238,GSM3628239,GSM3628240,GSM3628241,GSM3628242,GSM3628243,GSM3628244,GSM3628245,GSM3628246,GSM3628247,GSM3628248,GSM3628249,GSM3628250,GSM3628251,GSM3628252,GSM3628253,GSM3628254,GSM3628255,GSM3628256,GSM3628257,GSM3628258,GSM3628259,GSM3628260,GSM3628261,GSM3628262,GSM3628263,GSM3628264,GSM3628265,GSM3628266,GSM3628267,GSM3628268,GSM3628269,GSM3628270,GSM3628271,GSM3628272,GSM3628273,GSM3628274,GSM3628275,GSM3628276,GSM3628277,GSM3628278,GSM3628279,GSM3628280,GSM3628281,GSM3628282,GSM3628283,GSM3628284,GSM3628285,GSM3628286,GSM3628287,GSM3628288,GSM3628289,GSM3628290,GSM3628291,GSM3628292,GSM3628293,GSM3628294,GSM3628295,GSM3628296,GSM3628297,GSM3628298,GSM3628299,GSM3628300,GSM3628301,GSM3628302,GSM3628303,GSM3628304,GSM3628305,GSM3628306,GSM3628307,GSM3628308,GSM3628309,GSM3628310,GSM3628311,GSM3628312,GSM3628313,GSM3628314,GSM3628315,GSM3628316,GSM3628317,GSM3628318,GSM3628319,GSM3628320,GSM3628321,GSM3628322,GSM3628323,GSM3628324,GSM3628325,GSM3628326,GSM3628327,GSM3628328,GSM3628329,GSM3628330,GSM3628331,GSM3628332,GSM3628333,GSM3628334,GSM3628335,GSM3628336,GSM3628337,GSM3628338,GSM3628339,GSM3628340,GSM3628341,GSM3628342,GSM3628343,GSM3628344,GSM3628345,GSM3628346,GSM3628347,GSM3628348,GSM3628349,GSM3628350,GSM3628351,GSM3628352,GSM3628353,GSM3628354,GSM3628355,GSM3628356,GSM3628357,GSM3628358,GSM3628359,GSM3628360,GSM3628361,GSM3628362,GSM3628363,GSM3628364,GSM3628365,GSM3628366,GSM3628367,GSM3628368,GSM3628369,GSM3628370,GSM3628371,GSM3628372,GSM3628373,GSM3628374,GSM3628375,GSM3628376,GSM3628377,GSM3628378,GSM3628379,GSM3628380,GSM3628381,GSM3628382,GSM3628383,GSM3628384,GSM3628385,GSM3628386,GSM3628387,GSM3628388,GSM3628389,GSM3628390,GSM3628391,GSM3628392,GSM3628393,GSM3628394,GSM3628395,GSM3628396,GSM3628397,GSM3628398,GSM3628399,GSM3628400,GSM3628401,GSM3628402,GSM3628403,GSM3628404,GSM3628405,GSM3628406,GSM3628407,GSM3628408,GSM3628409,GSM3628410,GSM3628411,GSM3628412,GSM3628413,GSM3628414,GSM3628415,GSM3628416,GSM3628417,GSM3628418,GSM3628419,GSM3628420,GSM3628421,GSM3628422,GSM3628423,GSM3628424,GSM3628425,GSM3628426,GSM3628427,GSM3628428,GSM3628429,GSM3628430,GSM3628431,GSM3628432,GSM3628433,GSM3628434,GSM3628435,GSM3628436,GSM3628437,GSM3628438,GSM3628439,GSM3628440,GSM3628441,GSM3628442,GSM3628443,GSM3628444,GSM3628445,GSM3628446,GSM3628447,GSM3628448,GSM3628449,GSM3628450,GSM3628451,GSM3628452,GSM3628453,GSM3628454,GSM3628455,GSM3628456,GSM3628457,GSM3628458,GSM3628459,GSM3628460,GSM3628461,GSM3628462,GSM3628463,GSM3628464,GSM3628465,GSM3628466,GSM3628467,GSM3628468,GSM3628469,GSM3628470,GSM3628471,GSM3628472,GSM3628473,GSM3628474,GSM3628475,GSM3628476,GSM3628477,GSM3628478,GSM3628479,GSM3628480,GSM3628481,GSM3628482,GSM3628483,GSM3628484,GSM3628485,GSM3628486,GSM3628487,GSM3628488,GSM3628489,GSM3628490,GSM3628491,GSM3628492,GSM3628493,GSM3628494,GSM3628495,GSM3628496,GSM3628497,GSM3628498,GSM3628499,GSM3628500,GSM3628501,GSM3628502,GSM3628503,GSM3628504,GSM3628505,GSM3628506,GSM3628507,GSM3628508,GSM3628509,GSM3628510,GSM3628511,GSM3628512,GSM3628513,GSM3628514,GSM3628515,GSM3628516,GSM3628517,GSM3628518,GSM3628519,GSM3628520,GSM3628521,GSM3628522,GSM3628523,GSM3628524,GSM3628525,GSM3628526,GSM3628527,GSM3628528,GSM3628529,GSM3628530,GSM3628531,GSM3628532,GSM3628533,GSM3628534,GSM3628535,GSM3628536,GSM3628537,GSM3628538,GSM3628539,GSM3628540,GSM3628541,GSM3628542,GSM3628543,GSM3628544,GSM3628545,GSM3628546,GSM3628547,GSM3628548,GSM3628549,GSM3628550,GSM3628551,GSM3628552,GSM3628553,GSM3628554,GSM3628555,GSM3628556,GSM3628557,GSM3628558,GSM3628559,GSM3628560,GSM3628561,GSM3628562,GSM3628563,GSM3628564,GSM3628565,GSM3628566,GSM3628567,GSM3628568,GSM3628569,GSM3628570,GSM3628571,GSM3628572,GSM3628573,GSM3628574,GSM3628575,GSM3628576,GSM3628577,GSM3628578,GSM3628579,GSM3628580,GSM3628581,GSM3628582,GSM3628583,GSM3628584,GSM3628585,GSM3628586,GSM3628587,GSM3628588,GSM3628589,GSM3628590,GSM3628591,GSM3628592,GSM3628593,GSM3628594,GSM3628595,GSM3628596,GSM3628597,GSM3628598,GSM3628599,GSM3628600,GSM3628601,GSM3628602,GSM3628603,GSM3628604,GSM3628605,GSM3628606,GSM3628607,GSM3628608,GSM3628609,GSM3628610,GSM3628611,GSM3628612,GSM3628613,GSM3628614,GSM3628615,GSM3628616,GSM3628617,GSM3628618,GSM3628619,GSM3628620,GSM3628621,GSM3628622,GSM3628623,GSM3628624,GSM3628625,GSM3628626,GSM3628627,GSM3628628,GSM3628629,GSM3628630,GSM3628631,GSM3628632,GSM3628633,GSM3628634,GSM3628635,GSM3628636,GSM3628637,GSM3628638,GSM3628639,GSM3628640,GSM3628641,GSM3628642,GSM3628643,GSM3628644,GSM3628645,GSM3628646,GSM3628647,GSM3628648,GSM3628649,GSM3628650,GSM3628651,GSM3628652,GSM3628653,GSM3628654,GSM3628655,GSM3628656,GSM3628657,GSM3628658,GSM3628659,GSM3628660,GSM3628661,GSM3628662,GSM3628663,GSM3628664,GSM3628665,GSM3628666,GSM3628667,GSM3628668,GSM3628669,GSM3628670,GSM3628671,GSM3628672,GSM3628673,GSM3628674,GSM3628675,GSM3628676,GSM3628677,GSM3628678,GSM3628679,GSM3628680,GSM3628681,GSM3628682,GSM3628683,GSM3628684,GSM3628685,GSM3628686,GSM3628687,GSM3628688,GSM3628689,GSM3628690,GSM3628691,GSM3628692,GSM3628693,GSM3628694,GSM3628695,GSM3628696,GSM3628697,GSM3628698,GSM3628699,GSM3628700,GSM3628701,GSM3628702,GSM3628703,GSM3628704,GSM3628705,GSM3628706,GSM3628707,GSM3628708,GSM3628709,GSM3628710,GSM3628711,GSM3628712,GSM3628713,GSM3628714,GSM3628715,GSM3628716,GSM3628717,GSM3628718,GSM3628719,GSM3628720,GSM3628721,GSM3628722,GSM3628723,GSM3628724,GSM3628725,GSM3628726,GSM3628727,GSM3628728,GSM3628729,GSM3628730,GSM3628731,GSM3628732,GSM3628733,GSM3628734,GSM3628735,GSM3628736,GSM3628737,GSM3628738,GSM3628739,GSM3628740,GSM3628741,GSM3628742,GSM3628743,GSM3628744,GSM3628745,GSM3628746,GSM3628747,GSM3628748,GSM3628749,GSM3628750,GSM3628751,GSM3628752,GSM3628753,GSM3628754,GSM3628755,GSM3628756,GSM3628757,GSM3628758,GSM3628759,GSM3628760,GSM3628761,GSM3628762,GSM3628763,GSM3628764,GSM3628765,GSM3628766,GSM3628767,GSM3628768,GSM3628769,GSM3628770,GSM3628771,GSM3628772,GSM3628773,GSM3628774,GSM3628775,GSM3628776,GSM3628777,GSM3628778,GSM3628779,GSM3628780,GSM3628781,GSM3628782,GSM3628783,GSM3628784,GSM3628785,GSM3628786,GSM3628787,GSM3628788,GSM3628789,GSM3628790,GSM3628791,GSM3628792,GSM3628793,GSM3628794,GSM3628795,GSM3628796,GSM3628797,GSM3628798,GSM3628799,GSM3628800,GSM3628801,GSM3628802,GSM3628803,GSM3628804,GSM3628805,GSM3628806,GSM3628807,GSM3628808,GSM3628809,GSM3628810,GSM3628811,GSM3628812,GSM3628813,GSM3628814,GSM3628815,GSM3628816,GSM3628817,GSM3628818,GSM3628819,GSM3628820,GSM3628821,GSM3628822,GSM3628823,GSM3628824,GSM3628825,GSM3628826,GSM3628827,GSM3628828,GSM3628829,GSM3628830,GSM3628831,GSM3628832,GSM3628833,GSM3628834,GSM3628835,GSM3628836,GSM3628837,GSM3628838,GSM3628839,GSM3628840,GSM3628841,GSM3628842,GSM3628843,GSM3628844,GSM3628845,GSM3628846,GSM3628847,GSM3628848,GSM3628849,GSM3628850,GSM3628851,GSM3628852,GSM3628853,GSM3628854,GSM3628855,GSM3628856,GSM3628857,GSM3628858,GSM3628859,GSM3628860,GSM3628861,GSM3628862,GSM3628863,GSM3628864,GSM3628865,GSM3628866,GSM3628867,GSM3628868,GSM3628869,GSM3628870,GSM3628871,GSM3628872,GSM3628873,GSM3628874,GSM3628875,GSM3628876,GSM3628877,GSM3628878,GSM3628879,GSM3628880,GSM3628881,GSM3628882,GSM3628883,GSM3628884,GSM3628885,GSM3628886,GSM3628887,GSM3628888,GSM3628889,GSM3628890,GSM3628891,GSM3628892,GSM3628893,GSM3628894,GSM3628895,GSM3628896,GSM3628897,GSM3628898,GSM3628899,GSM3628900,GSM3628901,GSM3628902,GSM3628903,GSM3628904,GSM3628905,GSM3628906,GSM3628907,GSM3628908,GSM3628909,GSM3628910,GSM3628911,GSM3628912,GSM3628913,GSM3628914,GSM3628915,GSM3628916,GSM3628917,GSM3628918,GSM3628919,GSM3628920,GSM3628921,GSM3628922,GSM3628923,GSM3628924,GSM3628925,GSM3628926,GSM3628927,GSM3628928,GSM3628929,GSM3628930,GSM3628931,GSM3628932,GSM3628933,GSM3628934,GSM3628935,GSM3628936,GSM3628937,GSM3628938,GSM3628939,GSM3628940,GSM3628941,GSM3628942,GSM3628943,GSM3628944,GSM3628945,GSM3628946,GSM3628947,GSM3628948,GSM3628949,GSM3628950,GSM3628951,GSM3628952,GSM3628953,GSM3628954,GSM3628955,GSM3628956,GSM3628957,GSM3628958,GSM3628959,GSM3628960,GSM3628961,GSM3628962,GSM3628963,GSM3628964,GSM3628965,GSM3628966,GSM3628967,GSM3628968,GSM3628969,GSM3628970,GSM3628971,GSM3628972,GSM3628973,GSM3628974,GSM3628975,GSM3628976,GSM3628977,GSM3628978,GSM3628979,GSM3628980,GSM3628981,GSM3628982,GSM3628983,GSM3628984,GSM3628985,GSM3628986,GSM3628987,GSM3628988,GSM3628989,GSM3628990,GSM3628991,GSM3628992,GSM3628993,GSM3628994,GSM3628995,GSM3628996,GSM3628997,GSM3628998,GSM3628999,GSM3629000,GSM3629001,GSM3629002,GSM3629003,GSM3629004,GSM3629005,GSM3629006,GSM3629007,GSM3629008,GSM3629009,GSM3629010,GSM3629011,GSM3629012,GSM3629013,GSM3629014,GSM3629015,GSM3629016,GSM3629017,GSM3629018,GSM3629019,GSM3629020,GSM3629021,GSM3629022,GSM3629023,GSM3629024,GSM3629025,GSM3629026,GSM3629027,GSM3629028,GSM3629029,GSM3629030,GSM3629031,GSM3629032,GSM3629033,GSM3629034,GSM3629035,GSM3629036,GSM3629037,GSM3629038,GSM3629039,GSM3629040,GSM3629041,GSM3629042,GSM3629043,GSM3629044,GSM3629045,GSM3629046,GSM3629047,GSM3629048,GSM3629049,GSM3629050,GSM3629051,GSM3629052,GSM3629053,GSM3629054,GSM3629055,GSM3629056,GSM3629057,GSM3629058,GSM3629059,GSM3629060,GSM3629061,GSM3629062,GSM3629063,GSM3629064,GSM3629065,GSM3629066,GSM3629067,GSM3629068,GSM3629069,GSM3629070,GSM3629071,GSM3629072,GSM3629073,GSM3629074,GSM3629075,GSM3629076,GSM3629077,GSM3629078,GSM3629079,GSM3629080,GSM3629081,GSM3629082,GSM3629083,GSM3629084,GSM3629085,GSM3629086,GSM3629087,GSM3629088,GSM3629089,GSM3629090,GSM3629091,GSM3629092,GSM3629093,GSM3629094,GSM3629095,GSM3629096,GSM3629097,GSM3629098,GSM3629099,GSM3629100,GSM3629101,GSM3629102,GSM3629103,GSM3629104,GSM3629105,GSM3629106,GSM3629107,GSM3629108,GSM3629109,GSM3629110,GSM3629111,GSM3629112,GSM3629113,GSM3629114,GSM3629115,GSM3629116,GSM3629117,GSM3629118,GSM3629119,GSM3629120,GSM3629121,GSM3629122,GSM3629123,GSM3629124,GSM3629125,GSM3629126,GSM3629127,GSM3629128,GSM3629129,GSM3629130,GSM3629131,GSM3629132,GSM3629133,GSM3629134,GSM3629135,GSM3629136,GSM3629137,GSM3629138,GSM3629139,GSM3629140,GSM3629141,GSM3629142,GSM3629143,GSM3629144,GSM3629145,GSM3629146,GSM3629147,GSM3629148,GSM3629149,GSM3629150,GSM3629151,GSM3629152,GSM3629153,GSM3629154,GSM3629155,GSM3629156,GSM3629157,GSM3629158,GSM3629159,GSM3629160,GSM3629161,GSM3629162,GSM3629163,GSM3629164,GSM3629165,GSM3629166,GSM3629167,GSM3629168,GSM3629169,GSM3629170,GSM3629171,GSM3629172,GSM3629173,GSM3629174,GSM3629175,GSM3629176,GSM3629177,GSM3629178,GSM3629179,GSM3629180,GSM3629181,GSM3629182,GSM3629183,GSM3629184,GSM3629185,GSM3629186,GSM3629187,GSM3629188,GSM3629189,GSM3629190,GSM3629191,GSM3629192,GSM3629193,GSM3629194,GSM3629195,GSM3629196,GSM3629197,GSM3629198,GSM3629199,GSM3629200,GSM3629201,GSM3629202,GSM3629203,GSM3629204,GSM3629205,GSM3629206,GSM3629207,GSM3629208,GSM3629209,GSM3629210,GSM3629211,GSM3629212,GSM3629213,GSM3629214,GSM3629215,GSM3629216,GSM3629217,GSM3629218,GSM3629219,GSM3629220,GSM3629221,GSM3629222,GSM3629223,GSM3629224,GSM3629225,GSM3629226,GSM3629227,GSM3629228,GSM3629229,GSM3629230,GSM3629231,GSM3629232,GSM3629233,GSM3629234,GSM3629235,GSM3629236,GSM3629237,GSM3629238,GSM3629239,GSM3629240,GSM3629241,GSM3629242,GSM3629243,GSM3629244,GSM3629245,GSM3629246,GSM3629247,GSM3629248,GSM3629249,GSM3629250,GSM3629251,GSM3629252,GSM3629253,GSM3629254,GSM3629255,GSM3629256,GSM3629257,GSM3629258,GSM3629259,GSM3629260,GSM3629261,GSM3629262,GSM3629263,GSM3629264,GSM3629265,GSM3629266,GSM3629267,GSM3629268,GSM3629269,GSM3629270,GSM3629271,GSM3629272,GSM3629273,GSM3629274,GSM3629275,GSM3629276,GSM3629277,GSM3629278,GSM3629279,GSM3629280,GSM3629281,GSM3629282,GSM3629283,GSM3629284,GSM3629285,GSM3629286,GSM3629287,GSM3629288,GSM3629289,GSM3629290,GSM3629291,GSM3629292,GSM3629293,GSM3629294,GSM3629295,GSM3629296,GSM3629297,GSM3629298,GSM3629299,GSM3629300,GSM3629301,GSM3629302,GSM3629303,GSM3629304,GSM3629305,GSM3629306,GSM3629307,GSM3629308,GSM3629309,GSM3629310,GSM3629311,GSM3629312,GSM3629313,GSM3629314,GSM3629315,GSM3629316,GSM3629317,GSM3629318,GSM3629319,GSM3629320,GSM3629321,GSM3629322,GSM3629323,GSM3629324,GSM3629325,GSM3629326,GSM3629327,GSM3629328,GSM3629329,GSM3629330,GSM3629331,GSM3629332,GSM3629333,GSM3629334,GSM3629335,GSM3629336,GSM3629337,GSM3629338,GSM3629339,GSM3629340,GSM3629341,GSM3629342,GSM3629343,GSM3629344,GSM3629345,GSM3629346,GSM3629347,GSM3629348,GSM3629349,GSM3629350,GSM3629351,GSM3629352,GSM3629353,GSM3629354,GSM3629355,GSM3629356,GSM3629357,GSM3629358,GSM3629359,GSM3629360,GSM3629361,GSM3629362,GSM3629363,GSM3629364,GSM3629365,GSM3629366,GSM3629367,GSM3629368,GSM3629369,GSM3629370,GSM3629371,GSM3629372,GSM3629373,GSM3629374,GSM3629375,GSM3629376,GSM3629377,GSM3629378,GSM3629379,GSM3629380,GSM3629381,GSM3629382,G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,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
|
p1/preprocess/Chronic_kidney_disease/clinical_data/GSE142153.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM4221568,GSM4221569,GSM4221570,GSM4221571,GSM4221572,GSM4221573,GSM4221574,GSM4221575,GSM4221576,GSM4221577,GSM4221578,GSM4221579,GSM4221580,GSM4221581,GSM4221582,GSM4221583,GSM4221584,GSM4221585,GSM4221586,GSM4221587,GSM4221588,GSM4221589,GSM4221590,GSM4221591,GSM4221592,GSM4221593,GSM4221594,GSM4221595,GSM4221596,GSM4221597,GSM4221598,GSM4221599,GSM4221600,GSM4221601,GSM4221602,GSM4221603,GSM4221604,GSM4221605,GSM4221606,GSM4221607
|
2 |
+
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
p1/preprocess/Chronic_kidney_disease/clinical_data/GSE180393.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM5607752,GSM5607753,GSM5607754,GSM5607755,GSM5607756,GSM5607757,GSM5607758,GSM5607759,GSM5607760,GSM5607761,GSM5607762,GSM5607763,GSM5607764,GSM5607765,GSM5607766,GSM5607767,GSM5607768,GSM5607769,GSM5607770,GSM5607771,GSM5607772,GSM5607773,GSM5607774,GSM5607775,GSM5607776,GSM5607777,GSM5607778,GSM5607779,GSM5607780,GSM5607781,GSM5607782,GSM5607783,GSM5607784,GSM5607785,GSM5607786,GSM5607787,GSM5607788,GSM5607789,GSM5607790,GSM5607791,GSM5607792,GSM5607793,GSM5607794,GSM5607795,GSM5607796,GSM5607797,GSM5607798,GSM5607799,GSM5607800,GSM5607801,GSM5607802,GSM5607803,GSM5607804,GSM5607805,GSM5607806,GSM5607807,GSM5607808,GSM5607809,GSM5607810,GSM5607811,GSM5607812,GSM5607813
|
2 |
+
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0
|
p1/preprocess/Chronic_kidney_disease/clinical_data/GSE180394.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM5607814,GSM5607815,GSM5607816,GSM5607817,GSM5607818,GSM5607819,GSM5607820,GSM5607821,GSM5607822,GSM5607823,GSM5607824,GSM5607825,GSM5607826,GSM5607827,GSM5607828,GSM5607829,GSM5607830,GSM5607831,GSM5607832,GSM5607833,GSM5607834,GSM5607835,GSM5607836,GSM5607837,GSM5607838,GSM5607839,GSM5607840,GSM5607841,GSM5607842,GSM5607843,GSM5607844,GSM5607845,GSM5607846,GSM5607847,GSM5607848,GSM5607849,GSM5607850,GSM5607851,GSM5607852,GSM5607853,GSM5607854,GSM5607855,GSM5607856,GSM5607857,GSM5607858,GSM5607859,GSM5607860,GSM5607861,GSM5607862,GSM5607863,GSM5607864,GSM5607865,GSM5607866,GSM5607867,GSM5607868,GSM5607869,GSM5607870,GSM5607871,GSM5607872
|
2 |
+
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0
|
p1/preprocess/Chronic_kidney_disease/clinical_data/GSE66494.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM1623299,GSM1623300,GSM1623301,GSM1623302,GSM1623303,GSM1623304,GSM1623305,GSM1623306,GSM1623307,GSM1623308,GSM1623309,GSM1623310,GSM1623311,GSM1623312,GSM1623313,GSM1623314,GSM1623315,GSM1623316,GSM1623317,GSM1623318,GSM1623319,GSM1623320,GSM1623321,GSM1623322,GSM1623323,GSM1623324,GSM1623325,GSM1623326,GSM1623327,GSM1623328,GSM1623329,GSM1623330,GSM1623331,GSM1623332,GSM1623333,GSM1623334,GSM1623335,GSM1623336,GSM1623337,GSM1623338,GSM1623339,GSM1623340,GSM1623341,GSM1623342,GSM1623343,GSM1623344,GSM1623345,GSM1623346,GSM1623347,GSM1623348,GSM1623349,GSM1623350,GSM1623351,GSM1623352,GSM1623353,GSM1623354,GSM1623355,GSM1623356,GSM1623357,GSM1623358,GSM1623359
|
2 |
+
1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0
|
p1/preprocess/Chronic_kidney_disease/code/GSE104948.py
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE104948"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE104948"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE104948.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE104948.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE104948.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
21 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
22 |
+
|
23 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
24 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
25 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
26 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file, background_prefixes, clinical_prefixes)
|
27 |
+
|
28 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
29 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
30 |
+
|
31 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
32 |
+
print("Background Information:")
|
33 |
+
print(background_info)
|
34 |
+
print("Sample Characteristics Dictionary:")
|
35 |
+
print(sample_characteristics_dict)
|
36 |
+
# 1) Determine if gene expression data is available
|
37 |
+
is_gene_available = True # Based on the metadata (Affymetrix microarrays for gene expression)
|
38 |
+
# 2) Identify variable availability
|
39 |
+
trait_row = 1 # diagnosis field with multiple diagnoses
|
40 |
+
age_row = None # no age data detected
|
41 |
+
gender_row = None # no gender data detected
|
42 |
+
|
43 |
+
# 2) Define data type conversions
|
44 |
+
def convert_trait(value: Any) -> Optional[int]:
|
45 |
+
"""
|
46 |
+
Convert the diagnosis field to a binary indicator for Chronic Kidney Disease:
|
47 |
+
- If 'Tumor Nephrectomy' or unknown, map to 0/None
|
48 |
+
- Otherwise, map to 1
|
49 |
+
"""
|
50 |
+
if pd.isna(value):
|
51 |
+
return None
|
52 |
+
# Extract the part after the colon if present
|
53 |
+
parts = str(value).split(':', 1)
|
54 |
+
if len(parts) == 2:
|
55 |
+
val_str = parts[1].strip()
|
56 |
+
else:
|
57 |
+
val_str = parts[0].strip()
|
58 |
+
|
59 |
+
if val_str.lower() in ['tumor nephrectomy', '']:
|
60 |
+
return 0
|
61 |
+
if val_str.lower() == 'nan':
|
62 |
+
return None
|
63 |
+
# Everything else is considered CKD = 1
|
64 |
+
return 1
|
65 |
+
|
66 |
+
def convert_age(value: Any) -> Optional[float]:
|
67 |
+
# This dataset has no age data; return None
|
68 |
+
return None
|
69 |
+
|
70 |
+
def convert_gender(value: Any) -> Optional[int]:
|
71 |
+
# This dataset has no gender data; return None
|
72 |
+
return None
|
73 |
+
|
74 |
+
# 3) Conduct initial filtering and save metadata
|
75 |
+
is_trait_available = (trait_row is not None)
|
76 |
+
is_usable = validate_and_save_cohort_info(
|
77 |
+
is_final=False,
|
78 |
+
cohort=cohort,
|
79 |
+
info_path=json_path,
|
80 |
+
is_gene_available=is_gene_available,
|
81 |
+
is_trait_available=is_trait_available
|
82 |
+
)
|
83 |
+
|
84 |
+
# 4) If trait data is available, extract and preview the clinical features
|
85 |
+
if trait_row is not None:
|
86 |
+
selected_clinical_data = geo_select_clinical_features(
|
87 |
+
clinical_data,
|
88 |
+
trait=trait,
|
89 |
+
trait_row=trait_row,
|
90 |
+
convert_trait=convert_trait,
|
91 |
+
age_row=age_row,
|
92 |
+
convert_age=convert_age,
|
93 |
+
gender_row=gender_row,
|
94 |
+
convert_gender=convert_gender
|
95 |
+
)
|
96 |
+
preview_result = preview_df(selected_clinical_data)
|
97 |
+
print("Preview of selected clinical features:", preview_result)
|
98 |
+
|
99 |
+
# Save the clinical data
|
100 |
+
selected_clinical_data.to_csv(out_clinical_data_file, index=False)
|
101 |
+
# STEP3
|
102 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
103 |
+
gene_data = get_genetic_data(matrix_file)
|
104 |
+
|
105 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
106 |
+
print(gene_data.index[:20])
|
107 |
+
# Based on the ID patterns (e.g., "10000_at", "10001_at"), these look like probe set IDs
|
108 |
+
# from a microarray platform rather than human gene symbols. Hence, they require mapping.
|
109 |
+
|
110 |
+
print("requires_gene_mapping = True")
|
111 |
+
# STEP5
|
112 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
113 |
+
gene_annotation = get_gene_annotation(soft_file)
|
114 |
+
|
115 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
116 |
+
print("Gene annotation preview:")
|
117 |
+
print(preview_df(gene_annotation))
|
118 |
+
# STEP: Gene Identifier Mapping
|
119 |
+
|
120 |
+
# 1) Identify the columns in the gene annotation dataframe that match the
|
121 |
+
# probe identifiers and the columns that provide the gene symbols.
|
122 |
+
prob_col = "ID"
|
123 |
+
gene_col = "Symbol"
|
124 |
+
|
125 |
+
# 2) Get the gene mapping dataframe by extracting these two columns.
|
126 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col, gene_col)
|
127 |
+
|
128 |
+
# 3) Convert probe-level measurements to gene-level expression data.
|
129 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
130 |
+
|
131 |
+
# Print out a brief check of the mapped gene data
|
132 |
+
print("Mapped gene_data shape:", gene_data.shape)
|
133 |
+
print("First few gene symbols:", gene_data.index[:10])
|
134 |
+
# STEP7
|
135 |
+
# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.
|
136 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
137 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
138 |
+
|
139 |
+
# 2. Link the clinical and genetic data with the 'geo_link_clinical_genetic_data' function from the library.
|
140 |
+
linked_data = geo_link_clinical_genetic_data(selected_clinical_data, normalized_gene_data)
|
141 |
+
|
142 |
+
# 3. Handle missing values in the linked data
|
143 |
+
linked_data = handle_missing_values(linked_data, trait)
|
144 |
+
|
145 |
+
# 4. Determine whether the trait and some demographic features are severely biased, and remove biased features.
|
146 |
+
is_trait_biased, unbiased_linked_data = judge_and_remove_biased_features(linked_data, trait)
|
147 |
+
|
148 |
+
# 5. Conduct quality check and save the cohort information.
|
149 |
+
is_usable = validate_and_save_cohort_info(
|
150 |
+
is_final=True,
|
151 |
+
cohort=cohort,
|
152 |
+
info_path=json_path,
|
153 |
+
is_gene_available=True,
|
154 |
+
is_trait_available=True,
|
155 |
+
is_biased=is_trait_biased,
|
156 |
+
df=linked_data
|
157 |
+
)
|
158 |
+
|
159 |
+
# 6. If the linked data is usable, save it as a CSV file to 'out_data_file'.
|
160 |
+
if is_usable:
|
161 |
+
unbiased_linked_data.to_csv(out_data_file)
|
p1/preprocess/Chronic_kidney_disease/code/GSE104954.py
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE104954"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE104954"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE104954.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE104954.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE104954.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
21 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
22 |
+
|
23 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
24 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
25 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
26 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file, background_prefixes, clinical_prefixes)
|
27 |
+
|
28 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
29 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
30 |
+
|
31 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
32 |
+
print("Background Information:")
|
33 |
+
print(background_info)
|
34 |
+
print("Sample Characteristics Dictionary:")
|
35 |
+
print(sample_characteristics_dict)
|
36 |
+
# 1. Determine if gene expression data is available.
|
37 |
+
# From the background, this dataset uses Affymetrix microarrays for RNA,
|
38 |
+
# indicating gene expression data is present.
|
39 |
+
is_gene_available = True
|
40 |
+
|
41 |
+
# 2.1 Data Availability
|
42 |
+
# Matching the provided sample characteristics dictionary, we see:
|
43 |
+
# Key=0 => tissue: all the same, not useful.
|
44 |
+
# Key=1 => multiple kidney disease diagnoses vs. tumor nephrectomy (control).
|
45 |
+
# This can serve as a binary trait for "Chronic_kidney_disease" vs. non-CKD.
|
46 |
+
trait_row = 1 # diagnosis data is in row 1
|
47 |
+
age_row = None # age not found
|
48 |
+
gender_row = None # gender not found
|
49 |
+
|
50 |
+
# 2.2 Data Type Conversion
|
51 |
+
# We choose 'binary' for the trait: 1 = Chronic Kidney Disease, 0 = non-CKD, None if unknown.
|
52 |
+
def convert_trait(x: Any) -> Optional[int]:
|
53 |
+
if not isinstance(x, str):
|
54 |
+
return None
|
55 |
+
# Extract the part after the colon
|
56 |
+
val = x.split(":", 1)[-1].strip().lower()
|
57 |
+
if val in ["", "nan"]:
|
58 |
+
return None
|
59 |
+
if val == "tumor nephrectomy":
|
60 |
+
return 0 # likely control group
|
61 |
+
# Otherwise, treat all other diagnoses as CKD
|
62 |
+
return 1
|
63 |
+
|
64 |
+
# Since age and gender are unavailable, define pass-through functions returning None.
|
65 |
+
def convert_age(x: Any) -> Optional[float]:
|
66 |
+
return None
|
67 |
+
|
68 |
+
def convert_gender(x: Any) -> Optional[int]:
|
69 |
+
return None
|
70 |
+
|
71 |
+
# 3. Initial filtering on dataset usability
|
72 |
+
is_trait_available = (trait_row is not None)
|
73 |
+
is_usable = validate_and_save_cohort_info(
|
74 |
+
is_final=False,
|
75 |
+
cohort=cohort,
|
76 |
+
info_path=json_path,
|
77 |
+
is_gene_available=is_gene_available,
|
78 |
+
is_trait_available=is_trait_available
|
79 |
+
)
|
80 |
+
|
81 |
+
# 4. Clinical Feature Extraction (only if trait_row is available)
|
82 |
+
if trait_row is not None:
|
83 |
+
selected_clinical_df = geo_select_clinical_features(
|
84 |
+
clinical_data,
|
85 |
+
trait=trait,
|
86 |
+
trait_row=trait_row,
|
87 |
+
convert_trait=convert_trait,
|
88 |
+
age_row=age_row,
|
89 |
+
convert_age=convert_age,
|
90 |
+
gender_row=gender_row,
|
91 |
+
convert_gender=convert_gender
|
92 |
+
)
|
93 |
+
# Preview result
|
94 |
+
print(preview_df(selected_clinical_df, n=5))
|
95 |
+
# Save the extracted clinical features
|
96 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
97 |
+
# STEP3
|
98 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
99 |
+
gene_data = get_genetic_data(matrix_file)
|
100 |
+
|
101 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
102 |
+
print(gene_data.index[:20])
|
103 |
+
# The gene identifiers such as "10000_at", "10001_at", etc. indicate Affymetrix probe set IDs
|
104 |
+
# rather than human gene symbols, so they need to be mapped to gene symbols.
|
105 |
+
|
106 |
+
print("requires_gene_mapping = True")
|
107 |
+
# STEP5
|
108 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
109 |
+
gene_annotation = get_gene_annotation(soft_file)
|
110 |
+
|
111 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
112 |
+
print("Gene annotation preview:")
|
113 |
+
print(preview_df(gene_annotation))
|
114 |
+
# STEP: Gene Identifier Mapping
|
115 |
+
# 1. In the annotation DataFrame, the 'ID' column matches the probe identifiers in the gene expression data,
|
116 |
+
# and the 'Symbol' column contains the gene symbols.
|
117 |
+
# 2. Create a mapping DataFrame for probe-to-gene mapping.
|
118 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col="ID", gene_col="Symbol")
|
119 |
+
|
120 |
+
# 3. Apply this mapping to convert probe-level measurements to gene-level data.
|
121 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
122 |
+
|
123 |
+
# Optionally, preview a small portion of the resulting gene expression DataFrame
|
124 |
+
print(preview_df(gene_data, n=5))
|
125 |
+
# STEP7
|
126 |
+
# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.
|
127 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
128 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
129 |
+
|
130 |
+
# 2. Link the clinical and genetic data with the 'geo_link_clinical_genetic_data' function from the library.
|
131 |
+
linked_data = geo_link_clinical_genetic_data(selected_clinical_df, normalized_gene_data)
|
132 |
+
|
133 |
+
# 3. Handle missing values in the linked data
|
134 |
+
linked_data = handle_missing_values(linked_data, trait)
|
135 |
+
|
136 |
+
# 4. Determine whether the trait and some demographic features are severely biased, and remove biased features.
|
137 |
+
is_trait_biased, unbiased_linked_data = judge_and_remove_biased_features(linked_data, trait)
|
138 |
+
|
139 |
+
# 5. Conduct quality check and save the cohort information.
|
140 |
+
is_usable = validate_and_save_cohort_info(
|
141 |
+
is_final=True,
|
142 |
+
cohort=cohort,
|
143 |
+
info_path=json_path,
|
144 |
+
is_gene_available=True,
|
145 |
+
is_trait_available=True,
|
146 |
+
is_biased=is_trait_biased,
|
147 |
+
df=linked_data
|
148 |
+
)
|
149 |
+
|
150 |
+
# 6. If the linked data is usable, save it as a CSV file to 'out_data_file'.
|
151 |
+
if is_usable:
|
152 |
+
unbiased_linked_data.to_csv(out_data_file)
|
p1/preprocess/Chronic_kidney_disease/code/GSE127136.py
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE127136"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE127136"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE127136.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE127136.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE127136.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
21 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
22 |
+
|
23 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
24 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
25 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
26 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file, background_prefixes, clinical_prefixes)
|
27 |
+
|
28 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
29 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
30 |
+
|
31 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
32 |
+
print("Background Information:")
|
33 |
+
print(background_info)
|
34 |
+
print("Sample Characteristics Dictionary:")
|
35 |
+
print(sample_characteristics_dict)
|
36 |
+
# 1. Gene Expression Data Availability
|
37 |
+
is_gene_available = True # Single-cell RNA-seq suggests gene expression data is available.
|
38 |
+
|
39 |
+
# 2. Variable Availability and Data Type Conversion
|
40 |
+
# From the sample characteristics dictionary, row 1 contains multiple disease states (IgAN, kidney cancer, normal).
|
41 |
+
# We will treat "IgAN" as having the CKD trait = 1, and others (kidney cancer/normal) as 0.
|
42 |
+
trait_row = 1
|
43 |
+
age_row = None
|
44 |
+
gender_row = None
|
45 |
+
|
46 |
+
def convert_trait(value: str):
|
47 |
+
"""
|
48 |
+
Convert disease state values to binary indicating CKD (IgAN) or not.
|
49 |
+
"""
|
50 |
+
parts = value.split(':', 1)
|
51 |
+
val = parts[1].strip() if len(parts) > 1 else parts[0].strip()
|
52 |
+
if val.lower() == 'igan':
|
53 |
+
return 1
|
54 |
+
elif val.lower() in ['kidney cancer', 'normal']:
|
55 |
+
return 0
|
56 |
+
else:
|
57 |
+
return 0
|
58 |
+
|
59 |
+
# Since age and gender are not available, set their conversion functions to None
|
60 |
+
convert_age = None
|
61 |
+
convert_gender = None
|
62 |
+
|
63 |
+
# 3. Save Metadata using initial filtering
|
64 |
+
is_trait_available = (trait_row is not None)
|
65 |
+
is_usable = validate_and_save_cohort_info(
|
66 |
+
is_final=False,
|
67 |
+
cohort=cohort,
|
68 |
+
info_path=json_path,
|
69 |
+
is_gene_available=is_gene_available,
|
70 |
+
is_trait_available=is_trait_available
|
71 |
+
)
|
72 |
+
|
73 |
+
# 4. Clinical Feature Extraction (only if trait data is available)
|
74 |
+
if trait_row is not None:
|
75 |
+
selected_clinical_df = geo_select_clinical_features(
|
76 |
+
clinical_df=clinical_data,
|
77 |
+
trait=trait,
|
78 |
+
trait_row=trait_row,
|
79 |
+
convert_trait=convert_trait,
|
80 |
+
age_row=age_row,
|
81 |
+
convert_age=convert_age,
|
82 |
+
gender_row=gender_row,
|
83 |
+
convert_gender=convert_gender
|
84 |
+
)
|
85 |
+
print("Preview of selected clinical features:")
|
86 |
+
print(preview_df(selected_clinical_df))
|
87 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
88 |
+
# STEP3
|
89 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
90 |
+
gene_data = get_genetic_data(matrix_file)
|
91 |
+
|
92 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
93 |
+
print(gene_data.index[:20])
|
p1/preprocess/Chronic_kidney_disease/code/GSE142153.py
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE142153"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE142153"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE142153.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE142153.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE142153.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
21 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
22 |
+
|
23 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
24 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
25 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
26 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file, background_prefixes, clinical_prefixes)
|
27 |
+
|
28 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
29 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
30 |
+
|
31 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
32 |
+
print("Background Information:")
|
33 |
+
print(background_info)
|
34 |
+
print("Sample Characteristics Dictionary:")
|
35 |
+
print(sample_characteristics_dict)
|
36 |
+
# 1. Gene Expression Data Availability
|
37 |
+
is_gene_available = True # Based on "Microarray analysis" from the series summary
|
38 |
+
|
39 |
+
# 2. Variable Availability and Data Type Conversion
|
40 |
+
# From the sample characteristics dictionary, trait data is in row 1 ("diagnosis: ..."),
|
41 |
+
# age and gender data are not available.
|
42 |
+
trait_row = 1
|
43 |
+
age_row = None
|
44 |
+
gender_row = None
|
45 |
+
|
46 |
+
def convert_trait(value: str):
|
47 |
+
if not isinstance(value, str):
|
48 |
+
return None
|
49 |
+
# Split by colon and convert the part after colon
|
50 |
+
val = value.split(":")[-1].strip().lower()
|
51 |
+
if val == "healthy control":
|
52 |
+
return 0
|
53 |
+
elif val in ["diabetic nephropathy", "esrd"]:
|
54 |
+
return 1
|
55 |
+
return None
|
56 |
+
|
57 |
+
def convert_age(value: str):
|
58 |
+
# Not available in this dataset, so return None
|
59 |
+
return None
|
60 |
+
|
61 |
+
def convert_gender(value: str):
|
62 |
+
# Not available in this dataset, so return None
|
63 |
+
return None
|
64 |
+
|
65 |
+
# Determine trait availability
|
66 |
+
is_trait_available = (trait_row is not None)
|
67 |
+
|
68 |
+
# 3. Initial Filtering and Saving Metadata
|
69 |
+
_ = validate_and_save_cohort_info(
|
70 |
+
is_final=False,
|
71 |
+
cohort=cohort,
|
72 |
+
info_path=json_path,
|
73 |
+
is_gene_available=is_gene_available,
|
74 |
+
is_trait_available=is_trait_available
|
75 |
+
)
|
76 |
+
|
77 |
+
# 4. Clinical Feature Extraction (only if trait_row is not None)
|
78 |
+
if trait_row is not None:
|
79 |
+
selected_clinical_df = geo_select_clinical_features(
|
80 |
+
clinical_data,
|
81 |
+
trait=trait,
|
82 |
+
trait_row=trait_row,
|
83 |
+
convert_trait=convert_trait,
|
84 |
+
age_row=age_row,
|
85 |
+
convert_age=convert_age,
|
86 |
+
gender_row=gender_row,
|
87 |
+
convert_gender=convert_gender
|
88 |
+
)
|
89 |
+
print(preview_df(selected_clinical_df))
|
90 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
91 |
+
# STEP3
|
92 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
93 |
+
gene_data = get_genetic_data(matrix_file)
|
94 |
+
|
95 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
96 |
+
print(gene_data.index[:20])
|
97 |
+
# Based on the observed identifiers (e.g., "A_23_P100001"), these appear to be microarray probe IDs rather than standard human gene symbols.
|
98 |
+
print("requires_gene_mapping = True")
|
99 |
+
# STEP5
|
100 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
101 |
+
gene_annotation = get_gene_annotation(soft_file)
|
102 |
+
|
103 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
104 |
+
print("Gene annotation preview:")
|
105 |
+
print(preview_df(gene_annotation))
|
106 |
+
# STEP: Gene Identifier Mapping
|
107 |
+
|
108 |
+
# 1. We identify "ID" as the column with the same probe identifiers as in the gene expression data.
|
109 |
+
# and "GENE_SYMBOL" as the column with the gene symbols.
|
110 |
+
prob_col = "ID"
|
111 |
+
gene_col = "GENE_SYMBOL"
|
112 |
+
|
113 |
+
# 2. Obtain a mapping DataFrame for probes to gene symbols.
|
114 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col=prob_col, gene_col=gene_col)
|
115 |
+
|
116 |
+
# 3. Apply the mapping to convert probe-level expression data into gene-level expression data.
|
117 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
118 |
+
|
119 |
+
# Print a short preview of the resulting gene expression data
|
120 |
+
print("Gene expression data after mapping:")
|
121 |
+
print(preview_df(gene_data, n=5))
|
122 |
+
# STEP7
|
123 |
+
# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.
|
124 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
125 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
126 |
+
|
127 |
+
# 2. Link the clinical and genetic data with the 'geo_link_clinical_genetic_data' function from the library.
|
128 |
+
linked_data = geo_link_clinical_genetic_data(selected_clinical_df, normalized_gene_data)
|
129 |
+
|
130 |
+
# 3. Handle missing values in the linked data
|
131 |
+
linked_data = handle_missing_values(linked_data, trait)
|
132 |
+
|
133 |
+
# 4. Determine whether the trait and some demographic features are severely biased, and remove biased features.
|
134 |
+
is_trait_biased, unbiased_linked_data = judge_and_remove_biased_features(linked_data, trait)
|
135 |
+
|
136 |
+
# 5. Conduct quality check and save the cohort information.
|
137 |
+
is_usable = validate_and_save_cohort_info(
|
138 |
+
is_final=True,
|
139 |
+
cohort=cohort,
|
140 |
+
info_path=json_path,
|
141 |
+
is_gene_available=True,
|
142 |
+
is_trait_available=True,
|
143 |
+
is_biased=is_trait_biased,
|
144 |
+
df=linked_data
|
145 |
+
)
|
146 |
+
|
147 |
+
# 6. If the linked data is usable, save it as a CSV file to 'out_data_file'.
|
148 |
+
if is_usable:
|
149 |
+
unbiased_linked_data.to_csv(out_data_file)
|
p1/preprocess/Chronic_kidney_disease/code/GSE180393.py
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE180393"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE180393"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE180393.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE180393.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE180393.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
# 1. Identify the paths to the SOFT file and the matrix file
|
21 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
22 |
+
|
23 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
24 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
25 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
26 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file, background_prefixes, clinical_prefixes)
|
27 |
+
|
28 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
29 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
30 |
+
|
31 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
32 |
+
print("Background Information:")
|
33 |
+
print(background_info)
|
34 |
+
print("Sample Characteristics Dictionary:")
|
35 |
+
print(sample_characteristics_dict)
|
36 |
+
# 1. Evaluate whether gene expression data is available
|
37 |
+
is_gene_available = True # Based on microarray transcriptome data from the summary
|
38 |
+
|
39 |
+
# 2. Determine availability of trait, age, and gender data
|
40 |
+
# and define corresponding conversion functions
|
41 |
+
|
42 |
+
# From the sample characteristics dictionary, row 0 provides multi-category info
|
43 |
+
# about disease status. We will code "Living donor" or "unaffected" as 0 (control)
|
44 |
+
# and all others as 1 (CKD). Rows for age/gender do not appear available.
|
45 |
+
trait_row = 0
|
46 |
+
age_row = None
|
47 |
+
gender_row = None
|
48 |
+
|
49 |
+
def convert_trait(value: str):
|
50 |
+
# Extract the part after the colon
|
51 |
+
parts = value.split(":", 1)
|
52 |
+
if len(parts) < 2:
|
53 |
+
return None # Unknown format
|
54 |
+
label = parts[1].strip().lower()
|
55 |
+
# Living donor or unaffected
|
56 |
+
if "living donor" in label or "unaffected" in label:
|
57 |
+
return 0
|
58 |
+
else:
|
59 |
+
return 1
|
60 |
+
|
61 |
+
def convert_age(value: str):
|
62 |
+
# No age data available
|
63 |
+
return None
|
64 |
+
|
65 |
+
def convert_gender(value: str):
|
66 |
+
# No gender data available
|
67 |
+
return None
|
68 |
+
|
69 |
+
# 3. Conduct initial filtering and save metadata
|
70 |
+
is_trait_available = (trait_row is not None)
|
71 |
+
validate_and_save_cohort_info(
|
72 |
+
is_final=False,
|
73 |
+
cohort=cohort,
|
74 |
+
info_path=json_path,
|
75 |
+
is_gene_available=is_gene_available,
|
76 |
+
is_trait_available=is_trait_available
|
77 |
+
)
|
78 |
+
|
79 |
+
# 4. If trait data is available, extract and preview clinical features
|
80 |
+
if trait_row is not None:
|
81 |
+
selected_clinical_df = geo_select_clinical_features(
|
82 |
+
clinical_df=clinical_data,
|
83 |
+
trait=trait,
|
84 |
+
trait_row=trait_row,
|
85 |
+
convert_trait=convert_trait,
|
86 |
+
age_row=age_row,
|
87 |
+
convert_age=convert_age,
|
88 |
+
gender_row=gender_row,
|
89 |
+
convert_gender=convert_gender
|
90 |
+
)
|
91 |
+
|
92 |
+
# Preview and save the resulting clinical dataframe
|
93 |
+
preview = preview_df(selected_clinical_df, n=5)
|
94 |
+
print("Preview of selected clinical features:", preview)
|
95 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
96 |
+
# STEP3
|
97 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
98 |
+
gene_data = get_genetic_data(matrix_file)
|
99 |
+
|
100 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
101 |
+
print(gene_data.index[:20])
|
102 |
+
# The listed identifiers (e.g., "100009613_at", "10000_at", etc.) are typical Affymetrix probe set IDs,
|
103 |
+
# not standard human gene symbols. Therefore, they require mapping to gene symbols.
|
104 |
+
print("requires_gene_mapping = True")
|
105 |
+
# STEP5
|
106 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
107 |
+
gene_annotation = get_gene_annotation(soft_file)
|
108 |
+
|
109 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
110 |
+
print("Gene annotation preview:")
|
111 |
+
print(preview_df(gene_annotation))
|
112 |
+
# STEP6: Gene Identifier Mapping
|
113 |
+
|
114 |
+
# Observing the preview from step 5, the annotation DataFrame has columns 'ID' and 'ENTREZ_GENE_ID',
|
115 |
+
# but 'ENTREZ_GENE_ID' is purely numeric, which leads to an empty mapping when the library's
|
116 |
+
# apply_gene_mapping() tries to parse it as a “human gene symbol.” We will therefore implement
|
117 |
+
# a custom mapping function that distributes expression values to numeric Entrez IDs without
|
118 |
+
# filtering them out.
|
119 |
+
|
120 |
+
def apply_entrez_id_mapping(expression_df: pd.DataFrame, annotation_df: pd.DataFrame) -> pd.DataFrame:
|
121 |
+
"""
|
122 |
+
Convert probe-level data to gene-level data using numeric Entrez IDs.
|
123 |
+
If a probe maps to multiple Entrez IDs (split by '///'), each gene gets an equal split.
|
124 |
+
Then we sum contributions from multiple probes associated with the same gene ID.
|
125 |
+
"""
|
126 |
+
# Keep only the columns we need, renaming ENTREZ_GENE_ID to 'Gene'
|
127 |
+
mapping_df = annotation_df[['ID', 'ENTREZ_GENE_ID']].copy()
|
128 |
+
mapping_df.columns = ['ID', 'Gene']
|
129 |
+
mapping_df.dropna(subset=['Gene'], inplace=True)
|
130 |
+
|
131 |
+
# Filter to probes that exist in expression_df
|
132 |
+
mapping_df = mapping_df[mapping_df['ID'].isin(expression_df.index)].copy()
|
133 |
+
|
134 |
+
# A single probe might have multiple Entrez IDs separated by '///'
|
135 |
+
def split_entrez_ids(gene_str):
|
136 |
+
if '///' in gene_str:
|
137 |
+
return [x.strip() for x in gene_str.split('///') if x.strip()]
|
138 |
+
else:
|
139 |
+
return [gene_str.strip()]
|
140 |
+
|
141 |
+
mapping_df['Gene'] = mapping_df['Gene'].apply(split_entrez_ids)
|
142 |
+
# Remove rows with no valid gene IDs
|
143 |
+
mapping_df = mapping_df[mapping_df['Gene'].map(len) > 0]
|
144 |
+
|
145 |
+
# Count how many genes per probe
|
146 |
+
mapping_df['num_genes'] = mapping_df['Gene'].map(len)
|
147 |
+
|
148 |
+
# Explode so each gene occupies its own row
|
149 |
+
mapping_df.set_index('ID', inplace=True)
|
150 |
+
mapping_df = mapping_df.explode('Gene')
|
151 |
+
|
152 |
+
# Join expression data
|
153 |
+
merged_df = mapping_df.join(expression_df, how='inner')
|
154 |
+
expr_cols = [c for c in merged_df.columns if c not in ['Gene', 'num_genes']]
|
155 |
+
|
156 |
+
# Divide the probe expression among mapped genes
|
157 |
+
merged_df[expr_cols] = merged_df[expr_cols].div(merged_df['num_genes'], axis=0)
|
158 |
+
|
159 |
+
# Sum expressions for each gene
|
160 |
+
gene_df = merged_df.groupby('Gene')[expr_cols].sum()
|
161 |
+
return gene_df
|
162 |
+
|
163 |
+
# 1 & 2. Identify columns for probe ID and gene ID, then map
|
164 |
+
gene_data = apply_entrez_id_mapping(gene_data, gene_annotation)
|
165 |
+
|
166 |
+
# 3. Print shape after mapping to confirm we have gene-level data
|
167 |
+
print("Gene expression data shape after mapping:", gene_data.shape)
|
168 |
+
# STEP7
|
169 |
+
# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.
|
170 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
171 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
172 |
+
|
173 |
+
# 2. Link the clinical and genetic data with the 'geo_link_clinical_genetic_data' function from the library.
|
174 |
+
linked_data = geo_link_clinical_genetic_data(selected_clinical_df, normalized_gene_data)
|
175 |
+
|
176 |
+
# 3. Handle missing values in the linked data
|
177 |
+
linked_data = handle_missing_values(linked_data, trait)
|
178 |
+
|
179 |
+
# 4. Determine whether the trait and some demographic features are severely biased, and remove biased features.
|
180 |
+
is_trait_biased, unbiased_linked_data = judge_and_remove_biased_features(linked_data, trait)
|
181 |
+
|
182 |
+
# 5. Conduct quality check and save the cohort information.
|
183 |
+
is_usable = validate_and_save_cohort_info(
|
184 |
+
is_final=True,
|
185 |
+
cohort=cohort,
|
186 |
+
info_path=json_path,
|
187 |
+
is_gene_available=True,
|
188 |
+
is_trait_available=True,
|
189 |
+
is_biased=is_trait_biased,
|
190 |
+
df=linked_data
|
191 |
+
)
|
192 |
+
|
193 |
+
# 6. If the linked data is usable, save it as a CSV file to 'out_data_file'.
|
194 |
+
if is_usable:
|
195 |
+
unbiased_linked_data.to_csv(out_data_file)
|
p1/preprocess/Chronic_kidney_disease/code/GSE180394.py
ADDED
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE180394"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE180394"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE180394.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE180394.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE180394.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Attempt to identify the paths to the SOFT file and the matrix file
|
22 |
+
try:
|
23 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
24 |
+
except AssertionError:
|
25 |
+
print("[WARNING] Could not find the expected '.soft' or '.matrix' files in the directory.")
|
26 |
+
soft_file, matrix_file = None, None
|
27 |
+
|
28 |
+
if soft_file is None or matrix_file is None:
|
29 |
+
print("[ERROR] Required GEO files are missing. Please check file names in the cohort directory.")
|
30 |
+
else:
|
31 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
32 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
33 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
34 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file,
|
35 |
+
background_prefixes,
|
36 |
+
clinical_prefixes)
|
37 |
+
|
38 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
39 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
40 |
+
|
41 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
42 |
+
print("Background Information:")
|
43 |
+
print(background_info)
|
44 |
+
print("\nSample Characteristics Dictionary:")
|
45 |
+
print(sample_characteristics_dict)
|
46 |
+
# 1. Gene Expression Data Availability
|
47 |
+
is_gene_available = True # This dataset uses microarray for renal transcriptome analysis
|
48 |
+
|
49 |
+
# 2. Variable Availability and Data Type Conversion
|
50 |
+
# After assessing the sample characteristics:
|
51 |
+
# - The disease/trait information is at row=0, so trait_row=0
|
52 |
+
# - Age and gender information are not present, so age_row=None and gender_row=None
|
53 |
+
|
54 |
+
trait_row = 0
|
55 |
+
age_row = None
|
56 |
+
gender_row = None
|
57 |
+
|
58 |
+
# Define data type conversion functions
|
59 |
+
def convert_trait(value: str):
|
60 |
+
"""
|
61 |
+
Convert sample group to a binary indicator of CKD presence:
|
62 |
+
0 for healthy (e.g., living donor or unaffected part),
|
63 |
+
1 for CKD or other kidney disease states.
|
64 |
+
"""
|
65 |
+
if not value or ':' not in value:
|
66 |
+
return None
|
67 |
+
# Extract text after "sample group:"
|
68 |
+
val = value.split(':', 1)[-1].strip().lower()
|
69 |
+
if 'donor' in val or 'unaffected' in val:
|
70 |
+
return 0
|
71 |
+
else:
|
72 |
+
return 1
|
73 |
+
|
74 |
+
def convert_age(value: str):
|
75 |
+
"""No age data available, return None."""
|
76 |
+
return None
|
77 |
+
|
78 |
+
def convert_gender(value: str):
|
79 |
+
"""No gender data available, return None."""
|
80 |
+
return None
|
81 |
+
|
82 |
+
# 3. Save Metadata (initial filtering)
|
83 |
+
is_trait_available = (trait_row is not None)
|
84 |
+
is_usable = validate_and_save_cohort_info(
|
85 |
+
is_final=False,
|
86 |
+
cohort=cohort,
|
87 |
+
info_path=json_path,
|
88 |
+
is_gene_available=is_gene_available,
|
89 |
+
is_trait_available=is_trait_available
|
90 |
+
)
|
91 |
+
|
92 |
+
# 4. Clinical Feature Extraction (only if trait data is available)
|
93 |
+
if trait_row is not None:
|
94 |
+
selected_clinical_df = geo_select_clinical_features(
|
95 |
+
clinical_df=clinical_data, # assumed available from previous context
|
96 |
+
trait=trait,
|
97 |
+
trait_row=trait_row,
|
98 |
+
convert_trait=convert_trait,
|
99 |
+
age_row=age_row,
|
100 |
+
convert_age=convert_age,
|
101 |
+
gender_row=gender_row,
|
102 |
+
convert_gender=convert_gender
|
103 |
+
)
|
104 |
+
# Preview extracted clinical features
|
105 |
+
preview = preview_df(selected_clinical_df)
|
106 |
+
print("Preview of selected clinical features:", preview)
|
107 |
+
|
108 |
+
# Save clinical data if available
|
109 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
110 |
+
# STEP3
|
111 |
+
# Attempt to read gene expression data; if the library function yields an empty DataFrame,
|
112 |
+
# try re-reading without ignoring lines that start with '!' (because sometimes GEO data may
|
113 |
+
# place actual expression rows under lines that begin with '!').
|
114 |
+
|
115 |
+
gene_data = get_genetic_data(matrix_file)
|
116 |
+
if gene_data.empty:
|
117 |
+
print("[WARNING] The gene_data is empty. Attempting alternative loading without treating '!' as comments.")
|
118 |
+
import gzip
|
119 |
+
|
120 |
+
# Locate the marker line first
|
121 |
+
skip_rows = 0
|
122 |
+
with gzip.open(matrix_file, 'rt') as file:
|
123 |
+
for i, line in enumerate(file):
|
124 |
+
if "!series_matrix_table_begin" in line:
|
125 |
+
skip_rows = i + 1
|
126 |
+
break
|
127 |
+
|
128 |
+
# Read the data again, this time not treating '!' as comment
|
129 |
+
gene_data = pd.read_csv(
|
130 |
+
matrix_file,
|
131 |
+
compression="gzip",
|
132 |
+
skiprows=skip_rows,
|
133 |
+
delimiter="\t",
|
134 |
+
on_bad_lines="skip"
|
135 |
+
)
|
136 |
+
gene_data = gene_data.rename(columns={"ID_REF": "ID"}).astype({"ID": "str"})
|
137 |
+
gene_data.set_index("ID", inplace=True)
|
138 |
+
|
139 |
+
# Print the first 20 row IDs to confirm data structure
|
140 |
+
print(gene_data.index[:20])
|
141 |
+
# These identifiers (e.g., "100009613_at") are typical Affymetrix probe IDs, not standard human gene symbols.
|
142 |
+
|
143 |
+
print("\nrequires_gene_mapping = True")
|
144 |
+
# STEP5
|
145 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
146 |
+
gene_annotation = get_gene_annotation(soft_file)
|
147 |
+
|
148 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
149 |
+
print("Gene annotation preview:")
|
150 |
+
print(preview_df(gene_annotation))
|
151 |
+
# STEP: Gene Identifier Mapping
|
152 |
+
|
153 |
+
# 1) From the annotation preview, we see that the column "ID" matches the probe IDs in the gene expression data,
|
154 |
+
# and "ENTREZ_GENE_ID" stores the corresponding gene identifier (which we'll treat as the 'gene symbol' column).
|
155 |
+
|
156 |
+
probe_col = "ID"
|
157 |
+
symbol_col = "ENTREZ_GENE_ID"
|
158 |
+
|
159 |
+
# 2) Get a two-column dataframe for mapping probes to genes
|
160 |
+
gene_mapping = get_gene_mapping(gene_annotation, prob_col=probe_col, gene_col=symbol_col)
|
161 |
+
|
162 |
+
# 3) Apply the mapping to convert probe-level data into gene-level data
|
163 |
+
gene_data = apply_gene_mapping(gene_data, gene_mapping)
|
164 |
+
|
165 |
+
# Print a brief preview
|
166 |
+
print("Gene expression data shape:", gene_data.shape)
|
167 |
+
print("Preview of the mapped gene expression data:")
|
168 |
+
print(gene_data.head())
|
169 |
+
import os
|
170 |
+
import pandas as pd
|
171 |
+
|
172 |
+
# STEP7: Data Normalization and Linking
|
173 |
+
|
174 |
+
# 1) Normalize the gene symbols in the previously obtained gene_data
|
175 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
176 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
177 |
+
|
178 |
+
# 2) Load clinical data only if it exists and is non-empty
|
179 |
+
if os.path.exists(out_clinical_data_file) and os.path.getsize(out_clinical_data_file) > 0:
|
180 |
+
# Read the file
|
181 |
+
clinical_temp = pd.read_csv(out_clinical_data_file)
|
182 |
+
|
183 |
+
# Adjust row index to label the trait, age, and gender properly
|
184 |
+
if clinical_temp.shape[0] == 3:
|
185 |
+
clinical_temp.index = [trait, "Age", "Gender"]
|
186 |
+
elif clinical_temp.shape[0] == 2:
|
187 |
+
clinical_temp.index = [trait, "Age"]
|
188 |
+
elif clinical_temp.shape[0] == 1:
|
189 |
+
clinical_temp.index = [trait]
|
190 |
+
|
191 |
+
# 2) Link the clinical and normalized genetic data
|
192 |
+
linked_data = geo_link_clinical_genetic_data(clinical_temp, normalized_gene_data)
|
193 |
+
|
194 |
+
# 3) Handle missing values
|
195 |
+
linked_data = handle_missing_values(linked_data, trait)
|
196 |
+
|
197 |
+
# 4) Check for severe bias in the trait; remove biased demographic features if present
|
198 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
199 |
+
|
200 |
+
# 5) Final quality validation and save metadata
|
201 |
+
is_usable = validate_and_save_cohort_info(
|
202 |
+
is_final=True,
|
203 |
+
cohort=cohort,
|
204 |
+
info_path=json_path,
|
205 |
+
is_gene_available=True,
|
206 |
+
is_trait_available=True,
|
207 |
+
is_biased=trait_biased,
|
208 |
+
df=linked_data,
|
209 |
+
note=f"Final check on {cohort} with {trait}."
|
210 |
+
)
|
211 |
+
|
212 |
+
# 6) If the linked data is usable, save it
|
213 |
+
if is_usable:
|
214 |
+
linked_data.to_csv(out_data_file)
|
215 |
+
else:
|
216 |
+
# If no valid clinical data file is found, finalize metadata indicating trait unavailability
|
217 |
+
is_usable = validate_and_save_cohort_info(
|
218 |
+
is_final=True,
|
219 |
+
cohort=cohort,
|
220 |
+
info_path=json_path,
|
221 |
+
is_gene_available=True,
|
222 |
+
is_trait_available=False,
|
223 |
+
is_biased=True, # Force a fallback so that it's flagged as unusable
|
224 |
+
df=pd.DataFrame(),
|
225 |
+
note=f"No trait data found for {cohort}, final metadata recorded."
|
226 |
+
)
|
227 |
+
# Per instructions, do not save a final linked data file when trait data is absent.
|
p1/preprocess/Chronic_kidney_disease/code/GSE45980.py
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE45980"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE45980"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE45980.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE45980.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE45980.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Attempt to identify the paths to the SOFT file and the matrix file
|
22 |
+
try:
|
23 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
24 |
+
except AssertionError:
|
25 |
+
print("[WARNING] Could not find the expected '.soft' or '.matrix' files in the directory.")
|
26 |
+
soft_file, matrix_file = None, None
|
27 |
+
|
28 |
+
if soft_file is None or matrix_file is None:
|
29 |
+
print("[ERROR] Required GEO files are missing. Please check file names in the cohort directory.")
|
30 |
+
else:
|
31 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
32 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
33 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
34 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file,
|
35 |
+
background_prefixes,
|
36 |
+
clinical_prefixes)
|
37 |
+
|
38 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
39 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
40 |
+
|
41 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
42 |
+
print("Background Information:")
|
43 |
+
print(background_info)
|
44 |
+
print("\nSample Characteristics Dictionary:")
|
45 |
+
print(sample_characteristics_dict)
|
46 |
+
# Step 1: Determine if gene expression data is available
|
47 |
+
# From the background info, mRNA expression profiling was performed, so we set:
|
48 |
+
is_gene_available = True
|
49 |
+
|
50 |
+
# Step 2: Variable Availability and Data Type Conversion
|
51 |
+
|
52 |
+
# 2.1 The dataset trait is chronic kidney disease (CKD). However, all subjects are CKD patients,
|
53 |
+
# so there's no variation (everyone has the trait). Hence, it's effectively not available for our analysis:
|
54 |
+
trait_row = None
|
55 |
+
|
56 |
+
# For age, row 1 contains varied age values "age (yrs): <number>".
|
57 |
+
age_row = 1
|
58 |
+
|
59 |
+
# For gender, row 0 contains "gender: male" or "gender: female", so it is available and non-constant.
|
60 |
+
gender_row = 0
|
61 |
+
|
62 |
+
# 2.2 Define conversion functions for each variable.
|
63 |
+
|
64 |
+
def convert_trait(value: str) -> int:
|
65 |
+
# The trait is not actually variable in this dataset, so we won't use this.
|
66 |
+
# But we define a no-op function for completeness.
|
67 |
+
return None
|
68 |
+
|
69 |
+
def convert_age(value: str) -> float:
|
70 |
+
try:
|
71 |
+
# Example: "age (yrs): 72"
|
72 |
+
# Split at the first colon and parse the right side
|
73 |
+
right_side = value.split(':', 1)[1].strip()
|
74 |
+
return float(right_side)
|
75 |
+
except:
|
76 |
+
return None
|
77 |
+
|
78 |
+
def convert_gender(value: str) -> int:
|
79 |
+
try:
|
80 |
+
# Example: "gender: male"
|
81 |
+
right_side = value.split(':', 1)[1].strip().lower()
|
82 |
+
if right_side == 'male':
|
83 |
+
return 1
|
84 |
+
elif right_side == 'female':
|
85 |
+
return 0
|
86 |
+
else:
|
87 |
+
return None
|
88 |
+
except:
|
89 |
+
return None
|
90 |
+
|
91 |
+
# 3. Save Metadata (initial filtering)
|
92 |
+
# Trait availability depends on whether trait_row is None.
|
93 |
+
is_trait_available = (trait_row is not None)
|
94 |
+
|
95 |
+
is_usable = validate_and_save_cohort_info(
|
96 |
+
is_final=False,
|
97 |
+
cohort=cohort,
|
98 |
+
info_path=json_path,
|
99 |
+
is_gene_available=is_gene_available,
|
100 |
+
is_trait_available=is_trait_available
|
101 |
+
)
|
102 |
+
|
103 |
+
# 4. Clinical Feature Extraction
|
104 |
+
# Only proceed if the trait is available, i.e., trait_row is not None.
|
105 |
+
if trait_row is not None:
|
106 |
+
# Suppose we have a DataFrame called clinical_data already loaded.
|
107 |
+
# (In practice, it would be passed from previous steps.)
|
108 |
+
selected_clinical_df = geo_select_clinical_features(
|
109 |
+
clinical_df=clinical_data,
|
110 |
+
trait=trait,
|
111 |
+
trait_row=trait_row,
|
112 |
+
convert_trait=convert_trait,
|
113 |
+
age_row=age_row,
|
114 |
+
convert_age=convert_age,
|
115 |
+
gender_row=gender_row,
|
116 |
+
convert_gender=convert_gender
|
117 |
+
)
|
118 |
+
preview = preview_df(selected_clinical_df)
|
119 |
+
print("Preview of selected clinical features:", preview)
|
120 |
+
|
121 |
+
# Save to CSV
|
122 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
123 |
+
# STEP3
|
124 |
+
# Attempt to read gene expression data; if the library function yields an empty DataFrame,
|
125 |
+
# try re-reading without ignoring lines that start with '!' (because sometimes GEO data may
|
126 |
+
# place actual expression rows under lines that begin with '!').
|
127 |
+
|
128 |
+
gene_data = get_genetic_data(matrix_file)
|
129 |
+
if gene_data.empty:
|
130 |
+
print("[WARNING] The gene_data is empty. Attempting alternative loading without treating '!' as comments.")
|
131 |
+
import gzip
|
132 |
+
|
133 |
+
# Locate the marker line first
|
134 |
+
skip_rows = 0
|
135 |
+
with gzip.open(matrix_file, 'rt') as file:
|
136 |
+
for i, line in enumerate(file):
|
137 |
+
if "!series_matrix_table_begin" in line:
|
138 |
+
skip_rows = i + 1
|
139 |
+
break
|
140 |
+
|
141 |
+
# Read the data again, this time not treating '!' as comment
|
142 |
+
gene_data = pd.read_csv(
|
143 |
+
matrix_file,
|
144 |
+
compression="gzip",
|
145 |
+
skiprows=skip_rows,
|
146 |
+
delimiter="\t",
|
147 |
+
on_bad_lines="skip"
|
148 |
+
)
|
149 |
+
gene_data = gene_data.rename(columns={"ID_REF": "ID"}).astype({"ID": "str"})
|
150 |
+
gene_data.set_index("ID", inplace=True)
|
151 |
+
|
152 |
+
# Print the first 20 row IDs to confirm data structure
|
153 |
+
print(gene_data.index[:20])
|
154 |
+
# Based on the probe-like format of the identifiers (e.g., 'A_23_P100001'),
|
155 |
+
# they do not appear to be standard human gene symbols. They likely require mapping.
|
156 |
+
print("requires_gene_mapping = True")
|
157 |
+
# STEP5
|
158 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
159 |
+
gene_annotation = get_gene_annotation(soft_file)
|
160 |
+
|
161 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
162 |
+
print("Gene annotation preview:")
|
163 |
+
print(preview_df(gene_annotation))
|
164 |
+
# STEP: Gene Identifier Mapping
|
165 |
+
|
166 |
+
# 1. Decide that the column "ID" in the annotation dataframe corresponds to the probe IDs,
|
167 |
+
# and "GENE_SYMBOL" corresponds to the gene symbol.
|
168 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col="ID", gene_col="GENE_SYMBOL")
|
169 |
+
|
170 |
+
# 2. Convert probe-level data to gene expression data.
|
171 |
+
gene_data = apply_gene_mapping(expression_df=gene_data, mapping_df=mapping_df)
|
172 |
+
|
173 |
+
# Show a quick preview of the resulting gene-level data.
|
174 |
+
print("Mapped gene_data shape:", gene_data.shape)
|
175 |
+
print(gene_data.head())
|
176 |
+
import os
|
177 |
+
import pandas as pd
|
178 |
+
|
179 |
+
# STEP7: Data Normalization and Linking
|
180 |
+
|
181 |
+
# 1) Normalize the gene symbols in the previously obtained gene_data
|
182 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
183 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
184 |
+
|
185 |
+
# 2) Load clinical data only if it exists and is non-empty
|
186 |
+
if os.path.exists(out_clinical_data_file) and os.path.getsize(out_clinical_data_file) > 0:
|
187 |
+
# Read the file
|
188 |
+
clinical_temp = pd.read_csv(out_clinical_data_file)
|
189 |
+
|
190 |
+
# Adjust row index to label the trait, age, and gender properly
|
191 |
+
if clinical_temp.shape[0] == 3:
|
192 |
+
clinical_temp.index = [trait, "Age", "Gender"]
|
193 |
+
elif clinical_temp.shape[0] == 2:
|
194 |
+
clinical_temp.index = [trait, "Age"]
|
195 |
+
elif clinical_temp.shape[0] == 1:
|
196 |
+
clinical_temp.index = [trait]
|
197 |
+
|
198 |
+
# 2) Link the clinical and normalized genetic data
|
199 |
+
linked_data = geo_link_clinical_genetic_data(clinical_temp, normalized_gene_data)
|
200 |
+
|
201 |
+
# 3) Handle missing values
|
202 |
+
linked_data = handle_missing_values(linked_data, trait)
|
203 |
+
|
204 |
+
# 4) Check for severe bias in the trait; remove biased demographic features if present
|
205 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
206 |
+
|
207 |
+
# 5) Final quality validation and save metadata
|
208 |
+
is_usable = validate_and_save_cohort_info(
|
209 |
+
is_final=True,
|
210 |
+
cohort=cohort,
|
211 |
+
info_path=json_path,
|
212 |
+
is_gene_available=True,
|
213 |
+
is_trait_available=True,
|
214 |
+
is_biased=trait_biased,
|
215 |
+
df=linked_data,
|
216 |
+
note=f"Final check on {cohort} with {trait}."
|
217 |
+
)
|
218 |
+
|
219 |
+
# 6) If the linked data is usable, save it
|
220 |
+
if is_usable:
|
221 |
+
linked_data.to_csv(out_data_file)
|
222 |
+
else:
|
223 |
+
# If no valid clinical data file is found, finalize metadata indicating trait unavailability
|
224 |
+
is_usable = validate_and_save_cohort_info(
|
225 |
+
is_final=True,
|
226 |
+
cohort=cohort,
|
227 |
+
info_path=json_path,
|
228 |
+
is_gene_available=True,
|
229 |
+
is_trait_available=False,
|
230 |
+
is_biased=True, # Force a fallback so that it's flagged as unusable
|
231 |
+
df=pd.DataFrame(),
|
232 |
+
note=f"No trait data found for {cohort}, final metadata recorded."
|
233 |
+
)
|
234 |
+
# Per instructions, do not save a final linked data file when trait data is absent.
|
p1/preprocess/Chronic_kidney_disease/code/GSE60861.py
ADDED
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Chronic_kidney_disease"
|
6 |
+
cohort = "GSE60861"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Chronic_kidney_disease"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Chronic_kidney_disease/GSE60861"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Chronic_kidney_disease/GSE60861.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Chronic_kidney_disease/gene_data/GSE60861.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Chronic_kidney_disease/clinical_data/GSE60861.csv"
|
16 |
+
json_path = "./output/preprocess/1/Chronic_kidney_disease/cohort_info.json"
|
17 |
+
|
18 |
+
# STEP1
|
19 |
+
from tools.preprocess import *
|
20 |
+
|
21 |
+
# 1. Attempt to identify the paths to the SOFT file and the matrix file
|
22 |
+
try:
|
23 |
+
soft_file, matrix_file = geo_get_relevant_filepaths(in_cohort_dir)
|
24 |
+
except AssertionError:
|
25 |
+
print("[WARNING] Could not find the expected '.soft' or '.matrix' files in the directory.")
|
26 |
+
soft_file, matrix_file = None, None
|
27 |
+
|
28 |
+
if soft_file is None or matrix_file is None:
|
29 |
+
print("[ERROR] Required GEO files are missing. Please check file names in the cohort directory.")
|
30 |
+
else:
|
31 |
+
# 2. Read the matrix file to obtain background information and sample characteristics data
|
32 |
+
background_prefixes = ['!Series_title', '!Series_summary', '!Series_overall_design']
|
33 |
+
clinical_prefixes = ['!Sample_geo_accession', '!Sample_characteristics_ch1']
|
34 |
+
background_info, clinical_data = get_background_and_clinical_data(matrix_file,
|
35 |
+
background_prefixes,
|
36 |
+
clinical_prefixes)
|
37 |
+
|
38 |
+
# 3. Obtain the sample characteristics dictionary from the clinical dataframe
|
39 |
+
sample_characteristics_dict = get_unique_values_by_row(clinical_data)
|
40 |
+
|
41 |
+
# 4. Explicitly print out all the background information and the sample characteristics dictionary
|
42 |
+
print("Background Information:")
|
43 |
+
print(background_info)
|
44 |
+
print("\nSample Characteristics Dictionary:")
|
45 |
+
print(sample_characteristics_dict)
|
46 |
+
# 1. Determine if the dataset likely contains gene expression (mRNA) data
|
47 |
+
# From the background info, the title explicitly states analysis of mRNA-expression,
|
48 |
+
# so we set is_gene_available = True.
|
49 |
+
|
50 |
+
is_gene_available = True
|
51 |
+
|
52 |
+
# 2. Determine availability and parsing of the variables 'trait', 'age', and 'gender'.
|
53 |
+
|
54 |
+
# 2.1 Data Availability
|
55 |
+
# The dataset is entirely about chronic kidney disease (CKD) subdivided by specific nephropathies.
|
56 |
+
# Hence CKD is constant across all samples and offers no variation for associating gene expression.
|
57 |
+
# Therefore, "trait_row" should be None (treated as not available).
|
58 |
+
trait_row = None
|
59 |
+
|
60 |
+
# For the 'age' variable, key=1 in the sample characteristics has well-defined numeric values
|
61 |
+
# with multiple distinct entries. Thus we set age_row=1.
|
62 |
+
age_row = 1
|
63 |
+
|
64 |
+
# For the 'gender' variable, key=0 has entries "gender: male" and "gender: female" (and one mentioning "tissue"),
|
65 |
+
# which still shows at least 2 distinct gender values. Hence gender_row=0.
|
66 |
+
gender_row = 0
|
67 |
+
|
68 |
+
# 2.2 Data Type Conversion
|
69 |
+
# - Trait: not available (trait_row=None), but we still define the function.
|
70 |
+
# - Age: continuous.
|
71 |
+
# - Gender: binary (female->0, male->1).
|
72 |
+
|
73 |
+
def convert_trait(value: str) -> int:
|
74 |
+
# Not actually used since trait_row is None, but defined for completeness.
|
75 |
+
# We consider it unavailable, so return None to skip usage.
|
76 |
+
return None
|
77 |
+
|
78 |
+
def convert_age(value: str) -> float:
|
79 |
+
# Extract the part after the colon and convert to float
|
80 |
+
# Unknown or malformed entries become None
|
81 |
+
parts = value.split(":")
|
82 |
+
if len(parts) < 2:
|
83 |
+
return None
|
84 |
+
try:
|
85 |
+
return float(parts[-1].strip())
|
86 |
+
except ValueError:
|
87 |
+
return None
|
88 |
+
|
89 |
+
def convert_gender(value: str) -> int:
|
90 |
+
# Extract the part after the colon
|
91 |
+
parts = value.split(":")
|
92 |
+
if len(parts) < 2:
|
93 |
+
return None
|
94 |
+
val = parts[-1].strip().lower()
|
95 |
+
if val == "male":
|
96 |
+
return 1
|
97 |
+
elif val == "female":
|
98 |
+
return 0
|
99 |
+
else:
|
100 |
+
return None
|
101 |
+
|
102 |
+
# 3. Save metadata with initial filtering.
|
103 |
+
# trait_row is None => is_trait_available = False
|
104 |
+
# gene expression is likely => is_gene_available = True
|
105 |
+
# Perform the initial validation.
|
106 |
+
is_trait_available = (trait_row is not None)
|
107 |
+
|
108 |
+
is_usable = validate_and_save_cohort_info(
|
109 |
+
is_final=False,
|
110 |
+
cohort=cohort,
|
111 |
+
info_path=json_path,
|
112 |
+
is_gene_available=is_gene_available,
|
113 |
+
is_trait_available=is_trait_available
|
114 |
+
)
|
115 |
+
|
116 |
+
# 4. Clinical Feature Extraction
|
117 |
+
# We only extract clinical features if trait_row is not None. Here trait_row = None (no variation),
|
118 |
+
# so we skip the extraction step.
|
119 |
+
# (No further action regarding clinical data extraction.)
|
120 |
+
# STEP3
|
121 |
+
# Attempt to read gene expression data; if the library function yields an empty DataFrame,
|
122 |
+
# try re-reading without ignoring lines that start with '!' (because sometimes GEO data may
|
123 |
+
# place actual expression rows under lines that begin with '!').
|
124 |
+
|
125 |
+
gene_data = get_genetic_data(matrix_file)
|
126 |
+
if gene_data.empty:
|
127 |
+
print("[WARNING] The gene_data is empty. Attempting alternative loading without treating '!' as comments.")
|
128 |
+
import gzip
|
129 |
+
|
130 |
+
# Locate the marker line first
|
131 |
+
skip_rows = 0
|
132 |
+
with gzip.open(matrix_file, 'rt') as file:
|
133 |
+
for i, line in enumerate(file):
|
134 |
+
if "!series_matrix_table_begin" in line:
|
135 |
+
skip_rows = i + 1
|
136 |
+
break
|
137 |
+
|
138 |
+
# Read the data again, this time not treating '!' as comment
|
139 |
+
gene_data = pd.read_csv(
|
140 |
+
matrix_file,
|
141 |
+
compression="gzip",
|
142 |
+
skiprows=skip_rows,
|
143 |
+
delimiter="\t",
|
144 |
+
on_bad_lines="skip"
|
145 |
+
)
|
146 |
+
gene_data = gene_data.rename(columns={"ID_REF": "ID"}).astype({"ID": "str"})
|
147 |
+
gene_data.set_index("ID", inplace=True)
|
148 |
+
|
149 |
+
# Print the first 20 row IDs to confirm data structure
|
150 |
+
print(gene_data.index[:20])
|
151 |
+
# Based on their format (e.g., "A_23_P100001"), these identifiers appear to be probe IDs from a microarray platform,
|
152 |
+
# rather than standard human gene symbols. Therefore, they need to be mapped to gene symbols.
|
153 |
+
|
154 |
+
print("These identifiers are microarray probe IDs, not standard human gene symbols.")
|
155 |
+
print("requires_gene_mapping = True")
|
156 |
+
# STEP5
|
157 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
158 |
+
gene_annotation = get_gene_annotation(soft_file)
|
159 |
+
|
160 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
161 |
+
print("Gene annotation preview:")
|
162 |
+
print(preview_df(gene_annotation))
|
163 |
+
# STEP6: Gene Identifier Mapping
|
164 |
+
|
165 |
+
# 1 & 2. Decide which columns in the gene annotation dataframe correspond to the probe IDs and gene symbols.
|
166 |
+
# From inspection, "ID" matches the probe IDs (e.g., "A_23_P100001") in our expression data,
|
167 |
+
# and "GENE_SYMBOL" contains the gene symbols.
|
168 |
+
mapping_df = get_gene_mapping(gene_annotation, 'ID', 'GENE_SYMBOL')
|
169 |
+
|
170 |
+
# 3. Convert probe-level measurements to gene expression data by applying the mapping:
|
171 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
172 |
+
import os
|
173 |
+
import pandas as pd
|
174 |
+
|
175 |
+
# STEP7: Data Normalization and Linking
|
176 |
+
|
177 |
+
# 1) Normalize the gene symbols in the previously obtained gene_data
|
178 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
179 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
180 |
+
|
181 |
+
# 2) Load clinical data only if it exists and is non-empty
|
182 |
+
if os.path.exists(out_clinical_data_file) and os.path.getsize(out_clinical_data_file) > 0:
|
183 |
+
# Read the file
|
184 |
+
clinical_temp = pd.read_csv(out_clinical_data_file)
|
185 |
+
|
186 |
+
# Adjust row index to label the trait, age, and gender properly
|
187 |
+
if clinical_temp.shape[0] == 3:
|
188 |
+
clinical_temp.index = [trait, "Age", "Gender"]
|
189 |
+
elif clinical_temp.shape[0] == 2:
|
190 |
+
clinical_temp.index = [trait, "Age"]
|
191 |
+
elif clinical_temp.shape[0] == 1:
|
192 |
+
clinical_temp.index = [trait]
|
193 |
+
|
194 |
+
# 2) Link the clinical and normalized genetic data
|
195 |
+
linked_data = geo_link_clinical_genetic_data(clinical_temp, normalized_gene_data)
|
196 |
+
|
197 |
+
# 3) Handle missing values
|
198 |
+
linked_data = handle_missing_values(linked_data, trait)
|
199 |
+
|
200 |
+
# 4) Check for severe bias in the trait; remove biased demographic features if present
|
201 |
+
trait_biased, linked_data = judge_and_remove_biased_features(linked_data, trait)
|
202 |
+
|
203 |
+
# 5) Final quality validation and save metadata
|
204 |
+
is_usable = validate_and_save_cohort_info(
|
205 |
+
is_final=True,
|
206 |
+
cohort=cohort,
|
207 |
+
info_path=json_path,
|
208 |
+
is_gene_available=True,
|
209 |
+
is_trait_available=True,
|
210 |
+
is_biased=trait_biased,
|
211 |
+
df=linked_data,
|
212 |
+
note=f"Final check on {cohort} with {trait}."
|
213 |
+
)
|
214 |
+
|
215 |
+
# 6) If the linked data is usable, save it
|
216 |
+
if is_usable:
|
217 |
+
linked_data.to_csv(out_data_file)
|
218 |
+
else:
|
219 |
+
# If no valid clinical data file is found, finalize metadata indicating trait unavailability
|
220 |
+
is_usable = validate_and_save_cohort_info(
|
221 |
+
is_final=True,
|
222 |
+
cohort=cohort,
|
223 |
+
info_path=json_path,
|
224 |
+
is_gene_available=True,
|
225 |
+
is_trait_available=False,
|
226 |
+
is_biased=True, # Force a fallback so that it's flagged as unusable
|
227 |
+
df=pd.DataFrame(),
|
228 |
+
note=f"No trait data found for {cohort}, final metadata recorded."
|
229 |
+
)
|
230 |
+
# Per instructions, do not save a final linked data file when trait data is absent.
|