Check for non-symbolic alt alleles before left aligning in liftover #1909
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
During liftover, if the strand switches for an indel, the indel will be left aligned and trimmed. However, in determining whether a variant is an indel to be left aligned, any variant with a multi-character REF allele is marked as an indel and left aligned. The problem is that if all the alt alleles are either symbolic or spanning-deletions, then the left alignment algorithm will left align the variant all the way to the beginning of the contig, where it will set the REF allele to N.
While a variant with a multi-character REF and only symbolic/spanning-del alt seems a bit odd, as far as I can tell it is allowed by the vcf spec, and it can occur fairly naturally in the wild by splitting multiallelics on a vcf which includes spanning deletions. For example
fixes #1899