Bcftools filter error
1
0
Entering edit mode
4.2 years ago
BAGeno ▴ 190

Hi,

I am using bcftools filter. I run bcftools filter command in two different ways. It gave me different results.

Command #1

 bcftools filter --e "GQ<20" miss.GT.vcf.gz>test1.vcf

This gave me 49336 variants.

while when I run command 2

 bcftools filter -i "GQ>20" miss.GT.vcf.gz>test2.vcf

It gave me 80858 variants.

There are 80858 variants in original file.

Why there is such variation? Which command results should I consider for further analysis?

bcftools filter • 1.5k views
ADD COMMENT
1
Entering edit mode

This may be the recently fixed bcftools issue #1266.

ADD REPLY
0
Entering edit mode

what is the version of bcftools ? how is defined GQ in the header ? It's a FORMAT annotation ? with a multi-sample VCF ? show us a few lines with '-i' and '-e'

ADD REPLY
0
Entering edit mode

Yes it is multi-sample vcf and GQ field is in FORMAT column.

Here are lines of -e option.

chr1    3787134 rs41307854  A   G   1543.55 PASS    AC=5;AF=0.167;AN=30;BaseQRankSum=-0.367;DB;DP=342;ExcessHet=4.7216;FS=0.688;InbreedingCoeff=-0.2;MLEAC=5;MLEAF=0.167;MQ=60;MQRankSum=0;POSITIVE_TRAIN_SITE;QD=12.65;ReadPosRankSum=-0.152;SOR=0.593;VQSLOD=14.14;culprit=MQRankSum  GT:AD:DP:GQ:PL  0/0:40,0:40:99:0,99,1485    0/0:27,0:27:62:0,62,956 0/0:23,0:23:69:0,69,844 0/0:14,0:14:39:0,39,585 0/0:15,0:15:42:0,42,630 0/0:15,0:15:36:0,36,540 0/1:11,6:17:99:151,0,370    0/0:25,0:25:72:0,72,731 0/1:16,10:26:99:232,0,456   0/0:24,0:24:52:0,52,837 0/0:14,0:14:36:0,36,540 0/0:20,0:20:57:0,57,855 0/1:3,9:12:54:278,0,54  0/1:20,21:41:99:556,0,686   0/1:13,13:26:99:387,0,420
chr1    3787146 rs2253143   G   A   284.27  PASS    AC=1;AF=0.033;AN=30;BaseQRankSum=-0.261;DB;DP=406;ExcessHet=3.0103;FS=0;InbreedingCoeff=-0.0346;MLEAC=1;MLEAF=0.033;MQ=60;MQRankSum=0;POSITIVE_TRAIN_SITE;QD=10.53;ReadPosRankSum=1.2;SOR=0.804;VQSLOD=14.49;culprit=MQRankSum  GT:AD:DP:GQ:PL  0/0:40,0:40:99:0,99,1485    0/0:29,0:29:81:0,81,1215    0/0:30,0:30:90:0,90,995 0/0:19,0:19:54:0,54,810 0/1:13,14:27:99:320,0,274   0/0:15,0:15:42:0,42,630 0/0:21,0:21:54:0,54,810 0/0:27,0:27:81:0,81,775 0/0:39,0:39:99:0,99,1485    0/0:32,0:32:93:0,93,1395    0/0:17,0:17:51:0,51,559 0/0:23,0:23:26:0,26,699 0/0:15,0:15:39:0,39,585 0/0:42,0:42:99:0,102,1530   0/0:29,0:29:84:0,84,1260
chr1    3815401 rs12728401  G   A   487.67  PASS    AC=2;AF=0.067;AN=30;BaseQRankSum=2.62;DB;DP=403;ExcessHet=3.1627;FS=2.28;InbreedingCoeff=-0.0715;MLEAC=2;MLEAF=0.067;MQ=60;MQRankSum=0;POSITIVE_TRAIN_SITE;QD=7.87;ReadPosRankSum=0.946;SOR=0.411;VQSLOD=13.61;culprit=MQRankSum    GT:AD:DP:GQ:PL  0/0:41,0:41:99:0,99,1485    0/0:40,0:40:99:0,102,1530   0/0:21,0:21:63:0,63,548 0/1:24,10:34:99:216,0,524   0/0:33,0:33:93:0,93,1395    0/0:21,0:21:60:0,60,713 0/0:14,0:14:36:0,36,540 0/0:26,0:26:29:0,29,642 0/0:18,0:18:45:0,45,675 0/0:21,0:21:57:0,57,855 0/1:17,11:28:99:316,0,383   0/0:22,0:22:48:0,48,720 0/0:22,0:22:60:0,60,900 0/0:41,0:41:99:0,99,1485    0/0:21,0:21:60:0,60,835

Here are lines of -i option

chr1    215578972   rs41303271  T   C   794.07  PASS    AC=3;AF=0.1;AN=30;BaseQRankSum=-0.229;DB;DP=210;ExcessHet=3.4845;FS=1.01;InbreedingCoeff=-0.1139;MLEAC=3;MLEAF=0.1;MQ=60;MQRankSum=0;POSITIVE_TRAIN_SITE;QD=14.18;ReadPosRankSum=0.561;SOR=0.544;VQSLOD=14.34;culprit=MQRankSum GT:AD:DP:GQ:PL  0/0:6,0:6:18:0,18,227   0/0:9,0:9:27:0,27,279   0/0:20,0:20:60:0,60,696 0/1:10,7:17:99:203,0,301    0/0:24,0:24:66:0,66,990 0/1:6,8:14:99:212,0,163 0/0:11,0:11:30:0,30,450 0/1:10,15:25:99:430,0,290   0/0:19,0:19:57:0,57,725 0/0:20,0:20:60:0,60,754 0/0:6,0:6:15:0,15,225   0/0:10,0:10:30:0,30,355 0/0:6,0:6:18:0,18,225   0/0:13,0:13:39:0,39,387 0/0:10,0:10:30:0,30,369
chr1    215620492   rs14137 G   A   10213.3 PASS    AC=10;AF=0.333;AN=30;BaseQRankSum=-0.074;DB;DP=808;ExcessHet=0.3155;FS=0;InbreedingCoeff=0.4;MLEAC=10;MLEAF=0.333;MQ=60;MQRankSum=0;POSITIVE_TRAIN_SITE;QD=18.88;ReadPosRankSum=0.886;SOR=0.684;VQSLOD=14.69;culprit=MQRankSum  GT:AD:DP:GQ:PGT:PID:PL  0/0:41,0:41:99:.:.:0,99,1485    0/0:35,0:35:99:.:.:0,99,1383    1/1:0,101:101:99:.:.:3201,303,0 0/0:39,0:39:99:.:.:0,99,1485    0/1:74,60:134:99:.:.:1507,0,1946    0/0:33,0:33:99:.:.:0,99,1286    0/0:14,0:14:39:.:.:0,39,585 0/1:58,66:124:99:.:.:1801,0,1518    0/1:38,49:87:99:.:.:1366,0,957  0/0:44,0:44:99:.:.:0,99,1485    0/1:21,16:37:99:1|0:215620491_C_T:461,0,597 1/1:0,22:22:66:.:.:843,66,0 0/0:26,0:26:60:.:.:0,60,900 0/0:35,0:35:99:.:.:0,99,1485    1/1:2,34:36:59:.:.:1121,59,0
chr1    215620513   rs3767253   T   C   74.27   PASS    AC=1;AF=0.033;AN=30;BaseQRankSum=-1.349;DB;DP=583;ExcessHet=3.0103;FS=0;InbreedingCoeff=-0.0345;MLEAC=1;MLEAF=0.033;MQ=60;MQRankSum=0;POSITIVE_TRAIN_SITE;QD=6.75;ReadPosRankSum=0.258;SOR=0.527;VQSLOD=14.46;culprit=MQRankSum GT:AD:DP:GQ:PL  0/0:41,0:41:99:0,99,1485    0/0:35,0:35:99:0,99,1383    0/0:67,0:67:99:0,99,1485    0/0:39,0:39:99:0,99,1485    0/0:53,0:53:99:0,99,1485    0/0:39,0:39:99:0,99,1485    0/1:6,5:11:99:110,0,194 0/0:53,0:53:99:0,99,1485    0/0:66,0:66:99:0,120,1800   0/0:44,0:44:99:0,99,1485    0/0:30,0:30:81:0,81,1215    0/0:20,0:20:48:0,48,720 0/0:23,0:23:60:0,60,889 0/0:35,0:35:99:0,99,1485    0/0:27,0:27:72:0,72,1080
chr1    215625732   rs7531580   T   G   296.27  PASS    AC=1;AF=0.033;AN=30;BaseQRankSum=0.892;DB;DP=517;ExcessHet=3.0103;FS=6.021;InbreedingCoeff=-0.0345;MLEAC=1;MLEAF=0.033;MQ=60;MQRankSum=0;POSITIVE_TRAIN_SITE;QD=18.52;ReadPosRankSum=-0.384;SOR=0.078;VQSLOD=13.65;culprit=MQRankSum    GT:AD:DP:GQ:PL  0/0:44,0:44:99:0,114,1710   0/0:32,0:32:90:0,90,1261    0/0:47,0:47:99:0,114,1710   0/0:47,0:47:99:0,102,1595   0/0:48,0:48:99:0,114,1710   0/0:21,0:21:51:0,51,765 0/1:6,10:16:99:332,0,193    0/0:57,0:57:99:0,120,1800   0/0:53,0:53:99:0,120,1800   0/0:53,0:53:99:0,105,1575   0/0:17,0:17:45:0,45,675 0/0:23,0:23:30:0,30,721 0/0:16,0:16:33:0,33,495 0/0:29,0:29:81:0,81,1215    0/0:14,0:14:36:0,36,540
ADD REPLY
0
Entering edit mode

see John Marshall 's answer. Check your version of bcftools.

ADD REPLY
0
Entering edit mode
4.2 years ago
BAGeno ▴ 190

I am using bcftools 1.9. Do I need to install latest version?

ADD COMMENT

Login before adding your answer.

Traffic: 2145 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6