Entering edit mode
5.4 years ago
Shicheng Guo
★
9.6k
It looks index bed file don't provide better performance for bcftools view
.
method 1: bcftools view -T
time(bcftools view -T ../chr22.SNP.bin.bed ../../chr22.1kg.phase3.v5a.vcf.gz -Oz -o chr22.SNP.vcf.gz)
real 2m33.106s
user 2m32.641s
sys 0m0.293s
method 2: bcftools view -R
bgzip ../chr22.SNP.bin.bed
tabix -p bed ../chr22.SNP.bin.bed.gz
time(bcftools view -R ../chr22.SNP.bin.bed.gz ../../chr22.1kg.phase3.v5a.vcf.gz -Oz -o chr22.SNP.vcf.gz)
real 9m4.696s
user 9m4.271s
sys 0m0.372s
And what is your question, then?
There's no need to compress your bed file to use the
-R
option. Compare it running with the uncompressed bed file.