bcftools - reducing to "sites-only"?
1
0
Entering edit mode
6 weeks ago
Matthew • 0

I have some very large WGS BCF files and I would to extract just the first 8 columns, thus reducing to just a 'sites-only' VCF/BCF.

Does BCFTOOLS have a canned option for doing it?

I know I can do this:

query -f "%CHROM\t%POS\t%ID\t%REF\t%ALT\t%QUAL\t%FILTER\t%INFO\n"

but I'm finding that that is quite slow (>24hrs for some files in my case) - understandably so, since it will need to parse each BCF record (and I'll bet it's parsing all the per-sample information, which I don't want) and then reconstruct the desired output line for each row, according to that complex format string. But since my format string is really just "the first 8 columns please, unchanged", and "sites-only" VCF/BCFs are sort of a common/known thing, I wonder if there isn't a more efficient way to do that?

Thanks for any info

sites-only bcftools • 395 views
ADD COMMENT
0
Entering edit mode
6 weeks ago
bcftools view -G in.vcf.gz
ADD COMMENT
0
Entering edit mode

Thank you Pierre!
Not sure why I didn't notice that (I should have)

ADD REPLY
0
Entering edit mode

Don't forget to follow up on your threads. If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they all work. If an answer was not really helpful or did not work, provide detailed feedback so others know not to use that answer.

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

Traffic: 1509 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6