Pruning a VCF file and extracting pruned in snps using bcftools
1
1
Entering edit mode
9 months ago
AVA ▴ 40

I am new to the field of genomics and have only once or twice uses the bcftools before. I have to run a LMM using RVtests (it takes vcf format as input) for which I need to calculate a kinship matrix. In order to estimate the kinship matrix for each chromosome, I need to prune the vcf file for each chromosome based on a r2 0.25. Going through some earlier posts, I understood that I can use bcftools query. I would really appreciate if someone can suggest me a command line option for pruning a chromosome vcf file and obtaining a file with pruned in snps.

SNP bcftools bcftools query • 592 views
ADD COMMENT
0
Entering edit mode

. Going through some earlier posts, I understood that I can use bcftools query.

which posts please ?

ADD REPLY
1
Entering edit mode
9 months ago
4galaxy77 ★ 1.1k

You are right that bcftools can be used, but not query; use bcftools +prune instead.

Something like this should work for you:

bcftools +prune -l 0.25 -w 1000 input.bcf -Ob -o output.bcf
ADD COMMENT
0
Entering edit mode

Thank you. I have bcftools-1.11 and yes the above command did work but with -m instead of -l.

ADD REPLY

Login before adding your answer.

Traffic: 1524 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