Skip to content

Commit 3797ca9

Browse files
committed
Fixing how neat was counting input variants
1 parent b4f8017 commit 3797ca9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

neat/read_simulator/utils/vcf_func.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def parse_input_vcf(input_dict: dict[str: ContigVariants],
7373

7474
n_skipped = 0
7575
mismatched = 0
76+
records_found = 0
7677
# maximum number of columns we are interested in. Used for trimming unwanted samples.
7778
max_col = 7
7879
with open_input(vcf_path) as f:
@@ -276,14 +277,18 @@ def parse_input_vcf(input_dict: dict[str: ContigVariants],
276277
if rc == 1:
277278
_LOG.warning(f"Input variant skipped because a variant already existed at that location:"
278279
f"{chrom}: {location} ({temp_variant})")
280+
n_skipped += 1
281+
else:
282+
records_found += 1
279283

280284
if tumor_normal:
281285
"""
282286
Not yet implemented
283287
"""
284288
pass
285289

286-
_LOG.info(f'Found {len(input_dict)} variants in input VCF.')
290+
_LOG.info(f'Found {records_found} variants in input VCF.')
287291
_LOG.info(f'Skipped {n_skipped} variants because of multiples at the same location')
292+
_LOG.info(f'Skipped {mismatched} variants because of a mismatch between Ref and reference.')
288293

289294
return sample_columns

0 commit comments

Comments
 (0)