Entering edit mode
4.8 years ago
Famf ▴ 30
I have a very large BCF file from which I want to extract a list of SNPs (also very large). The SNPs of interest are in a tab delimited file with two columns chromosome and position. I have tried the bcftools by using
view function and the options
-R like bellow but I haven't had success.
bcftools view -T mylist.txt file.bcf -Ou -o filteredfile.bcf
Thanks in advance
What does that mean? What is the exact problem you're facing? Can you also paste the first few lines of your
can you please share with me what should be the format of this mylist.txt file?
is it ok to do something like this:
where mySNPs.txt looks like this:
What do your questions have to do with my comment?
Did you try it? Did it work? Did the results match your expectations?
I tried it and this is what I got:
I also tried this:
where mylist.txt was a tab separated file:
but I got this error:
Can you please advise how mylist.txt should be formatted?
-R mylist.txt(instead of
-T mylist.txt) work? What is the output to
cat -te mylist.txt?
I tried what you suggested:
mylist.txtlooks fine. What is the bcftools version you're using?
bcftools --versionshould give you the version info.
it's this one:
That's a new version. I have no idea what's going on here. Is there any chance you could go back to bcftools 1.9 and try this? It should not make a difference but just in case.
I am doing this on some cluster so ...but anyway thank you so much for debugging tips!