yrsong commited on
Commit
c8f67f0
·
verified ·
1 Parent(s): 16b0ad4

Update Readme.md with scRNA information

Browse files
Files changed (1) hide show
  1. README.md +104 -74
README.md CHANGED
@@ -28,99 +28,43 @@ This repository provides the HR-VILAGE-3K3M dataset, a curated collection of hum
28
  **Fig**: Overview of HR-VILAGE-3K3M. (a) HR-VILAGE-3K3M construction workflow. (b) Distribution of sample timepoints for vaccine and inoculation studies, , shown separately for bulk RNA-seq and single-cell RNA-seq datasets. (c) Composition of the dataset, stratified by platform, tissue type, study type, and pathogen, including both bulk and single-cell transcriptomic studies.
29
 
30
  # Dataset Description:
31
- - This repo contains 66 studies, comprising 3178 subjects and 14,136 observations along with 2,557,942 single cells.
32
- - We provide preprocessed and normalized gene expression data, raw gene expression data, meta data and antibody data.
33
 
34
  # Data Structure:
35
  ```
36
  HR-VILAGE-3K3M/
37
  ├── README.md
38
  ├── study_meta.csv
39
- ├── gene_expr/
40
  │ └── <study_ID>_gene_expr.csv
41
  ├── singel_cell_gene_expr/
42
  │ └── <study_ID>.h5ad
43
  ├── meta/
44
  │ └── <study_ID>_meta.csv
45
- ├── gene_expr_raw/
46
  │ └── <study_ID>_raw.csv
47
  └── antibody/
48
  └── <study_ID>_antibody.csv
49
  ```
50
  - **study_meta.csv**: Contains study-level metadata (e.g., platform, tissue type, study type) and serves as an overview of the repository. Users can use this file to filter and select a subset of studies based on custom criteria.
51
- - **gene_expr/**: Processed gene expression matrices for each study (sample-by-gene). All files share the same 41,667 gene columns, with 9,004 genes non-missing across all studies.
52
- - **singel_cell_gene_expr/**: Processed single cell gene expression matrices for each study in h5ad format.
53
  - **meta/**: Study-specific metadata files (.csv), aligned by row names with the corresponding expression data. All metadata files share the same column structure; missing values are marked as NA.
54
- - **gene_expr_raw/**: Raw probe-level expression matrices (probe-by-sample), provided when available to support custom preprocessing workflows.
55
  - **antibody/**: Raw antibody measurements with sample IDs matching those in the metadata, enabling integration with gene expression data at the subject level.
56
 
57
- # Data Relations:
58
- The following duplicate studies (right nodes) are not included in HR-VILAGE-3K3M, while their source studies (left leaves) are included in HR-VILAGE-3K3M.
59
- ```
60
- GSE73072_H3N2_DEE2 ──┐
61
- ├── GSE52428
62
- GSE73072_H1N1_DEE4 ──┘
63
-
64
- GSE73072_H3N2_DEE2 ├── GSE30550
65
-
66
- GSE73072_HRV_UVA ──┐
67
- GSE73072_RSV_DEE1 ── ├── GSE17156
68
- GSE73072_H3N2_DEE2 ──┘
69
- ```
70
-
71
- The studies within the following groups are from the same study group with less batch effect.
72
- - **Group 1**
73
- | E_MTAB_12993_blood | E_MTAB_12993_nose |
74
- |---|---|
75
- - **Group 2**
76
- | GSE61754 | GSE90732 |
77
- |---|---|
78
- - **Group 3**
79
- | GSE73072_H1N1_DEE4 | GSE73072_H1N1_DEE3 | GSE73072_H3N2_DEE2 | GSE73072_H3N2_DEE5 | GSE73072_HRV_DUKE | GSE73072_HRV_UVA | GSE73072_RSV_DEE1 |
80
- |---|---|---|---|---|---|---|
81
- - **Group 4**
82
- | GSE74811 | GSE74813 | GSE74815 | GSE74816 |
83
- |---|---|---|---|
84
- - **Group 5**
85
- | GSE48023 | GSE48018 |
86
- |---|---|
87
- - **Group 6**
88
- | GSE59635 | GSE59654 |
89
- |---|---|
90
- - **Group 7**
91
- | GSE59743 | GSE101709 | GSE101710 |
92
- |---|---|---|
93
- - **Group 8**
94
- | GSE190001_PRIME | GSE190001_BOOST |
95
- |---|---|
96
- - **Group 9**
97
- | SDY311 | SDY112 | SDY315 |
98
- |---|---|---|
99
- - **Group 10**
100
- | GSE201533 | GSE190747 | GSE201642 |
101
- |---|---|---|
102
- - **Group 11**
103
- | GSE246525 | GSE276544 | GSE247401 |
104
- |---|---|---|
105
- - **Group 12**
106
- | GSE169159 | GSE102012 |
107
- |---|---|
108
- - **Group 13**
109
- | GSE29614 | GSE29615 | GSE29617 |
110
- |---|---|---|
111
- - **Group 14**
112
- | GSE52005 | GSE48762 |
113
- |---|---|
114
-
115
  # How to start:
116
- Users could directly download all files and read the files locally.
117
- Alternaitvely, the following provide (partially) loading the dataset into Python using `dataset` package.
118
  ```python
119
  repo_id = "xuejun72/HR-VILAGE-3K3M"
120
  import pandas as pd
121
  from datasets import load_dataset
122
  ```
123
- There are two ways to load (and combine) the datasets.
 
 
124
  1. Use our predefined configuration name, and pass to `name` argument in `load_dataset()`. `trust_remote_code=True` is required.
125
 
126
  Example 1, to download study_meta:
@@ -134,13 +78,13 @@ There are two ways to load (and combine) the datasets.
134
  ```
135
  Example 3, to download and combine **all** gene expression datasets. However, this is highly **NOT** recommended since their size are too large and the execution time will be long.
136
  ```python
137
- # Not recommened!
138
  gene_expr_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True)
139
  gene_expr = gene_expr_dict["train"].to_pandas()
140
  ```
141
 
142
- In addition, we provide study filter function before downloading and loading, which works for **meta** and **gene expression** datasets.
143
- `split_filter` argument is designed for this filter, which is optional. By default, `split_filter=None` will downloading all datasets as shown before.
144
  `split_filter` is a `dict` Python object where `key` is filter factors taking values from `['study_type','platform','tissue','pathogen','vaccine']` and `value` is a list of categories for each `key`. `value` should be exact same as that in study_meta.csv.
145
  Some examples of a valid `split_filter`:
146
  ```python
@@ -148,7 +92,7 @@ There are two ways to load (and combine) the datasets.
148
  split_filter = {"study_type": ["vaccine"], "vaccine": ["Influenza TIV"]}
149
  split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
150
  ```
151
- Example 4, to download and combine a customized filtered meta datasets:
152
  ```python
153
  split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
154
  meta_filtered_dict = load_dataset(repo_id, name = "meta", trust_remote_code=True, split_filter=split_filter)
@@ -156,7 +100,7 @@ There are two ways to load (and combine) the datasets.
156
  meta_filtered = value.to_pandas().set_index("row_name")
157
  meta_filtered
158
  ```
159
- Example 5, to download and combine a customized filtered gene expression datasets:
160
  ```python
161
  split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
162
  gene_expr_filtered_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True, split_filter=split_filter)
@@ -164,7 +108,7 @@ There are two ways to load (and combine) the datasets.
164
  gene_expr_filtered = value.to_pandas().set_index("row_name")
165
  gene_expr_filtered
166
  ```
167
- 3. Use exact path of one csv file, and pass to `data_files` argument in `load_dataset()`.
168
 
169
  Example 1, to download study_meta:
170
  ```python
@@ -180,8 +124,94 @@ There are two ways to load (and combine) the datasets.
180
  ```
181
  Note: for **antibody** and **raw gene expression** datasets, since different study has different columns which cannot be simply combined, loading them must using `data_files` argument and be one-by-one.
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  # Example code:
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
  # How to cite:
187
 
 
28
  **Fig**: Overview of HR-VILAGE-3K3M. (a) HR-VILAGE-3K3M construction workflow. (b) Distribution of sample timepoints for vaccine and inoculation studies, , shown separately for bulk RNA-seq and single-cell RNA-seq datasets. (c) Composition of the dataset, stratified by platform, tissue type, study type, and pathogen, including both bulk and single-cell transcriptomic studies.
29
 
30
  # Dataset Description:
31
+ - This repo contains 66 studies (59 bulk and 7 single cell studies), comprising 3178 subjects and 14,136 observations along with 2,557,942 single cells.
32
+ - We provide preprocessed and normalized gene expression data, raw gene expression data, metadata and antibody data.
33
 
34
  # Data Structure:
35
  ```
36
  HR-VILAGE-3K3M/
37
  ├── README.md
38
  ├── study_meta.csv
39
+ ├── bulk_gene_expr/
40
  │ └── <study_ID>_gene_expr.csv
41
  ├── singel_cell_gene_expr/
42
  │ └── <study_ID>.h5ad
43
  ├── meta/
44
  │ └── <study_ID>_meta.csv
45
+ ├── bulk_gene_expr_raw/
46
  │ └── <study_ID>_raw.csv
47
  └── antibody/
48
  └── <study_ID>_antibody.csv
49
  ```
50
  - **study_meta.csv**: Contains study-level metadata (e.g., platform, tissue type, study type) and serves as an overview of the repository. Users can use this file to filter and select a subset of studies based on custom criteria.
51
+ - **bulk_gene_expr/**: Processed gene expression matrices for each study (sample-by-gene). All files share the same 41,667 gene columns, with 9,004 genes non-missing across all studies.
52
+ - **singel_cell_gene_expr/**: Processed single cell gene expression matrices for each study in h5ad format. Raw count matrices are stored in the .X attribute, and cell-level metadata is stored in the .obs dataframe.
53
  - **meta/**: Study-specific metadata files (.csv), aligned by row names with the corresponding expression data. All metadata files share the same column structure; missing values are marked as NA.
54
+ - **bulk_gene_expr_raw/**: Raw probe-level expression matrices (probe-by-sample), provided when available to support custom preprocessing workflows.
55
  - **antibody/**: Raw antibody measurements with sample IDs matching those in the metadata, enabling integration with gene expression data at the subject level.
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  # How to start:
58
+ Users could directly download all files and read files locally.
59
+ Alternatively, the following provides (partially) loading the dataset into Python using `dataset` package.
60
  ```python
61
  repo_id = "xuejun72/HR-VILAGE-3K3M"
62
  import pandas as pd
63
  from datasets import load_dataset
64
  ```
65
+ ## Bulk gene expression data
66
+ Bulk gene expression data can be loaded and combined using two alternative approaches.
67
+
68
  1. Use our predefined configuration name, and pass to `name` argument in `load_dataset()`. `trust_remote_code=True` is required.
69
 
70
  Example 1, to download study_meta:
 
78
  ```
79
  Example 3, to download and combine **all** gene expression datasets. However, this is highly **NOT** recommended since their size are too large and the execution time will be long.
80
  ```python
81
+ # Not recommended!
82
  gene_expr_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True)
83
  gene_expr = gene_expr_dict["train"].to_pandas()
84
  ```
85
 
86
+ In addition, we providea study filter function before downloading and loading, which works for **meta** and **gene expression** datasets.
87
+ `split_filter` argument is designed for this filter, which is optional. By default, `split_filter=None` will download all datasets as shown before.
88
  `split_filter` is a `dict` Python object where `key` is filter factors taking values from `['study_type','platform','tissue','pathogen','vaccine']` and `value` is a list of categories for each `key`. `value` should be exact same as that in study_meta.csv.
89
  Some examples of a valid `split_filter`:
90
  ```python
 
92
  split_filter = {"study_type": ["vaccine"], "vaccine": ["Influenza TIV"]}
93
  split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
94
  ```
95
+ Example 4, to download and combine a customized filtered meta dataset:
96
  ```python
97
  split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
98
  meta_filtered_dict = load_dataset(repo_id, name = "meta", trust_remote_code=True, split_filter=split_filter)
 
100
  meta_filtered = value.to_pandas().set_index("row_name")
101
  meta_filtered
102
  ```
103
+ Example 5, to download and combine a customized filtered gene expression dataset:
104
  ```python
105
  split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
106
  gene_expr_filtered_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True, split_filter=split_filter)
 
108
  gene_expr_filtered = value.to_pandas().set_index("row_name")
109
  gene_expr_filtered
110
  ```
111
+ 2. Use exact path of one csv file, and pass to `data_files` argument in `load_dataset()`.
112
 
113
  Example 1, to download study_meta:
114
  ```python
 
124
  ```
125
  Note: for **antibody** and **raw gene expression** datasets, since different study has different columns which cannot be simply combined, loading them must using `data_files` argument and be one-by-one.
126
 
127
+ ## Single cell gene expression data
128
+ Single-cell gene expression data can be downloaded and accessed using the anndata package.
129
+
130
+ ```python
131
+ import anndata as ad
132
+ # Load the GSE195673 dataset
133
+ GSE195673 = ad.read_h5ad("./GSE195673_processed.h5ad")
134
+ # View cell-level metadata
135
+ GSE195673.obs
136
+ ```
137
+ A merged dataset containing all 7 studies is also provided, comprising 2,557,942 cells and 13,589 common genes:
138
+ ```python
139
+ import anndata as ad
140
+ # Load the combined dataset
141
+ combined = ad.read_h5ad("./combined.h5ad")
142
+ # View cell-level metadata
143
+ combined.obs
144
+ ```
145
+ The combined object includes detailed cell-level metadata such as sample_id, cell_type, sex, donor_id, time_point_day, dataset, covid_status, age, tissue, and study_type. It also contains dimensionality reductions (X_pca, X_umap) and graph-based neighbor information in obsp for downstream analysis.
146
+
147
+
148
  # Example code:
149
 
150
+ Single Cell Visualization
151
+ ```python
152
+ import scanpy as sc
153
+ # Visualize UMAP colored by dataset
154
+ sc.pl.umap(combined, color='dataset', save='_combined_by_dataset.png', show=True)
155
+ ```
156
+
157
+ # Data Relations:
158
+ The following duplicate studies (right nodes) are not included in HR-VILAGE-3K3M, while their source studies (left leaves) are included in HR-VILAGE-3K3M.
159
+ ```
160
+ GSE73072_H3N2_DEE2 ──┐
161
+ ├── GSE52428
162
+ GSE73072_H1N1_DEE4 ──┘
163
+
164
+ GSE73072_H3N2_DEE2 ├── GSE30550
165
+
166
+ GSE73072_HRV_UVA ──┐
167
+ GSE73072_RSV_DEE1 ── ├── GSE17156
168
+ GSE73072_H3N2_DEE2 ──┘
169
+ ```
170
+
171
+ The studies within the following groups are from the same study group with less batch effect.
172
+ - **Group 1**
173
+ | E_MTAB_12993_blood | E_MTAB_12993_nose |
174
+ |---|---|
175
+ - **Group 2**
176
+ | GSE61754 | GSE90732 |
177
+ |---|---|
178
+ - **Group 3**
179
+ | GSE73072_H1N1_DEE4 | GSE73072_H1N1_DEE3 | GSE73072_H3N2_DEE2 | GSE73072_H3N2_DEE5 | GSE73072_HRV_DUKE | GSE73072_HRV_UVA | GSE73072_RSV_DEE1 |
180
+ |---|---|---|---|---|---|---|
181
+ - **Group 4**
182
+ | GSE74811 | GSE74813 | GSE74815 | GSE74816 |
183
+ |---|---|---|---|
184
+ - **Group 5**
185
+ | GSE48023 | GSE48018 |
186
+ |---|---|
187
+ - **Group 6**
188
+ | GSE59635 | GSE59654 |
189
+ |---|---|
190
+ - **Group 7**
191
+ | GSE59743 | GSE101709 | GSE101710 |
192
+ |---|---|---|
193
+ - **Group 8**
194
+ | GSE190001_PRIME | GSE190001_BOOST |
195
+ |---|---|
196
+ - **Group 9**
197
+ | SDY311 | SDY112 | SDY315 |
198
+ |---|---|---|
199
+ - **Group 10**
200
+ | GSE201533 | GSE190747 | GSE201642 |
201
+ |---|---|---|
202
+ - **Group 11**
203
+ | GSE246525 | GSE276544 | GSE247401 |
204
+ |---|---|---|
205
+ - **Group 12**
206
+ | GSE169159 | GSE102012 |
207
+ |---|---|
208
+ - **Group 13**
209
+ | GSE29614 | GSE29615 | GSE29617 |
210
+ |---|---|---|
211
+ - **Group 14**
212
+ | GSE52005 | GSE48762 |
213
+ |---|---|
214
+
215
 
216
  # How to cite:
217