Question: Genotype is changing after merging multiple vcf files using bcftools merge command
0
gravatar for Apurba
4 months ago by
Apurba0
Israel
Apurba0 wrote:

I have 3 vcf files containing 10, 15 and 20 different individuals in each file. The merging command "bcftools merge -0 --missing-to-ref", was used to merge the vcf files together. After merging, in a location of the merged vcf file, the genotype (GT) is changing to 0/3; whereas in the unmerged vcf file, the same GT was 0/2. In addition, variant-specific parameters (e.g. SOR, QUAL, BaseQRankSum, etc.) are also changing in the merged vcf file. This thing is happening for multiple variants in multiple individuals. This seems to be an issue for the downstream analysis.

Can anyone suggest me how to fix this issue? Also please let me know if there are other tools where I can merge multiple vcf files with different Individuals.

N.B: The version of bcftools I am using is 1.9.

ADD COMMENTlink modified 4 months ago • written 4 months ago by Apurba0

Thank you for the explanation finswimmer. Have a nice day.

Apurba

ADD REPLYlink written 4 months ago by Apurba0
1
gravatar for finswimmer
4 months ago by
finswimmer14k
Germany
finswimmer14k wrote:

Hello Apurba ,

The merging command "bcftools merge -0 --missing-to-ref", was used to merge the vcf files together.

You should use -0 or --missing-to-ref. Not both.

After merging, in a location of the merged vcf file, the genotype (GT) is changing to 0/3; whereas in the unmerged vcf file, the same GT was 0/2.

This is expected. When you have different ALT alleles on the same position in the different vcf files, the numbers for the genotype must be expanded. Otherwise you cannot say Sample 1 has on pos 1 e.g. C/T, Sample 2 C/G, Sample 3 C/A.

In addition, variant-specific parameters (e.g. SOR, QUAL, BaseQRankSum, etc.) are also changing in the merged vcf file.

Have a look at bcftools docs for the -info-rules parameter, what bcftools is doing here and how you can change the behavior.

fin swimmer

ADD COMMENTlink written 4 months ago by finswimmer14k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2192 users visited in the last hour
_