Skip to content

bcftools merge with gVCF blocks #195

Description

@jordilc

Hi,
I want to use bcftools merge with files with gVCF blocks, but if one of the files has an SNP where the other file has a gVCF block, bcftools doesn't merge them properly. An example:

File 1:
18 7447502 . C T 228 PASS DP=12;VDB=0.985771 ...
18 7447775 . T . . LowQual END=7447781 GT 0/0
18 7447783 . T . . LowQual END=7447803 GT 0/0

File 2:
18 7447472 . C A 228 PASS DP=14;VDB=0.346151 ...
18 7447777 . T G 190 PASS DP=9;VDB=0.904845 ...

Merged file:
18 7447502 . C T 228 PASS VDB=0.985771 ...
18 7447775 . T . . LowQual END=7447781;AN=2 GT 0/0 ./.
18 7447777 . T G 190 PASS VDB=0.904845 ...
18 7447783 . T . . LowQual END=7447803;AN=2 GT 0/0 ./.

I think the expected result should be split the gVCF block into two blocks, with the SNP between them:
18 7447502 . C T 228 PASS VDB=0.985771 ...
18 7447775 . T . . LowQual END=7447776;AN=2 GT 0/0 ./.
18 7447777 . T G 190 PASS VDB=0.904845 ...
18 7447778 . T . . LowQual END=7447781;AN=2 GT 0/0 ./.
18 7447783 . T . . LowQual END=7447803;AN=2 GT 0/0 ./.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions