From 9288ef141a2e71d4141d9dd8de8e559a96f34d5e Mon Sep 17 00:00:00 2001 From: Peter-J-Freeman Date: Fri, 27 Mar 2026 13:49:33 +0000 Subject: [PATCH 1/2] Output VCF dels etc as in #799 --- VariantValidator/modules/vvMixinCore.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/VariantValidator/modules/vvMixinCore.py b/VariantValidator/modules/vvMixinCore.py index e94b2d23..2bd4eeda 100644 --- a/VariantValidator/modules/vvMixinCore.py +++ b/VariantValidator/modules/vvMixinCore.py @@ -1297,6 +1297,30 @@ def validate(self, for build_key, accession_dict in list(lifted_response.items()): try: accession_key = list(accession_dict.keys())[0] + for k, v in accession_dict.items(): + hgvs = v["hgvs_genomic_description"].posedit + edit = hgvs.edit + + # Extract HGVS coordinates and edit type (do NOT mutate) + start = int(hgvs.pos.start.base) + end = int(hgvs.pos.end.base) + variant_type = edit.type # 'del', 'dup', 'inv' + + # Only apply SV-style formatting for large variants + if (variant_type in ["del", "dup", "inv"] + and len(edit.ref) >= 50): + + # Overwrite/standardise VCF-style fields if still needed + v["vcf"]["pos"] = str(start) # VCF left anchor convention + v["vcf"]["ref"] = str(end) + v["vcf"]["alt"] = variant_type.upper() + + else: + # Small variants: keep original VCF-style representation + # (no SV transformation) + pass + + if accession_dict[accession_key]['hgvs_genomic_description'].ac.startswith('NC_'): primary_assembly_loci[build_key.lower()] = accession_dict[accession_key] else: From 7cc87a6fb68f5b2952393123f8a4544823192ed6 Mon Sep 17 00:00:00 2001 From: Peter-J-Freeman Date: Wed, 8 Apr 2026 00:30:43 +0100 Subject: [PATCH 2/2] update table output lovd checking --- VariantValidator/modules/valoutput.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VariantValidator/modules/valoutput.py b/VariantValidator/modules/valoutput.py index dae38cfb..71b46ffb 100644 --- a/VariantValidator/modules/valoutput.py +++ b/VariantValidator/modules/valoutput.py @@ -114,7 +114,8 @@ def format_as_table(self, with_meta=True): for variant in self.output_list: # Get additional warnings from lovd syntax check - self.lovd_syntax_check(variant) + if variant.output_type_flag == 'warning': + self.lovd_syntax_check(variant) prot = '' if variant.hgvs_predicted_protein_consequence is not None: