Update Readme with scRNA information
#2
by
yrsong
- opened
README.md
CHANGED
|
@@ -28,96 +28,42 @@ This repository provides the HR-VILAGE-3K3M dataset, a curated collection of hum
|
|
| 28 |
**Fig**: Overview of HV-RIGEL-3K. (a) HV-RIGEL-3K construction workflow. (b) Distribution of sample timepoints for vaccine and inoculation studies. (c) Composition of the dataset by platform, tissue type, study type, and pathogen.
|
| 29 |
|
| 30 |
# Dataset Description:
|
| 31 |
-
- This repo contains 59 studies, comprising
|
| 32 |
-
- We provide preprocessed and normalized gene expression data, raw gene expression data,
|
| 33 |
|
| 34 |
# Data Structure:
|
| 35 |
```
|
| 36 |
HR-VILAGE-3K3M/
|
| 37 |
├── README.md
|
| 38 |
├── study_meta.csv
|
| 39 |
-
├──
|
| 40 |
│ └── <study_ID>_gene_expr.csv
|
|
|
|
|
|
|
| 41 |
├── meta/
|
| 42 |
│ └── <study_ID>_meta.csv
|
| 43 |
-
├──
|
| 44 |
│ └── <study_ID>_raw.csv
|
| 45 |
└── antibody/
|
| 46 |
└── <study_ID>_antibody.csv
|
| 47 |
```
|
| 48 |
- **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.
|
| 49 |
-
- **
|
|
|
|
| 50 |
- **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.
|
| 51 |
-
- **
|
| 52 |
- **antibody/**: Raw antibody measurements with sample IDs matching those in the metadata, enabling integration with gene expression data at the subject level.
|
| 53 |
|
| 54 |
-
# Data Relations:
|
| 55 |
-
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.
|
| 56 |
-
```
|
| 57 |
-
GSE73072_H3N2_DEE2 ──┐
|
| 58 |
-
├── GSE52428
|
| 59 |
-
GSE73072_H1N1_DEE4 ──┘
|
| 60 |
-
|
| 61 |
-
GSE73072_H3N2_DEE2 ├── GSE30550
|
| 62 |
-
|
| 63 |
-
GSE73072_HRV_UVA ──┐
|
| 64 |
-
GSE73072_RSV_DEE1 ── ├── GSE17156
|
| 65 |
-
GSE73072_H3N2_DEE2 ──┘
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
The studies within the following groups are from the same study group with less batch effect.
|
| 69 |
-
- **Group 1**
|
| 70 |
-
| E_MTAB_12993_blood | E_MTAB_12993_nose |
|
| 71 |
-
|---|---|
|
| 72 |
-
- **Group 2**
|
| 73 |
-
| GSE61754 | GSE90732 |
|
| 74 |
-
|---|---|
|
| 75 |
-
- **Group 3**
|
| 76 |
-
| GSE73072_H1N1_DEE4 | GSE73072_H1N1_DEE3 | GSE73072_H3N2_DEE2 | GSE73072_H3N2_DEE5 | GSE73072_HRV_DUKE | GSE73072_HRV_UVA | GSE73072_RSV_DEE1 |
|
| 77 |
-
|---|---|---|---|---|---|---|
|
| 78 |
-
- **Group 4**
|
| 79 |
-
| GSE74811 | GSE74813 | GSE74815 | GSE74816 |
|
| 80 |
-
|---|---|---|---|
|
| 81 |
-
- **Group 5**
|
| 82 |
-
| GSE48023 | GSE48018 |
|
| 83 |
-
|---|---|
|
| 84 |
-
- **Group 6**
|
| 85 |
-
| GSE59635 | GSE59654 |
|
| 86 |
-
|---|---|
|
| 87 |
-
- **Group 7**
|
| 88 |
-
| GSE59743 | GSE101709 | GSE101710 |
|
| 89 |
-
|---|---|---|
|
| 90 |
-
- **Group 8**
|
| 91 |
-
| GSE190001_PRIME | GSE190001_BOOST |
|
| 92 |
-
|---|---|
|
| 93 |
-
- **Group 9**
|
| 94 |
-
| SDY311 | SDY112 | SDY315 |
|
| 95 |
-
|---|---|---|
|
| 96 |
-
- **Group 10**
|
| 97 |
-
| GSE201533 | GSE190747 | GSE201642 |
|
| 98 |
-
|---|---|---|
|
| 99 |
-
- **Group 11**
|
| 100 |
-
| GSE246525 | GSE276544 | GSE247401 |
|
| 101 |
-
|---|---|---|
|
| 102 |
-
- **Group 12**
|
| 103 |
-
| GSE169159 | GSE102012 |
|
| 104 |
-
|---|---|
|
| 105 |
-
- **Group 13**
|
| 106 |
-
| GSE29614 | GSE29615 | GSE29617 |
|
| 107 |
-
|---|---|---|
|
| 108 |
-
- **Group 14**
|
| 109 |
-
| GSE52005 | GSE48762 |
|
| 110 |
-
|---|---|
|
| 111 |
-
|
| 112 |
# How to start:
|
| 113 |
-
Users could directly download all files and read
|
| 114 |
-
|
| 115 |
```python
|
| 116 |
repo_id = "xuejun72/HR-VILAGE-3K3M"
|
| 117 |
import pandas as pd
|
| 118 |
from datasets import load_dataset
|
| 119 |
```
|
| 120 |
-
|
|
|
|
| 121 |
1. Use our predefined configuration name, and pass to `name` argument in `load_dataset()`. `trust_remote_code=True` is required.
|
| 122 |
|
| 123 |
Example 1, to download study_meta:
|
|
@@ -131,13 +77,13 @@ There are two ways to load (and combine) the datasets.
|
|
| 131 |
```
|
| 132 |
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.
|
| 133 |
```python
|
| 134 |
-
# Not
|
| 135 |
gene_expr_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True)
|
| 136 |
gene_expr = gene_expr_dict["train"].to_pandas()
|
| 137 |
```
|
| 138 |
|
| 139 |
-
In addition, we provide study filter function before downloading and loading, which works for **meta** and **
|
| 140 |
-
`split_filter` argument is designed for this filter, which is optional. By default, `split_filter=None` will
|
| 141 |
`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.
|
| 142 |
Some examples of a valid `split_filter`:
|
| 143 |
```python
|
|
@@ -145,7 +91,7 @@ There are two ways to load (and combine) the datasets.
|
|
| 145 |
split_filter = {"study_type": ["vaccine"], "vaccine": ["Influenza TIV"]}
|
| 146 |
split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
|
| 147 |
```
|
| 148 |
-
Example 4, to download and combine a customized filtered meta
|
| 149 |
```python
|
| 150 |
split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
|
| 151 |
meta_filtered_dict = load_dataset(repo_id, name = "meta", trust_remote_code=True, split_filter=split_filter)
|
|
@@ -153,7 +99,7 @@ There are two ways to load (and combine) the datasets.
|
|
| 153 |
meta_filtered = value.to_pandas().set_index("row_name")
|
| 154 |
meta_filtered
|
| 155 |
```
|
| 156 |
-
Example 5, to download and combine a customized filtered gene expression
|
| 157 |
```python
|
| 158 |
split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
|
| 159 |
gene_expr_filtered_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True, split_filter=split_filter)
|
|
@@ -161,7 +107,7 @@ There are two ways to load (and combine) the datasets.
|
|
| 161 |
gene_expr_filtered = value.to_pandas().set_index("row_name")
|
| 162 |
gene_expr_filtered
|
| 163 |
```
|
| 164 |
-
|
| 165 |
|
| 166 |
Example 1, to download study_meta:
|
| 167 |
```python
|
|
@@ -177,8 +123,95 @@ There are two ways to load (and combine) the datasets.
|
|
| 177 |
```
|
| 178 |
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.
|
| 179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
# Example code:
|
| 181 |
|
| 182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
# How to cite:
|
| 184 |
|
|
|
|
| 28 |
**Fig**: Overview of HV-RIGEL-3K. (a) HV-RIGEL-3K construction workflow. (b) Distribution of sample timepoints for vaccine and inoculation studies. (c) Composition of the dataset by platform, tissue type, study type, and pathogen.
|
| 29 |
|
| 30 |
# Dataset Description:
|
| 31 |
+
- This repo contains 66 studies (59 bulk and 7 single cell studies), comprising 3178 subjects, 14,136 observations, and 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 |
+
├── single_cell_gene_expr/
|
| 42 |
+
│ └── <study_ID>_processed.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 |
+
- **single_cell_gene_expr/**: Contains processed .h5ad files for each single-cell RNA-seq study. 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 |
1. Use our predefined configuration name, and pass to `name` argument in `load_dataset()`. `trust_remote_code=True` is required.
|
| 68 |
|
| 69 |
Example 1, to download study_meta:
|
|
|
|
| 77 |
```
|
| 78 |
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.
|
| 79 |
```python
|
| 80 |
+
# Not recommended!
|
| 81 |
gene_expr_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True)
|
| 82 |
gene_expr = gene_expr_dict["train"].to_pandas()
|
| 83 |
```
|
| 84 |
|
| 85 |
+
In addition, we provide a study filter function before downloading and loading, which works for **meta** and **bulk_gene_expr** datasets.
|
| 86 |
+
`split_filter` argument is designed for this filter, which is optional. By default, `split_filter=None` will download all datasets as shown before.
|
| 87 |
`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.
|
| 88 |
Some examples of a valid `split_filter`:
|
| 89 |
```python
|
|
|
|
| 91 |
split_filter = {"study_type": ["vaccine"], "vaccine": ["Influenza TIV"]}
|
| 92 |
split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
|
| 93 |
```
|
| 94 |
+
Example 4, to download and combine a customized filtered meta dataset:
|
| 95 |
```python
|
| 96 |
split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
|
| 97 |
meta_filtered_dict = load_dataset(repo_id, name = "meta", trust_remote_code=True, split_filter=split_filter)
|
|
|
|
| 99 |
meta_filtered = value.to_pandas().set_index("row_name")
|
| 100 |
meta_filtered
|
| 101 |
```
|
| 102 |
+
Example 5, to download and combine a customized filtered gene expression dataset:
|
| 103 |
```python
|
| 104 |
split_filter = {"study_type": ["vaccine"], "platform": ["RNA-seq"], "tissue": ["PBMC","nasal swab"], "pathogen": []}
|
| 105 |
gene_expr_filtered_dict = load_dataset(repo_id, name = "gene_expr", trust_remote_code=True, split_filter=split_filter)
|
|
|
|
| 107 |
gene_expr_filtered = value.to_pandas().set_index("row_name")
|
| 108 |
gene_expr_filtered
|
| 109 |
```
|
| 110 |
+
2. Use the exact path of one csv file, and pass to `data_files` argument in `load_dataset()`.
|
| 111 |
|
| 112 |
Example 1, to download study_meta:
|
| 113 |
```python
|
|
|
|
| 123 |
```
|
| 124 |
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.
|
| 125 |
|
| 126 |
+
## Single cell gene expression data
|
| 127 |
+
Single-cell gene expression data can be downloaded and accessed using the anndata package.
|
| 128 |
+
|
| 129 |
+
```python
|
| 130 |
+
import anndata as ad
|
| 131 |
+
# Load the GSE195673 dataset
|
| 132 |
+
GSE195673 = ad.read_h5ad("./GSE195673_processed.h5ad")
|
| 133 |
+
# View cell-level metadata
|
| 134 |
+
GSE195673.obs
|
| 135 |
+
```
|
| 136 |
+
A merged dataset containing all 7 studies is also provided, comprising 2,557,942 cells and 13,589 common genes:
|
| 137 |
+
```python
|
| 138 |
+
import anndata as ad
|
| 139 |
+
# Load the combined dataset
|
| 140 |
+
combined = ad.read_h5ad("./combined.h5ad")
|
| 141 |
+
# View cell-level metadata
|
| 142 |
+
combined.obs
|
| 143 |
+
```
|
| 144 |
+
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.
|
| 145 |
+
|
| 146 |
# Example code:
|
| 147 |
|
| 148 |
|
| 149 |
+
Single Cell Visualization
|
| 150 |
+
```python
|
| 151 |
+
import scanpy as sc
|
| 152 |
+
# Visualize UMAP colored by dataset
|
| 153 |
+
sc.pl.umap(combined, color='dataset', save='_combined_by_dataset.png', show=True)
|
| 154 |
+
```
|
| 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 |
|