Hello,
I am currently trying to remove an individual from a vcf that is the product of ~120 vcf files. However, one of the samples is not needed and I am trying to get rid of it via:
vcftools --vcf example.vcf --remove-indv IND024 --out no024 --recode --recode-INFO-all --stdout > example_no024.vcf
The original vcf, renamed here as example.vcf is 153 GB in size. The resulting file after removing IND024 is 420 GB in size which does not make sense. I would appreciate advice on this.
Thanks
*UPDATE: I found the difference between the original merged vcf and the output vcf with the removed individual. The original file has single dots to signify missing information in the GT:GQ:DP:PL:AD fields while the removed vcf has multiple dots which we think is responsible for the increase in file size. Here is an example:
original vcf:
scaffold_1 27 . T A 94.23 . AC=7;AF=1.00;AN=8;BaseQRankSum=-0.842;DP=29;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRan kSum=-0.431;QD=25.95;ReadPosRankSum=0.000;SF=197,223,274,275;SOR=1.179 GT:GQ:DP:PL:AD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1/1:9:3:91,9,0:0,3 . . . . . . . . . . . . . . . . . . . . . . . . . 0/1:66:6:115,0,66:2,4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vcf with removed individual:
scaffold_1 27 . T A 94.23 . AC=7;AF=1.00;AN=8;BaseQRankSum=-0.842;DP=29;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=-0.431;QD=25.95;ReadPosRankSum=0.000;SF=197,223,274,275;SOR=1.179 GT:GQ:DP:PL:AD .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. 1/1:9:3:91,9,0:0,3 .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. 0/1:66:6:115,0,66:2,4 .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:.
This brings up two questions: Is there any merit or purpose to have the vcf file formatted with the multiple dot format? If not, how would I be able to retain the single-dot format in order to have smaller files after filtering for individuals?
0 answers
No answers yet.
Log in to answer this question.
1) isn't your original vcf compressed ? what is the output of
file example.vcf? 2) you should use bcftools. 3) for such large file, you should use the .bcf format1) I need to make other changes to the vcf files that require them to be uncompressed so I am leaving compression for later. The output of file example.vcf is: example.vcf: ASCII text, with very long lines
2) I'll give bcftools -s a try, thanks!
3) The size of the file isn't an issue in terms of storage for now, I am just concerned of the file difference.
update: After trying bcf tools, it also produced a 419 GB file. While I don't have a problem with the size, I'd like to know if this file size discrepancy is normal since I'd think this file would be smaller since it has less samples.
**UPDATE #2: I found the difference between the original merged vcf and the output vcf with the removed individual. The original file has single dots to signify missing information in the GT:GQ:DP:PL:AD fields while the removed vcf has multiple dots which we think is responsible for the increase in file size. Here is an example:
original vcf:
scaffold_1 27 . T A 94.23 . AC=7;AF=1.00;AN=8;BaseQRankSum=-0.842;DP=29;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRan kSum=-0.431;QD=25.95;ReadPosRankSum=0.000;SF=197,223,274,275;SOR=1.179 GT:GQ:DP:PL:AD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1/1:9:3:91,9,0:0,3 . . . . . . . . . . . . . . . . . . . . . . . . . 0/1:66:6:115,0,66:2,4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vcf with removed individual:
scaffold_1 27 . T A 94.23 . AC=7;AF=1.00;AN=8;BaseQRankSum=-0.842;DP=29;ExcessHet=0.0000;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;MQRankSum=-0.431;QD=25.95;ReadPosRankSum=0.000;SF=197,223,274,275;SOR=1.179 GT:GQ:DP:PL:AD .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. 1/1:9:3:91,9,0:0,3 .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. 0/1:66:6:115,0,66:2,4 .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:. .:.:.:.:.
This brings up two questions: Is there any merit or purpose to have the vcf file formatted with the multiple dot format? If not, how would I be able to retain the single-dot format in order to have smaller files after filtering for individuals?