svtools icon indicating copy to clipboard operation
svtools copied to clipboard

BND Variants on GL contigs move during file conversion

Open ernfrid opened this issue 8 years ago • 1 comments

For example,

$ cat roundtrip_diff.out | cut -f1-4 | less
4a5
> ##INFO=<ID=POS,Number=1,Type=Integer,Description="Position of the variant described in this record">
81118,81119c81119,81120
< GL000193.1    16      13312_2 N
< GL000193.1    25      13311_2 N

---
> GL000193.1    17      13312_2 N
> GL000193.1    26      13311_2 N

Left file here is before conversion to BEDPE. The right file is after conversion to BEDPE and then back to VCF.

ernfrid avatar Apr 26 '16 19:04 ernfrid

In reviewing the code, I believe this is due to the CIPOS extending to position 0 of the VCF. Adjustments to the coordinates for minus strand BNDs result in the BEDPE coordinate being -1 which is thus truncated to 0. Thus, when this is undone on reconversion to VCF, the coordinate is moved to the right by 1 bp. This would be a problem for any coordinates that end up <0 in the BEDPE.

One possibly solution is to just grab the position from the ALT instead of doing math.

It is also unclear if this confidence interval is valid. It appears to come from lmerge when run with the sum algorithm.

ernfrid avatar Jun 08 '16 18:06 ernfrid