Upload 3 files
Browse files- .gitattributes +2 -0
- hg38.py +86 -0
- hg38_8k_test.jsonl +3 -0
- hg38_8k_train.jsonl +3 -0
.gitattributes
CHANGED
@@ -53,3 +53,5 @@ 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 |
+
hg38_8k_test.jsonl filter=lfs diff=lfs merge=lfs -text
|
57 |
+
hg38_8k_train.jsonl filter=lfs diff=lfs merge=lfs -text
|
hg38.py
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
2 |
+
#
|
3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
# you may not use this file except in compliance with the License.
|
5 |
+
# You may obtain a copy of the License at
|
6 |
+
#
|
7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
#
|
9 |
+
# Unless required by applicable law or agreed to in writing, software
|
10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
+
# See the License for the specific language governing permissions and
|
13 |
+
# limitations under the License.
|
14 |
+
import json
|
15 |
+
import os
|
16 |
+
|
17 |
+
import datasets
|
18 |
+
import pandas as pd
|
19 |
+
|
20 |
+
_CITATION = """\
|
21 |
+
CITATION
|
22 |
+
"""
|
23 |
+
|
24 |
+
_DESCRIPTION = """\
|
25 |
+
DESCRIPTION
|
26 |
+
"""
|
27 |
+
|
28 |
+
_HOMEPAGE = "HOMEPAGE"
|
29 |
+
|
30 |
+
_LICENSE = ""
|
31 |
+
|
32 |
+
|
33 |
+
FILES = ["hg38_8k_train.jsonl", "hg38_8k_test.jsonl"]
|
34 |
+
|
35 |
+
|
36 |
+
task_list = [
|
37 |
+
"hg38_8k",
|
38 |
+
]
|
39 |
+
|
40 |
+
|
41 |
+
class hg38Config(datasets.BuilderConfig):
|
42 |
+
def __init__(self, **kwargs):
|
43 |
+
super().__init__(version=datasets.Version("1.0.0"), **kwargs)
|
44 |
+
|
45 |
+
|
46 |
+
class hg38(datasets.GeneratorBasedBuilder):
|
47 |
+
BUILDER_CONFIGS = [
|
48 |
+
hg38Config(
|
49 |
+
name=task_name,
|
50 |
+
)
|
51 |
+
for task_name in task_list
|
52 |
+
]
|
53 |
+
|
54 |
+
def _info(self):
|
55 |
+
return datasets.DatasetInfo(
|
56 |
+
description=_DESCRIPTION,
|
57 |
+
features=datasets.Features(
|
58 |
+
{
|
59 |
+
"chrom":datasets.Value("string"),
|
60 |
+
"start": datasets.Value("int32"),
|
61 |
+
"end": datasets.Value("int32"),
|
62 |
+
"seq": datasets.Value("string"),
|
63 |
+
}
|
64 |
+
),
|
65 |
+
homepage=_HOMEPAGE,
|
66 |
+
license=_LICENSE,
|
67 |
+
citation=_CITATION,
|
68 |
+
)
|
69 |
+
|
70 |
+
def _split_generators(self, dl_manager):
|
71 |
+
downloaded_files = dl_manager.download(FILES)
|
72 |
+
return [
|
73 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files[0]}),
|
74 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files[1]}),
|
75 |
+
]
|
76 |
+
|
77 |
+
def _generate_examples(self, filepath):
|
78 |
+
with open(filepath) as jsonl_file:
|
79 |
+
for row, line in enumerate(jsonl_file):
|
80 |
+
data = json.loads(line)
|
81 |
+
yield row, {
|
82 |
+
"chrom": data["chrom"],
|
83 |
+
"start": data["start"],
|
84 |
+
"end": data["end"],
|
85 |
+
"seq": data["seq"],
|
86 |
+
}
|
hg38_8k_test.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8a830d7b4609610df261c172744cdcf9b42b68f4861a88280803514befc83ece
|
3 |
+
size 311056603
|
hg38_8k_train.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3140d510518af1a2303a1b90a493fb182b6cc291394dd3141330f17fafd9dfbe
|
3 |
+
size 2799491712
|