michal
commited on
Commit
·
ab2bc10
1
Parent(s):
92284d2
Data file and loading script
Browse files- .gitattributes +1 -0
- README.md +3 -0
- biovdb_1000.csv +3 -0
- biovdb_1000.py +50 -0
.gitattributes
CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
+
biovdb_1000.csv filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# biovdb
|
2 |
+
|
3 |
+
Test set of ~1000 samples from GEO.
|
biovdb_1000.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc6c493ff7eca194d8c9d9f4c221bb81d5e8478bf94d9fb5f3b7f830e75ed8ea
|
3 |
+
size 452384517
|
biovdb_1000.py
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import datasets
|
3 |
+
|
4 |
+
CSV_PATH = "./biovdb_1000.csv"
|
5 |
+
|
6 |
+
CITATION = """
|
7 |
+
"""
|
8 |
+
|
9 |
+
class CustomDataset(datasets.GeneratorBasedBuilder):
|
10 |
+
VERSION = datasets.Version("1.0.0")
|
11 |
+
BUILDER_CONFIGS = []
|
12 |
+
|
13 |
+
def _info(self):
|
14 |
+
return datasets.DatasetInfo(
|
15 |
+
description="Test set of ~1000 samples from GEO",
|
16 |
+
citation=CITATION,
|
17 |
+
homepage="",
|
18 |
+
)
|
19 |
+
|
20 |
+
def _split_generators(self, dl_manager):
|
21 |
+
data = pd.read_csv(CSV_PATH)
|
22 |
+
unique_series_ids = data['series_id'].unique()
|
23 |
+
|
24 |
+
for series_id in unique_series_ids:
|
25 |
+
self.BUILDER_CONFIGS.append(
|
26 |
+
datasets.BuilderConfig(
|
27 |
+
name=str(series_id),
|
28 |
+
version=datasets.Version("1.0.0"),
|
29 |
+
description=f"Dataset for series_id {series_id}"
|
30 |
+
)
|
31 |
+
)
|
32 |
+
|
33 |
+
return [
|
34 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={
|
35 |
+
"data": data[data['series_id'] == self.config.name]
|
36 |
+
}),
|
37 |
+
]
|
38 |
+
|
39 |
+
def _generate_examples(self, data):
|
40 |
+
metadata_columns = data.columns[:40]
|
41 |
+
expression_columns = data.columns[40:]
|
42 |
+
|
43 |
+
for idx, row in data.iterrows():
|
44 |
+
yield idx, {
|
45 |
+
"data": row[expression_columns].values.tolist(),
|
46 |
+
"metadata": row[metadata_columns].to_dict()
|
47 |
+
}
|
48 |
+
|
49 |
+
if __name__ == '__main__':
|
50 |
+
ds = datasets.load_dataset("./biovdb_1000.py", "GSE52", split='train')
|