error on extracting a snp from vcf file using bcftools

1

Hello,

I am trying to extract a SNP based on POS column from a multisample vcf file.
I need the entire line with all the calls for all samples for the respective SNP.
I used:

bcftools view --include POS==41766 input.vcf -o SNP_41766

But the output file shows vcf header only.
Thank you for any help!


snp

• 175 views

To use bcftools, I would write it in this the way:
bcftools view --include 'POS=41766' input.vcf -o SNP_41766

This also will work, but I prefer the previous one:
bcftools view --include POS=41766 input.vcf -o SNP_41766


Login
before adding your answer.



Source link