How to filter vcf file by MAF using bcftools?
0
0
Entering edit mode
13 months ago

I saw this thread (https://github.com/samtools/bcftools/issues/357) and it seems sometimes bcftools recomputes MAF and sometimes it takes it from INFO. Which one is recommended to use and how is this calculation different than what stated on INFO?

Also, what is the difference between:

bcftools view -q 0.01:minor data.vcf.gz -Ov -o out.vcf
bcftools view -i 'MAF > 0.01' data.vcf.gz -Ov -o out.vcf
bcftools isec -e'MAF<0.01'  data.vcf.gz -Ov -o out.vcf

Thank you!

bcftools vcf • 1.8k views
ADD COMMENT
0
Entering edit mode

Here is the BCFtools cheat sheet that will explain your questions and more.

https://gist.github.com/elowy01/93922762e131d7abd3c7e8e166a74a0b

ADD REPLY
0
Entering edit mode

Thank you! Do you know when isec options should be used? What is the difference between just using view or isec?

ADD REPLY
2
Entering edit mode
  • isec option is used to find overlapping variants in different vcf files.
  • view option in used to subset, filter and convert VCF and BCF files
ADD REPLY
0
Entering edit mode

IMO that cheat sheet is quite confusing. The official manual is a lot clearer. OP needs to read the freaking manual, especially if they can't even tell isec and view apart.

ADD REPLY

Login before adding your answer.

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