@@ -39,8 +39,8 @@ class Converter(object):
39
39
file (conv_region_filename):
40
40
41
41
**conv_region_dict** : Array of regions (e.g. '{"Chromosome":
42
- ["X", "X", "M"],"Start": [50001, 55001, 50001 ],"End": [52001 ,
43
- 60601, 60026 ]}'). Values for Chromosome must align with values in
42
+ ["X", "X", "M"],"Start": [50000, 55000, 50000 ],"End": [52000 ,
43
+ 60600, 60025 ]}'). Values for Chromosome must align with values in
44
44
VCF #CHROM field. Ranges must be `0-based \
45
45
<https://www.biostars.org/p/84686/>`_
46
46
(or 0-start, half-open) and based on GRCh37 or GRCh38 \
@@ -141,7 +141,6 @@ def __init__(
141
141
"Please provide valid 'conv_region_filename'" )
142
142
elif conv_region_dict :
143
143
try :
144
- self ._fix_conv_region_zero_based (conv_region_dict )
145
144
self .conversion_region = pyranges .from_dict (conv_region_dict )
146
145
except FileNotFoundError :
147
146
raise
@@ -199,16 +198,6 @@ def convert(self, output_filename='fhir.json'):
199
198
output_filename )
200
199
general_logger .info ("Completed VCF to FHIR Conversion" )
201
200
202
- def _fix_conv_region_zero_based (self , conv_region_dict ):
203
- i = 0
204
- for start in conv_region_dict ["Start" ]:
205
- conv_region_dict ["Start" ][i ] = start - 1
206
- i += 1
207
- i = 0
208
- for end in conv_region_dict ["End" ]:
209
- conv_region_dict ["End" ][i ] = end - 1
210
- i += 1
211
-
212
201
def _generate_exception (self , msg ):
213
202
general_logger .error (msg , exc_info = True )
214
203
raise Exception (msg , sys .exc_info )
0 commit comments