Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion VariantValidator/modules/valoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 24 additions & 0 deletions VariantValidator/modules/vvMixinCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down