Body: <p>I have a vcf with multi-allelic SNPs, e.g. <code>REF: A</code> and <code>ALT: G, C</code>.</p>
  <p>I would like to combine all reference alleles to the most frequent reference alleles. This should reflect both in the REF field and in the genotypes themselves.</p>
  <p>Can this be done with an existing tool?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-15T09:42:36.163Z
Comments.Text: Please [edit] your question and add a few lines from a VCF file that we can use to reproduce your issue. Make sure to also show us the output you expect from those lines.
Comments.UserDisplayName: terdon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-18T16:21:30.583Z
Comments.Text: I would suggest computing the population frequencies of each allele, using suggestions here: https://www.biostars.org/p/366694/. You will then have the frequencies of each allele, you can make up your own mind which alleles to combine.
Comments.UserDisplayName: Maximilian Press
Tags: <vcf><snp><bcftools><multi-allelic>
Title: Combine all alternate alleles
ThreadText: # Combine all alternate alleles
  
  (Asked by: username_0 on 2021-10-14)
  
  I have a vcf with multi-allelic SNPs, e.g. `REF: A` and `ALT: G, C`.
  
  I would like to combine all reference alleles to the most frequent reference alleles. This should reflect both in the REF field and in the genotypes themselves.
  
  Can this be done with an existing tool?
  
  **Tags:** vcf, snp, bcftools, multi-allelic
  
  > **Comments:**
  > **username_1**: Please [edit] your question and add a few lines from a VCF file that we can use to reproduce your issue. Make sure to also show us the output you expect from those lines.  
  > **username_2**: I would suggest computing the population frequencies of each allele, using suggestions here: https://www.biostars.org/p/366694/. You will then have the frequencies of each allele, you can make up your own mind which alleles to combine.  
  
  ---
  
  ## 0 answers
  
  