Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- input/GEO/Substance_Use_Disorder/GSE161986/GSE161986_family.soft.gz +3 -0
- input/GEO/Substance_Use_Disorder/GSE161986/GSE161986_series_matrix.txt.gz +3 -0
- input/GEO/Substance_Use_Disorder/GSE161999/GSE161999-GPL16384_series_matrix.txt.gz +3 -0
- input/GEO/Substance_Use_Disorder/GSE273630/GSE273630_family.soft.gz +3 -0
- input/GEO/Telomere_Length/GSE16058/GSE16058_series_matrix.txt.gz +3 -0
- input/GEO/Testicular_Cancer/GSE62523/GSE62523_family.soft.gz +3 -0
- input/GEO/Thymoma/GSE29695/GSE29695_family.soft.gz +3 -0
- input/GEO/Thymoma/GSE42977/GSE42977_series_matrix.txt.gz +3 -0
- input/GEO/Uterine_Carcinosarcoma/GSE68950/GSE68950_family.soft.gz +3 -0
- input/GEO/Uterine_Carcinosarcoma/GSE68950/GSE68950_series_matrix.txt.gz +3 -0
- input/GEO/Vitamin_D_Levels/GSE118723/GSE118723_series_matrix.txt.gz +3 -0
- input/TCGA/TCGA_Bladder_Cancer_(BLCA)/TCGA.BLCA.sampleMap_BLCA_clinicalMatrix +0 -0
- input/TCGA/TCGA_Breast_Cancer_(BRCA)/TCGA.BRCA.sampleMap_BRCA_clinicalMatrix +0 -0
- input/TCGA/TCGA_Cervical_Cancer_(CESC)/TCGA.CESC.sampleMap_CESC_clinicalMatrix +0 -0
- output/preprocess/Polycystic_Ovary_Syndrome/GSE87435.csv +0 -0
- output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/GSE151158.csv +3 -0
- output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/GSE43322.csv +3 -0
- output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/GSE87435.csv +3 -0
- output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/TCGA.csv +703 -0
- output/preprocess/Polycystic_Ovary_Syndrome/cohort_info.json +42 -0
- output/preprocess/Polycystic_Ovary_Syndrome/gene_data/GSE151158.csv +0 -0
- output/preprocess/Polycystic_Ovary_Syndrome/gene_data/GSE43322.csv +0 -0
- output/preprocess/Polycystic_Ovary_Syndrome/gene_data/GSE87435.csv +0 -0
- output/preprocess/Post-Traumatic_Stress_Disorder/GSE199841.csv +0 -0
- output/preprocess/Post-Traumatic_Stress_Disorder/cohort_info.json +102 -0
- output/preprocess/Psoriasis/GSE183134.csv +0 -0
- output/preprocess/Psoriasis/clinical_data/GSE123086.csv +4 -0
- output/preprocess/Psoriasis/clinical_data/GSE123088.csv +4 -0
- output/preprocess/Psoriasis/clinical_data/GSE158448.csv +2 -0
- output/preprocess/Psoriasis/clinical_data/GSE162998.csv +2 -0
- output/preprocess/Psoriasis/clinical_data/GSE178228.csv +2 -0
- output/preprocess/Rectal_Cancer/cohort_info.json +112 -0
- p1/preprocess/Prostate_Cancer/gene_data/GSE259218.csv +9 -0
- p1/preprocess/Sarcoma/clinical_data/GSE197147.csv +2 -0
- p1/preprocess/Sarcoma/code/GSE118336.py +251 -0
- p1/preprocess/Sarcoma/code/GSE133228.py +247 -0
- p1/preprocess/Sarcoma/code/GSE142162.py +235 -0
- p1/preprocess/Sarcoma/code/GSE159847.py +237 -0
- p1/preprocess/Sarcoma/code/GSE159848.py +234 -0
- p1/preprocess/Sarcoma/code/GSE162785.py +218 -0
- p1/preprocess/Sarcoma/code/GSE162789.py +245 -0
- p1/preprocess/Sarcoma/code/GSE197147.py +244 -0
- p1/preprocess/Schizophrenia/GSE120340.csv +0 -0
- p1/preprocess/Schizophrenia/GSE120342.csv +0 -0
- p1/preprocess/Schizophrenia/clinical_data/GSE120340.csv +2 -0
- p1/preprocess/Schizophrenia/clinical_data/GSE120342.csv +2 -0
- p1/preprocess/Schizophrenia/clinical_data/GSE145554.csv +4 -0
- p1/preprocess/Schizophrenia/code/GSE119288.py +120 -0
- p1/preprocess/Schizophrenia/code/GSE119289.py +124 -0
- p1/preprocess/Schizophrenia/code/GSE120340.py +144 -0
input/GEO/Substance_Use_Disorder/GSE161986/GSE161986_family.soft.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b5fabb7e9b7191a95400ec39bb8b2196968f6648917fd217cdf3b19cc44a3aae
|
3 |
+
size 11232051
|
input/GEO/Substance_Use_Disorder/GSE161986/GSE161986_series_matrix.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fe0ed7db595f0a1fa8f4f8e8a8f9c17963519c03724ead257c481f41b7709446
|
3 |
+
size 2677416
|
input/GEO/Substance_Use_Disorder/GSE161999/GSE161999-GPL16384_series_matrix.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8fd2f33c7476ea46e40c6783a73ffcaf995bd448b58a1bdacc3cbbc3bf106a6a
|
3 |
+
size 216063
|
input/GEO/Substance_Use_Disorder/GSE273630/GSE273630_family.soft.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f04bdf73ec7d848ccf8f0c89cb1085a64a37705ebc15c7d471666dc027f56024
|
3 |
+
size 342110
|
input/GEO/Telomere_Length/GSE16058/GSE16058_series_matrix.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dfd5d6bbd19ea8c1a8c01ece38858229406cb245a49d9b56cecd99d8bc1b5d7d
|
3 |
+
size 5901241
|
input/GEO/Testicular_Cancer/GSE62523/GSE62523_family.soft.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0f44fda1a3d4b8d2832345f787ccc8932a40ad46db6524ec4df672703f4be207
|
3 |
+
size 16391600
|
input/GEO/Thymoma/GSE29695/GSE29695_family.soft.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fe6916f7a7ac09341b61be773a14fa93df9afbb135bf9716cc838d96202612a7
|
3 |
+
size 18223233
|
input/GEO/Thymoma/GSE42977/GSE42977_series_matrix.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:29764af5134eca4417ac82fc5911de2719ec5fd7a6b5f11a86b53565d60e37f9
|
3 |
+
size 29160190
|
input/GEO/Uterine_Carcinosarcoma/GSE68950/GSE68950_family.soft.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0afb89c03e6dc6af279d5dd144dbd63d8676516dc5f5d819a86e7bd92a96095a
|
3 |
+
size 87561521
|
input/GEO/Uterine_Carcinosarcoma/GSE68950/GSE68950_series_matrix.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ff5e6853968d4e479f9202604ed5febbf24d64309d1cfc415c93b1c120fe6dd
|
3 |
+
size 33754853
|
input/GEO/Vitamin_D_Levels/GSE118723/GSE118723_series_matrix.txt.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc2ca7d518c1fba458b5648650a576597f7970f43b63fb3c25158717bf408f61
|
3 |
+
size 252686
|
input/TCGA/TCGA_Bladder_Cancer_(BLCA)/TCGA.BLCA.sampleMap_BLCA_clinicalMatrix
ADDED
The diff for this file is too large to render.
See raw diff
|
|
input/TCGA/TCGA_Breast_Cancer_(BRCA)/TCGA.BRCA.sampleMap_BRCA_clinicalMatrix
ADDED
The diff for this file is too large to render.
See raw diff
|
|
input/TCGA/TCGA_Cervical_Cancer_(CESC)/TCGA.CESC.sampleMap_CESC_clinicalMatrix
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/preprocess/Polycystic_Ovary_Syndrome/GSE87435.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/GSE151158.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
,GSM4567420,GSM4567421,GSM4567422,GSM4567423,GSM4567424,GSM4567425,GSM4567426,GSM4567427,GSM4567428,GSM4567429,GSM4567430,GSM4567431,GSM4567432,GSM4567433,GSM4567434,GSM4567435,GSM4567436,GSM4567437,GSM4567438,GSM4567439,GSM4567440,GSM4567441,GSM4567442,GSM4567443,GSM4567444,GSM4567445,GSM4567446,GSM4567447,GSM4567448,GSM4567449,GSM4567450,GSM4567451,GSM4567452,GSM4567453,GSM4567454,GSM4567455,GSM4567456,GSM4567457,GSM4567458,GSM4567459,GSM4567460,GSM4567461,GSM4567462,GSM4567463,GSM4567464,GSM4567465,GSM4567466,GSM4567467,GSM4567468,GSM4567469,GSM4567470,GSM4567471,GSM4567472,GSM4567473,GSM4567474,GSM4567475,GSM4567476,GSM4567477,GSM4567478,GSM4567479,GSM4567480,GSM4567481,GSM4567482,GSM4567483,GSM4567484,GSM4567485
|
2 |
+
Polycystic_Ovary_Syndrome,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,,,,,
|
3 |
+
Gender,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,0.0,0.0,0.0,0.0
|
output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/GSE43322.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
,GSM1059640,GSM1059641,GSM1059642,GSM1059643,GSM1059644,GSM1059645,GSM1059646,GSM1059647,GSM1059648,GSM1059649,GSM1059650,GSM1059651,GSM1059652,GSM1059653,GSM1059654,GSM1059686,GSM1059687,GSM1059688,GSM1059689,GSM1059690,GSM1059691,GSM1059692,GSM1059693,GSM1059694,GSM1059695,GSM1059696,GSM1059697,GSM1059698,GSM1059699,GSM1059700,GSM1059701
|
2 |
+
Polycystic_Ovary_Syndrome,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
|
3 |
+
Gender,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
|
output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/GSE87435.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
,GSM2331293,GSM2331295,GSM2331297,GSM2331299,GSM2331301,GSM2331303,GSM2331305,GSM2331307,GSM2331309,GSM2331311,GSM2331313,GSM2331315,GSM2331317,GSM2331319,GSM2331321,GSM2331323,GSM2331325,GSM2331327
|
2 |
+
Polycystic_Ovary_Syndrome,1.0,1.0,1.0,1.0,1.0,1.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
|
3 |
+
Gender,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
|
output/preprocess/Polycystic_Ovary_Syndrome/clinical_data/TCGA.csv
ADDED
@@ -0,0 +1,703 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
,Polycystic_Ovary_Syndrome,Age,Gender
|
2 |
+
TCGA-06-0743-01,1,69.0,1.0
|
3 |
+
TCGA-26-5136-01,1,78.0,0.0
|
4 |
+
TCGA-HT-7857-01,1,24.0,0.0
|
5 |
+
TCGA-TQ-A7RW-01,1,32.0,1.0
|
6 |
+
TCGA-HT-7879-01,1,31.0,1.0
|
7 |
+
TCGA-HT-7609-01,1,34.0,1.0
|
8 |
+
TCGA-FG-5963-01,1,23.0,1.0
|
9 |
+
TCGA-TM-A7C3-01,1,43.0,0.0
|
10 |
+
TCGA-FG-A710-01,1,50.0,0.0
|
11 |
+
TCGA-FG-6691-01,1,23.0,0.0
|
12 |
+
TCGA-32-2634-01,1,82.0,1.0
|
13 |
+
TCGA-TQ-A7RM-01,1,41.0,0.0
|
14 |
+
TCGA-HW-7486-01,1,37.0,1.0
|
15 |
+
TCGA-06-0882-01,1,30.0,1.0
|
16 |
+
TCGA-FG-8186-01,1,42.0,0.0
|
17 |
+
TCGA-HT-A4DS-01,1,55.0,0.0
|
18 |
+
TCGA-06-0219-01,1,67.0,1.0
|
19 |
+
TCGA-FG-A60J-01,1,47.0,0.0
|
20 |
+
TCGA-HT-7858-01,1,28.0,1.0
|
21 |
+
TCGA-HT-8106-01,1,53.0,1.0
|
22 |
+
TCGA-06-0178-01,1,38.0,1.0
|
23 |
+
TCGA-76-4929-01,1,76.0,0.0
|
24 |
+
TCGA-E1-A7YY-01,1,27.0,0.0
|
25 |
+
TCGA-S9-A7R8-01,1,44.0,0.0
|
26 |
+
TCGA-QH-A65X-01,1,28.0,0.0
|
27 |
+
TCGA-27-2528-01,1,62.0,1.0
|
28 |
+
TCGA-14-0781-01,1,49.0,1.0
|
29 |
+
TCGA-HT-A5RC-01,1,70.0,0.0
|
30 |
+
TCGA-28-1747-01,1,44.0,1.0
|
31 |
+
TCGA-S9-A6TY-01,1,50.0,1.0
|
32 |
+
TCGA-FG-7638-01,1,31.0,0.0
|
33 |
+
TCGA-DB-A64P-01,1,40.0,1.0
|
34 |
+
TCGA-P5-A5F4-01,1,35.0,0.0
|
35 |
+
TCGA-HT-7467-01,1,54.0,1.0
|
36 |
+
TCGA-14-1034-01,1,60.0,0.0
|
37 |
+
TCGA-S9-A7J2-01,1,25.0,1.0
|
38 |
+
TCGA-S9-A7R2-01,1,69.0,1.0
|
39 |
+
TCGA-DU-A5TW-01,1,33.0,0.0
|
40 |
+
TCGA-HT-8113-01,1,49.0,0.0
|
41 |
+
TCGA-DU-A6S7-01,1,27.0,0.0
|
42 |
+
TCGA-QH-A65R-01,1,38.0,0.0
|
43 |
+
TCGA-14-1829-01,1,57.0,1.0
|
44 |
+
TCGA-06-0644-01,1,71.0,1.0
|
45 |
+
TCGA-DB-5273-01,1,33.0,1.0
|
46 |
+
TCGA-DU-8166-01,1,29.0,0.0
|
47 |
+
TCGA-DU-A5TY-01,1,46.0,0.0
|
48 |
+
TCGA-TM-A84R-01,1,46.0,1.0
|
49 |
+
TCGA-DU-7018-01,1,57.0,0.0
|
50 |
+
TCGA-14-1034-02,1,60.0,0.0
|
51 |
+
TCGA-06-0187-01,1,69.0,1.0
|
52 |
+
TCGA-HT-A74J-01,1,33.0,1.0
|
53 |
+
TCGA-FG-7641-01,1,31.0,1.0
|
54 |
+
TCGA-TQ-A7RK-02,1,29.0,1.0
|
55 |
+
TCGA-DU-A6S2-01,1,37.0,0.0
|
56 |
+
TCGA-06-0158-01,1,73.0,1.0
|
57 |
+
TCGA-DB-A4XH-01,1,53.0,0.0
|
58 |
+
TCGA-DU-6404-02,1,24.0,0.0
|
59 |
+
TCGA-TM-A7CF-02,1,41.0,0.0
|
60 |
+
TCGA-FG-8181-01,1,23.0,1.0
|
61 |
+
TCGA-DU-7006-01,1,60.0,0.0
|
62 |
+
TCGA-CS-5394-01,1,40.0,1.0
|
63 |
+
TCGA-E1-A7YK-01,1,52.0,1.0
|
64 |
+
TCGA-HT-7470-01,1,37.0,1.0
|
65 |
+
TCGA-S9-A7IQ-01,1,45.0,0.0
|
66 |
+
TCGA-P5-A5F0-01,1,33.0,1.0
|
67 |
+
TCGA-S9-A89V-01,1,70.0,1.0
|
68 |
+
TCGA-IK-7675-01,1,43.0,1.0
|
69 |
+
TCGA-FG-A4MW-01,1,63.0,1.0
|
70 |
+
TCGA-HT-7677-01,1,53.0,1.0
|
71 |
+
TCGA-12-5299-01,1,56.0,0.0
|
72 |
+
TCGA-DU-6407-02,1,35.0,0.0
|
73 |
+
TCGA-06-0747-01,1,53.0,1.0
|
74 |
+
TCGA-06-0156-01,1,57.0,1.0
|
75 |
+
TCGA-DU-6396-01,1,31.0,0.0
|
76 |
+
TCGA-CS-6669-01,1,26.0,0.0
|
77 |
+
TCGA-P5-A735-01,1,38.0,0.0
|
78 |
+
TCGA-TM-A7CA-01,1,44.0,1.0
|
79 |
+
TCGA-DU-7304-01,1,43.0,1.0
|
80 |
+
TCGA-P5-A5ET-01,1,27.0,1.0
|
81 |
+
TCGA-06-5414-01,1,61.0,1.0
|
82 |
+
TCGA-S9-A6TU-01,1,38.0,1.0
|
83 |
+
TCGA-E1-A7YS-01,1,71.0,1.0
|
84 |
+
TCGA-DH-5144-01,1,56.0,0.0
|
85 |
+
TCGA-DB-A64O-01,1,59.0,1.0
|
86 |
+
TCGA-HT-8111-01,1,32.0,1.0
|
87 |
+
TCGA-14-0736-02,1,49.0,1.0
|
88 |
+
TCGA-DB-A64R-01,1,24.0,0.0
|
89 |
+
TCGA-FG-8189-01,1,33.0,0.0
|
90 |
+
TCGA-27-2521-01,1,34.0,1.0
|
91 |
+
TCGA-06-0749-01,1,50.0,1.0
|
92 |
+
TCGA-32-2615-01,1,62.0,1.0
|
93 |
+
TCGA-QH-A6XC-01,1,48.0,1.0
|
94 |
+
TCGA-HT-7856-01,1,35.0,1.0
|
95 |
+
TCGA-DB-A75K-01,1,55.0,0.0
|
96 |
+
TCGA-DU-5871-01,1,37.0,0.0
|
97 |
+
TCGA-06-2557-01,1,76.0,1.0
|
98 |
+
TCGA-DU-A5TS-01,1,42.0,1.0
|
99 |
+
TCGA-HT-A5RA-01,1,65.0,0.0
|
100 |
+
TCGA-06-0132-01,1,49.0,1.0
|
101 |
+
TCGA-QH-A6X3-01,1,27.0,1.0
|
102 |
+
TCGA-FG-A713-01,1,74.0,0.0
|
103 |
+
TCGA-FG-5965-01,1,39.0,0.0
|
104 |
+
TCGA-DB-A64L-01,1,67.0,0.0
|
105 |
+
TCGA-E1-A7YW-01,1,28.0,1.0
|
106 |
+
TCGA-DB-A64Q-01,1,31.0,0.0
|
107 |
+
TCGA-TQ-A7RO-01,1,29.0,1.0
|
108 |
+
TCGA-HT-7695-01,1,29.0,0.0
|
109 |
+
TCGA-06-5859-01,1,63.0,1.0
|
110 |
+
TCGA-TM-A7C4-01,1,39.0,0.0
|
111 |
+
TCGA-HT-7854-01,1,62.0,1.0
|
112 |
+
TCGA-TQ-A7RP-01,1,66.0,1.0
|
113 |
+
TCGA-HT-8012-01,1,30.0,0.0
|
114 |
+
TCGA-S9-A7R3-01,1,28.0,0.0
|
115 |
+
TCGA-HT-8558-01,1,29.0,0.0
|
116 |
+
TCGA-E1-5311-01,1,31.0,1.0
|
117 |
+
TCGA-TM-A84Q-01,1,31.0,1.0
|
118 |
+
TCGA-HW-8322-01,1,39.0,1.0
|
119 |
+
TCGA-HW-A5KL-01,1,42.0,0.0
|
120 |
+
TCGA-27-2523-01,1,63.0,1.0
|
121 |
+
TCGA-HT-7605-01,1,38.0,1.0
|
122 |
+
TCGA-DU-8163-01,1,29.0,1.0
|
123 |
+
TCGA-FG-5962-01,1,54.0,1.0
|
124 |
+
TCGA-TQ-A7RV-01,1,27.0,1.0
|
125 |
+
TCGA-HT-7684-01,1,58.0,1.0
|
126 |
+
TCGA-CS-6290-01,1,31.0,1.0
|
127 |
+
TCGA-06-5858-01,1,45.0,0.0
|
128 |
+
TCGA-DU-5847-01,1,34.0,0.0
|
129 |
+
TCGA-HT-7485-01,1,42.0,1.0
|
130 |
+
TCGA-06-0129-01,1,30.0,1.0
|
131 |
+
TCGA-HT-A74H-01,1,62.0,1.0
|
132 |
+
TCGA-TQ-A7RH-01,1,39.0,1.0
|
133 |
+
TCGA-27-1832-01,1,59.0,0.0
|
134 |
+
TCGA-HT-7611-01,1,36.0,1.0
|
135 |
+
TCGA-DU-A5TR-01,1,51.0,1.0
|
136 |
+
TCGA-TM-A84M-01,1,40.0,1.0
|
137 |
+
TCGA-FG-7643-01,1,49.0,0.0
|
138 |
+
TCGA-DU-8164-01,1,51.0,1.0
|
139 |
+
TCGA-32-5222-01,1,66.0,1.0
|
140 |
+
TCGA-HW-7487-01,1,39.0,1.0
|
141 |
+
TCGA-RY-A83Z-01,1,54.0,0.0
|
142 |
+
TCGA-E1-A7YQ-01,1,58.0,0.0
|
143 |
+
TCGA-FG-7637-01,1,49.0,1.0
|
144 |
+
TCGA-DH-A66F-01,1,49.0,1.0
|
145 |
+
TCGA-FG-A87N-01,1,37.0,0.0
|
146 |
+
TCGA-QH-A6CZ-01,1,38.0,1.0
|
147 |
+
TCGA-CS-4943-01,1,37.0,1.0
|
148 |
+
TCGA-FG-A4MU-01,1,58.0,1.0
|
149 |
+
TCGA-DU-6408-01,1,23.0,0.0
|
150 |
+
TCGA-28-5218-01,1,63.0,1.0
|
151 |
+
TCGA-06-0211-02,1,47.0,1.0
|
152 |
+
TCGA-DU-5855-01,1,49.0,0.0
|
153 |
+
TCGA-TM-A7CF-01,1,41.0,0.0
|
154 |
+
TCGA-TQ-A7RG-01,1,36.0,1.0
|
155 |
+
TCGA-HT-7610-01,1,25.0,0.0
|
156 |
+
TCGA-S9-A7J3-01,1,52.0,0.0
|
157 |
+
TCGA-DH-A7US-01,1,50.0,1.0
|
158 |
+
TCGA-QH-A65V-01,1,43.0,0.0
|
159 |
+
TCGA-06-0678-11,0,46.765467625899284,1.0
|
160 |
+
TCGA-S9-A7IY-01,1,39.0,1.0
|
161 |
+
TCGA-VM-A8C9-01,1,37.0,0.0
|
162 |
+
TCGA-HT-8110-01,1,57.0,1.0
|
163 |
+
TCGA-06-0675-11,0,46.765467625899284,1.0
|
164 |
+
TCGA-CS-4938-01,1,31.0,0.0
|
165 |
+
TCGA-HT-7603-01,1,29.0,1.0
|
166 |
+
TCGA-15-1444-01,1,21.0,1.0
|
167 |
+
TCGA-06-0152-02,1,68.0,1.0
|
168 |
+
TCGA-DU-7011-01,1,25.0,1.0
|
169 |
+
TCGA-DU-6395-01,1,31.0,1.0
|
170 |
+
TCGA-DU-8162-01,1,61.0,0.0
|
171 |
+
TCGA-DU-8161-01,1,63.0,0.0
|
172 |
+
TCGA-WY-A859-01,1,34.0,0.0
|
173 |
+
TCGA-HT-7902-01,1,30.0,0.0
|
174 |
+
TCGA-HT-A5R9-01,1,48.0,0.0
|
175 |
+
TCGA-RY-A845-01,1,40.0,0.0
|
176 |
+
TCGA-HT-A5RB-01,1,24.0,1.0
|
177 |
+
TCGA-FG-6690-01,1,70.0,1.0
|
178 |
+
TCGA-DB-A4XG-01,1,34.0,1.0
|
179 |
+
TCGA-QH-A6X9-01,1,73.0,0.0
|
180 |
+
TCGA-E1-A7YO-01,1,45.0,1.0
|
181 |
+
TCGA-26-1442-01,1,43.0,1.0
|
182 |
+
TCGA-RY-A843-01,1,30.0,1.0
|
183 |
+
TCGA-WH-A86K-01,1,65.0,1.0
|
184 |
+
TCGA-S9-A7QW-01,1,54.0,0.0
|
185 |
+
TCGA-DU-7019-01,1,39.0,1.0
|
186 |
+
TCGA-32-2616-01,1,48.0,0.0
|
187 |
+
TCGA-DB-5270-01,1,38.0,0.0
|
188 |
+
TCGA-28-2510-01,1,46.765467625899284,1.0
|
189 |
+
TCGA-08-0386-01,1,74.0,1.0
|
190 |
+
TCGA-S9-A6WE-01,1,34.0,1.0
|
191 |
+
TCGA-41-3915-01,1,48.0,1.0
|
192 |
+
TCGA-TQ-A7RF-01,1,27.0,0.0
|
193 |
+
TCGA-TQ-A7RR-01,1,38.0,1.0
|
194 |
+
TCGA-19-1787-01,1,48.0,1.0
|
195 |
+
TCGA-06-0190-01,1,62.0,1.0
|
196 |
+
TCGA-DH-A66B-01,1,52.0,1.0
|
197 |
+
TCGA-DB-A4XB-01,1,38.0,1.0
|
198 |
+
TCGA-WY-A85D-01,1,60.0,1.0
|
199 |
+
TCGA-FG-A4MY-01,1,44.0,0.0
|
200 |
+
TCGA-28-5209-01,1,66.0,0.0
|
201 |
+
TCGA-HT-7681-01,1,29.0,0.0
|
202 |
+
TCGA-DU-8168-01,1,55.0,0.0
|
203 |
+
TCGA-CS-6666-01,1,22.0,1.0
|
204 |
+
TCGA-28-5216-01,1,52.0,1.0
|
205 |
+
TCGA-32-1982-01,1,76.0,0.0
|
206 |
+
TCGA-28-2499-01,1,59.0,1.0
|
207 |
+
TCGA-19-4065-02,1,36.0,1.0
|
208 |
+
TCGA-06-0141-01,1,62.0,1.0
|
209 |
+
TCGA-DB-A4X9-01,1,33.0,0.0
|
210 |
+
TCGA-HT-7860-01,1,60.0,0.0
|
211 |
+
TCGA-27-2526-01,1,79.0,0.0
|
212 |
+
TCGA-DH-5141-01,1,32.0,1.0
|
213 |
+
TCGA-DU-5872-02,1,43.0,0.0
|
214 |
+
TCGA-QH-A6CV-01,1,51.0,1.0
|
215 |
+
TCGA-CS-6667-01,1,39.0,0.0
|
216 |
+
TCGA-S9-A6UA-01,1,66.0,1.0
|
217 |
+
TCGA-TQ-A7RJ-01,1,25.0,0.0
|
218 |
+
TCGA-S9-A6U1-01,1,22.0,0.0
|
219 |
+
TCGA-TQ-A8XE-02,1,42.0,0.0
|
220 |
+
TCGA-FG-A6J1-01,1,44.0,0.0
|
221 |
+
TCGA-FG-A87Q-01,1,61.0,0.0
|
222 |
+
TCGA-41-2571-01,1,89.0,1.0
|
223 |
+
TCGA-QH-A6CW-01,1,43.0,1.0
|
224 |
+
TCGA-14-1402-02,1,58.0,0.0
|
225 |
+
TCGA-12-5295-01,1,60.0,0.0
|
226 |
+
TCGA-FG-8185-01,1,37.0,1.0
|
227 |
+
TCGA-DU-6407-01,1,35.0,0.0
|
228 |
+
TCGA-S9-A6TW-01,1,40.0,1.0
|
229 |
+
TCGA-14-0871-01,1,74.0,0.0
|
230 |
+
TCGA-E1-A7Z6-01,1,41.0,0.0
|
231 |
+
TCGA-14-0790-01,1,64.0,0.0
|
232 |
+
TCGA-DU-A76K-01,1,87.0,1.0
|
233 |
+
TCGA-12-0616-01,1,36.0,0.0
|
234 |
+
TCGA-E1-5303-01,1,38.0,1.0
|
235 |
+
TCGA-06-0680-11,0,46.765467625899284,1.0
|
236 |
+
TCGA-S9-A7R7-01,1,27.0,1.0
|
237 |
+
TCGA-E1-5304-01,1,42.0,1.0
|
238 |
+
TCGA-06-5410-01,1,72.0,0.0
|
239 |
+
TCGA-P5-A5F2-01,1,36.0,0.0
|
240 |
+
TCGA-R8-A6ML-01,1,52.0,1.0
|
241 |
+
TCGA-19-5960-01,1,56.0,1.0
|
242 |
+
TCGA-CS-5396-01,1,53.0,0.0
|
243 |
+
TCGA-19-2629-01,1,60.0,1.0
|
244 |
+
TCGA-S9-A7QY-01,1,35.0,0.0
|
245 |
+
TCGA-DB-5277-01,1,34.0,1.0
|
246 |
+
TCGA-HT-7474-01,1,52.0,1.0
|
247 |
+
TCGA-EZ-7264-01,1,47.0,0.0
|
248 |
+
TCGA-76-4927-01,1,58.0,1.0
|
249 |
+
TCGA-S9-A7J0-01,1,30.0,0.0
|
250 |
+
TCGA-TQ-A7RV-02,1,27.0,1.0
|
251 |
+
TCGA-HT-A619-01,1,51.0,0.0
|
252 |
+
TCGA-HT-8010-01,1,64.0,0.0
|
253 |
+
TCGA-E1-A7YE-01,1,32.0,0.0
|
254 |
+
TCGA-DH-A7UR-01,1,59.0,0.0
|
255 |
+
TCGA-HT-7881-01,1,38.0,1.0
|
256 |
+
TCGA-E1-A7Z3-01,1,31.0,0.0
|
257 |
+
TCGA-QH-A6XA-01,1,23.0,0.0
|
258 |
+
TCGA-E1-A7Z2-01,1,58.0,0.0
|
259 |
+
TCGA-32-2638-01,1,67.0,1.0
|
260 |
+
TCGA-HT-A74K-01,1,58.0,0.0
|
261 |
+
TCGA-QH-A86X-01,1,33.0,1.0
|
262 |
+
TCGA-06-5415-01,1,60.0,1.0
|
263 |
+
TCGA-DU-6401-01,1,31.0,0.0
|
264 |
+
TCGA-16-1045-01,1,49.0,0.0
|
265 |
+
TCGA-DU-7007-01,1,33.0,1.0
|
266 |
+
TCGA-CS-4944-01,1,50.0,1.0
|
267 |
+
TCGA-P5-A736-01,1,44.0,0.0
|
268 |
+
TCGA-R8-A6MK-01,1,40.0,1.0
|
269 |
+
TCGA-06-0157-01,1,63.0,0.0
|
270 |
+
TCGA-DU-7301-01,1,53.0,1.0
|
271 |
+
TCGA-19-4065-01,1,36.0,1.0
|
272 |
+
TCGA-CS-5390-01,1,47.0,0.0
|
273 |
+
TCGA-FG-6689-01,1,30.0,1.0
|
274 |
+
TCGA-HT-7875-01,1,56.0,1.0
|
275 |
+
TCGA-P5-A5EZ-01,1,39.0,1.0
|
276 |
+
TCGA-DU-A7TG-01,1,40.0,1.0
|
277 |
+
TCGA-FG-6692-01,1,63.0,1.0
|
278 |
+
TCGA-DB-5275-01,1,36.0,1.0
|
279 |
+
TCGA-VM-A8CE-01,1,25.0,1.0
|
280 |
+
TCGA-KT-A74X-01,1,26.0,1.0
|
281 |
+
TCGA-DH-A66D-01,1,43.0,0.0
|
282 |
+
TCGA-06-5416-01,1,23.0,0.0
|
283 |
+
TCGA-DB-5278-01,1,17.0,1.0
|
284 |
+
TCGA-TM-A84S-01,1,36.0,1.0
|
285 |
+
TCGA-12-0619-01,1,60.0,1.0
|
286 |
+
TCGA-CS-6665-01,1,51.0,0.0
|
287 |
+
TCGA-DU-5872-01,1,43.0,0.0
|
288 |
+
TCGA-HT-A615-01,1,38.0,0.0
|
289 |
+
TCGA-26-5139-01,1,65.0,0.0
|
290 |
+
TCGA-06-0174-01,1,54.0,1.0
|
291 |
+
TCGA-CS-5393-01,1,39.0,1.0
|
292 |
+
TCGA-06-0645-01,1,55.0,0.0
|
293 |
+
TCGA-FG-5965-02,1,39.0,0.0
|
294 |
+
TCGA-HT-7693-01,1,51.0,0.0
|
295 |
+
TCGA-HT-7469-01,1,30.0,1.0
|
296 |
+
TCGA-32-2632-01,1,80.0,1.0
|
297 |
+
TCGA-32-1980-01,1,72.0,1.0
|
298 |
+
TCGA-DU-6406-01,1,59.0,0.0
|
299 |
+
TCGA-QH-A870-01,1,38.0,0.0
|
300 |
+
TCGA-06-2562-01,1,81.0,1.0
|
301 |
+
TCGA-HT-8114-01,1,36.0,1.0
|
302 |
+
TCGA-DU-A6S6-01,1,35.0,0.0
|
303 |
+
TCGA-HT-7694-01,1,60.0,1.0
|
304 |
+
TCGA-DU-A6S8-01,1,74.0,0.0
|
305 |
+
TCGA-R8-A6YH-01,1,46.765467625899284,1.0
|
306 |
+
TCGA-FG-A6J3-01,1,52.0,0.0
|
307 |
+
TCGA-DU-7014-01,1,59.0,1.0
|
308 |
+
TCGA-FG-A4MT-02,1,27.0,0.0
|
309 |
+
TCGA-HT-7477-01,1,62.0,1.0
|
310 |
+
TCGA-DU-7015-01,1,41.0,0.0
|
311 |
+
TCGA-DH-5143-01,1,30.0,1.0
|
312 |
+
TCGA-FG-A6IZ-01,1,60.0,1.0
|
313 |
+
TCGA-VW-A7QS-01,1,35.0,0.0
|
314 |
+
TCGA-HT-7680-01,1,32.0,0.0
|
315 |
+
TCGA-HT-8109-01,1,64.0,1.0
|
316 |
+
TCGA-HT-A618-01,1,37.0,0.0
|
317 |
+
TCGA-06-0171-02,1,65.0,1.0
|
318 |
+
TCGA-DU-6542-01,1,25.0,1.0
|
319 |
+
TCGA-FG-5964-01,1,62.0,1.0
|
320 |
+
TCGA-DB-A75M-01,1,47.0,1.0
|
321 |
+
TCGA-DU-A7T8-01,1,35.0,1.0
|
322 |
+
TCGA-FG-8182-01,1,35.0,1.0
|
323 |
+
TCGA-14-1825-01,1,70.0,1.0
|
324 |
+
TCGA-S9-A6WH-01,1,73.0,0.0
|
325 |
+
TCGA-HT-8563-01,1,30.0,0.0
|
326 |
+
TCGA-28-5213-01,1,72.0,1.0
|
327 |
+
TCGA-06-5412-01,1,78.0,0.0
|
328 |
+
TCGA-DU-7290-01,1,45.0,0.0
|
329 |
+
TCGA-DB-5276-01,1,32.0,1.0
|
330 |
+
TCGA-P5-A5EX-01,1,41.0,0.0
|
331 |
+
TCGA-12-3653-01,1,34.0,0.0
|
332 |
+
TCGA-HW-8320-01,1,36.0,1.0
|
333 |
+
TCGA-DU-A76O-01,1,30.0,1.0
|
334 |
+
TCGA-HT-7882-01,1,66.0,1.0
|
335 |
+
TCGA-HT-8105-01,1,54.0,1.0
|
336 |
+
TCGA-P5-A5EV-01,1,39.0,1.0
|
337 |
+
TCGA-HT-7481-01,1,39.0,1.0
|
338 |
+
TCGA-DU-8167-01,1,69.0,0.0
|
339 |
+
TCGA-WY-A85B-01,1,24.0,1.0
|
340 |
+
TCGA-HW-7489-01,1,38.0,1.0
|
341 |
+
TCGA-76-4928-01,1,85.0,0.0
|
342 |
+
TCGA-06-5408-01,1,54.0,0.0
|
343 |
+
TCGA-DU-7009-01,1,32.0,0.0
|
344 |
+
TCGA-FG-6688-01,1,59.0,0.0
|
345 |
+
TCGA-28-5220-01,1,67.0,1.0
|
346 |
+
TCGA-QH-A6CS-01,1,41.0,1.0
|
347 |
+
TCGA-06-0130-01,1,54.0,1.0
|
348 |
+
TCGA-TM-A84L-01,1,31.0,1.0
|
349 |
+
TCGA-DH-A669-01,1,70.0,1.0
|
350 |
+
TCGA-HT-7692-01,1,43.0,1.0
|
351 |
+
TCGA-F6-A8O3-01,1,34.0,1.0
|
352 |
+
TCGA-DU-6410-01,1,56.0,1.0
|
353 |
+
TCGA-06-5411-01,1,51.0,1.0
|
354 |
+
TCGA-HT-7686-01,1,29.0,0.0
|
355 |
+
TCGA-28-2514-01,1,45.0,1.0
|
356 |
+
TCGA-FG-A60L-01,1,34.0,0.0
|
357 |
+
TCGA-HT-7688-01,1,59.0,1.0
|
358 |
+
TCGA-HT-8104-01,1,51.0,0.0
|
359 |
+
TCGA-TM-A84I-01,1,30.0,1.0
|
360 |
+
TCGA-06-5417-01,1,45.0,0.0
|
361 |
+
TCGA-DU-5849-01,1,48.0,1.0
|
362 |
+
TCGA-S9-A7IZ-01,1,48.0,0.0
|
363 |
+
TCGA-DB-5280-01,1,43.0,1.0
|
364 |
+
TCGA-DU-A7TJ-01,1,55.0,1.0
|
365 |
+
TCGA-FG-A711-01,1,33.0,0.0
|
366 |
+
TCGA-26-5133-01,1,59.0,1.0
|
367 |
+
TCGA-06-2567-01,1,65.0,1.0
|
368 |
+
TCGA-P5-A72X-01,1,21.0,1.0
|
369 |
+
TCGA-HT-7602-01,1,21.0,1.0
|
370 |
+
TCGA-HT-8564-01,1,47.0,1.0
|
371 |
+
TCGA-S9-A6WP-01,1,42.0,1.0
|
372 |
+
TCGA-06-5413-01,1,67.0,1.0
|
373 |
+
TCGA-DU-5870-02,1,34.0,0.0
|
374 |
+
TCGA-P5-A5F1-01,1,30.0,1.0
|
375 |
+
TCGA-32-1970-01,1,59.0,1.0
|
376 |
+
TCGA-14-1823-01,1,58.0,0.0
|
377 |
+
TCGA-HT-A617-01,1,47.0,1.0
|
378 |
+
TCGA-HT-7884-01,1,44.0,0.0
|
379 |
+
TCGA-P5-A780-01,1,44.0,0.0
|
380 |
+
TCGA-E1-A7YL-01,1,46.0,1.0
|
381 |
+
TCGA-HT-A614-01,1,47.0,1.0
|
382 |
+
TCGA-CS-4942-01,1,44.0,0.0
|
383 |
+
TCGA-TM-A84O-01,1,61.0,0.0
|
384 |
+
TCGA-DU-5852-01,1,61.0,0.0
|
385 |
+
TCGA-S9-A7J1-01,1,43.0,1.0
|
386 |
+
TCGA-S9-A7R4-01,1,46.0,1.0
|
387 |
+
TCGA-P5-A733-01,1,52.0,0.0
|
388 |
+
TCGA-DU-A7TA-01,1,32.0,1.0
|
389 |
+
TCGA-P5-A737-01,1,47.0,1.0
|
390 |
+
TCGA-S9-A6U9-01,1,36.0,1.0
|
391 |
+
TCGA-27-1830-01,1,57.0,1.0
|
392 |
+
TCGA-QH-A6CU-01,1,52.0,0.0
|
393 |
+
TCGA-27-1835-01,1,53.0,0.0
|
394 |
+
TCGA-HW-7490-01,1,41.0,1.0
|
395 |
+
TCGA-R8-A73M-01,1,48.0,0.0
|
396 |
+
TCGA-06-0750-01,1,43.0,1.0
|
397 |
+
TCGA-32-4213-01,1,47.0,0.0
|
398 |
+
TCGA-06-0210-02,1,72.0,0.0
|
399 |
+
TCGA-06-2563-01,1,72.0,0.0
|
400 |
+
TCGA-HT-8013-01,1,37.0,0.0
|
401 |
+
TCGA-27-1837-01,1,36.0,1.0
|
402 |
+
TCGA-WY-A85C-01,1,36.0,1.0
|
403 |
+
TCGA-DU-7304-02,1,43.0,1.0
|
404 |
+
TCGA-28-2513-01,1,69.0,0.0
|
405 |
+
TCGA-DB-A4XA-01,1,30.0,1.0
|
406 |
+
TCGA-DB-A64X-01,1,56.0,0.0
|
407 |
+
TCGA-CS-6668-01,1,57.0,0.0
|
408 |
+
TCGA-VM-A8CD-01,1,58.0,1.0
|
409 |
+
TCGA-HT-8019-01,1,34.0,0.0
|
410 |
+
TCGA-06-2561-01,1,53.0,0.0
|
411 |
+
TCGA-TM-A84F-01,1,48.0,1.0
|
412 |
+
TCGA-DU-7010-01,1,58.0,0.0
|
413 |
+
TCGA-QH-A65Z-01,1,54.0,1.0
|
414 |
+
TCGA-HT-7616-01,1,75.0,1.0
|
415 |
+
TCGA-P5-A72Z-01,1,64.0,0.0
|
416 |
+
TCGA-06-5418-01,1,75.0,0.0
|
417 |
+
TCGA-06-0138-01,1,43.0,1.0
|
418 |
+
TCGA-HT-A5R5-01,1,33.0,0.0
|
419 |
+
TCGA-IK-8125-01,1,62.0,1.0
|
420 |
+
TCGA-CS-6188-01,1,48.0,1.0
|
421 |
+
TCGA-HT-7480-01,1,33.0,1.0
|
422 |
+
TCGA-E1-A7YI-01,1,33.0,0.0
|
423 |
+
TCGA-19-2620-01,1,70.0,1.0
|
424 |
+
TCGA-12-3650-01,1,46.0,1.0
|
425 |
+
TCGA-26-5134-01,1,74.0,1.0
|
426 |
+
TCGA-19-2624-01,1,51.0,1.0
|
427 |
+
TCGA-06-0646-01,1,60.0,1.0
|
428 |
+
TCGA-06-2559-01,1,83.0,1.0
|
429 |
+
TCGA-VV-A86M-01,1,36.0,0.0
|
430 |
+
TCGA-S9-A6U2-01,1,48.0,0.0
|
431 |
+
TCGA-HW-8319-01,1,34.0,0.0
|
432 |
+
TCGA-HT-7479-01,1,44.0,1.0
|
433 |
+
TCGA-TM-A84C-01,1,32.0,1.0
|
434 |
+
TCGA-S9-A6WL-01,1,52.0,1.0
|
435 |
+
TCGA-HT-A61B-01,1,22.0,1.0
|
436 |
+
TCGA-DU-6393-01,1,66.0,1.0
|
437 |
+
TCGA-HT-A74L-01,1,22.0,0.0
|
438 |
+
TCGA-S9-A7R1-01,1,35.0,1.0
|
439 |
+
TCGA-VM-A8CF-01,1,44.0,0.0
|
440 |
+
TCGA-E1-A7Z4-01,1,35.0,1.0
|
441 |
+
TCGA-06-0184-01,1,63.0,1.0
|
442 |
+
TCGA-DU-6397-02,1,45.0,1.0
|
443 |
+
TCGA-06-AABW-11,0,46.765467625899284,1.0
|
444 |
+
TCGA-HT-A4DV-01,1,51.0,0.0
|
445 |
+
TCGA-02-2485-01,1,53.0,1.0
|
446 |
+
TCGA-02-2483-01,1,43.0,1.0
|
447 |
+
TCGA-P5-A731-01,1,59.0,0.0
|
448 |
+
TCGA-HT-7608-01,1,61.0,1.0
|
449 |
+
TCGA-E1-A7YU-01,1,42.0,1.0
|
450 |
+
TCGA-E1-A7YN-01,1,63.0,0.0
|
451 |
+
TCGA-TQ-A7RS-01,1,25.0,0.0
|
452 |
+
TCGA-06-0221-02,1,31.0,1.0
|
453 |
+
TCGA-DU-7302-01,1,48.0,0.0
|
454 |
+
TCGA-DU-6403-01,1,60.0,0.0
|
455 |
+
TCGA-41-5651-01,1,59.0,0.0
|
456 |
+
TCGA-HT-7473-01,1,28.0,1.0
|
457 |
+
TCGA-HW-A5KJ-01,1,68.0,1.0
|
458 |
+
TCGA-HW-7493-01,1,40.0,0.0
|
459 |
+
TCGA-P5-A781-01,1,34.0,0.0
|
460 |
+
TCGA-HW-8321-01,1,31.0,1.0
|
461 |
+
TCGA-28-5207-01,1,71.0,1.0
|
462 |
+
TCGA-DU-8165-01,1,60.0,0.0
|
463 |
+
TCGA-12-3652-01,1,60.0,1.0
|
464 |
+
TCGA-26-5132-01,1,74.0,1.0
|
465 |
+
TCGA-RY-A847-01,1,45.0,1.0
|
466 |
+
TCGA-WY-A85A-01,1,20.0,1.0
|
467 |
+
TCGA-06-0190-02,1,62.0,1.0
|
468 |
+
TCGA-DU-7309-01,1,41.0,0.0
|
469 |
+
TCGA-TQ-A7RN-01,1,32.0,1.0
|
470 |
+
TCGA-TM-A84G-01,1,54.0,0.0
|
471 |
+
TCGA-06-0238-01,1,46.0,1.0
|
472 |
+
TCGA-DU-6402-01,1,52.0,1.0
|
473 |
+
TCGA-DH-A7UV-01,1,49.0,1.0
|
474 |
+
TCGA-DU-A7TB-01,1,56.0,1.0
|
475 |
+
TCGA-DU-6400-01,1,66.0,0.0
|
476 |
+
TCGA-FG-A70Y-01,1,20.0,0.0
|
477 |
+
TCGA-RY-A83X-01,1,46.0,0.0
|
478 |
+
TCGA-02-0047-01,1,78.0,1.0
|
479 |
+
TCGA-76-4925-01,1,76.0,1.0
|
480 |
+
TCGA-19-0957-02,1,48.0,0.0
|
481 |
+
TCGA-06-0681-11,0,46.765467625899284,1.0
|
482 |
+
TCGA-HT-7607-01,1,61.0,0.0
|
483 |
+
TCGA-DH-A7UU-01,1,43.0,1.0
|
484 |
+
TCGA-41-4097-01,1,63.0,0.0
|
485 |
+
TCGA-CS-5395-01,1,43.0,1.0
|
486 |
+
TCGA-P5-A5EW-01,1,20.0,0.0
|
487 |
+
TCGA-TQ-A7RK-01,1,29.0,1.0
|
488 |
+
TCGA-06-0745-01,1,59.0,1.0
|
489 |
+
TCGA-E1-5319-01,1,48.0,0.0
|
490 |
+
TCGA-S9-A7IX-01,1,57.0,1.0
|
491 |
+
TCGA-HT-7855-01,1,39.0,1.0
|
492 |
+
TCGA-28-1753-01,1,53.0,1.0
|
493 |
+
TCGA-E1-A7YM-01,1,63.0,1.0
|
494 |
+
TCGA-WY-A85E-01,1,48.0,0.0
|
495 |
+
TCGA-P5-A5F6-01,1,26.0,1.0
|
496 |
+
TCGA-76-4926-01,1,68.0,1.0
|
497 |
+
TCGA-DB-A64U-01,1,38.0,0.0
|
498 |
+
TCGA-28-5204-01,1,72.0,1.0
|
499 |
+
TCGA-CS-6186-01,1,58.0,1.0
|
500 |
+
TCGA-E1-5305-01,1,34.0,1.0
|
501 |
+
TCGA-HT-7483-01,1,14.0,1.0
|
502 |
+
TCGA-DU-A6S3-01,1,60.0,1.0
|
503 |
+
TCGA-19-2625-01,1,76.0,0.0
|
504 |
+
TCGA-S9-A89Z-01,1,40.0,1.0
|
505 |
+
TCGA-DU-7306-01,1,67.0,1.0
|
506 |
+
TCGA-DB-5279-01,1,59.0,1.0
|
507 |
+
TCGA-FG-8191-01,1,30.0,1.0
|
508 |
+
TCGA-27-1831-01,1,66.0,1.0
|
509 |
+
TCGA-14-0787-01,1,69.0,1.0
|
510 |
+
TCGA-14-0817-01,1,69.0,0.0
|
511 |
+
TCGA-06-0168-01,1,59.0,0.0
|
512 |
+
TCGA-HT-A61A-01,1,20.0,0.0
|
513 |
+
TCGA-DU-5854-01,1,57.0,0.0
|
514 |
+
TCGA-HT-7687-01,1,74.0,1.0
|
515 |
+
TCGA-RY-A840-01,1,47.0,1.0
|
516 |
+
TCGA-06-0878-01,1,74.0,1.0
|
517 |
+
TCGA-DU-6405-01,1,51.0,0.0
|
518 |
+
TCGA-DH-A669-02,1,70.0,1.0
|
519 |
+
TCGA-QH-A65S-01,1,32.0,0.0
|
520 |
+
TCGA-HT-7601-01,1,30.0,0.0
|
521 |
+
TCGA-DB-A64V-01,1,54.0,1.0
|
522 |
+
TCGA-28-5215-01,1,62.0,0.0
|
523 |
+
TCGA-DU-A7TD-01,1,52.0,1.0
|
524 |
+
TCGA-S9-A6WD-01,1,58.0,1.0
|
525 |
+
TCGA-HT-7475-01,1,67.0,1.0
|
526 |
+
TCGA-WY-A858-01,1,32.0,0.0
|
527 |
+
TCGA-TQ-A8XE-01,1,42.0,0.0
|
528 |
+
TCGA-DU-6392-01,1,35.0,0.0
|
529 |
+
TCGA-DB-A75L-01,1,36.0,0.0
|
530 |
+
TCGA-HT-8018-01,1,40.0,0.0
|
531 |
+
TCGA-E1-5322-01,1,38.0,0.0
|
532 |
+
TCGA-RY-A83Y-01,1,45.0,1.0
|
533 |
+
TCGA-HT-7606-01,1,30.0,0.0
|
534 |
+
TCGA-E1-5302-01,1,41.0,1.0
|
535 |
+
TCGA-DU-A76R-01,1,51.0,1.0
|
536 |
+
TCGA-P5-A72W-01,1,35.0,1.0
|
537 |
+
TCGA-FG-8188-01,1,41.0,1.0
|
538 |
+
TCGA-HT-7468-01,1,30.0,1.0
|
539 |
+
TCGA-HT-7877-01,1,20.0,0.0
|
540 |
+
TCGA-VW-A8FI-01,1,66.0,1.0
|
541 |
+
TCGA-06-0744-01,1,66.0,1.0
|
542 |
+
TCGA-DB-A64S-01,1,20.0,1.0
|
543 |
+
TCGA-12-0618-01,1,49.0,1.0
|
544 |
+
TCGA-HT-A616-01,1,36.0,0.0
|
545 |
+
TCGA-VM-A8CH-01,1,24.0,0.0
|
546 |
+
TCGA-S9-A6UB-01,1,52.0,1.0
|
547 |
+
TCGA-02-0055-01,1,62.0,0.0
|
548 |
+
TCGA-DU-6394-01,1,53.0,1.0
|
549 |
+
TCGA-W9-A837-01,1,47.0,1.0
|
550 |
+
TCGA-S9-A7IS-01,1,33.0,0.0
|
551 |
+
TCGA-DB-A4XD-01,1,32.0,1.0
|
552 |
+
TCGA-P5-A77X-01,1,55.0,0.0
|
553 |
+
TCGA-S9-A6WI-01,1,56.0,0.0
|
554 |
+
TCGA-16-0846-01,1,85.0,1.0
|
555 |
+
TCGA-TQ-A7RQ-01,1,38.0,0.0
|
556 |
+
TCGA-76-4932-01,1,50.0,0.0
|
557 |
+
TCGA-P5-A730-01,1,22.0,1.0
|
558 |
+
TCGA-HT-7478-01,1,36.0,1.0
|
559 |
+
TCGA-HT-7620-01,1,40.0,1.0
|
560 |
+
TCGA-QH-A6CY-01,1,38.0,1.0
|
561 |
+
TCGA-HT-7689-01,1,58.0,0.0
|
562 |
+
TCGA-HW-A5KK-01,1,64.0,1.0
|
563 |
+
TCGA-DU-A5TP-01,1,33.0,1.0
|
564 |
+
TCGA-12-0821-01,1,62.0,1.0
|
565 |
+
TCGA-DU-A76L-01,1,54.0,1.0
|
566 |
+
TCGA-06-1804-01,1,81.0,0.0
|
567 |
+
TCGA-HW-7491-01,1,35.0,1.0
|
568 |
+
TCGA-S9-A6U5-01,1,33.0,1.0
|
569 |
+
TCGA-P5-A5EU-01,1,35.0,1.0
|
570 |
+
TCGA-15-0742-01,1,65.0,1.0
|
571 |
+
TCGA-VM-A8C8-01,1,50.0,0.0
|
572 |
+
TCGA-HT-7873-01,1,29.0,1.0
|
573 |
+
TCGA-DU-7008-01,1,41.0,0.0
|
574 |
+
TCGA-FG-A70Z-01,1,53.0,0.0
|
575 |
+
TCGA-HT-A5R7-01,1,33.0,0.0
|
576 |
+
TCGA-DH-5140-01,1,38.0,0.0
|
577 |
+
TCGA-S9-A6WQ-01,1,57.0,0.0
|
578 |
+
TCGA-DU-7298-01,1,38.0,0.0
|
579 |
+
TCGA-TM-A84J-01,1,63.0,1.0
|
580 |
+
TCGA-DH-A7UT-01,1,30.0,1.0
|
581 |
+
TCGA-DU-A5TU-01,1,62.0,0.0
|
582 |
+
TCGA-DU-7294-01,1,53.0,0.0
|
583 |
+
TCGA-14-2554-01,1,52.0,0.0
|
584 |
+
TCGA-TM-A84T-01,1,19.0,1.0
|
585 |
+
TCGA-HW-7495-01,1,45.0,0.0
|
586 |
+
TCGA-DB-A75P-01,1,25.0,0.0
|
587 |
+
TCGA-FG-A4MX-01,1,47.0,1.0
|
588 |
+
TCGA-19-1390-01,1,63.0,0.0
|
589 |
+
TCGA-27-1834-01,1,56.0,1.0
|
590 |
+
TCGA-DB-5274-01,1,37.0,0.0
|
591 |
+
TCGA-FG-8187-01,1,31.0,1.0
|
592 |
+
TCGA-KT-A7W1-01,1,45.0,0.0
|
593 |
+
TCGA-28-2509-01,1,77.0,0.0
|
594 |
+
TCGA-HT-7482-01,1,18.0,0.0
|
595 |
+
TCGA-HT-8108-01,1,26.0,0.0
|
596 |
+
TCGA-QH-A6X5-01,1,58.0,0.0
|
597 |
+
TCGA-DU-6404-01,1,24.0,0.0
|
598 |
+
TCGA-S9-A6U0-01,1,46.0,1.0
|
599 |
+
TCGA-FG-7636-01,1,48.0,1.0
|
600 |
+
TCGA-F6-A8O4-01,1,44.0,1.0
|
601 |
+
TCGA-HT-7476-01,1,26.0,1.0
|
602 |
+
TCGA-TM-A84B-01,1,40.0,1.0
|
603 |
+
TCGA-76-4931-01,1,70.0,0.0
|
604 |
+
TCGA-DH-5142-01,1,29.0,1.0
|
605 |
+
TCGA-FG-A60K-01,1,34.0,0.0
|
606 |
+
TCGA-06-2570-01,1,21.0,0.0
|
607 |
+
TCGA-S9-A6WO-01,1,29.0,1.0
|
608 |
+
TCGA-HW-A5KM-01,1,35.0,1.0
|
609 |
+
TCGA-E1-A7YH-01,1,47.0,0.0
|
610 |
+
TCGA-CS-4941-01,1,67.0,1.0
|
611 |
+
TCGA-QH-A6CX-01,1,66.0,1.0
|
612 |
+
TCGA-FG-7634-01,1,28.0,1.0
|
613 |
+
TCGA-14-0789-01,1,54.0,1.0
|
614 |
+
TCGA-DU-5874-01,1,62.0,0.0
|
615 |
+
TCGA-HT-7676-01,1,26.0,1.0
|
616 |
+
TCGA-P5-A72U-01,1,71.0,0.0
|
617 |
+
TCGA-FG-5963-02,1,23.0,1.0
|
618 |
+
TCGA-E1-5318-01,1,42.0,0.0
|
619 |
+
TCGA-S9-A7QZ-01,1,41.0,1.0
|
620 |
+
TCGA-E1-A7YD-01,1,57.0,1.0
|
621 |
+
TCGA-CS-6670-01,1,43.0,1.0
|
622 |
+
TCGA-DB-5281-01,1,61.0,1.0
|
623 |
+
TCGA-DU-6399-01,1,54.0,1.0
|
624 |
+
TCGA-HT-7690-01,1,29.0,1.0
|
625 |
+
TCGA-HT-7472-01,1,38.0,1.0
|
626 |
+
TCGA-DU-7300-01,1,53.0,0.0
|
627 |
+
TCGA-06-2565-01,1,59.0,1.0
|
628 |
+
TCGA-06-2558-01,1,75.0,0.0
|
629 |
+
TCGA-HT-7471-01,1,37.0,0.0
|
630 |
+
TCGA-HT-A61C-01,1,66.0,1.0
|
631 |
+
TCGA-06-0125-02,1,63.0,0.0
|
632 |
+
TCGA-DH-A66G-01,1,49.0,0.0
|
633 |
+
TCGA-12-1597-01,1,62.0,0.0
|
634 |
+
TCGA-27-2524-01,1,56.0,1.0
|
635 |
+
TCGA-S9-A6TS-01,1,48.0,0.0
|
636 |
+
TCGA-S9-A6WM-01,1,59.0,0.0
|
637 |
+
TCGA-TQ-A7RI-01,1,37.0,0.0
|
638 |
+
TCGA-DU-6397-01,1,45.0,1.0
|
639 |
+
TCGA-HT-8011-01,1,55.0,1.0
|
640 |
+
TCGA-S9-A6WG-01,1,31.0,1.0
|
641 |
+
TCGA-06-0125-01,1,63.0,0.0
|
642 |
+
TCGA-DB-A4XE-01,1,27.0,0.0
|
643 |
+
TCGA-DU-8158-01,1,57.0,0.0
|
644 |
+
TCGA-P5-A77W-01,1,37.0,0.0
|
645 |
+
TCGA-HT-8107-01,1,62.0,1.0
|
646 |
+
TCGA-DB-A4XF-01,1,41.0,0.0
|
647 |
+
TCGA-06-0686-01,1,53.0,1.0
|
648 |
+
TCGA-HT-8015-01,1,21.0,1.0
|
649 |
+
TCGA-06-0211-01,1,47.0,1.0
|
650 |
+
TCGA-HT-7874-01,1,41.0,0.0
|
651 |
+
TCGA-S9-A6WN-01,1,38.0,0.0
|
652 |
+
TCGA-TQ-A7RU-01,1,51.0,1.0
|
653 |
+
TCGA-06-5856-01,1,58.0,1.0
|
654 |
+
TCGA-HT-7691-01,1,31.0,0.0
|
655 |
+
TCGA-HT-7604-01,1,50.0,1.0
|
656 |
+
TCGA-E1-A7YJ-01,1,55.0,1.0
|
657 |
+
TCGA-HT-7880-01,1,30.0,1.0
|
658 |
+
TCGA-DU-5851-01,1,40.0,0.0
|
659 |
+
TCGA-S9-A6TX-01,1,46.0,1.0
|
660 |
+
TCGA-QH-A6X4-01,1,47.0,1.0
|
661 |
+
TCGA-DB-A4XC-01,1,26.0,1.0
|
662 |
+
TCGA-VM-A8CA-01,1,54.0,1.0
|
663 |
+
TCGA-DU-7299-01,1,33.0,1.0
|
664 |
+
TCGA-TM-A7C5-01,1,30.0,1.0
|
665 |
+
TCGA-06-0649-01,1,73.0,0.0
|
666 |
+
TCGA-06-2569-01,1,24.0,0.0
|
667 |
+
TCGA-DB-A75O-01,1,29.0,1.0
|
668 |
+
TCGA-DU-7013-01,1,59.0,1.0
|
669 |
+
TCGA-S9-A6TZ-01,1,39.0,0.0
|
670 |
+
TCGA-41-2572-01,1,67.0,1.0
|
671 |
+
TCGA-02-2486-01,1,64.0,1.0
|
672 |
+
TCGA-DU-5870-01,1,34.0,0.0
|
673 |
+
TCGA-28-5208-01,1,52.0,1.0
|
674 |
+
TCGA-DU-A7T6-01,1,73.0,0.0
|
675 |
+
TCGA-E1-5307-01,1,62.0,0.0
|
676 |
+
TCGA-R8-A6MO-01,1,53.0,0.0
|
677 |
+
TCGA-FN-7833-01,1,25.0,1.0
|
678 |
+
TCGA-TM-A84H-01,1,44.0,0.0
|
679 |
+
TCGA-DU-5853-01,1,29.0,1.0
|
680 |
+
TCGA-CS-5397-01,1,54.0,0.0
|
681 |
+
TCGA-DU-A7TC-01,1,32.0,1.0
|
682 |
+
TCGA-19-2619-01,1,55.0,0.0
|
683 |
+
TCGA-DB-A64W-01,1,65.0,0.0
|
684 |
+
TCGA-06-0210-01,1,72.0,0.0
|
685 |
+
TCGA-VV-A829-01,1,44.0,1.0
|
686 |
+
TCGA-27-2519-01,1,48.0,1.0
|
687 |
+
TCGA-QH-A6X8-01,1,56.0,0.0
|
688 |
+
TCGA-HT-A74O-01,1,34.0,1.0
|
689 |
+
TCGA-06-2564-01,1,50.0,1.0
|
690 |
+
TCGA-DU-7012-01,1,74.0,0.0
|
691 |
+
TCGA-S9-A6U8-01,1,24.0,1.0
|
692 |
+
TCGA-E1-A7YV-01,1,26.0,0.0
|
693 |
+
TCGA-FG-A4MT-01,1,27.0,0.0
|
694 |
+
TCGA-VM-A8CB-01,1,33.0,1.0
|
695 |
+
TCGA-P5-A5EY-01,1,21.0,1.0
|
696 |
+
TCGA-26-5135-01,1,72.0,0.0
|
697 |
+
TCGA-S9-A7QX-01,1,36.0,0.0
|
698 |
+
TCGA-S9-A6TV-01,1,50.0,1.0
|
699 |
+
TCGA-DU-7292-01,1,69.0,1.0
|
700 |
+
TCGA-S9-A6U6-01,1,28.0,1.0
|
701 |
+
TCGA-DU-A7TI-01,1,32.0,1.0
|
702 |
+
TCGA-DU-A5TT-01,1,70.0,1.0
|
703 |
+
TCGA-19-1389-02,1,51.0,1.0
|
output/preprocess/Polycystic_Ovary_Syndrome/cohort_info.json
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"GSE87435": {
|
3 |
+
"is_usable": true,
|
4 |
+
"is_gene_available": true,
|
5 |
+
"is_trait_available": true,
|
6 |
+
"is_available": true,
|
7 |
+
"is_biased": false,
|
8 |
+
"has_age": false,
|
9 |
+
"has_gender": false,
|
10 |
+
"sample_size": 18
|
11 |
+
},
|
12 |
+
"GSE43322": {
|
13 |
+
"is_usable": false,
|
14 |
+
"is_gene_available": true,
|
15 |
+
"is_trait_available": true,
|
16 |
+
"is_available": true,
|
17 |
+
"is_biased": true,
|
18 |
+
"has_age": false,
|
19 |
+
"has_gender": false,
|
20 |
+
"sample_size": 31
|
21 |
+
},
|
22 |
+
"GSE151158": {
|
23 |
+
"is_usable": false,
|
24 |
+
"is_gene_available": true,
|
25 |
+
"is_trait_available": true,
|
26 |
+
"is_available": true,
|
27 |
+
"is_biased": true,
|
28 |
+
"has_age": false,
|
29 |
+
"has_gender": false,
|
30 |
+
"sample_size": 61
|
31 |
+
},
|
32 |
+
"TCGA": {
|
33 |
+
"is_usable": false,
|
34 |
+
"is_gene_available": true,
|
35 |
+
"is_trait_available": true,
|
36 |
+
"is_available": true,
|
37 |
+
"is_biased": true,
|
38 |
+
"has_age": true,
|
39 |
+
"has_gender": false,
|
40 |
+
"sample_size": 308
|
41 |
+
}
|
42 |
+
}
|
output/preprocess/Polycystic_Ovary_Syndrome/gene_data/GSE151158.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/preprocess/Polycystic_Ovary_Syndrome/gene_data/GSE43322.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/preprocess/Polycystic_Ovary_Syndrome/gene_data/GSE87435.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/preprocess/Post-Traumatic_Stress_Disorder/GSE199841.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/preprocess/Post-Traumatic_Stress_Disorder/cohort_info.json
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"GSE81761": {
|
3 |
+
"is_usable": true,
|
4 |
+
"is_gene_available": true,
|
5 |
+
"is_trait_available": true,
|
6 |
+
"is_available": true,
|
7 |
+
"is_biased": false,
|
8 |
+
"has_age": true,
|
9 |
+
"has_gender": true,
|
10 |
+
"sample_size": 109
|
11 |
+
},
|
12 |
+
"GSE77164": {
|
13 |
+
"is_usable": true,
|
14 |
+
"is_gene_available": true,
|
15 |
+
"is_trait_available": true,
|
16 |
+
"is_available": true,
|
17 |
+
"is_biased": false,
|
18 |
+
"has_age": true,
|
19 |
+
"has_gender": true,
|
20 |
+
"sample_size": 254
|
21 |
+
},
|
22 |
+
"GSE67663": {
|
23 |
+
"is_usable": true,
|
24 |
+
"is_gene_available": true,
|
25 |
+
"is_trait_available": true,
|
26 |
+
"is_available": true,
|
27 |
+
"is_biased": false,
|
28 |
+
"has_age": true,
|
29 |
+
"has_gender": true,
|
30 |
+
"sample_size": 184
|
31 |
+
},
|
32 |
+
"GSE64814": {
|
33 |
+
"is_usable": true,
|
34 |
+
"is_gene_available": true,
|
35 |
+
"is_trait_available": true,
|
36 |
+
"is_available": true,
|
37 |
+
"is_biased": false,
|
38 |
+
"has_age": false,
|
39 |
+
"has_gender": false,
|
40 |
+
"sample_size": 96
|
41 |
+
},
|
42 |
+
"GSE63878": {
|
43 |
+
"is_usable": true,
|
44 |
+
"is_gene_available": true,
|
45 |
+
"is_trait_available": true,
|
46 |
+
"is_available": true,
|
47 |
+
"is_biased": false,
|
48 |
+
"has_age": false,
|
49 |
+
"has_gender": false,
|
50 |
+
"sample_size": 96
|
51 |
+
},
|
52 |
+
"GSE52875": {
|
53 |
+
"is_usable": false,
|
54 |
+
"is_gene_available": false,
|
55 |
+
"is_trait_available": false,
|
56 |
+
"is_available": false,
|
57 |
+
"is_biased": null,
|
58 |
+
"has_age": null,
|
59 |
+
"has_gender": null,
|
60 |
+
"sample_size": null
|
61 |
+
},
|
62 |
+
"GSE44456": {
|
63 |
+
"is_usable": true,
|
64 |
+
"is_gene_available": true,
|
65 |
+
"is_trait_available": true,
|
66 |
+
"is_available": true,
|
67 |
+
"is_biased": false,
|
68 |
+
"has_age": true,
|
69 |
+
"has_gender": true,
|
70 |
+
"sample_size": 39
|
71 |
+
},
|
72 |
+
"GSE199841": {
|
73 |
+
"is_usable": true,
|
74 |
+
"is_gene_available": true,
|
75 |
+
"is_trait_available": true,
|
76 |
+
"is_available": true,
|
77 |
+
"is_biased": false,
|
78 |
+
"has_age": true,
|
79 |
+
"has_gender": false,
|
80 |
+
"sample_size": 48
|
81 |
+
},
|
82 |
+
"GSE114852": {
|
83 |
+
"is_usable": true,
|
84 |
+
"is_gene_available": true,
|
85 |
+
"is_trait_available": true,
|
86 |
+
"is_available": true,
|
87 |
+
"is_biased": false,
|
88 |
+
"has_age": false,
|
89 |
+
"has_gender": true,
|
90 |
+
"sample_size": 149
|
91 |
+
},
|
92 |
+
"TCGA": {
|
93 |
+
"is_usable": false,
|
94 |
+
"is_gene_available": false,
|
95 |
+
"is_trait_available": false,
|
96 |
+
"is_available": false,
|
97 |
+
"is_biased": null,
|
98 |
+
"has_age": null,
|
99 |
+
"has_gender": null,
|
100 |
+
"sample_size": null
|
101 |
+
}
|
102 |
+
}
|
output/preprocess/Psoriasis/GSE183134.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
output/preprocess/Psoriasis/clinical_data/GSE123086.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
,GSM3494884,GSM3494885,GSM3494886,GSM3494887,GSM3494888,GSM3494889,GSM3494890,GSM3494891,GSM3494892,GSM3494893,GSM3494894,GSM3494895,GSM3494896,GSM3494897,GSM3494898,GSM3494899,GSM3494900,GSM3494901,GSM3494902,GSM3494903,GSM3494904,GSM3494905,GSM3494906,GSM3494907,GSM3494908,GSM3494909,GSM3494910,GSM3494911,GSM3494912,GSM3494913,GSM3494914,GSM3494915,GSM3494916,GSM3494917,GSM3494918,GSM3494919,GSM3494920,GSM3494921,GSM3494922,GSM3494923,GSM3494924,GSM3494925,GSM3494926,GSM3494927,GSM3494928,GSM3494929,GSM3494930,GSM3494931,GSM3494932,GSM3494933,GSM3494934,GSM3494935,GSM3494936,GSM3494937,GSM3494938,GSM3494939,GSM3494940,GSM3494941,GSM3494942,GSM3494943,GSM3494944,GSM3494945,GSM3494946,GSM3494947,GSM3494948,GSM3494949,GSM3494950,GSM3494951,GSM3494952,GSM3494953,GSM3494954,GSM3494955,GSM3494956,GSM3494957,GSM3494958,GSM3494959,GSM3494960,GSM3494961,GSM3494962,GSM3494963,GSM3494964,GSM3494965,GSM3494966,GSM3494967,GSM3494968,GSM3494969,GSM3494970,GSM3494971,GSM3494972,GSM3494973,GSM3494974,GSM3494975,GSM3494976,GSM3494977,GSM3494978,GSM3494979,GSM3494980,GSM3494981,GSM3494982,GSM3494983,GSM3494984,GSM3494985,GSM3494986,GSM3494987,GSM3494988,GSM3494989,GSM3494990,GSM3494991,GSM3494992,GSM3494993,GSM3494994,GSM3494995,GSM3494996,GSM3494997,GSM3494998,GSM3494999,GSM3495000,GSM3495001,GSM3495002,GSM3495003,GSM3495004,GSM3495005,GSM3495006,GSM3495007,GSM3495008,GSM3495009,GSM3495010,GSM3495011,GSM3495012,GSM3495013,GSM3495014,GSM3495015,GSM3495016,GSM3495017,GSM3495018,GSM3495019,GSM3495020,GSM3495021,GSM3495022,GSM3495023,GSM3495024,GSM3495025,GSM3495026,GSM3495027,GSM3495028,GSM3495029,GSM3495030,GSM3495031,GSM3495032,GSM3495033,GSM3495034,GSM3495035,GSM3495036,GSM3495037,GSM3495038,GSM3495039,GSM3495040,GSM3495041,GSM3495042,GSM3495043,GSM3495044,GSM3495045,GSM3495046,GSM3495047,GSM3495048,GSM3495049
|
2 |
+
Psoriasis,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,,,,,,,,,,,,,,,,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
3 |
+
Age,56.0,,20.0,51.0,37.0,61.0,,31.0,56.0,41.0,61.0,,80.0,53.0,61.0,73.0,60.0,76.0,77.0,74.0,69.0,77.0,81.0,70.0,82.0,69.0,82.0,67.0,67.0,78.0,67.0,74.0,,51.0,72.0,66.0,80.0,36.0,67.0,31.0,31.0,45.0,56.0,65.0,53.0,48.0,50.0,76.0,,24.0,42.0,76.0,22.0,,23.0,34.0,43.0,47.0,24.0,55.0,48.0,58.0,30.0,28.0,41.0,63.0,55.0,55.0,67.0,47.0,46.0,49.0,23.0,68.0,39.0,24.0,36.0,58.0,38.0,27.0,67.0,61.0,69.0,63.0,60.0,17.0,10.0,9.0,13.0,10.0,13.0,15.0,12.0,13.0,81.0,94.0,51.0,40.0,,97.0,23.0,93.0,58.0,28.0,54.0,15.0,8.0,11.0,12.0,8.0,14.0,8.0,10.0,14.0,13.0,40.0,52.0,42.0,29.0,43.0,41.0,54.0,42.0,49.0,45.0,56.0,64.0,71.0,48.0,20.0,53.0,32.0,26.0,28.0,47.0,24.0,48.0,,19.0,41.0,38.0,,15.0,12.0,13.0,,11.0,,16.0,11.0,,35.0,26.0,39.0,46.0,42.0,20.0,69.0,69.0,47.0,47.0,56.0,54.0,53.0,50.0,22.0
|
4 |
+
Gender,1.0,,1.0,1.0,1.0,1.0,,1.0,1.0,1.0,1.0,,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,,1.0,1.0,1.0,1.0,,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,,1.0,1.0,1.0,,1.0,1.0,1.0,,1.0,,1.0,1.0,,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
output/preprocess/Psoriasis/clinical_data/GSE123088.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
|
2 |
+
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0,,,,,,,,,,,,,,
|
3 |
+
56.0,,20.0,51.0,37.0,61.0,31.0,41.0,80.0,53.0,73.0,60.0,76.0,77.0,74.0,69.0,81.0,70.0,82.0,67.0,78.0,72.0,66.0,36.0,45.0,65.0,48.0,50.0,24.0,42.0
|
4 |
+
1.0,,0.0,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
output/preprocess/Psoriasis/clinical_data/GSE158448.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
,GSM4800737,GSM4800738,GSM4800739,GSM4800740,GSM4800741,GSM4800742,GSM4800743,GSM4800744,GSM4800745,GSM4800746,GSM4800747,GSM4800748,GSM4800749,GSM4800750,GSM4800751,GSM4800752,GSM4800753,GSM4800754,GSM4800755,GSM4800756,GSM4800757,GSM4800758,GSM4800759,GSM4800760,GSM4800761,GSM4800762,GSM4800763,GSM4800764,GSM4800765,GSM4800766,GSM4800767,GSM4800768,GSM4800769,GSM4800770,GSM4800771,GSM4800772,GSM4800773,GSM4800774,GSM4800775,GSM4800776,GSM4800777,GSM4800778,GSM4800779,GSM4800780,GSM4800781,GSM4800782,GSM4800783,GSM4800784,GSM4800785,GSM4800786,GSM4800787,GSM4800788,GSM4800789,GSM4800790,GSM4800791,GSM4800792,GSM4800793,GSM4800794,GSM4800795,GSM4800796
|
2 |
+
Psoriasis,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,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
output/preprocess/Psoriasis/clinical_data/GSE162998.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
,GSM4969892,GSM4969893,GSM4969894,GSM4969895,GSM4969896,GSM4969897,GSM4969898,GSM4969899,GSM4969900,GSM4969901,GSM4969902,GSM4969903,GSM4969904,GSM4969905,GSM4969906,GSM4969907,GSM4969908,GSM4969909,GSM4969910,GSM4969911,GSM4969912,GSM4969913,GSM4969914,GSM4969915,GSM4969916,GSM4969917,GSM4969918,GSM4969919,GSM4969920,GSM4969921,GSM4969922,GSM4969923,GSM4969924,GSM4969925,GSM4969926,GSM4969927,GSM4969928,GSM4969929,GSM4969930,GSM4969931,GSM4969932,GSM4969933,GSM4969934,GSM4969935,GSM4969936,GSM4969937,GSM4969938,GSM4969939
|
2 |
+
Psoriasis,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,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,1.0,0.0,1.0,1.0,1.0,0.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
output/preprocess/Psoriasis/clinical_data/GSE178228.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
,GSM5384796,GSM5384797,GSM5384798,GSM5384799,GSM5384800,GSM5384801,GSM5384802,GSM5384803,GSM5384804,GSM5384805,GSM5384806,GSM5384807,GSM5384808,GSM5384809,GSM5384810,GSM5384811,GSM5384812,GSM5384813,GSM5384814,GSM5384815,GSM5384816,GSM5384817,GSM5384818,GSM5384819,GSM5384820,GSM5384821,GSM5384822,GSM5384823,GSM5384824,GSM5384825,GSM5384826,GSM5384827,GSM5384828,GSM5384829,GSM5384830,GSM5384831,GSM5384832,GSM5384833,GSM5384834,GSM5384835,GSM5384836,GSM5384837,GSM5384838,GSM5384839,GSM5384840,GSM5384841,GSM5384842,GSM5384843,GSM5384844,GSM5384845,GSM5384846,GSM5384847,GSM5384848,GSM5384849,GSM5384850,GSM5384851,GSM5384852,GSM5384853,GSM5384854,GSM5384855,GSM5384856,GSM5384857,GSM5384858,GSM5384859,GSM5384860,GSM5384861,GSM5384862,GSM5384863,GSM5384864,GSM5384865,GSM5384866,GSM5384867,GSM5384868,GSM5384869,GSM5384870,GSM5384871,GSM5384872,GSM5384873,GSM5384874,GSM5384875,GSM5384876,GSM5384877,GSM5384878,GSM5384879,GSM5384880,GSM5384881,GSM5384882,GSM5384883,GSM5384884,GSM5384885,GSM5384886,GSM5384887,GSM5384888,GSM5384889,GSM5384890,GSM5384891,GSM5384892,GSM5384893,GSM5384894,GSM5384895,GSM5384896,GSM5384897,GSM5384898,GSM5384899,GSM5384900,GSM5384901,GSM5384902,GSM5384903,GSM5384904,GSM5384905,GSM5384906,GSM5384907,GSM5384908,GSM5384909,GSM5384910,GSM5384911,GSM5384912
|
2 |
+
Psoriasis,14.7,2.9,7.2,15.5,3.0,8.2,6.4,3.0,6.0,7.8,10.3,20.1,3.2,5.0,8.39999999999999,2.6,22.8,4.7,13.4,4.3,10.0,10.6,7.2,1.6,10.2,4.4,9.2,12.6,12.0,5.8,5.0,11.9,12.0,3.0,12.7,0.7,4.1,1.8,5.2,2.7,13.2,15.2,13.8999999999999,4.3,16.7,9.4,6.0,11.1,19.2,8.4,12.4,15.6,14.0,22.0,3.6,6.8,8.5,4.6,7.6,2.8,27.7,2.2,4.2,12.0,2.4,12.3999999999999,2.4,31.9,5.3,25.0,1.8,14.9,2.7,15.6,8.4,15.2,5.2,16.7,53.8,5.8,11.8,7.8,22.3,15.3,6.6,2.8,7.2,12.4,17.8,9.0,10.1,7.39999999999999,22.0,10.5,29.8,4.1,18.3,12.0,8.8,16.0,41.4,13.5,6.9,12.4,15.7,15.6,12.3,2.4,14.6,14.9,8.8,22.2,19.2,6.1,11.2,10.6,14.2
|
output/preprocess/Rectal_Cancer/cohort_info.json
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"GSE94104": {
|
3 |
+
"is_usable": true,
|
4 |
+
"is_gene_available": true,
|
5 |
+
"is_trait_available": true,
|
6 |
+
"is_available": true,
|
7 |
+
"is_biased": false,
|
8 |
+
"has_age": false,
|
9 |
+
"has_gender": false,
|
10 |
+
"sample_size": 80
|
11 |
+
},
|
12 |
+
"GSE40492": {
|
13 |
+
"is_usable": true,
|
14 |
+
"is_gene_available": true,
|
15 |
+
"is_trait_available": true,
|
16 |
+
"is_available": true,
|
17 |
+
"is_biased": false,
|
18 |
+
"has_age": true,
|
19 |
+
"has_gender": true,
|
20 |
+
"sample_size": 245
|
21 |
+
},
|
22 |
+
"GSE170999": {
|
23 |
+
"is_usable": false,
|
24 |
+
"is_gene_available": false,
|
25 |
+
"is_trait_available": true,
|
26 |
+
"is_available": false,
|
27 |
+
"is_biased": null,
|
28 |
+
"has_age": null,
|
29 |
+
"has_gender": null,
|
30 |
+
"sample_size": null
|
31 |
+
},
|
32 |
+
"GSE150082": {
|
33 |
+
"is_usable": true,
|
34 |
+
"is_gene_available": true,
|
35 |
+
"is_trait_available": true,
|
36 |
+
"is_available": true,
|
37 |
+
"is_biased": false,
|
38 |
+
"has_age": true,
|
39 |
+
"has_gender": true,
|
40 |
+
"sample_size": 39
|
41 |
+
},
|
42 |
+
"GSE145037": {
|
43 |
+
"is_usable": false,
|
44 |
+
"is_gene_available": false,
|
45 |
+
"is_trait_available": false,
|
46 |
+
"is_available": false,
|
47 |
+
"is_biased": null,
|
48 |
+
"has_age": null,
|
49 |
+
"has_gender": null,
|
50 |
+
"sample_size": null
|
51 |
+
},
|
52 |
+
"GSE139255": {
|
53 |
+
"is_usable": true,
|
54 |
+
"is_gene_available": true,
|
55 |
+
"is_trait_available": true,
|
56 |
+
"is_available": true,
|
57 |
+
"is_biased": false,
|
58 |
+
"has_age": false,
|
59 |
+
"has_gender": false,
|
60 |
+
"sample_size": 156
|
61 |
+
},
|
62 |
+
"GSE133057": {
|
63 |
+
"is_usable": true,
|
64 |
+
"is_gene_available": true,
|
65 |
+
"is_trait_available": true,
|
66 |
+
"is_available": true,
|
67 |
+
"is_biased": false,
|
68 |
+
"has_age": true,
|
69 |
+
"has_gender": true,
|
70 |
+
"sample_size": 33
|
71 |
+
},
|
72 |
+
"GSE123390": {
|
73 |
+
"is_usable": true,
|
74 |
+
"is_gene_available": true,
|
75 |
+
"is_trait_available": true,
|
76 |
+
"is_available": true,
|
77 |
+
"is_biased": false,
|
78 |
+
"has_age": false,
|
79 |
+
"has_gender": false,
|
80 |
+
"sample_size": 28
|
81 |
+
},
|
82 |
+
"GSE119409": {
|
83 |
+
"is_usable": true,
|
84 |
+
"is_gene_available": true,
|
85 |
+
"is_trait_available": true,
|
86 |
+
"is_available": true,
|
87 |
+
"is_biased": false,
|
88 |
+
"has_age": false,
|
89 |
+
"has_gender": false,
|
90 |
+
"sample_size": 2
|
91 |
+
},
|
92 |
+
"GSE109057": {
|
93 |
+
"is_usable": true,
|
94 |
+
"is_gene_available": true,
|
95 |
+
"is_trait_available": true,
|
96 |
+
"is_available": true,
|
97 |
+
"is_biased": false,
|
98 |
+
"has_age": false,
|
99 |
+
"has_gender": false,
|
100 |
+
"sample_size": 3
|
101 |
+
},
|
102 |
+
"TCGA": {
|
103 |
+
"is_usable": true,
|
104 |
+
"is_gene_available": true,
|
105 |
+
"is_trait_available": true,
|
106 |
+
"is_available": true,
|
107 |
+
"is_biased": false,
|
108 |
+
"has_age": true,
|
109 |
+
"has_gender": true,
|
110 |
+
"sample_size": 105
|
111 |
+
}
|
112 |
+
}
|
p1/preprocess/Prostate_Cancer/gene_data/GSE259218.csv
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Gene,GSM8111504,GSM8111505,GSM8111506,GSM8111507,GSM8111508,GSM8111509,GSM8111510,GSM8111511,GSM8111512,GSM8111513,GSM8111514,GSM8111515,GSM8111516,GSM8111517,GSM8111518,GSM8111519,GSM8111520,GSM8111521,GSM8111522,GSM8111523,GSM8111524,GSM8111525,GSM8111526,GSM8111527,GSM8111528,GSM8111529,GSM8111530,GSM8111531,GSM8111532,GSM8111533,GSM8111534,GSM8111535,GSM8111536,GSM8111537,GSM8111538,GSM8111539,GSM8111540,GSM8111541,GSM8111542,GSM8111543,GSM8111544,GSM8111545,GSM8111546,GSM8111547,GSM8111548,GSM8111549,GSM8111550,GSM8111551
|
2 |
+
OR4F16,92.62348,96.1646,93.14436,94.60566,92.70193,92.29272,91.78902,92.52548,93.50397,92.1257,96.85947,94.30385,97.46374,93.60451,95.8289,94.38887,94.15765,103.0378,98.61027,95.02132,91.14053,91.06796,88.63256,92.14626,91.37267,94.98623,101.7025,89.04741,87.51493,91.45093,92.14801,91.39998,95.84787,101.9999,102.0307,96.79668,93.29488,96.59714,92.74218,98.79894,95.86237,97.19956,88.95374,97.59253,96.86462,101.3525,93.17311,101.5774
|
3 |
+
OR4F17,95.95036,92.17675,95.10325,97.2383,95.29253,95.43927,97.35049,89.20792,89.4932,99.43916,91.68876,96.58812,90.92703,94.91365,92.69555,95.66331,92.49176,92.31004,88.7634,93.99573,97.19251,92.02088,96.45043,96.03814,85.89545,94.34533,93.72083,87.66558,94.98042,91.70341,94.19315,95.05149,101.9253,95.44308,94.8525,94.31593,90.55092,98.94518,88.25571,90.87545,97.49011,100.3776,99.07206,93.27406,98.19466,97.44492,89.79266,94.12099
|
4 |
+
OR4F21,194.74611,186.88168,190.15385,181.11916,178.31121000000002,184.65344,188.38761,178.48894,194.89199,177.79680000000002,193.97115,182.50745,190.86485,182.33688999999998,182.21885,182.94562000000002,177.87921999999998,186.89138,189.26441,188.15188999999998,182.46785,180.54367000000002,191.29709,187.45098000000002,185.33479,192.87718,189.13256,189.64796,188.87382000000002,190.46150999999998,180.07397,193.73802999999998,191.74015,172.2509,182.79140999999998,187.5306,188.00284,191.33695,185.6642,187.09397,174.51728,186.72394,182.62914999999998,194.90013,177.22823,189.14454,189.91125,194.63229
|
5 |
+
OR4F29,92.24358,89.94441,89.95223,98.43713,89.74045,96.29741,95.3726,93.66099,97.79916,94.63802,101.3678,94.41834,90.03468,92.87086,92.09503,89.26066,93.0051,95.06699,96.16346,97.88391,97.2855,91.0332,92.92427,90.21371,93.44091,105.5865,94.52934,94.67641,89.50008,86.55812,100.8829,93.54269,93.49877,93.25122,94.51927,94.1384,89.56702,88.95223,94.93038,101.357,95.3435,96.06966,94.9967,92.35013,91.80289,93.66821,93.57048,106.7245
|
6 |
+
OR4F3,88.85523,99.21703,93.07277,92.55325,103.4661,96.36249,87.33717,89.64014,94.17142,89.8408,89.92381,85.75546,84.27009,100.2968,92.61087,90.13343,99.7556,88.1498,93.37534,83.51451,98.2854,85.96048,86.21328,87.64319,112.7936,91.5827,102.1816,93.98384,91.56601,97.36145,93.86375,94.18634,88.72652,98.50233,93.08009,89.75155,93.01897,93.31461,93.08166,91.45093,90.98116,90.30466,92.83686,99.3224,93.97758,96.25475,93.86806,101.1472
|
7 |
+
OR4F4,185.54547,194.06567,178.2003,179.3677,187.96043,185.4264,187.26728,180.66799,180.91118,195.51704,184.94928,191.36651999999998,179.3657,186.35577,188.39845,180.58699000000001,184.59861,178.37243,223.03966000000003,182.16378,183.27353,193.34502,183.68752,192.70065,190.92311,182.46614,184.8333,192.32474,188.13522,183.3831,181.88657999999998,200.99063999999998,181.95177999999999,186.65825,190.39247999999998,178.49754000000001,184.68518999999998,190.71572,189.74538,186.71528999999998,185.85718,183.27321999999998,179.03733,193.36665,186.28352,186.86105,183.40856,178.75342999999998
|
8 |
+
OR4F5,177.38063,193.30158,181.50494,183.54149999999998,190.07296,187.14512000000002,185.42806000000002,196.42499,181.18968,187.92471,190.47345,171.50689,185.02333,193.10395,181.83245,171.15949,190.42229,176.70373,179.64164,183.80202,193.4931,174.96405,185.48614,179.86972,194.84206,194.39896,178.81445000000002,191.69397,188.44806,181.77506,184.58217000000002,178.47466,187.66017,188.75498,178.94450999999998,178.88846,186.95185,183.97177,179.43383,178.94745999999998,184.0177,176.41209,195.80340999999999,188.28372000000002,191.02737,181.54261,186.93289,186.16651000000002
|
9 |
+
PCMTD2,363.8437,355.2527,356.9194,371.5242,360.1638,344.6977,319.2271,375.2348,395.4962,389.5339,396.8118,388.0998,370.6284,359.8901,369.9979,350.8168,282.4656,313.0189,324.2806,301.9114,304.5741,333.6693,358.0184,335.6337,252.3954,285.7505,291.4072,264.9956,299.0491,288.4565,280.4529,296.4833,290.6401,242.5474,318.5953,226.6705,257.2045,254.083,259.6339,237.0867,304.7521,238.2254,327.6698,254.5902,238.7073,250.4888,290.0233,286.8727
|
p1/preprocess/Sarcoma/clinical_data/GSE197147.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM5910186,GSM5910187,GSM5910188,GSM5910189,GSM5910190,GSM5910191,GSM5910192,GSM5910193,GSM5910194,GSM5910195,GSM5910196,GSM5910197,GSM5910198,GSM5910199,GSM5910200,GSM5910201,GSM5910202,GSM5910203,GSM5910204,GSM5910205,GSM5910206,GSM5910207,GSM5910208,GSM5910209,GSM5910210,GSM5910211,GSM5910212,GSM5910213,GSM5910214,GSM5910215,GSM5910216,GSM5910217,GSM5910218,GSM5910219,GSM5910220,GSM5910221,GSM5910222,GSM5910223,GSM5910224,GSM5910225,GSM5910226,GSM5910227,GSM5910228,GSM5910229,GSM5910230,GSM5910231,GSM5910232,GSM5910233,GSM5910234,GSM5910235,GSM5910236,GSM5910237,GSM5910238,GSM5910239,GSM5910240,GSM5910241,GSM5910242,GSM5910243,GSM5910244,GSM5910245,GSM5910246,GSM5910247,GSM5910248,GSM5910249,GSM5910250,GSM5910251,GSM5910252,GSM5910253,GSM5910254,GSM5910255,GSM5910256,GSM5910257,GSM5910258,GSM5910259,GSM5910260,GSM5910261,GSM5910262,GSM5910263,GSM5910264
|
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,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,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,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/Sarcoma/code/GSE118336.py
ADDED
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE118336"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE118336"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE118336.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE118336.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE118336.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 |
+
# Step: Dataset Analysis and Clinical Feature Extraction
|
37 |
+
|
38 |
+
# 1. Gene Expression Data Availability
|
39 |
+
# The Series title indicates "HTA2.0 (human transcriptome array) analysis", which suggests
|
40 |
+
# actual gene expression data is available (and not simply miRNA or methylation data).
|
41 |
+
is_gene_available = True
|
42 |
+
|
43 |
+
# 2. Variable Availability and Data Type Conversion
|
44 |
+
|
45 |
+
# 2.1 Identify keys in the sample characteristics for each variable:
|
46 |
+
trait_row = None # No mention of 'Sarcoma' or a relevant disease key in the dictionary.
|
47 |
+
age_row = None # No age information found.
|
48 |
+
gender_row = None # No gender information found.
|
49 |
+
|
50 |
+
# 2.2 Define data-type conversion functions. Even though data is not available,
|
51 |
+
# we provide them as placeholders.
|
52 |
+
|
53 |
+
def convert_trait(x: str) -> int:
|
54 |
+
# Not used because trait_row is None, but here's a placeholder function.
|
55 |
+
# Convert to 'binary' if used, or return None for unknown.
|
56 |
+
return None
|
57 |
+
|
58 |
+
def convert_age(x: str) -> float:
|
59 |
+
# Not used because age_row is None, placeholder function
|
60 |
+
return None
|
61 |
+
|
62 |
+
def convert_gender(x: str) -> int:
|
63 |
+
# Not used because gender_row is None, placeholder function
|
64 |
+
return None
|
65 |
+
|
66 |
+
# 3. Save Metadata (initial filtering).
|
67 |
+
# Trait data availability depends on trait_row. Since trait_row is None, is_trait_available=False.
|
68 |
+
is_trait_available = False
|
69 |
+
|
70 |
+
is_usable = validate_and_save_cohort_info(
|
71 |
+
is_final=False,
|
72 |
+
cohort=cohort,
|
73 |
+
info_path=json_path,
|
74 |
+
is_gene_available=is_gene_available,
|
75 |
+
is_trait_available=is_trait_available
|
76 |
+
)
|
77 |
+
|
78 |
+
# 4. Since trait_row is None, we skip clinical feature extraction and do not call geo_select_clinical_features.
|
79 |
+
# STEP3
|
80 |
+
import gzip
|
81 |
+
import pandas as pd
|
82 |
+
|
83 |
+
try:
|
84 |
+
# 1. Attempt to extract gene expression data using the library function
|
85 |
+
gene_data = get_genetic_data(matrix_file)
|
86 |
+
except KeyError:
|
87 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
88 |
+
# and rename the first column to "ID".
|
89 |
+
marker = "!series_matrix_table_begin"
|
90 |
+
skip_rows = None
|
91 |
+
|
92 |
+
# Determine how many rows to skip before the matrix data begins
|
93 |
+
with gzip.open(matrix_file, 'rt') as f:
|
94 |
+
for i, line in enumerate(f):
|
95 |
+
if marker in line:
|
96 |
+
skip_rows = i + 1
|
97 |
+
break
|
98 |
+
else:
|
99 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
100 |
+
|
101 |
+
# Read the data from the determined position
|
102 |
+
gene_data = pd.read_csv(
|
103 |
+
matrix_file,
|
104 |
+
compression='gzip',
|
105 |
+
skiprows=skip_rows,
|
106 |
+
comment='!',
|
107 |
+
delimiter='\t',
|
108 |
+
on_bad_lines='skip'
|
109 |
+
)
|
110 |
+
|
111 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
112 |
+
if 'ID_REF' in gene_data.columns:
|
113 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
114 |
+
else:
|
115 |
+
first_col = gene_data.columns[0]
|
116 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
117 |
+
|
118 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
119 |
+
gene_data.set_index('ID', inplace=True)
|
120 |
+
|
121 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
122 |
+
print(gene_data.index[:20])
|
123 |
+
requires_gene_mapping = True
|
124 |
+
# STEP5
|
125 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
126 |
+
if soft_file is None:
|
127 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
128 |
+
gene_annotation = pd.DataFrame()
|
129 |
+
else:
|
130 |
+
try:
|
131 |
+
# Attempt to extract gene annotation with the default method
|
132 |
+
gene_annotation = get_gene_annotation(soft_file)
|
133 |
+
except UnicodeDecodeError:
|
134 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
135 |
+
import gzip
|
136 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
137 |
+
content = f.read()
|
138 |
+
gene_annotation = filter_content_by_prefix(
|
139 |
+
content,
|
140 |
+
prefixes_a=['^','!','#'],
|
141 |
+
unselect=True,
|
142 |
+
source_type='string',
|
143 |
+
return_df_a=True
|
144 |
+
)[0]
|
145 |
+
|
146 |
+
print("Gene annotation preview:")
|
147 |
+
print(preview_df(gene_annotation))
|
148 |
+
# STEP 6: Gene Identifier Mapping
|
149 |
+
|
150 |
+
# We'll attempt to map the probe-level data to gene symbols only if there's a genuine overlap
|
151 |
+
# between the expression data indices and the annotation IDs.
|
152 |
+
|
153 |
+
probe_column_candidates = ["ID", "probeset_id"]
|
154 |
+
gene_symbol_column_candidates = ["gene_assignment", "mrna_assignment"]
|
155 |
+
|
156 |
+
chosen_probe_col = None
|
157 |
+
chosen_symbol_col = None
|
158 |
+
|
159 |
+
# 1. Find a probe column with overlap
|
160 |
+
for col in probe_column_candidates:
|
161 |
+
if col in gene_annotation.columns:
|
162 |
+
overlap = set(gene_annotation[col]) & set(gene_data.index)
|
163 |
+
if len(overlap) > 0:
|
164 |
+
chosen_probe_col = col
|
165 |
+
break
|
166 |
+
|
167 |
+
# 2. Pick a gene symbol column
|
168 |
+
for col in gene_symbol_column_candidates:
|
169 |
+
if col in gene_annotation.columns:
|
170 |
+
chosen_symbol_col = col
|
171 |
+
break
|
172 |
+
|
173 |
+
# If none found, skip mapping
|
174 |
+
if not chosen_probe_col or not chosen_symbol_col:
|
175 |
+
print("No suitable probe or gene symbol columns found in the annotation. Skipping mapping.")
|
176 |
+
else:
|
177 |
+
# Build a preliminary mapping DataFrame
|
178 |
+
mapping_df = get_gene_mapping(
|
179 |
+
gene_annotation,
|
180 |
+
prob_col=chosen_probe_col,
|
181 |
+
gene_col=chosen_symbol_col
|
182 |
+
)
|
183 |
+
|
184 |
+
# 3. Check for genuine overlap after dropping invalid entries
|
185 |
+
mapped_ids = set(mapping_df["ID"].unique()) & set(gene_data.index)
|
186 |
+
if len(mapped_ids) == 0:
|
187 |
+
print("No overlapping probe IDs after cleaning. Skipping mapping.")
|
188 |
+
else:
|
189 |
+
# Proceed with the mapping since there is an actual overlap
|
190 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
191 |
+
print("Gene-level mapping performed successfully.")
|
192 |
+
print("Mapped gene_data shape:", gene_data.shape)
|
193 |
+
print("First few gene symbols after mapping:", gene_data.index[:10].tolist())
|
194 |
+
import os
|
195 |
+
import pandas as pd
|
196 |
+
|
197 |
+
# STEP 7: Data Normalization and Linking
|
198 |
+
|
199 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
200 |
+
if not os.path.exists(out_clinical_data_file):
|
201 |
+
# No trait data file => dataset is not usable for trait analysis
|
202 |
+
df_null = pd.DataFrame()
|
203 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
204 |
+
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=False,
|
210 |
+
is_biased=is_biased,
|
211 |
+
df=df_null,
|
212 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
213 |
+
)
|
214 |
+
|
215 |
+
else:
|
216 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
217 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
218 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
219 |
+
|
220 |
+
# 2. Load the previously extracted clinical CSV.
|
221 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
222 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
223 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
224 |
+
|
225 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
226 |
+
combined_clinical_df = selected_clinical_df
|
227 |
+
|
228 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
229 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
230 |
+
|
231 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
232 |
+
processed_data = handle_missing_values(linked_data, trait)
|
233 |
+
|
234 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
235 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
236 |
+
|
237 |
+
# 5. Final validation and metadata saving.
|
238 |
+
is_usable = validate_and_save_cohort_info(
|
239 |
+
is_final=True,
|
240 |
+
cohort=cohort,
|
241 |
+
info_path=json_path,
|
242 |
+
is_gene_available=True,
|
243 |
+
is_trait_available=True,
|
244 |
+
is_biased=trait_biased,
|
245 |
+
df=processed_data,
|
246 |
+
note="Completed trait-based preprocessing."
|
247 |
+
)
|
248 |
+
|
249 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
250 |
+
if is_usable:
|
251 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Sarcoma/code/GSE133228.py
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE133228"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE133228"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE133228.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE133228.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE133228.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 background info, we assume these data measure gene expression
|
38 |
+
|
39 |
+
# 2) Variable Availability and Data Type Conversion
|
40 |
+
|
41 |
+
# From the sample characteristics:
|
42 |
+
# 0 -> ['gender: Male', 'gender: Female']
|
43 |
+
# 1 -> ['age: 3', 'age: 11', 'age: 4', 'age: 25', ...] (multiple distinct ages)
|
44 |
+
# 2 -> ['tumor type: primary tumor'] (only one value)
|
45 |
+
|
46 |
+
# The trait "Sarcoma" is not explicitly found in any row, and row 2 has only one unique value.
|
47 |
+
# Hence, trait_row = None (not useful for a variation-based analysis).
|
48 |
+
trait_row = None
|
49 |
+
|
50 |
+
# Age data is in row=1 with multiple distinct values
|
51 |
+
age_row = 1
|
52 |
+
|
53 |
+
# Gender data is in row=0 with multiple distinct values
|
54 |
+
gender_row = 0
|
55 |
+
|
56 |
+
# 2.2) Define data type converters
|
57 |
+
|
58 |
+
def convert_trait(value: str) -> int:
|
59 |
+
# Not used because trait_row is None, but define for consistency.
|
60 |
+
# If we had data, we might extract part after the colon and map accordingly.
|
61 |
+
return None
|
62 |
+
|
63 |
+
def convert_age(value: str) -> float:
|
64 |
+
# Typical pattern: "age: 25"
|
65 |
+
# Split by colon and take the numeric part
|
66 |
+
parts = value.split(':')
|
67 |
+
if len(parts) == 2:
|
68 |
+
try:
|
69 |
+
return float(parts[1].strip())
|
70 |
+
except ValueError:
|
71 |
+
return None
|
72 |
+
return None
|
73 |
+
|
74 |
+
def convert_gender(value: str) -> int:
|
75 |
+
# Typical pattern: "gender: Male"/"gender: Female"
|
76 |
+
# Convert Female->0, Male->1, otherwise None
|
77 |
+
parts = value.split(':')
|
78 |
+
if len(parts) == 2:
|
79 |
+
g = parts[1].strip().lower()
|
80 |
+
if g == 'male':
|
81 |
+
return 1
|
82 |
+
elif g == 'female':
|
83 |
+
return 0
|
84 |
+
return None
|
85 |
+
|
86 |
+
# 3) Save Metadata (initial filtering)
|
87 |
+
# Trait data availability depends on whether trait_row is 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
|
99 |
+
# Since trait_row is None, we skip extracting clinical features
|
100 |
+
# STEP3
|
101 |
+
import gzip
|
102 |
+
import pandas as pd
|
103 |
+
|
104 |
+
try:
|
105 |
+
# 1. Attempt to extract gene expression data using the library function
|
106 |
+
gene_data = get_genetic_data(matrix_file)
|
107 |
+
except KeyError:
|
108 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
109 |
+
# and rename the first column to "ID".
|
110 |
+
marker = "!series_matrix_table_begin"
|
111 |
+
skip_rows = None
|
112 |
+
|
113 |
+
# Determine how many rows to skip before the matrix data begins
|
114 |
+
with gzip.open(matrix_file, 'rt') as f:
|
115 |
+
for i, line in enumerate(f):
|
116 |
+
if marker in line:
|
117 |
+
skip_rows = i + 1
|
118 |
+
break
|
119 |
+
else:
|
120 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
121 |
+
|
122 |
+
# Read the data from the determined position
|
123 |
+
gene_data = pd.read_csv(
|
124 |
+
matrix_file,
|
125 |
+
compression='gzip',
|
126 |
+
skiprows=skip_rows,
|
127 |
+
comment='!',
|
128 |
+
delimiter='\t',
|
129 |
+
on_bad_lines='skip'
|
130 |
+
)
|
131 |
+
|
132 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
133 |
+
if 'ID_REF' in gene_data.columns:
|
134 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
135 |
+
else:
|
136 |
+
first_col = gene_data.columns[0]
|
137 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
138 |
+
|
139 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
140 |
+
gene_data.set_index('ID', inplace=True)
|
141 |
+
|
142 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
143 |
+
print(gene_data.index[:20])
|
144 |
+
# These identifiers (e.g., "100009676_at", "10000_at") appear to be microarray probe IDs, not standard human gene symbols.
|
145 |
+
# Typically, such probe IDs need to be mapped to the corresponding gene symbols.
|
146 |
+
|
147 |
+
print("requires_gene_mapping = True")
|
148 |
+
# STEP5
|
149 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
150 |
+
if soft_file is None:
|
151 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
152 |
+
gene_annotation = pd.DataFrame()
|
153 |
+
else:
|
154 |
+
try:
|
155 |
+
# Attempt to extract gene annotation with the default method
|
156 |
+
gene_annotation = get_gene_annotation(soft_file)
|
157 |
+
except UnicodeDecodeError:
|
158 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
159 |
+
import gzip
|
160 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
161 |
+
content = f.read()
|
162 |
+
gene_annotation = filter_content_by_prefix(
|
163 |
+
content,
|
164 |
+
prefixes_a=['^','!','#'],
|
165 |
+
unselect=True,
|
166 |
+
source_type='string',
|
167 |
+
return_df_a=True
|
168 |
+
)[0]
|
169 |
+
|
170 |
+
print("Gene annotation preview:")
|
171 |
+
print(preview_df(gene_annotation))
|
172 |
+
# STEP: Gene Identifier Mapping
|
173 |
+
|
174 |
+
# 1) Decide which key in the gene annotation dataframe corresponds to the probe IDs
|
175 |
+
# (same as those in the gene expression data) and which key corresponds to the gene symbol.
|
176 |
+
# From our preview, "ID" in the annotation matches the probe IDs in the gene expression data,
|
177 |
+
# while "Description" appears to hold gene names/symbols (albeit as descriptive text).
|
178 |
+
|
179 |
+
prob_col = "ID"
|
180 |
+
gene_col = "Description"
|
181 |
+
|
182 |
+
# 2) Get a gene mapping dataframe using these columns.
|
183 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col, gene_col)
|
184 |
+
|
185 |
+
# 3) Convert probe-level measurements to gene-level data.
|
186 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
187 |
+
|
188 |
+
# Optional: Inspect the resulting gene_data shape
|
189 |
+
print("Mapped gene expression data shape:", gene_data.shape)
|
190 |
+
import os
|
191 |
+
import pandas as pd
|
192 |
+
|
193 |
+
# STEP 7: Data Normalization and Linking
|
194 |
+
|
195 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
196 |
+
if not os.path.exists(out_clinical_data_file):
|
197 |
+
# No trait data file => dataset is not usable for trait analysis
|
198 |
+
df_null = pd.DataFrame()
|
199 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
200 |
+
validate_and_save_cohort_info(
|
201 |
+
is_final=True,
|
202 |
+
cohort=cohort,
|
203 |
+
info_path=json_path,
|
204 |
+
is_gene_available=True,
|
205 |
+
is_trait_available=False,
|
206 |
+
is_biased=is_biased,
|
207 |
+
df=df_null,
|
208 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
209 |
+
)
|
210 |
+
|
211 |
+
else:
|
212 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
213 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
214 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
215 |
+
|
216 |
+
# 2. Load the previously extracted clinical CSV.
|
217 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
218 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
219 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
220 |
+
|
221 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
222 |
+
combined_clinical_df = selected_clinical_df
|
223 |
+
|
224 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
225 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
226 |
+
|
227 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
228 |
+
processed_data = handle_missing_values(linked_data, trait)
|
229 |
+
|
230 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
231 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
232 |
+
|
233 |
+
# 5. Final validation and metadata saving.
|
234 |
+
is_usable = validate_and_save_cohort_info(
|
235 |
+
is_final=True,
|
236 |
+
cohort=cohort,
|
237 |
+
info_path=json_path,
|
238 |
+
is_gene_available=True,
|
239 |
+
is_trait_available=True,
|
240 |
+
is_biased=trait_biased,
|
241 |
+
df=processed_data,
|
242 |
+
note="Completed trait-based preprocessing."
|
243 |
+
)
|
244 |
+
|
245 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
246 |
+
if is_usable:
|
247 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Sarcoma/code/GSE142162.py
ADDED
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE142162"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE142162"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE142162.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE142162.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE142162.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 gene expression availability
|
37 |
+
is_gene_available = True # Based on Affymetrix hgu133Plus2 arrays and "Expression profiling" indication
|
38 |
+
|
39 |
+
# 2) Identify data availability (rows) and define conversion functions
|
40 |
+
|
41 |
+
# For this dataset, the trait is effectively constant ("tumor type: primary tumor"), so it's not useful
|
42 |
+
# for an association study. Hence, trait_row is None.
|
43 |
+
trait_row = None
|
44 |
+
|
45 |
+
# Age is variable under key 1
|
46 |
+
age_row = 1
|
47 |
+
|
48 |
+
# Gender is variable under key 0
|
49 |
+
gender_row = 0
|
50 |
+
|
51 |
+
# 2.2) Data type conversion functions
|
52 |
+
|
53 |
+
def convert_trait(value: str):
|
54 |
+
"""
|
55 |
+
This dataset does not contain meaningful variation for the primary trait 'Sarcoma'.
|
56 |
+
We'll return None for all inputs.
|
57 |
+
"""
|
58 |
+
return None
|
59 |
+
|
60 |
+
def convert_age(value: str):
|
61 |
+
"""
|
62 |
+
Converts age values after the colon to a continuous numeric type.
|
63 |
+
Unknown values are returned as None.
|
64 |
+
Example input: "age: 25"
|
65 |
+
"""
|
66 |
+
parts = value.split(':')
|
67 |
+
if len(parts) < 2:
|
68 |
+
return None
|
69 |
+
raw_val = parts[1].strip()
|
70 |
+
if not raw_val.isdigit():
|
71 |
+
return None
|
72 |
+
return float(raw_val)
|
73 |
+
|
74 |
+
def convert_gender(value: str):
|
75 |
+
"""
|
76 |
+
Converts gender to a binary variable:
|
77 |
+
Female -> 0
|
78 |
+
Male -> 1
|
79 |
+
Unknown values are returned as None.
|
80 |
+
Example input: "gender: Male"
|
81 |
+
"""
|
82 |
+
parts = value.split(':')
|
83 |
+
if len(parts) < 2:
|
84 |
+
return None
|
85 |
+
raw_val = parts[1].strip().lower()
|
86 |
+
if raw_val == 'male':
|
87 |
+
return 1
|
88 |
+
elif raw_val == 'female':
|
89 |
+
return 0
|
90 |
+
return None
|
91 |
+
|
92 |
+
# 3) Conduct initial dataset filtering and save metadata
|
93 |
+
is_trait_available = (trait_row is not None)
|
94 |
+
is_usable = validate_and_save_cohort_info(
|
95 |
+
is_final=False,
|
96 |
+
cohort=cohort,
|
97 |
+
info_path=json_path,
|
98 |
+
is_gene_available=is_gene_available,
|
99 |
+
is_trait_available=is_trait_available
|
100 |
+
)
|
101 |
+
|
102 |
+
# 4) Since trait_row is None, we skip clinical feature extraction.
|
103 |
+
# STEP3
|
104 |
+
import gzip
|
105 |
+
import pandas as pd
|
106 |
+
|
107 |
+
try:
|
108 |
+
# 1. Attempt to extract gene expression data using the library function
|
109 |
+
gene_data = get_genetic_data(matrix_file)
|
110 |
+
except KeyError:
|
111 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
112 |
+
# and rename the first column to "ID".
|
113 |
+
marker = "!series_matrix_table_begin"
|
114 |
+
skip_rows = None
|
115 |
+
|
116 |
+
# Determine how many rows to skip before the matrix data begins
|
117 |
+
with gzip.open(matrix_file, 'rt') as f:
|
118 |
+
for i, line in enumerate(f):
|
119 |
+
if marker in line:
|
120 |
+
skip_rows = i + 1
|
121 |
+
break
|
122 |
+
else:
|
123 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
124 |
+
|
125 |
+
# Read the data from the determined position
|
126 |
+
gene_data = pd.read_csv(
|
127 |
+
matrix_file,
|
128 |
+
compression='gzip',
|
129 |
+
skiprows=skip_rows,
|
130 |
+
comment='!',
|
131 |
+
delimiter='\t',
|
132 |
+
on_bad_lines='skip'
|
133 |
+
)
|
134 |
+
|
135 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
136 |
+
if 'ID_REF' in gene_data.columns:
|
137 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
138 |
+
else:
|
139 |
+
first_col = gene_data.columns[0]
|
140 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
141 |
+
|
142 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
143 |
+
gene_data.set_index('ID', inplace=True)
|
144 |
+
|
145 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
146 |
+
print(gene_data.index[:20])
|
147 |
+
print("requires_gene_mapping = True")
|
148 |
+
# STEP5
|
149 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
150 |
+
if soft_file is None:
|
151 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
152 |
+
gene_annotation = pd.DataFrame()
|
153 |
+
else:
|
154 |
+
try:
|
155 |
+
# Attempt to extract gene annotation with the default method
|
156 |
+
gene_annotation = get_gene_annotation(soft_file)
|
157 |
+
except UnicodeDecodeError:
|
158 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
159 |
+
import gzip
|
160 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
161 |
+
content = f.read()
|
162 |
+
gene_annotation = filter_content_by_prefix(
|
163 |
+
content,
|
164 |
+
prefixes_a=['^','!','#'],
|
165 |
+
unselect=True,
|
166 |
+
source_type='string',
|
167 |
+
return_df_a=True
|
168 |
+
)[0]
|
169 |
+
|
170 |
+
print("Gene annotation preview:")
|
171 |
+
print(preview_df(gene_annotation))
|
172 |
+
# Gene Identifier Mapping
|
173 |
+
probe_col = "ID" # column in gene_annotation that matches the probe IDs in gene_data
|
174 |
+
gene_symbol_col = "Description" # column in gene_annotation containing the gene symbol or descriptive info
|
175 |
+
|
176 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col=probe_col, gene_col=gene_symbol_col)
|
177 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
178 |
+
import os
|
179 |
+
import pandas as pd
|
180 |
+
|
181 |
+
# STEP 7: Data Normalization and Linking
|
182 |
+
|
183 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
184 |
+
if not os.path.exists(out_clinical_data_file):
|
185 |
+
# No trait data file => dataset is not usable for trait analysis
|
186 |
+
df_null = pd.DataFrame()
|
187 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
188 |
+
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=is_biased,
|
195 |
+
df=df_null,
|
196 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
197 |
+
)
|
198 |
+
|
199 |
+
else:
|
200 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
201 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
202 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
203 |
+
|
204 |
+
# 2. Load the previously extracted clinical CSV.
|
205 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
206 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
207 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
208 |
+
|
209 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
210 |
+
combined_clinical_df = selected_clinical_df
|
211 |
+
|
212 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
213 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
214 |
+
|
215 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
216 |
+
processed_data = handle_missing_values(linked_data, trait)
|
217 |
+
|
218 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
219 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
220 |
+
|
221 |
+
# 5. Final validation and metadata saving.
|
222 |
+
is_usable = validate_and_save_cohort_info(
|
223 |
+
is_final=True,
|
224 |
+
cohort=cohort,
|
225 |
+
info_path=json_path,
|
226 |
+
is_gene_available=True,
|
227 |
+
is_trait_available=True,
|
228 |
+
is_biased=trait_biased,
|
229 |
+
df=processed_data,
|
230 |
+
note="Completed trait-based preprocessing."
|
231 |
+
)
|
232 |
+
|
233 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
234 |
+
if is_usable:
|
235 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Sarcoma/code/GSE159847.py
ADDED
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE159847"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE159847"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE159847.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE159847.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE159847.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 # This dataset likely contains gene expression data (Affymetrix/Agilent transcriptome).
|
38 |
+
|
39 |
+
# 2. Variable Availability and Data Type Conversion
|
40 |
+
|
41 |
+
# Since all samples are "complex sarcomas" (one trait), there's effectively no variation in the trait.
|
42 |
+
trait_row = None
|
43 |
+
|
44 |
+
# We do see multiple ages under key=1, so age is available.
|
45 |
+
age_row = 1
|
46 |
+
|
47 |
+
# We see males and females under key=0, so gender is available.
|
48 |
+
gender_row = 0
|
49 |
+
|
50 |
+
# Conversion functions
|
51 |
+
def convert_trait(value: str):
|
52 |
+
# Not used since trait_row is None, but defined as per instructions
|
53 |
+
return None
|
54 |
+
|
55 |
+
def convert_age(value: str):
|
56 |
+
# Example value: "age: 73"
|
57 |
+
try:
|
58 |
+
val = value.split(":", 1)[1].strip()
|
59 |
+
return float(val)
|
60 |
+
except:
|
61 |
+
return None
|
62 |
+
|
63 |
+
def convert_gender(value: str):
|
64 |
+
# Example value: "Sex: M" or "Sex: F"
|
65 |
+
val = value.split(":", 1)[1].strip().lower()
|
66 |
+
if val == "m":
|
67 |
+
return 1
|
68 |
+
elif val == "f":
|
69 |
+
return 0
|
70 |
+
return None
|
71 |
+
|
72 |
+
# 3. Save Metadata (initial filtering)
|
73 |
+
is_trait_available = (trait_row is not None)
|
74 |
+
validate_and_save_cohort_info(
|
75 |
+
is_final=False,
|
76 |
+
cohort=cohort,
|
77 |
+
info_path=json_path,
|
78 |
+
is_gene_available=is_gene_available,
|
79 |
+
is_trait_available=is_trait_available
|
80 |
+
)
|
81 |
+
|
82 |
+
# 4. Clinical Feature Extraction
|
83 |
+
# Skip this step if trait_row is None
|
84 |
+
if trait_row is not None:
|
85 |
+
selected_clinical_df = geo_select_clinical_features(
|
86 |
+
clinical_df=clinical_data,
|
87 |
+
trait="Sarcoma",
|
88 |
+
trait_row=trait_row,
|
89 |
+
convert_trait=convert_trait,
|
90 |
+
age_row=age_row,
|
91 |
+
convert_age=convert_age,
|
92 |
+
gender_row=gender_row,
|
93 |
+
convert_gender=convert_gender
|
94 |
+
)
|
95 |
+
print("Preview of selected clinical features:", preview_df(selected_clinical_df))
|
96 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
97 |
+
# STEP3
|
98 |
+
import gzip
|
99 |
+
import pandas as pd
|
100 |
+
|
101 |
+
try:
|
102 |
+
# 1. Attempt to extract gene expression data using the library function
|
103 |
+
gene_data = get_genetic_data(matrix_file)
|
104 |
+
except KeyError:
|
105 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
106 |
+
# and rename the first column to "ID".
|
107 |
+
marker = "!series_matrix_table_begin"
|
108 |
+
skip_rows = None
|
109 |
+
|
110 |
+
# Determine how many rows to skip before the matrix data begins
|
111 |
+
with gzip.open(matrix_file, 'rt') as f:
|
112 |
+
for i, line in enumerate(f):
|
113 |
+
if marker in line:
|
114 |
+
skip_rows = i + 1
|
115 |
+
break
|
116 |
+
else:
|
117 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
118 |
+
|
119 |
+
# Read the data from the determined position
|
120 |
+
gene_data = pd.read_csv(
|
121 |
+
matrix_file,
|
122 |
+
compression='gzip',
|
123 |
+
skiprows=skip_rows,
|
124 |
+
comment='!',
|
125 |
+
delimiter='\t',
|
126 |
+
on_bad_lines='skip'
|
127 |
+
)
|
128 |
+
|
129 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
130 |
+
if 'ID_REF' in gene_data.columns:
|
131 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
132 |
+
else:
|
133 |
+
first_col = gene_data.columns[0]
|
134 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
135 |
+
|
136 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
137 |
+
gene_data.set_index('ID', inplace=True)
|
138 |
+
|
139 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
140 |
+
print(gene_data.index[:20])
|
141 |
+
# These appear to be microarray probe IDs that are not standard human gene symbols.
|
142 |
+
print("requires_gene_mapping = True")
|
143 |
+
# STEP5
|
144 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
145 |
+
if soft_file is None:
|
146 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
147 |
+
gene_annotation = pd.DataFrame()
|
148 |
+
else:
|
149 |
+
try:
|
150 |
+
# Attempt to extract gene annotation with the default method
|
151 |
+
gene_annotation = get_gene_annotation(soft_file)
|
152 |
+
except UnicodeDecodeError:
|
153 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
154 |
+
import gzip
|
155 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
156 |
+
content = f.read()
|
157 |
+
gene_annotation = filter_content_by_prefix(
|
158 |
+
content,
|
159 |
+
prefixes_a=['^','!','#'],
|
160 |
+
unselect=True,
|
161 |
+
source_type='string',
|
162 |
+
return_df_a=True
|
163 |
+
)[0]
|
164 |
+
|
165 |
+
print("Gene annotation preview:")
|
166 |
+
print(preview_df(gene_annotation))
|
167 |
+
# STEP6: Gene Identifier Mapping
|
168 |
+
|
169 |
+
# 1. Identify the matching columns in gene_annotation for probe ID and gene symbol
|
170 |
+
# Based on the preview, 'ID' corresponds to the probe IDs (e.g., A_23_P1000xx),
|
171 |
+
# and 'GENE_SYMBOL' holds the gene symbol.
|
172 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='GENE_SYMBOL')
|
173 |
+
|
174 |
+
# 2. Apply the mapping to convert probe-level data into gene-level data
|
175 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
176 |
+
|
177 |
+
# 3. Check a small part of the resulting gene_data
|
178 |
+
print("Mapped gene expression data shape:", gene_data.shape)
|
179 |
+
print("First 5 genes in gene_data index:", gene_data.index[:5].tolist())
|
180 |
+
import os
|
181 |
+
import pandas as pd
|
182 |
+
|
183 |
+
# STEP 7: Data Normalization and Linking
|
184 |
+
|
185 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
186 |
+
if not os.path.exists(out_clinical_data_file):
|
187 |
+
# No trait data file => dataset is not usable for trait analysis
|
188 |
+
df_null = pd.DataFrame()
|
189 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
190 |
+
validate_and_save_cohort_info(
|
191 |
+
is_final=True,
|
192 |
+
cohort=cohort,
|
193 |
+
info_path=json_path,
|
194 |
+
is_gene_available=True,
|
195 |
+
is_trait_available=False,
|
196 |
+
is_biased=is_biased,
|
197 |
+
df=df_null,
|
198 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
199 |
+
)
|
200 |
+
|
201 |
+
else:
|
202 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
203 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
204 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
205 |
+
|
206 |
+
# 2. Load the previously extracted clinical CSV.
|
207 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
208 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
209 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
210 |
+
|
211 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
212 |
+
combined_clinical_df = selected_clinical_df
|
213 |
+
|
214 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
215 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
216 |
+
|
217 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
218 |
+
processed_data = handle_missing_values(linked_data, trait)
|
219 |
+
|
220 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
221 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
222 |
+
|
223 |
+
# 5. Final validation and metadata saving.
|
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=True,
|
230 |
+
is_biased=trait_biased,
|
231 |
+
df=processed_data,
|
232 |
+
note="Completed trait-based preprocessing."
|
233 |
+
)
|
234 |
+
|
235 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
236 |
+
if is_usable:
|
237 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Sarcoma/code/GSE159848.py
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE159848"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE159848"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE159848.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE159848.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE159848.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 # The dataset is described as "Expression data from 50 mixoid liposarcomas"
|
38 |
+
|
39 |
+
# 2. Identify availability of variables and define their data-conversion functions
|
40 |
+
# According to the dictionary, row 0 has sex: M/F, and row 1 has age
|
41 |
+
# For the trait "Sarcoma," the dataset is entirely mixoid liposarcomas (no variation), so we consider it unavailable.
|
42 |
+
trait_row = None
|
43 |
+
age_row = 1
|
44 |
+
gender_row = 0
|
45 |
+
|
46 |
+
def convert_trait(value: str):
|
47 |
+
"""
|
48 |
+
Since trait is not available/variable in this dataset, always return None.
|
49 |
+
"""
|
50 |
+
return None
|
51 |
+
|
52 |
+
def convert_age(value: str):
|
53 |
+
"""
|
54 |
+
Extract the age value after the colon, converting it to float if possible.
|
55 |
+
Return None for invalid or unknown values.
|
56 |
+
"""
|
57 |
+
val = value.split(':')[-1].strip()
|
58 |
+
try:
|
59 |
+
return float(val)
|
60 |
+
except ValueError:
|
61 |
+
return None
|
62 |
+
|
63 |
+
def convert_gender(value: str):
|
64 |
+
"""
|
65 |
+
Extract the gender value (M or F) after the colon and convert to binary:
|
66 |
+
M or male -> 1
|
67 |
+
F or female -> 0
|
68 |
+
Others -> None
|
69 |
+
"""
|
70 |
+
val = value.split(':')[-1].strip().lower()
|
71 |
+
if val in ['m', 'male']:
|
72 |
+
return 1
|
73 |
+
elif val in ['f', 'female']:
|
74 |
+
return 0
|
75 |
+
else:
|
76 |
+
return None
|
77 |
+
|
78 |
+
# 3. Save metadata with initial filtering
|
79 |
+
is_trait_available = (trait_row is not None)
|
80 |
+
is_usable = validate_and_save_cohort_info(
|
81 |
+
is_final=False,
|
82 |
+
cohort=cohort,
|
83 |
+
info_path=json_path,
|
84 |
+
is_gene_available=is_gene_available,
|
85 |
+
is_trait_available=is_trait_available
|
86 |
+
)
|
87 |
+
|
88 |
+
# 4. Since trait_row is None, skip extraction of clinical features
|
89 |
+
# STEP3
|
90 |
+
import gzip
|
91 |
+
import pandas as pd
|
92 |
+
|
93 |
+
try:
|
94 |
+
# 1. Attempt to extract gene expression data using the library function
|
95 |
+
gene_data = get_genetic_data(matrix_file)
|
96 |
+
except KeyError:
|
97 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
98 |
+
# and rename the first column to "ID".
|
99 |
+
marker = "!series_matrix_table_begin"
|
100 |
+
skip_rows = None
|
101 |
+
|
102 |
+
# Determine how many rows to skip before the matrix data begins
|
103 |
+
with gzip.open(matrix_file, 'rt') as f:
|
104 |
+
for i, line in enumerate(f):
|
105 |
+
if marker in line:
|
106 |
+
skip_rows = i + 1
|
107 |
+
break
|
108 |
+
else:
|
109 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
110 |
+
|
111 |
+
# Read the data from the determined position
|
112 |
+
gene_data = pd.read_csv(
|
113 |
+
matrix_file,
|
114 |
+
compression='gzip',
|
115 |
+
skiprows=skip_rows,
|
116 |
+
comment='!',
|
117 |
+
delimiter='\t',
|
118 |
+
on_bad_lines='skip'
|
119 |
+
)
|
120 |
+
|
121 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
122 |
+
if 'ID_REF' in gene_data.columns:
|
123 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
124 |
+
else:
|
125 |
+
first_col = gene_data.columns[0]
|
126 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
127 |
+
|
128 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
129 |
+
gene_data.set_index('ID', inplace=True)
|
130 |
+
|
131 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
132 |
+
print(gene_data.index[:20])
|
133 |
+
# Based on the observed probe IDs (e.g., "A_23_P100001"), these are not standard human gene symbols.
|
134 |
+
# Thus, gene-to-symbol mapping is required.
|
135 |
+
|
136 |
+
print("requires_gene_mapping = True")
|
137 |
+
# STEP5
|
138 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
139 |
+
if soft_file is None:
|
140 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
141 |
+
gene_annotation = pd.DataFrame()
|
142 |
+
else:
|
143 |
+
try:
|
144 |
+
# Attempt to extract gene annotation with the default method
|
145 |
+
gene_annotation = get_gene_annotation(soft_file)
|
146 |
+
except UnicodeDecodeError:
|
147 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
148 |
+
import gzip
|
149 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
150 |
+
content = f.read()
|
151 |
+
gene_annotation = filter_content_by_prefix(
|
152 |
+
content,
|
153 |
+
prefixes_a=['^','!','#'],
|
154 |
+
unselect=True,
|
155 |
+
source_type='string',
|
156 |
+
return_df_a=True
|
157 |
+
)[0]
|
158 |
+
|
159 |
+
print("Gene annotation preview:")
|
160 |
+
print(preview_df(gene_annotation))
|
161 |
+
# STEP6: Gene Identifier Mapping
|
162 |
+
|
163 |
+
# 1. Identify the matching columns in the gene annotation dataframe.
|
164 |
+
# From the preview, the probe identifiers are under "ID" and the gene symbols are under "GENE_SYMBOL".
|
165 |
+
probe_col = "ID"
|
166 |
+
symbol_col = "GENE_SYMBOL"
|
167 |
+
|
168 |
+
# 2. Create the mapping dataframe from probe to gene symbol.
|
169 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col=probe_col, gene_col=symbol_col)
|
170 |
+
|
171 |
+
# 3. Convert probe-level measurements into gene expression data using the mapping dataframe.
|
172 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
173 |
+
|
174 |
+
# (Optional) Print the shape and a small index preview to verify successful mapping
|
175 |
+
print("Mapped gene_data shape:", gene_data.shape)
|
176 |
+
print("First 20 gene symbols in mapped gene_data:", list(gene_data.index[:20]))
|
177 |
+
import os
|
178 |
+
import pandas as pd
|
179 |
+
|
180 |
+
# STEP 7: Data Normalization and Linking
|
181 |
+
|
182 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
183 |
+
if not os.path.exists(out_clinical_data_file):
|
184 |
+
# No trait data file => dataset is not usable for trait analysis
|
185 |
+
df_null = pd.DataFrame()
|
186 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
187 |
+
validate_and_save_cohort_info(
|
188 |
+
is_final=True,
|
189 |
+
cohort=cohort,
|
190 |
+
info_path=json_path,
|
191 |
+
is_gene_available=True,
|
192 |
+
is_trait_available=False,
|
193 |
+
is_biased=is_biased,
|
194 |
+
df=df_null,
|
195 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
196 |
+
)
|
197 |
+
|
198 |
+
else:
|
199 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
200 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
201 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
202 |
+
|
203 |
+
# 2. Load the previously extracted clinical CSV.
|
204 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
205 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
206 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
207 |
+
|
208 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
209 |
+
combined_clinical_df = selected_clinical_df
|
210 |
+
|
211 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
212 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
213 |
+
|
214 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
215 |
+
processed_data = handle_missing_values(linked_data, trait)
|
216 |
+
|
217 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
218 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
219 |
+
|
220 |
+
# 5. Final validation and metadata saving.
|
221 |
+
is_usable = validate_and_save_cohort_info(
|
222 |
+
is_final=True,
|
223 |
+
cohort=cohort,
|
224 |
+
info_path=json_path,
|
225 |
+
is_gene_available=True,
|
226 |
+
is_trait_available=True,
|
227 |
+
is_biased=trait_biased,
|
228 |
+
df=processed_data,
|
229 |
+
note="Completed trait-based preprocessing."
|
230 |
+
)
|
231 |
+
|
232 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
233 |
+
if is_usable:
|
234 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Sarcoma/code/GSE162785.py
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE162785"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE162785"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE162785.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE162785.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE162785.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 gene expression data availability
|
37 |
+
is_gene_available = True # Microarray analysis suggests gene expression data is available
|
38 |
+
|
39 |
+
# 2) Variable availability and data type conversion
|
40 |
+
|
41 |
+
# From the sample characteristics dictionary:
|
42 |
+
# {0: ['cell line: A673', 'cell line: CHLA-10', 'cell line: EW7', 'cell line: SK-N-MC']}
|
43 |
+
# There is only one key (0), whose values all refer to Ewing sarcoma cell lines. For our trait of interest ("Sarcoma"),
|
44 |
+
# this dataset effectively has just one value for all samples (i.e., all are Ewing Sarcoma), so it is considered constant
|
45 |
+
# and therefore not available for association analysis.
|
46 |
+
trait_row = None # No variability in the trait
|
47 |
+
age_row = None # No age data available
|
48 |
+
gender_row = None # No gender data available
|
49 |
+
|
50 |
+
# Although the rows are None, we still define the conversion functions as requested.
|
51 |
+
def convert_trait(value: str):
|
52 |
+
# Not used here because trait_row is None
|
53 |
+
# Typically, we would parse the string after the colon and convert, but there's no relevant data to parse.
|
54 |
+
return None
|
55 |
+
|
56 |
+
def convert_age(value: str):
|
57 |
+
# Not used here because age_row is None
|
58 |
+
return None
|
59 |
+
|
60 |
+
def convert_gender(value: str):
|
61 |
+
# Not used here because gender_row is None
|
62 |
+
return None
|
63 |
+
|
64 |
+
# 3) Save metadata (initial filtering)
|
65 |
+
# Trait data is considered unavailable since trait_row is None.
|
66 |
+
is_trait_available = False
|
67 |
+
is_usable = validate_and_save_cohort_info(
|
68 |
+
is_final=False,
|
69 |
+
cohort=cohort,
|
70 |
+
info_path=json_path,
|
71 |
+
is_gene_available=is_gene_available,
|
72 |
+
is_trait_available=is_trait_available
|
73 |
+
)
|
74 |
+
|
75 |
+
# 4) Clinical feature extraction is skipped because trait_row is None (no clinical data for trait).
|
76 |
+
# STEP3
|
77 |
+
import gzip
|
78 |
+
import pandas as pd
|
79 |
+
|
80 |
+
try:
|
81 |
+
# 1. Attempt to extract gene expression data using the library function
|
82 |
+
gene_data = get_genetic_data(matrix_file)
|
83 |
+
except KeyError:
|
84 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
85 |
+
# and rename the first column to "ID".
|
86 |
+
marker = "!series_matrix_table_begin"
|
87 |
+
skip_rows = None
|
88 |
+
|
89 |
+
# Determine how many rows to skip before the matrix data begins
|
90 |
+
with gzip.open(matrix_file, 'rt') as f:
|
91 |
+
for i, line in enumerate(f):
|
92 |
+
if marker in line:
|
93 |
+
skip_rows = i + 1
|
94 |
+
break
|
95 |
+
else:
|
96 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
97 |
+
|
98 |
+
# Read the data from the determined position
|
99 |
+
gene_data = pd.read_csv(
|
100 |
+
matrix_file,
|
101 |
+
compression='gzip',
|
102 |
+
skiprows=skip_rows,
|
103 |
+
comment='!',
|
104 |
+
delimiter='\t',
|
105 |
+
on_bad_lines='skip'
|
106 |
+
)
|
107 |
+
|
108 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
109 |
+
if 'ID_REF' in gene_data.columns:
|
110 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
111 |
+
else:
|
112 |
+
first_col = gene_data.columns[0]
|
113 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
114 |
+
|
115 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
116 |
+
gene_data.set_index('ID', inplace=True)
|
117 |
+
|
118 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
119 |
+
print(gene_data.index[:20])
|
120 |
+
print("requires_gene_mapping = True")
|
121 |
+
# STEP5
|
122 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
123 |
+
if soft_file is None:
|
124 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
125 |
+
gene_annotation = pd.DataFrame()
|
126 |
+
else:
|
127 |
+
try:
|
128 |
+
# Attempt to extract gene annotation with the default method
|
129 |
+
gene_annotation = get_gene_annotation(soft_file)
|
130 |
+
except UnicodeDecodeError:
|
131 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
132 |
+
import gzip
|
133 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
134 |
+
content = f.read()
|
135 |
+
gene_annotation = filter_content_by_prefix(
|
136 |
+
content,
|
137 |
+
prefixes_a=['^','!','#'],
|
138 |
+
unselect=True,
|
139 |
+
source_type='string',
|
140 |
+
return_df_a=True
|
141 |
+
)[0]
|
142 |
+
|
143 |
+
print("Gene annotation preview:")
|
144 |
+
print(preview_df(gene_annotation))
|
145 |
+
# STEP: Gene Identifier Mapping
|
146 |
+
|
147 |
+
# 1. Identify the columns in the annotation dataframe that match our probe IDs and contain gene symbols.
|
148 |
+
# From the preview, the "ID" column matches the numerical probe identifiers, and "gene_assignment" contains gene symbols.
|
149 |
+
prob_col = "ID"
|
150 |
+
gene_col = "gene_assignment"
|
151 |
+
|
152 |
+
# 2. Create a mapping dataframe with these two columns.
|
153 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col=prob_col, gene_col=gene_col)
|
154 |
+
|
155 |
+
# 3. Convert the probe-level expression data to gene-level expression data using this mapping.
|
156 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
157 |
+
|
158 |
+
# (Optional) Print shape and a small preview of the resulting mapped data
|
159 |
+
print("Mapped gene_data shape:", gene_data.shape)
|
160 |
+
print("Mapped gene_data preview:\n", gene_data.head())
|
161 |
+
import os
|
162 |
+
import pandas as pd
|
163 |
+
|
164 |
+
# STEP 7: Data Normalization and Linking
|
165 |
+
|
166 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
167 |
+
if not os.path.exists(out_clinical_data_file):
|
168 |
+
# No trait data file => dataset is not usable for trait analysis
|
169 |
+
df_null = pd.DataFrame()
|
170 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
171 |
+
validate_and_save_cohort_info(
|
172 |
+
is_final=True,
|
173 |
+
cohort=cohort,
|
174 |
+
info_path=json_path,
|
175 |
+
is_gene_available=True,
|
176 |
+
is_trait_available=False,
|
177 |
+
is_biased=is_biased,
|
178 |
+
df=df_null,
|
179 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
180 |
+
)
|
181 |
+
|
182 |
+
else:
|
183 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
184 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
185 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
186 |
+
|
187 |
+
# 2. Load the previously extracted clinical CSV.
|
188 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
189 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
190 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
191 |
+
|
192 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
193 |
+
combined_clinical_df = selected_clinical_df
|
194 |
+
|
195 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
196 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
197 |
+
|
198 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
199 |
+
processed_data = handle_missing_values(linked_data, trait)
|
200 |
+
|
201 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
202 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
203 |
+
|
204 |
+
# 5. Final validation and metadata saving.
|
205 |
+
is_usable = validate_and_save_cohort_info(
|
206 |
+
is_final=True,
|
207 |
+
cohort=cohort,
|
208 |
+
info_path=json_path,
|
209 |
+
is_gene_available=True,
|
210 |
+
is_trait_available=True,
|
211 |
+
is_biased=trait_biased,
|
212 |
+
df=processed_data,
|
213 |
+
note="Completed trait-based preprocessing."
|
214 |
+
)
|
215 |
+
|
216 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
217 |
+
if is_usable:
|
218 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Sarcoma/code/GSE162789.py
ADDED
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE162789"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE162789"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE162789.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE162789.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE162789.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 dataset description focusing on Ewing sarcoma pathogenesis via HDAC
|
38 |
+
|
39 |
+
# 2) Identify and set availability of trait, age, and gender
|
40 |
+
# Inspecting the sample characteristics, we see only one key (0).
|
41 |
+
# All samples appear to have the same trait (Ewing sarcoma), so there's no variation -> trait not available
|
42 |
+
trait_row = None
|
43 |
+
|
44 |
+
# Age is available for 2 samples (14, 20). The other 4 do not mention age but we will treat them as missing
|
45 |
+
age_row = 0
|
46 |
+
|
47 |
+
# Gender is only explicitly "female" for 2 samples and unknown for the rest, so there's effectively only one unique known value
|
48 |
+
gender_row = None
|
49 |
+
|
50 |
+
# 2) Define converters for trait, age, and gender
|
51 |
+
def convert_trait(x: str) -> int:
|
52 |
+
"""
|
53 |
+
Convert the trait from string to a binary or categorical label.
|
54 |
+
Not used here because trait_row is None, but defined for completeness.
|
55 |
+
"""
|
56 |
+
# Example logic (convert to 1 if "Ewing sarcoma" appears, else None):
|
57 |
+
parts = x.split(":")
|
58 |
+
if len(parts) > 1:
|
59 |
+
val = parts[1].strip().lower()
|
60 |
+
if "ewing sarcoma" in val:
|
61 |
+
return 1
|
62 |
+
return None
|
63 |
+
|
64 |
+
def convert_age(x: str) -> float:
|
65 |
+
"""
|
66 |
+
Convert the age from string to a continuous float.
|
67 |
+
If no age information is present, return None.
|
68 |
+
"""
|
69 |
+
# Example logic to parse "14 year old"
|
70 |
+
match = re.search(r'(\d+)\s*year\s*old', x.lower())
|
71 |
+
if match:
|
72 |
+
return float(match.group(1))
|
73 |
+
return None
|
74 |
+
|
75 |
+
def convert_gender(x: str) -> int:
|
76 |
+
"""
|
77 |
+
Convert the gender from string to binary (female -> 0, male -> 1).
|
78 |
+
If unknown, return None.
|
79 |
+
"""
|
80 |
+
parts = x.split(":")
|
81 |
+
val = parts[-1].strip().lower() if len(parts) > 1 else x.lower()
|
82 |
+
if "female" in val:
|
83 |
+
return 0
|
84 |
+
elif "male" in val:
|
85 |
+
return 1
|
86 |
+
return None
|
87 |
+
|
88 |
+
# 3) Save metadata using initial filtering
|
89 |
+
is_trait_available = (trait_row is not None)
|
90 |
+
|
91 |
+
# Since this is just the initial filtering, set is_final=False
|
92 |
+
_ = validate_and_save_cohort_info(
|
93 |
+
is_final=False,
|
94 |
+
cohort=cohort,
|
95 |
+
info_path=json_path,
|
96 |
+
is_gene_available=is_gene_available,
|
97 |
+
is_trait_available=is_trait_available
|
98 |
+
)
|
99 |
+
|
100 |
+
# 4) Because trait_row is None, we skip clinical feature extraction
|
101 |
+
# (No further steps for clinical data since the trait is considered not available.)
|
102 |
+
# STEP3
|
103 |
+
import gzip
|
104 |
+
import pandas as pd
|
105 |
+
|
106 |
+
try:
|
107 |
+
# 1. Attempt to extract gene expression data using the library function
|
108 |
+
gene_data = get_genetic_data(matrix_file)
|
109 |
+
except KeyError:
|
110 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
111 |
+
# and rename the first column to "ID".
|
112 |
+
marker = "!series_matrix_table_begin"
|
113 |
+
skip_rows = None
|
114 |
+
|
115 |
+
# Determine how many rows to skip before the matrix data begins
|
116 |
+
with gzip.open(matrix_file, 'rt') as f:
|
117 |
+
for i, line in enumerate(f):
|
118 |
+
if marker in line:
|
119 |
+
skip_rows = i + 1
|
120 |
+
break
|
121 |
+
else:
|
122 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
123 |
+
|
124 |
+
# Read the data from the determined position
|
125 |
+
gene_data = pd.read_csv(
|
126 |
+
matrix_file,
|
127 |
+
compression='gzip',
|
128 |
+
skiprows=skip_rows,
|
129 |
+
comment='!',
|
130 |
+
delimiter='\t',
|
131 |
+
on_bad_lines='skip'
|
132 |
+
)
|
133 |
+
|
134 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
135 |
+
if 'ID_REF' in gene_data.columns:
|
136 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
137 |
+
else:
|
138 |
+
first_col = gene_data.columns[0]
|
139 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
140 |
+
|
141 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
142 |
+
gene_data.set_index('ID', inplace=True)
|
143 |
+
|
144 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
145 |
+
print(gene_data.index[:20])
|
146 |
+
# Based on the numeric identifiers (e.g., 7892501, 7892502, etc.), these look like probe IDs rather than official gene symbols.
|
147 |
+
# Therefore, they need to be mapped to standard human gene symbols.
|
148 |
+
print("requires_gene_mapping = True")
|
149 |
+
# STEP5
|
150 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
151 |
+
if soft_file is None:
|
152 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
153 |
+
gene_annotation = pd.DataFrame()
|
154 |
+
else:
|
155 |
+
try:
|
156 |
+
# Attempt to extract gene annotation with the default method
|
157 |
+
gene_annotation = get_gene_annotation(soft_file)
|
158 |
+
except UnicodeDecodeError:
|
159 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
160 |
+
import gzip
|
161 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
162 |
+
content = f.read()
|
163 |
+
gene_annotation = filter_content_by_prefix(
|
164 |
+
content,
|
165 |
+
prefixes_a=['^','!','#'],
|
166 |
+
unselect=True,
|
167 |
+
source_type='string',
|
168 |
+
return_df_a=True
|
169 |
+
)[0]
|
170 |
+
|
171 |
+
print("Gene annotation preview:")
|
172 |
+
print(preview_df(gene_annotation))
|
173 |
+
# STEP 6: Gene Identifier Mapping
|
174 |
+
|
175 |
+
# 1. Identify the annotation columns that match the expression data IDs and the gene symbols.
|
176 |
+
# From inspection, "ID" corresponds to the probe ID (same format as gene_data.index),
|
177 |
+
# and "mrna_assignment" appears to have clearer references to actual gene symbols (e.g. "OR4F4", "SEPT14").
|
178 |
+
|
179 |
+
# 2. Get the gene mapping DataFrame using "mrna_assignment" as the gene symbol source
|
180 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col="ID", gene_col="mrna_assignment")
|
181 |
+
|
182 |
+
# 3. Convert probe-level measurements to gene-level expression
|
183 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
184 |
+
|
185 |
+
# Let's see the result
|
186 |
+
print("Gene data shape after mapping:", gene_data.shape)
|
187 |
+
print("First 5 gene indices after mapping:", gene_data.index[:5].tolist())
|
188 |
+
import os
|
189 |
+
import pandas as pd
|
190 |
+
|
191 |
+
# STEP 7: Data Normalization and Linking
|
192 |
+
|
193 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
194 |
+
if not os.path.exists(out_clinical_data_file):
|
195 |
+
# No trait data file => dataset is not usable for trait analysis
|
196 |
+
df_null = pd.DataFrame()
|
197 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
198 |
+
validate_and_save_cohort_info(
|
199 |
+
is_final=True,
|
200 |
+
cohort=cohort,
|
201 |
+
info_path=json_path,
|
202 |
+
is_gene_available=True,
|
203 |
+
is_trait_available=False,
|
204 |
+
is_biased=is_biased,
|
205 |
+
df=df_null,
|
206 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
207 |
+
)
|
208 |
+
|
209 |
+
else:
|
210 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
211 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
212 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
213 |
+
|
214 |
+
# 2. Load the previously extracted clinical CSV.
|
215 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
216 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
217 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
218 |
+
|
219 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
220 |
+
combined_clinical_df = selected_clinical_df
|
221 |
+
|
222 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
223 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
224 |
+
|
225 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
226 |
+
processed_data = handle_missing_values(linked_data, trait)
|
227 |
+
|
228 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
229 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
230 |
+
|
231 |
+
# 5. Final validation and metadata saving.
|
232 |
+
is_usable = validate_and_save_cohort_info(
|
233 |
+
is_final=True,
|
234 |
+
cohort=cohort,
|
235 |
+
info_path=json_path,
|
236 |
+
is_gene_available=True,
|
237 |
+
is_trait_available=True,
|
238 |
+
is_biased=trait_biased,
|
239 |
+
df=processed_data,
|
240 |
+
note="Completed trait-based preprocessing."
|
241 |
+
)
|
242 |
+
|
243 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
244 |
+
if is_usable:
|
245 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Sarcoma/code/GSE197147.py
ADDED
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Sarcoma"
|
6 |
+
cohort = "GSE197147"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Sarcoma"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Sarcoma/GSE197147"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Sarcoma/GSE197147.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Sarcoma/gene_data/GSE197147.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Sarcoma/clinical_data/GSE197147.csv"
|
16 |
+
json_path = "./output/preprocess/1/Sarcoma/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 the dataset contains gene expression data
|
37 |
+
is_gene_available = True # The series description explicitly mentions "Gene expression profiling"
|
38 |
+
|
39 |
+
# 2. Identify variable availability and define row indices
|
40 |
+
# Only one key (0) is present with multiple histotypes ("HB","NB","RMS","WT").
|
41 |
+
# We'll map "RMS" to the trait of interest (Sarcoma=1) and others to 0.
|
42 |
+
trait_row = 0 # We can infer the Sarcoma trait from 'histotype: RMS' vs others
|
43 |
+
age_row = None # No age information in the sample dictionary
|
44 |
+
gender_row = None # No gender information in the sample dictionary
|
45 |
+
|
46 |
+
# 2.2 Define conversion functions
|
47 |
+
def convert_trait(value: str):
|
48 |
+
# Extract the part after the colon.
|
49 |
+
val = value.split(':')[-1].strip().lower()
|
50 |
+
# Map RMS => 1 (Sarcoma), others => 0
|
51 |
+
if val == 'rms':
|
52 |
+
return 1
|
53 |
+
elif val in ['hb', 'nb', 'wt']:
|
54 |
+
return 0
|
55 |
+
return None # For any unexpected values
|
56 |
+
|
57 |
+
def convert_age(value: str):
|
58 |
+
# No rows found for age, so no real conversion logic needed
|
59 |
+
return None
|
60 |
+
|
61 |
+
def convert_gender(value: str):
|
62 |
+
# No rows found for gender, so no real conversion logic needed
|
63 |
+
return None
|
64 |
+
|
65 |
+
# 2.1 Check if the trait data is available
|
66 |
+
is_trait_available = (trait_row is not None)
|
67 |
+
|
68 |
+
# 3. Save metadata with initial filtering
|
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. If trait data is available (trait_row != None), extract clinical features
|
78 |
+
if trait_row is not None:
|
79 |
+
selected_clinical = 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 |
+
# Preview the extracted clinical features
|
90 |
+
print(preview_df(selected_clinical, n=5))
|
91 |
+
# Save to CSV
|
92 |
+
selected_clinical.to_csv(out_clinical_data_file, index=False)
|
93 |
+
# STEP3
|
94 |
+
import gzip
|
95 |
+
import pandas as pd
|
96 |
+
|
97 |
+
try:
|
98 |
+
# 1. Attempt to extract gene expression data using the library function
|
99 |
+
gene_data = get_genetic_data(matrix_file)
|
100 |
+
except KeyError:
|
101 |
+
# Fallback: the expected "ID_REF" column may be absent, so manually parse the file
|
102 |
+
# and rename the first column to "ID".
|
103 |
+
marker = "!series_matrix_table_begin"
|
104 |
+
skip_rows = None
|
105 |
+
|
106 |
+
# Determine how many rows to skip before the matrix data begins
|
107 |
+
with gzip.open(matrix_file, 'rt') as f:
|
108 |
+
for i, line in enumerate(f):
|
109 |
+
if marker in line:
|
110 |
+
skip_rows = i + 1
|
111 |
+
break
|
112 |
+
else:
|
113 |
+
raise ValueError(f"Marker '{marker}' not found in the file.")
|
114 |
+
|
115 |
+
# Read the data from the determined position
|
116 |
+
gene_data = pd.read_csv(
|
117 |
+
matrix_file,
|
118 |
+
compression='gzip',
|
119 |
+
skiprows=skip_rows,
|
120 |
+
comment='!',
|
121 |
+
delimiter='\t',
|
122 |
+
on_bad_lines='skip'
|
123 |
+
)
|
124 |
+
|
125 |
+
# If a different column name is used instead of 'ID_REF', rename appropriately
|
126 |
+
if 'ID_REF' in gene_data.columns:
|
127 |
+
gene_data.rename(columns={'ID_REF': 'ID'}, inplace=True)
|
128 |
+
else:
|
129 |
+
first_col = gene_data.columns[0]
|
130 |
+
gene_data.rename(columns={first_col: 'ID'}, inplace=True)
|
131 |
+
|
132 |
+
gene_data['ID'] = gene_data['ID'].astype(str)
|
133 |
+
gene_data.set_index('ID', inplace=True)
|
134 |
+
|
135 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
136 |
+
print(gene_data.index[:20])
|
137 |
+
# Based on the provided gene expression data index (e.g., 'TC0100006437.hg.1'),
|
138 |
+
# these appear to be probe or platform-specific identifiers rather than standard human gene symbols.
|
139 |
+
# Therefore, we conclude that these IDs must be mapped to standard gene symbols for proper analysis.
|
140 |
+
|
141 |
+
print("requires_gene_mapping = True")
|
142 |
+
# STEP5
|
143 |
+
# 1 & 2. Only extract and preview gene annotation data if the SOFT file exists, otherwise skip.
|
144 |
+
if soft_file is None:
|
145 |
+
print("No SOFT file found. Skipping gene annotation extraction.")
|
146 |
+
gene_annotation = pd.DataFrame()
|
147 |
+
else:
|
148 |
+
try:
|
149 |
+
# Attempt to extract gene annotation with the default method
|
150 |
+
gene_annotation = get_gene_annotation(soft_file)
|
151 |
+
except UnicodeDecodeError:
|
152 |
+
# Fallback if UTF-8 decoding fails: read with a more lenient encoding and pass the content as a string
|
153 |
+
import gzip
|
154 |
+
with gzip.open(soft_file, 'rt', encoding='latin-1', errors='replace') as f:
|
155 |
+
content = f.read()
|
156 |
+
gene_annotation = filter_content_by_prefix(
|
157 |
+
content,
|
158 |
+
prefixes_a=['^','!','#'],
|
159 |
+
unselect=True,
|
160 |
+
source_type='string',
|
161 |
+
return_df_a=True
|
162 |
+
)[0]
|
163 |
+
|
164 |
+
print("Gene annotation preview:")
|
165 |
+
print(preview_df(gene_annotation))
|
166 |
+
# STEP: Gene Identifier Mapping
|
167 |
+
|
168 |
+
# 1. Identify which annotation columns store the gene IDs and gene symbol references.
|
169 |
+
# From the preview, it appears the column "ID" matches the row index of our gene expression data,
|
170 |
+
# and the column "SPOT_ID.1" contains gene symbol references.
|
171 |
+
probe_id_col = "ID"
|
172 |
+
gene_symbol_col = "SPOT_ID.1"
|
173 |
+
|
174 |
+
# 2. Get a gene mapping dataframe from the annotation dataframe.
|
175 |
+
mapping_df = get_gene_mapping(
|
176 |
+
annotation=gene_annotation,
|
177 |
+
prob_col=probe_id_col,
|
178 |
+
gene_col=gene_symbol_col
|
179 |
+
)
|
180 |
+
|
181 |
+
# 3. Convert probe-level measurements into gene-level expression.
|
182 |
+
gene_data = apply_gene_mapping(expression_df=gene_data, mapping_df=mapping_df)
|
183 |
+
|
184 |
+
# Print a small preview to confirm the result
|
185 |
+
print("Mapped gene expression data preview:")
|
186 |
+
print(gene_data.head())
|
187 |
+
import os
|
188 |
+
import pandas as pd
|
189 |
+
|
190 |
+
# STEP 7: Data Normalization and Linking
|
191 |
+
|
192 |
+
# First, check if the clinical CSV file exists. If it does not, we cannot proceed with trait-based linking.
|
193 |
+
if not os.path.exists(out_clinical_data_file):
|
194 |
+
# No trait data file => dataset is not usable for trait analysis
|
195 |
+
df_null = pd.DataFrame()
|
196 |
+
is_biased = True # Arbitrary boolean to satisfy function requirement
|
197 |
+
validate_and_save_cohort_info(
|
198 |
+
is_final=True,
|
199 |
+
cohort=cohort,
|
200 |
+
info_path=json_path,
|
201 |
+
is_gene_available=True,
|
202 |
+
is_trait_available=False,
|
203 |
+
is_biased=is_biased,
|
204 |
+
df=df_null,
|
205 |
+
note="No trait data file found; dataset not usable for trait analysis."
|
206 |
+
)
|
207 |
+
|
208 |
+
else:
|
209 |
+
# 1. Normalize the mapped gene expression data using known gene symbol synonyms, then save.
|
210 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
211 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
212 |
+
|
213 |
+
# 2. Load the previously extracted clinical CSV.
|
214 |
+
selected_clinical_df = pd.read_csv(out_clinical_data_file)
|
215 |
+
# If we had a single-row trait, rename row 0 to the trait name (example usage).
|
216 |
+
selected_clinical_df = selected_clinical_df.rename(index={0: trait})
|
217 |
+
|
218 |
+
# Combine these as our final clinical data; in this dataset, we only have trait info (if any).
|
219 |
+
combined_clinical_df = selected_clinical_df
|
220 |
+
|
221 |
+
# Link the clinical and genetic data by matching sample IDs in columns.
|
222 |
+
linked_data = geo_link_clinical_genetic_data(combined_clinical_df, normalized_gene_data)
|
223 |
+
|
224 |
+
# 3. Handle missing values in the linked data (drop incomplete rows/columns, then impute).
|
225 |
+
processed_data = handle_missing_values(linked_data, trait)
|
226 |
+
|
227 |
+
# 4. Check trait bias and remove any biased demographic features (if any).
|
228 |
+
trait_biased, processed_data = judge_and_remove_biased_features(processed_data, trait)
|
229 |
+
|
230 |
+
# 5. Final validation and metadata saving.
|
231 |
+
is_usable = validate_and_save_cohort_info(
|
232 |
+
is_final=True,
|
233 |
+
cohort=cohort,
|
234 |
+
info_path=json_path,
|
235 |
+
is_gene_available=True,
|
236 |
+
is_trait_available=True,
|
237 |
+
is_biased=trait_biased,
|
238 |
+
df=processed_data,
|
239 |
+
note="Completed trait-based preprocessing."
|
240 |
+
)
|
241 |
+
|
242 |
+
# 6. If final dataset is usable, save. Otherwise, skip.
|
243 |
+
if is_usable:
|
244 |
+
processed_data.to_csv(out_data_file)
|
p1/preprocess/Schizophrenia/GSE120340.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Schizophrenia/GSE120342.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
p1/preprocess/Schizophrenia/clinical_data/GSE120340.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM3398477,GSM3398478,GSM3398479,GSM3398480,GSM3398481,GSM3398482,GSM3398483,GSM3398484,GSM3398485,GSM3398486,GSM3398487,GSM3398488,GSM3398489,GSM3398490,GSM3398491,GSM3398492,GSM3398493,GSM3398494,GSM3398495,GSM3398496,GSM3398497,GSM3398498,GSM3398499,GSM3398500,GSM3398501,GSM3398502,GSM3398503,GSM3398504,GSM3398505,GSM3398506
|
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,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
|
p1/preprocess/Schizophrenia/clinical_data/GSE120342.csv
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
GSM3398507,GSM3398508,GSM3398509,GSM3398510,GSM3398511,GSM3398512,GSM3398513,GSM3398514,GSM3398515,GSM3398516,GSM3398517
|
2 |
+
0.0,0.0,0.0,0.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0
|
p1/preprocess/Schizophrenia/clinical_data/GSE145554.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GSM4321410,GSM4321411,GSM4321412,GSM4321413,GSM4321414,GSM4321415,GSM4321416,GSM4321417,GSM4321418,GSM4321419,GSM4321420,GSM4321421,GSM4321422,GSM4321423,GSM4321424,GSM4321425,GSM4321426,GSM4321427,GSM4321428,GSM4321429,GSM4321430,GSM4321431,GSM4321432,GSM4321433,GSM4321434,GSM4321435,GSM4321436,GSM4321437,GSM4321438,GSM4321439,GSM4321440,GSM4321441,GSM4321442,GSM4321443,GSM4321444,GSM4321445,GSM4321446,GSM4321447,GSM4321448,GSM4321449,GSM4321450,GSM4321451,GSM4321452
|
2 |
+
1.0,0.0,1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0,1.0,0.0,1.0,0.0,1.0,1.0,0.0,0.0,1.0,0.0,1.0,1.0,1.0,1.0,0.0,1.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0,1.0,0.0,0.0,1.0,0.0
|
3 |
+
63.0,90.0,83.0,69.0,73.0,84.0,66.0,78.0,65.0,89.0,69.0,74.0,66.0,86.0,79.0,77.0,68.0,59.0,58.0,90.0,72.0,80.0,58.0,57.0,63.0,90.0,83.0,69.0,84.0,66.0,78.0,65.0,89.0,69.0,74.0,66.0,79.0,77.0,68.0,59.0,58.0,90.0,72.0
|
4 |
+
1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,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/Schizophrenia/code/GSE119288.py
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Schizophrenia"
|
6 |
+
cohort = "GSE119288"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Schizophrenia"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Schizophrenia/GSE119288"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Schizophrenia/GSE119288.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Schizophrenia/gene_data/GSE119288.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Schizophrenia/clinical_data/GSE119288.csv"
|
16 |
+
json_path = "./output/preprocess/1/Schizophrenia/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 "expression-based" transcriptomic study
|
38 |
+
# 2) Identify rows for trait, age, and gender in the sample characteristics dictionary
|
39 |
+
# None indicates the data is not available or is constant (useless for association).
|
40 |
+
trait_row = None
|
41 |
+
age_row = None
|
42 |
+
gender_row = None
|
43 |
+
|
44 |
+
# 2.2) Define data conversion functions (though they won't be used here since data is missing).
|
45 |
+
def convert_trait(value: str) -> Optional[int]:
|
46 |
+
# Placeholder for a binary trait conversion (not used due to missing data).
|
47 |
+
return None
|
48 |
+
|
49 |
+
def convert_age(value: str) -> Optional[float]:
|
50 |
+
# Placeholder for a continuous age conversion (not used due to missing data).
|
51 |
+
return None
|
52 |
+
|
53 |
+
def convert_gender(value: str) -> Optional[int]:
|
54 |
+
# Placeholder for a binary gender conversion (not used due to missing data).
|
55 |
+
return None
|
56 |
+
|
57 |
+
# 3) Conduct initial filtering and save metadata about dataset usability
|
58 |
+
is_trait_available = trait_row is not None
|
59 |
+
validate_and_save_cohort_info(
|
60 |
+
is_final=False,
|
61 |
+
cohort=cohort,
|
62 |
+
info_path=json_path,
|
63 |
+
is_gene_available=is_gene_available,
|
64 |
+
is_trait_available=is_trait_available
|
65 |
+
)
|
66 |
+
|
67 |
+
# 4) Since trait_row is None, we skip clinical feature extraction.
|
68 |
+
# STEP3
|
69 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
70 |
+
gene_data = get_genetic_data(matrix_file)
|
71 |
+
|
72 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
73 |
+
print(gene_data.index[:20])
|
74 |
+
# These probe set IDs (e.g., '1007_s_at') are not human gene symbols but Affymetrix identifiers.
|
75 |
+
requires_gene_mapping = True
|
76 |
+
# STEP5
|
77 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
78 |
+
gene_annotation = get_gene_annotation(soft_file)
|
79 |
+
|
80 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
81 |
+
print("Gene annotation preview:")
|
82 |
+
print(preview_df(gene_annotation))
|
83 |
+
# STEP: Gene Identifier Mapping
|
84 |
+
|
85 |
+
# 1. Identify the columns matching the probe IDs and the gene symbols.
|
86 |
+
# From the annotation preview, "ID" matches the probe set IDs in the expression data,
|
87 |
+
# and we will assume "SPOT_ID" contains gene identifiers or symbols (though here they appear identical
|
88 |
+
# to "ID" in the preview, other rows might differ or contain additional mappings).
|
89 |
+
|
90 |
+
prob_col = 'ID'
|
91 |
+
gene_col = 'SPOT_ID'
|
92 |
+
|
93 |
+
# 2. Create a gene mapping dataframe using the identified columns.
|
94 |
+
gene_mapping_df = get_gene_mapping(gene_annotation, prob_col=prob_col, gene_col=gene_col)
|
95 |
+
|
96 |
+
# 3. Convert the probe-level expression data into gene-level expression data using the mapping.
|
97 |
+
gene_data = apply_gene_mapping(gene_data, gene_mapping_df)
|
98 |
+
|
99 |
+
# Optionally, display a small portion of the resulting DataFrame to verify.
|
100 |
+
print(gene_data.head())
|
101 |
+
# STEP7
|
102 |
+
|
103 |
+
# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.
|
104 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
105 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
106 |
+
|
107 |
+
# Since trait_row is None (no trait data available), we cannot link to clinical data or perform
|
108 |
+
# downstream steps requiring a trait variable. Therefore, we skip steps 2, 3, and 4.
|
109 |
+
|
110 |
+
# 5. We perform partial validation (is_final=False) to record the dataset has gene data but no trait.
|
111 |
+
# That way, we are not required to provide a df or is_biased argument.
|
112 |
+
validate_and_save_cohort_info(
|
113 |
+
is_final=False,
|
114 |
+
cohort=cohort,
|
115 |
+
info_path=json_path,
|
116 |
+
is_gene_available=True,
|
117 |
+
is_trait_available=False
|
118 |
+
)
|
119 |
+
|
120 |
+
# 6. Since trait data is unavailable, we do NOT save a linked dataset.
|
p1/preprocess/Schizophrenia/code/GSE119289.py
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Schizophrenia"
|
6 |
+
cohort = "GSE119289"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Schizophrenia"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Schizophrenia/GSE119289"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Schizophrenia/GSE119289.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Schizophrenia/gene_data/GSE119289.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Schizophrenia/clinical_data/GSE119289.csv"
|
16 |
+
json_path = "./output/preprocess/1/Schizophrenia/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 |
+
# Step 1: Determine if gene expression data is available
|
37 |
+
is_gene_available = True # Based on "transcriptomic drug screening," it appears to be gene expression data
|
38 |
+
|
39 |
+
# Step 2: Identify rows and define data conversion functions for trait, age, and gender
|
40 |
+
trait_row = None # No Schizophrenia-related info found
|
41 |
+
age_row = None # No age-related info found
|
42 |
+
gender_row = None # No gender-related info found
|
43 |
+
|
44 |
+
# Since we have no actual data, the conversion functions simply return None
|
45 |
+
def convert_trait(value: str):
|
46 |
+
return None
|
47 |
+
|
48 |
+
def convert_age(value: str):
|
49 |
+
return None
|
50 |
+
|
51 |
+
def convert_gender(value: str):
|
52 |
+
return None
|
53 |
+
|
54 |
+
# Step 3: Initial filtering and saving cohort info
|
55 |
+
is_trait_available = (trait_row is not None)
|
56 |
+
is_usable = validate_and_save_cohort_info(
|
57 |
+
is_final=False,
|
58 |
+
cohort=cohort,
|
59 |
+
info_path=json_path,
|
60 |
+
is_gene_available=is_gene_available,
|
61 |
+
is_trait_available=is_trait_available
|
62 |
+
)
|
63 |
+
|
64 |
+
# Step 4: Clinical feature extraction is skipped because trait_row is None
|
65 |
+
# STEP3
|
66 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
67 |
+
gene_data = get_genetic_data(matrix_file)
|
68 |
+
|
69 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
70 |
+
print(gene_data.index[:20])
|
71 |
+
# The identifiers appear to be Affymetrix probe IDs, not standard human gene symbols.
|
72 |
+
# Therefore, they likely require mapping to gene symbols.
|
73 |
+
requires_gene_mapping = True
|
74 |
+
# STEP5
|
75 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
76 |
+
gene_annotation = get_gene_annotation(soft_file)
|
77 |
+
|
78 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
79 |
+
print("Gene annotation preview:")
|
80 |
+
print(preview_df(gene_annotation))
|
81 |
+
# STEP - Gene Identifier Mapping
|
82 |
+
|
83 |
+
# 1. Determine which columns in the annotation represent the probe identifiers and the gene symbols.
|
84 |
+
# Based on the prior preview, "ID" appears to match our expression data's index (probe IDs),
|
85 |
+
# but we do not see a separate column containing actual gene symbols. For demonstration, we'll
|
86 |
+
# assume "SPOT_ID" is intended as the gene symbol column, although it is the same as "ID" in the preview.
|
87 |
+
|
88 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col="ID", gene_col="SPOT_ID")
|
89 |
+
|
90 |
+
# 2. Convert probe-level measurements into gene expression data using the mapping.
|
91 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
92 |
+
|
93 |
+
# 3. Print a small preview of the resulting gene expression data.
|
94 |
+
print("Converted gene expression data shape:", gene_data.shape)
|
95 |
+
print("Gene expression data preview:")
|
96 |
+
print(preview_df(gene_data))
|
97 |
+
# STEP7
|
98 |
+
# Since there is no trait data (trait_row is None), we cannot link clinical data or perform trait-based analysis.
|
99 |
+
# Nonetheless, we must do a final validation to record that the dataset is unusable for trait-related analysis.
|
100 |
+
|
101 |
+
import pandas as pd
|
102 |
+
|
103 |
+
# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.
|
104 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
105 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
106 |
+
|
107 |
+
# 2. Prepare a dummy DataFrame for final validation,
|
108 |
+
# and set is_biased to False (arbitrary choice) to meet function requirements.
|
109 |
+
dummy_df = pd.DataFrame()
|
110 |
+
|
111 |
+
# 3. Perform final quality validation, marking trait as unavailable,
|
112 |
+
# which leads to the dataset being recorded as unusable (is_usable=False).
|
113 |
+
is_usable = validate_and_save_cohort_info(
|
114 |
+
is_final=True,
|
115 |
+
cohort=cohort,
|
116 |
+
info_path=json_path,
|
117 |
+
is_gene_available=True,
|
118 |
+
is_trait_available=False,
|
119 |
+
is_biased=False,
|
120 |
+
df=dummy_df,
|
121 |
+
note="Trait data not available; only gene expression is present."
|
122 |
+
)
|
123 |
+
|
124 |
+
# 4. Since the dataset is unusable for trait analysis, do not produce any final linked output.
|
p1/preprocess/Schizophrenia/code/GSE120340.py
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Path Configuration
|
2 |
+
from tools.preprocess import *
|
3 |
+
|
4 |
+
# Processing context
|
5 |
+
trait = "Schizophrenia"
|
6 |
+
cohort = "GSE120340"
|
7 |
+
|
8 |
+
# Input paths
|
9 |
+
in_trait_dir = "../DATA/GEO/Schizophrenia"
|
10 |
+
in_cohort_dir = "../DATA/GEO/Schizophrenia/GSE120340"
|
11 |
+
|
12 |
+
# Output paths
|
13 |
+
out_data_file = "./output/preprocess/1/Schizophrenia/GSE120340.csv"
|
14 |
+
out_gene_data_file = "./output/preprocess/1/Schizophrenia/gene_data/GSE120340.csv"
|
15 |
+
out_clinical_data_file = "./output/preprocess/1/Schizophrenia/clinical_data/GSE120340.csv"
|
16 |
+
json_path = "./output/preprocess/1/Schizophrenia/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 # Affymetrix whole-genome expression microarray indicates gene expression data
|
38 |
+
|
39 |
+
# 2.1 Variable Availability
|
40 |
+
trait_row = 0 # Row with multiple disease states, including SCZ
|
41 |
+
age_row = None # No age data in the dictionary
|
42 |
+
gender_row = None # No gender data in the dictionary
|
43 |
+
|
44 |
+
# 2.2 Data Type Conversion
|
45 |
+
def convert_trait(value: str):
|
46 |
+
parts = value.split(':', 1)
|
47 |
+
if len(parts) == 2:
|
48 |
+
v = parts[1].strip().lower()
|
49 |
+
# Mark SCZ as 1, others as 0
|
50 |
+
return 1 if v == 'scz' else 0
|
51 |
+
return None
|
52 |
+
|
53 |
+
def convert_age(value: str):
|
54 |
+
# No age data is available
|
55 |
+
return None
|
56 |
+
|
57 |
+
def convert_gender(value: str):
|
58 |
+
# No gender data is available
|
59 |
+
return None
|
60 |
+
|
61 |
+
# 3. Save Metadata (initial filtering)
|
62 |
+
is_trait_available = (trait_row is not None)
|
63 |
+
is_usable = validate_and_save_cohort_info(
|
64 |
+
is_final=False,
|
65 |
+
cohort=cohort,
|
66 |
+
info_path=json_path,
|
67 |
+
is_gene_available=is_gene_available,
|
68 |
+
is_trait_available=is_trait_available
|
69 |
+
)
|
70 |
+
|
71 |
+
# 4. Clinical Feature Extraction (only if trait data is available)
|
72 |
+
if trait_row is not None:
|
73 |
+
selected_clinical_df = geo_select_clinical_features(
|
74 |
+
clinical_data,
|
75 |
+
trait=trait,
|
76 |
+
trait_row=trait_row,
|
77 |
+
convert_trait=convert_trait,
|
78 |
+
age_row=age_row,
|
79 |
+
convert_age=convert_age,
|
80 |
+
gender_row=gender_row,
|
81 |
+
convert_gender=convert_gender
|
82 |
+
)
|
83 |
+
# Observe output
|
84 |
+
print(preview_df(selected_clinical_df))
|
85 |
+
# Save extracted clinical features
|
86 |
+
selected_clinical_df.to_csv(out_clinical_data_file, index=False)
|
87 |
+
# STEP3
|
88 |
+
# 1. Use the get_genetic_data function from the library to get the gene_data from the matrix_file previously defined.
|
89 |
+
gene_data = get_genetic_data(matrix_file)
|
90 |
+
|
91 |
+
# 2. Print the first 20 row IDs (gene or probe identifiers) for future observation.
|
92 |
+
print(gene_data.index[:20])
|
93 |
+
# Based on the observed identifiers (e.g., 10002_at), these are Affymetrix probe set IDs, not standard human gene symbols.
|
94 |
+
# Therefore, a mapping step to human gene symbols is needed.
|
95 |
+
print("requires_gene_mapping = True")
|
96 |
+
# STEP5
|
97 |
+
# 1. Use the 'get_gene_annotation' function from the library to get gene annotation data from the SOFT file.
|
98 |
+
gene_annotation = get_gene_annotation(soft_file)
|
99 |
+
|
100 |
+
# 2. Use the 'preview_df' function from the library to preview the data and print out the results.
|
101 |
+
print("Gene annotation preview:")
|
102 |
+
print(preview_df(gene_annotation))
|
103 |
+
# STEP: Gene Identifier Mapping
|
104 |
+
|
105 |
+
# 1. Identify the columns in gene_annotation that match the probe IDs and the gene symbols.
|
106 |
+
# From the preview, "ID" matches the probe ID used in gene_data, and "Description" appears
|
107 |
+
# to contain the gene's name/symbol information (albeit in a descriptive form).
|
108 |
+
|
109 |
+
mapping_df = get_gene_mapping(gene_annotation, prob_col='ID', gene_col='Description')
|
110 |
+
|
111 |
+
# 2. Convert probe-level measurements to gene-level measurements by applying the mapping.
|
112 |
+
gene_data = apply_gene_mapping(gene_data, mapping_df)
|
113 |
+
|
114 |
+
# For confirmation, let's see the shape of the resulting gene_data
|
115 |
+
print("Mapped gene_data shape:", gene_data.shape)
|
116 |
+
# STEP7
|
117 |
+
# 1. Normalize the obtained gene data with the 'normalize_gene_symbols_in_index' function from the library.
|
118 |
+
normalized_gene_data = normalize_gene_symbols_in_index(gene_data)
|
119 |
+
normalized_gene_data.to_csv(out_gene_data_file)
|
120 |
+
|
121 |
+
# 2. Link the clinical and genetic data with the 'geo_link_clinical_genetic_data' function from the library.
|
122 |
+
# Fixing the variable name from 'selected_clinical_data' to 'selected_clinical_df'
|
123 |
+
linked_data = geo_link_clinical_genetic_data(selected_clinical_df, normalized_gene_data)
|
124 |
+
|
125 |
+
# 3. Handle missing values in the linked data
|
126 |
+
linked_data = handle_missing_values(linked_data, trait)
|
127 |
+
|
128 |
+
# 4. Determine whether the trait and some demographic features are severely biased, and remove biased features.
|
129 |
+
is_trait_biased, unbiased_linked_data = judge_and_remove_biased_features(linked_data, trait)
|
130 |
+
|
131 |
+
# 5. Conduct quality check and save the cohort information.
|
132 |
+
is_usable = validate_and_save_cohort_info(
|
133 |
+
is_final=True,
|
134 |
+
cohort=cohort,
|
135 |
+
info_path=json_path,
|
136 |
+
is_gene_available=True,
|
137 |
+
is_trait_available=True,
|
138 |
+
is_biased=is_trait_biased,
|
139 |
+
df=linked_data
|
140 |
+
)
|
141 |
+
|
142 |
+
# 6. If the linked data is usable, save it as a CSV file to 'out_data_file'.
|
143 |
+
if is_usable:
|
144 |
+
unbiased_linked_data.to_csv(out_data_file)
|