Entering edit mode
4.8 years ago
nikitavlassenko
▴
120
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?
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.
that's the only syntax. https://github.com/samtools/htslib/blob/ba95c897358c9896a993ebc3336e680d15c96082/synced_bcf_reader.c#L895