This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Counting allele counts/frequencies from a vcf file with both cases and controls

Dear Biostars members,

I a multi-sample vcf which has been annotated with VEP. The vcf has both cases and controls. I would like to know the allele counts and frequencies for cases vs controls.

I am able to use bcftools to pull the relevant fields but was wondering if there was a way of feeding it a case control label and it giving me a split of the results based from this rather than dividing the vcf into cases and controls and then running the analysis separately?

Many thanks for your time

bcftools allele count vep

You can create 2 one-sample-ID-per-line files of case IDs and control IDs and use them with the -S parameter available in many bcftools sub-tools.

1 answer

This is the aim of https://pcingola.github.io/SnpEff/ss_casecontrol/

Log in to answer this question.