This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bcftools view: index -R not better than -T

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
bcftools -r -t

There's no need to compress your bed file to use the -R option. Compare it running with the uncompressed bed file.

0 answers

No answers yet.

Log in to answer this question.