fritzsedlazeck / SURVIVOR

Toolset for SV simulation, comparison and filtering
MIT License
354 stars 47 forks source link

merge produces invalid VCF when used on Manta VCFs #58

Closed Lenbok closed 5 years ago

Lenbok commented 5 years ago

I tried to merge a VCF containing Manta calls. The result was not valid VCF, due to literal inclusion of Manta IDs (which contain colons) in the FORMAT ID field (where colons are FORMAT sub-field separators). Presumably these should be escaped somehow in the merged vcf?

2       47698620        MantaDEL:13:0:2:0:0:0   C       <DEL>   999     PASS    SUPP=1;SUPP_VEC=01;SVGLEN=-328057;SVTYPE=DEL;SVMETHOD=SURVIVORv2;CHR2=2;END=48026677;CIPOS=0,0;CIEND=0,0;STRANDS=+-     GT:PSV:LN:DR:ST:QV:TY:ID:RAL:AAL:CO ./.:NaN:0:0,0:--:NaN:NaN        0/1:NA:328057:399,300:+-:999:DEL:MantaDEL:13:0:2:0:0:0:C:<DEL>:2_47698620-2_48026677
fritzsedlazeck commented 5 years ago

Thanks for letting me know. This is a feature we recently implemented to enhance the tracking back of the merged entry.

I will look into this, but I for now don't understand why it's valid in manta but not in the merged vcf. Thanks Fritz

Lenbok commented 5 years ago

Hi, in Manta the ID is stored in the ID column, where colons are fine (semicolons are used to separate multiple values). It isn't in the sample column.

On Mon, 17 Dec 2018, 15:34 Fritz Sedlazeck <notifications@github.com wrote:

Thanks for letting me know. This is a feature we recently implemented to enhance the tracking back of the merged entry.

I will look into this, but I for now don't understand why it's valid in manta but not in the merged vcf. Thanks Fritz

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fritzsedlazeck/SURVIVOR/issues/58#issuecomment-447704931, or mute the thread https://github.com/notifications/unsubscribe-auth/AARN8kgLuDghJ0lsiX1tSVuM73Tv8GQUks5u5wLOgaJpZM4ZVjr5 .

fritzsedlazeck commented 5 years ago

Ah I see. I was confused. Thanks Fritz

jessie-wangjie commented 5 years ago

I got the same problem with the Manta vcf included using the master branch codes.

lindenb commented 5 years ago

I got the same problem today with manta. I fixed by changing https://github.com/fritzsedlazeck/SURVIVOR/blob/master/src/vcfs/Merge_VCF.cpp#L617

tmp.sv_id += buffer[i];

to

tmp.sv_id += (buffer[i]==':'?'~':buffer[i]);