@@ -294,17 +294,18 @@ def scan_vcf(path, target_num_partitions):
294
294
295
295
def check_overlap (partitions ):
296
296
for i in range (1 , len (partitions )):
297
- prev_partition = partitions [i - 1 ]
298
- current_partition = partitions [i ]
299
- if (
300
- prev_partition .region .contig == current_partition .region .contig
301
- and prev_partition .region .end > current_partition .region .start
302
- ):
303
- raise ValueError (
304
- f"Multiple VCFs have the region "
305
- f"{ prev_partition .region .contig } :{ prev_partition .region .start } -"
306
- f"{ current_partition .region .end } "
307
- )
297
+ prev_region = partitions [i - 1 ].region
298
+ current_region = partitions [i ].region
299
+ if prev_region .contig == current_region .contig :
300
+ if prev_region .end is None :
301
+ logger .warning ("Cannot check overlaps; issue #146" )
302
+ continue
303
+ if prev_region .end > current_region .start :
304
+ raise ValueError (
305
+ f"Multiple VCFs have the region "
306
+ f"{ prev_region .contig } :{ prev_region .start } -"
307
+ f"{ current_region .end } "
308
+ )
308
309
309
310
310
311
def scan_vcfs (paths , show_progress , target_num_partitions , worker_processes = 1 ):
@@ -453,7 +454,7 @@ def sanitise_value_float_2d(buff, j, value):
453
454
454
455
def sanitise_int_array (value , ndmin , dtype ):
455
456
if isinstance (value , tuple ):
456
- value = [VCF_INT_MISSING if x is None else x for x in value ] # NEEDS TEST
457
+ value = [VCF_INT_MISSING if x is None else x for x in value ] # NEEDS TEST
457
458
value = np .array (value , ndmin = ndmin , copy = False )
458
459
value [value == VCF_INT_MISSING ] = - 1
459
460
value [value == VCF_INT_FILL ] = - 2
0 commit comments