Error while running bcftools merge - REF differ

1,864 views
Skip to first unread message

Alexandre

unread,
Mar 22, 2017, 5:46:05 PM3/22/17
to delly-users

Hi Tobias,


I am running the germline SV calling workflow and I ran into some issues during the "bcftools merge" step, which fails to complete the merging due to different reference alleles for the same position (which I guess is probably due to different versions of the reference fasta used and/or of delly throughout the study).


Here are stderr from the error for DEL and DUP and a grep of the position of the faulty allele in the unified site list generated from "delly merge".


Error message while running "bcftools merge" for DEL:

The REF prefixes differ: N vs A (1,1)

Failed to merge alleles at 1:142654568


Position of the faulty allele in file generated after ‘delly merge’:

#CHROM POS   ID                  REF ALT      QUAL FILTER  INFO

1   142654568   DEL00049305   A    <DEL>   0       PASS    PRECISE;SVTYPE=DEL;SVMETHOD=EMBL.DELLYv0.7.6;CHR2=1;END=142655338;PE=2;MAPQ=12;CT=3to5;CIPOS=-9,9;CIEND=-9,9;INSLEN=0;HOMLEN=9;SR=10;SRQ=0.959302;

CONSENSUS=CATTCCGTCCATGGCGGGAGTATTCTGCAATCCTATGTGAGGGACAAACATTCAGACCCCAGAAGGAGTGTTCTGGAATCCTATGTGAAGGACAAACATTCAGACCCTCGTAGCAGTGTTCTGGAATCCTATGTGAGGGACAGACATTCAGACCCTCGCAGCAGTGTTCTGG

1   142654568   DEL00049306   N    <DEL>   0       PASS   IMPRECISE;SVTYPE=DEL;SVMETHOD=EMBL.DELLYv0.7.6;CHR2=1;END=142656756;PE=9;MAPQ=7;CT=3to5;CIPOS=-2,2;CIEND=-2,2


Error message while running "bcftools merge" for DUP:

The REF prefixes differ: N vs C (1,1)

Failed to merge alleles at 1:161499354


Position of the faulty allele in file generated after ‘delly merge’:

#CHROM POS   ID                    REF  ALT      QUAL FILTER  INFO

1   161499354   DUP00000963    C     <DUP>  0        PASS   IMPRECISE;SVTYPE=DUP;SVMETHOD=EMBL.DELLYv0.7.6;CHR2=1;END=161580729;PE=2;MAPQ=15;CT=5to3;CIPOS=-486,486;CIEND=-486,486

1   161499354   DUP00000964    N     <DUP>  0        PASS   IMPRECISE;SVTYPE=DUP;SVMETHOD=EMBL.DELLYv0.7.6;CHR2=1;END=161581253;PE=2;MAPQ=15;CT=5to3;CIPOS=-332,332;CIEND=-332,332



Any thoughts on what could be causing this, and ideas for filtering out these alleles? Should I only remove the duplicated allele that have ‘N’ as the reference, or try to merge in some way the alleles (merge info such as PE and SR)?


Thanks a lot,


Alex

Tobias Rausch

unread,
Mar 30, 2017, 10:47:54 AM3/30/17
to Alexandre, delly-users
Hi Alex,

You just need to tell bcftools that it should not attempt any merging of REF and ALT alleles (to create multi-allelic records as for SNPs & InDels) but to simply merge based on IDs.

bcftools merge -m id -O b -o merged.bcf s1.geno.bcf s2.geno.bcf ... sN.geno.bcf

Since the delly IDs are unique the merged.bcf file should have the same number of records as your input bcf files. Sorry, this was missing in the README, thanks for reporting this. The REF=='N' is indeed a legacy bug of Delly. It's fixed now in the later versions so you shouldn't see this coming up again but you could still get different REF alleles for the small InDels of Delly. So '-m id' is always good to keep for the merging step after the re-genotyping.

Best, Tobias



--
You received this message because you are subscribed to the Google Groups "delly-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to delly-users+unsubscribe@googlegroups.com.
To post to this group, send email to delly...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexandre

unread,
Mar 30, 2017, 2:00:31 PM3/30/17
to delly-users, alexandre...@gmail.com
Hi Tobias,

That's great, thanks for your answer and the update!

Best,
Alex
To unsubscribe from this group and stop receiving emails from it, send an email to delly-users...@googlegroups.com.

Alexandre

unread,
Mar 30, 2017, 6:27:33 PM3/30/17
to delly-users, alexandre...@gmail.com
Hi Tobias,

The bcftools merge with the '-m id' option worked perfectly well and generated a merged.bcf file using .bcf recalled files. However, the delly filter step throws the error 'Fail to open index file' when referring to the input merged.bcf file. Have you ever encountered such error?

Thank you again for your time.

Best,
Alex

Tobias Rausch

unread,
Mar 31, 2017, 3:07:21 AM3/31/17
to Alexandre, delly-users
bcftools index merged.bcf

Best, Tobias


To unsubscribe from this group and stop receiving emails from it, send an email to delly-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages