Datasets:
miraesunnykim
commited on
Commit
·
5ccdaae
1
Parent(s):
977b2bc
add splits + remove accessory dataset.py
Browse files- .gitattributes +1 -3
- .gitignore +5 -0
- dataset.py +0 -64
- label_transfer_meta.parquet +0 -0
- label_transfer_mvalues.parquet +0 -3
- training_meta.parquet +0 -0
- training_mvalues.parquet +0 -3
.gitattributes
CHANGED
|
@@ -56,6 +56,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 56 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
-
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 60 |
-
|
| 61 |
-
training_mvalues.parquet preview=1
|
|
|
|
| 56 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
.gitignore
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# dev files
|
| 2 |
+
_*
|
| 3 |
+
|
| 4 |
+
# large files - upload with hf_transfer or huggingface-cli
|
| 5 |
+
*.parquet
|
dataset.py
DELETED
|
@@ -1,64 +0,0 @@
|
|
| 1 |
-
import datasets
|
| 2 |
-
import pandas as pd
|
| 3 |
-
|
| 4 |
-
_CITATION = """\
|
| 5 |
-
@article{kim2024methylation_atlas,
|
| 6 |
-
title = {Ontology-aware DNA methylation classification with a curated atlas of human tissues and cell types},
|
| 7 |
-
author = {Kim, Mirae and Dannenfelser, Ruth and Cui, Yufei and Allen, Genevera and Yao, Vicky},
|
| 8 |
-
journal = {bioRxiv preprint},
|
| 9 |
-
year = {2025},
|
| 10 |
-
doi = {10.1101/2024.XX.XXXXXX}
|
| 11 |
-
}
|
| 12 |
-
"""
|
| 13 |
-
|
| 14 |
-
_DESCRIPTION = ""
|
| 15 |
-
_HOMEPAGE = "https://github.com/ylaboratory/methylation-classification"
|
| 16 |
-
_LICENSE = "cc-by-4.0"
|
| 17 |
-
|
| 18 |
-
class MethylClassification(datasets.GeneratorBasedBuilder):
|
| 19 |
-
VERSION = datasets.Version("1.0.0")
|
| 20 |
-
|
| 21 |
-
def _info(self):
|
| 22 |
-
return datasets.DatasetInfo(
|
| 23 |
-
description=_DESCRIPTION,
|
| 24 |
-
features=None,
|
| 25 |
-
supervised_keys=None,
|
| 26 |
-
homepage=_HOMEPAGE,
|
| 27 |
-
license=_LICENSE,
|
| 28 |
-
citation=_CITATION,
|
| 29 |
-
)
|
| 30 |
-
|
| 31 |
-
def _split_generators(self, dl_manager):
|
| 32 |
-
files = dl_manager.download_and_extract({
|
| 33 |
-
"train_mvalues": "training_mvalues.parquet",
|
| 34 |
-
"train_meta": "training_meta.parquet",
|
| 35 |
-
"test_mvalues": "label_transfer_mvalues.parquet",
|
| 36 |
-
"test_meta": "label_transfer_meta.parquet",
|
| 37 |
-
})
|
| 38 |
-
|
| 39 |
-
return [
|
| 40 |
-
datasets.SplitGenerator(
|
| 41 |
-
name=datasets.Split.TRAIN,
|
| 42 |
-
gen_kwargs={
|
| 43 |
-
"mvalues_path": files["train_mvalues"],
|
| 44 |
-
"meta_path": files["train_meta"]
|
| 45 |
-
}
|
| 46 |
-
),
|
| 47 |
-
datasets.SplitGenerator(
|
| 48 |
-
name=datasets.Split.TEST,
|
| 49 |
-
gen_kwargs={
|
| 50 |
-
"mvalues_path": files["test_mvalues"],
|
| 51 |
-
"meta_path": files["test_meta"]
|
| 52 |
-
}
|
| 53 |
-
)
|
| 54 |
-
]
|
| 55 |
-
|
| 56 |
-
def _generate_examples(self, mvalues_path, meta_path):
|
| 57 |
-
mvalues_df = pd.read_parquet(mvalues_path)
|
| 58 |
-
meta_df = pd.read_parquet(meta_path)
|
| 59 |
-
|
| 60 |
-
# Combine the DataFrames by index (assuming the index is the sample ID and aligned)
|
| 61 |
-
combined_df = pd.merge(meta_df, mvalues_df, left_index=True, right_index=True)
|
| 62 |
-
|
| 63 |
-
for idx, row in combined_df.iterrows():
|
| 64 |
-
yield idx, row.to_dict()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
label_transfer_meta.parquet
DELETED
|
Binary file (49.7 kB)
|
|
|
label_transfer_mvalues.parquet
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5347f27cff73f022f47facecc6c5d3f769b7e780b3defa50c389f39a38376722
|
| 3 |
-
size 18954632144
|
|
|
|
|
|
|
|
|
|
|
|
training_meta.parquet
DELETED
|
Binary file (76.4 kB)
|
|
|
training_mvalues.parquet
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:7aef4a03f8d89c4406afda205d0a8e19d12f08189dfd317db69cb571a67524ee
|
| 3 |
-
size 30091856136
|
|
|
|
|
|
|
|
|
|
|
|