bcftools view gives empty file when trying to subset it
1
0
Entering edit mode
4.8 years ago

I need to subset a vcf file, so I ran the following commands:

bgzip BATCH1.vcf
bcftools index BATCH1.vcf.gz
bcftools view BATCH1.vcf.gz -r 1:3494620,1:3826786 -o batch1_subset.vcf

And got an empty batch1_subset.vcf. I know well that there is 3494620 position at chr1, and there is 3826786, I verified that, but see no output generated. Why?

bcftools • 1.5k views
ADD COMMENT
2
Entering edit mode
4.8 years ago

try with '1:3494620-3494620,1:3826786-3826786' or 'chr1:3494620-3494620,chr1:3826786-3826786' ?

ADD COMMENT
0
Entering edit mode

Ok, this is the answer. Could you explain why it is like that? I would expect specifying only one region if I need only one region. I will accept the answer if you post.

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 1709 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