From 07b99fab7e0d9167b3ae293d2cb7894157ac1d2d Mon Sep 17 00:00:00 2001 From: Yen-Chung Chen Date: Wed, 1 Oct 2025 21:17:27 -0400 Subject: [PATCH] Handling missing QUAL in user VCF files When QUAL is missing in user VCF files, replace it with 42. (Address #161) --- neat/read_simulator/utils/vcf_func.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neat/read_simulator/utils/vcf_func.py b/neat/read_simulator/utils/vcf_func.py index 5d8fac18..b7b9bef1 100755 --- a/neat/read_simulator/utils/vcf_func.py +++ b/neat/read_simulator/utils/vcf_func.py @@ -164,6 +164,11 @@ def parse_input_vcf(input_dict: dict[str: ContigVariants], f'{reference_string}') continue + # Quality score could be missing, in this case, we treat it as ground truth and assign a default score + default_qual = "42" + if record[5] == ".": + record[5] = default_qual + # We'll need the genotype when we generate reads, and output the records, if applicable genotype = None normal_sample_field = None