Datasets:
improving clarity of readme
Browse files
README.md
CHANGED
|
@@ -1,40 +1,83 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
-
|
| 4 |
homepage: https://github.com/ylaboratory/methylation-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
|
| 7 |
|
| 8 |
-
# Methylation
|
| 9 |
|
| 10 |
-
## Dataset
|
| 11 |
|
| 12 |
- **Homepage:** https://github.com/ylaboratory/methylation-classification
|
| 13 |
- **Pubmed:** False
|
| 14 |
- **Public:** True
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Data and usage
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
- normalized using [BMIQ](https://rdrr.io/bioc/wateRmelon/man/BMIQ.html)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
- Sample ID
|
| 28 |
-
- training.ID
|
| 29 |
-
- training.Name
|
| 30 |
-
- Dataset
|
| 31 |
-
- Original.ID
|
| 32 |
-
- Original.Name
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
## Quick start
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
```
|
| 36 |
-
# Load the dataset using the Hugging Face datasets library
|
| 37 |
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
import seaborn as sns
|
| 39 |
import matplotlib.pyplot as plt
|
| 40 |
|
|
@@ -56,10 +99,10 @@ labtransfer_meta = load_dataset(
|
|
| 56 |
data_files="https://huggingface.co/datasets/ylab/methyl-classification/resolve/main/labtransfer_meta.parquet"
|
| 57 |
).to_pandas().set_index('Sample')
|
| 58 |
|
| 59 |
-
#
|
| 60 |
print(training_meta.describe())
|
| 61 |
|
| 62 |
-
# Plot
|
| 63 |
sns.kdeplot(data=training_mv.iloc[:5].T, common_norm=False)
|
| 64 |
plt.xlabel("Methylation Value")
|
| 65 |
plt.ylabel("Density")
|
|
@@ -67,6 +110,7 @@ plt.title("Methylation Density for 5 Samples")
|
|
| 67 |
plt.show()
|
| 68 |
|
| 69 |
```
|
|
|
|
| 70 |
<!-- If using our model:
|
| 71 |
```
|
| 72 |
git clone https://github.com/ylaboratory/methylation-classification.git
|
|
@@ -85,9 +129,28 @@ cd download
|
|
| 85 |
huggingface-cli download ylab/methyl-classification
|
| 86 |
``` -->
|
| 87 |
|
| 88 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
```
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
```
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
+
- en
|
| 4 |
homepage: https://github.com/ylaboratory/methylation-classification
|
| 5 |
+
license: cc-by-4.0
|
| 6 |
+
task_categories:
|
| 7 |
+
- tabular-classification
|
| 8 |
+
tags:
|
| 9 |
+
- biology
|
| 10 |
+
- bioinformatics
|
| 11 |
+
- biomedical
|
| 12 |
+
- DNA-methylation
|
| 13 |
+
- multi-label-classification
|
| 14 |
+
pretty_name: 450k DNA methylation tissue classification
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10K<n<100K
|
| 17 |
---
|
| 18 |
|
| 19 |
|
| 20 |
+
# DNA Methylation Tissue Classification Dataset
|
| 21 |
|
| 22 |
+
## Dataset Summary
|
| 23 |
|
| 24 |
- **Homepage:** https://github.com/ylaboratory/methylation-classification
|
| 25 |
- **Pubmed:** False
|
| 26 |
- **Public:** True
|
| 27 |
|
| 28 |
+
|
| 29 |
+
This data resource is vast, curated reference atlas of DNA methylation (DNAm) profiles
|
| 30 |
+
spanning 16,959 *healthy* primary human tissue and cell samples profiled on [Illumina 450K arrays](https://www.illumina.com/documents/products/datasheets/datasheet_humanmethylation450.pdf).
|
| 31 |
+
Samples cover 86 unique tissues and cell types and are manually mapped to a common set of terms in the [UBERON anatomical ontology](https://www.ebi.ac.uk/ols4/ontologies/uberon).
|
| 32 |
+
This dataset is intended to be used as a baseline resource for multi-label classification in
|
| 33 |
+
the biomedical domain, particuarly for tissue/cell‑type classification, deconvolution, and epigenetic biomarker discovery.
|
| 34 |
+
|
| 35 |
+
> **Key stats:**
|
| 36 |
+
> **16,959** total DNAm samples from **210** studies in the [Gene Expression Omnibus](https://www.ncbi.nlm.nih.gov/geo/) (GEO)
|
| 37 |
+
> **86** tissue/cell types (55 in training set, 31 in holdout)
|
| 38 |
+
> **297,598** quality controlled CpG sites (M-values) per sample
|
| 39 |
+
> **10,351** samples used for training (>= 2 studies per label)
|
| 40 |
+
> **6,608** samples reserved in holdout set to evalulate generalization/label transfer
|
| 41 |
|
| 42 |
## Data and usage
|
| 43 |
|
| 44 |
+
The dataset itself is divided into two sets, one used for training and cross-validation, and a separate holdout set used to for evaluation on unseen labels.
|
| 45 |
+
For faster loading and improved the files are stored as [parquet files](https://parquet.apache.org).
|
| 46 |
+
|
| 47 |
+
For each partition there are two main file types:
|
| 48 |
+
- `_mvalues`: containing preprocessed and quality controlled DNAm M-values background corrected using [preprocessNoob](https://rdrr.io/bioc/minfi/man/preprocessNoob.html) and normalized using [BMIQ](https://rdrr.io/bioc/wateRmelon/man/BMIQ.html).
|
| 49 |
+
- '_meta': metadata files containing the sample id, dataset, and UBERON tissue/cell identifiers and labels. There are two columns corresponding to UBERON identifiers, one contains the most descriptive tissue or cell term, and the second contains a more general term used to create a larger training compendium. (e.g., `pericardial fat` vs. `visceral fat`).
|
| 50 |
+
|
| 51 |
+
The full list of files include:
|
| 52 |
+
- `full_ontology.edgelist`: a [networkx](https://networkx.org/documentation/stable/reference/readwrite/edgelist.html) file containing the tissue/cell ontology connecting all 86 tissue and cell terms
|
| 53 |
+
- `training_ontology.edgelist`: a [networkx](https://networkx.org/documentation/stable/reference/readwrite/edgelist.html) file containing the tissue/cell ontology connecting the 55 tissue and cell terms
|
| 54 |
+
- `training_meta.parquet`: metadata for the samples in the training partition
|
| 55 |
+
- `label_transfer_meta.parquet`: metadata for the samples in the holdout partition
|
| 56 |
+
- `training_mvalues.parquet`: m-values measuring DNAm at 297,598 CpG sites across the genome for samples in the training partition
|
| 57 |
+
- `label_transfer_mvalues.parquet`: m-values measuring DNAm at 297,598 CpG sites across the genome for samples in the holdout partition
|
| 58 |
|
| 59 |
+
The columns in metadata files:
|
| 60 |
+
- `Sample ID`: sample identifier in GEO (GSM ID)
|
| 61 |
+
- `training.ID`: standardized UBERON ID used for training
|
| 62 |
+
- `training.Name`: corresponding tissue/cell name for the training ID
|
| 63 |
+
- `Dataset`: dataset identifier in GEO (GSE ID)
|
| 64 |
+
- `Original.ID`: manually annotated most descriptive UBERON ID
|
| 65 |
+
- `Original.Name`: correpsonding tissue/cell name for original ID
|
| 66 |
+
|
| 67 |
+
Mvalue files are structured probe (rows) by samples (columns). Columns are labeled with GSM identifiers
|
| 68 |
+
with one additional column for probe which contains Illumina CpG IDs (e.g., `cg03128332`).
|
| 69 |
|
| 70 |
## Quick start
|
| 71 |
+
|
| 72 |
+
Using python with the `huggingface_hub` and `pyarrow` packages, and the optional `pandas` and `networkx` packages
|
| 73 |
+
installed we can quickly get started with this dataset.
|
| 74 |
+
|
| 75 |
```
|
|
|
|
| 76 |
from datasets import load_dataset
|
| 77 |
+
import pyarrow.parquet as pq
|
| 78 |
+
|
| 79 |
+
import pandas as pd
|
| 80 |
+
import networkx as nx
|
| 81 |
import seaborn as sns
|
| 82 |
import matplotlib.pyplot as plt
|
| 83 |
|
|
|
|
| 99 |
data_files="https://huggingface.co/datasets/ylab/methyl-classification/resolve/main/labtransfer_meta.parquet"
|
| 100 |
).to_pandas().set_index('Sample')
|
| 101 |
|
| 102 |
+
# View the training set metadata
|
| 103 |
print(training_meta.describe())
|
| 104 |
|
| 105 |
+
# Plot m-value density plots for first five samples
|
| 106 |
sns.kdeplot(data=training_mv.iloc[:5].T, common_norm=False)
|
| 107 |
plt.xlabel("Methylation Value")
|
| 108 |
plt.ylabel("Density")
|
|
|
|
| 110 |
plt.show()
|
| 111 |
|
| 112 |
```
|
| 113 |
+
|
| 114 |
<!-- If using our model:
|
| 115 |
```
|
| 116 |
git clone https://github.com/ylaboratory/methylation-classification.git
|
|
|
|
| 129 |
huggingface-cli download ylab/methyl-classification
|
| 130 |
``` -->
|
| 131 |
|
| 132 |
+
## Code for data processing, analysis, and tissue classification
|
| 133 |
+
|
| 134 |
+
This dataset, while designed to be standalone, was generated as a part of a larger paper predicting tissue and cell type.
|
| 135 |
+
The code for processing the raw data files and conducting the analysis in that paper can
|
| 136 |
+
be found on the project [Github](https://github.com/ylaboratory/methylation-classification).
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
## Citation
|
| 140 |
+
|
| 141 |
+
If you use this dataset in your work, please cite:
|
| 142 |
+
> Kim et al., “Ontology‑aware DNA methylation classification with a curated atlas of human tissues and cell types”, \[bioRxiv preprint\] (2025).
|
| 143 |
|
| 144 |
```
|
| 145 |
+
@article{kim2024methylation_atlas,
|
| 146 |
+
title = {Ontology-aware DNA methylation classification with a curated atlas of human tissues and cell types},
|
| 147 |
+
author = {Kim, Mirae and Dannenfelser, Ruth and Cui, Yufei and Allen, Genevera and Yao, Vicky},
|
| 148 |
+
journal = {bioRxiv preprint},
|
| 149 |
+
year = {2025},
|
| 150 |
+
doi = {10.1101/2024.XX.XXXXXX}
|
| 151 |
+
}
|
| 152 |
```
|
| 153 |
|
| 154 |
+
## License
|
| 155 |
+
|
| 156 |
+
This dataset is released under CC BY 4.0, permitting both academic and commercial use with attribution.
|