Update human_reference_genome.py
Browse files- human_reference_genome.py +8 -13
human_reference_genome.py
CHANGED
@@ -50,7 +50,6 @@ _URLS = {
|
|
50 |
|
51 |
_CHUNK_LENGTHS = [6000, 12000]
|
52 |
_OVERLAP = 100
|
53 |
-
_THRESHOLD_FILTER_N = 0.05
|
54 |
|
55 |
|
56 |
def filter_fn(char: str) -> str:
|
@@ -190,15 +189,11 @@ class HumanReferenceGenome(datasets.GeneratorBasedBuilder):
|
|
190 |
end_pos = min(seq_length, (i+1) * chunk_length + 2 * _OVERLAP)
|
191 |
chunk_sequence = sequence[start_pos:end_pos]
|
192 |
|
193 |
-
#
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
'start_pos': start_pos,
|
202 |
-
'end_pos': end_pos
|
203 |
-
}
|
204 |
-
key += 1
|
|
|
50 |
|
51 |
_CHUNK_LENGTHS = [6000, 12000]
|
52 |
_OVERLAP = 100
|
|
|
53 |
|
54 |
|
55 |
def filter_fn(char: str) -> str:
|
|
|
189 |
end_pos = min(seq_length, (i+1) * chunk_length + 2 * _OVERLAP)
|
190 |
chunk_sequence = sequence[start_pos:end_pos]
|
191 |
|
192 |
+
# yield chunk
|
193 |
+
yield key, {
|
194 |
+
'sequence': chunk_sequence,
|
195 |
+
'chromosome': chromosome,
|
196 |
+
'start_pos': start_pos,
|
197 |
+
'end_pos': end_pos
|
198 |
+
}
|
199 |
+
key += 1
|
|
|
|
|
|
|
|