Entering edit mode
3.5 years ago
evafinegan
•
0
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!
Hi, it should work as you are running it. Are you sure that there is a record at this position? What if you simply grep the line:
Note that you can also extract the header with grep by using:
Note: if your VCF is indeed uncompressed, then this will also work:
Deleted.
That will select only the variant in chr1, but I think the question refers to all events.
Hello everyone! Thank you for your suggestions! I tried most of the suggestions but it is weird that I am still getting the header only (not the desired SNP row).
Any error? maybe try to use other position if you did not already, make sure you copy it from your vcf file.