This is a test version of Biostars. For the public version, visit https://www.biostars.org.
VCF Merge using Vcf Tools

Hello,

I tried combining two vcf files using vcf tools merge. The problem I am facing is that the tool is adding the depth of the two vcf files when I dont want to do that and instead simply want it to take the higher of the two depths.

Command used;

bgzip file1.vcf
bgzip file2.vcf

tabix file1.vcf.gz
tabix file2.vcf.gz

vcf-tools merge file1.vcf.gz file2.vcf.gz > combined.vcf

Examples:

Combined.vcf:
chr7    295683  rs36173688      T       TG      623.23  PASS    AC=4;AF=1.00;AN=4;DB;**DP=37**;ExcessHet=3.0103;FS=0.000;MLEAC=2;MLEAF=1.00;MQ0=0;MQ=60.00;QD=30.62;RPA=4,5;RU=G;SF=0,1;SOR=5.994;STR    GT:GQ:DP:PL:AD  1/1:57:19:619,57,0:0,19 1/1:54:18:702,54,0:0,18

File 1:
chr7  295683  rs36173688      T       TG      581.73  PASS    AC=2;AF=1.00;AN=2;DB;**DP=19**;ExcessHet=3.0103;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=60.00;MQ0=0;QD=30.62;RPA=4,5;RU=G;SOR=5.994;STR   GT:AD:DP:GQ:PL  1/1:0,19:19:57:619,57,0

File 2:
chr7  295683  rs36173688      T       TG      664.73  PASS    AC=2;AF=1.00;AN=2;DB;**DP=18**;ExcessHet=3.0103;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=60.00;MQ0=0;QD=34.24;RPA=4,5;RU=G;SOR=5.892;STR   GT:AD:DP:GQ:PL  1/1:0,18:18:54:702,54,0

As seen in the example with DP column in combined vcf has simply added the values from both of them when it shouldnt since its from the same patient data and I only want to merge the vcf files from different variant callers.

vcftools variant depth

0 answers

No answers yet.

Log in to answer this question.