Entering edit mode
6.3 years ago
Famf
▴
30
Hi there,
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 -T
and -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
mylist.txt
file?HI Ram,
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?
Hi,
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?
Thanks
Does using
-R mylist.txt
(instead of-T mylist.txt
) work? What is the output tocat -te mylist.txt
?I tried what you suggested:
and:
gives me:
Your
mylist.txt
looks fine. What is the bcftools version you're using?bcftools --version
should 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!