vt icon indicating copy to clipboard operation
vt copied to clipboard

protected (some) complex variants from left-trimming in normalize

Open selkovjr opened this issue 7 years ago • 1 comments

This patch prevents the trimming of complex variants that are already normalized.

Example: trimming CAT -> CG changes it to a form that is hard to analyze: AT -> G. Indeed, some tools, such as freebayes, interpret it incorrectly, while the original combination of a deletion and a SNP presents no problems.

I do not know whether the solution I present here is complete (I suspect not), but it fixes all instances of this type of error I was able to find in my data.

selkovjr avatar Aug 16 '17 03:08 selkovjr

@selkovjr - I cannot accept this PR because:

  1. it would contradict the definition of normalization
  2. it is not practical to make exceptions so that a downstream tool will work
  3. It is probably a better idea for you to add an intermediate step between vt normalize and freebayes to manipulate the variants

atks avatar Aug 17 '17 18:08 atks