text: user3694: Some programs (e.g. shapeit4) automatically annotate an INFO tag into a .vcf file which gives the cumulative genetic distance in cM between each SNP:
  ##fileformat=VCFv4.2
  ##FILTER=<ID=PASS,Description="All filters passed">
  ##fileDate=10/11/2020 - 21:29:39
  ##source=G2H
  ##contig=<ID=9>
  ##INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency">
  ##INFO=<ID=AC,Number=1,Type=Integer,Description="Allele count">
  ##INFO=<ID=CM,Number=A,Type=Float,Description="Interpolated cM position">
  ##FORMAT=<ID=GT,Number=1,Type=String,Description="Phased genotypes">
  ##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">
  ##bcftools_viewVersion=1.9-207-g2299ab6+htslib-1.9-271-g6738132
  ##bcftools_viewCommand=view -s -1_-1 ukb_cal_chr9_v2.HumanOrigins.common_snps.HumanOriginsInds.fiftyPercentEthnicUKBInds.PHASED.bgz.vcf.gz; Date=Mon May 24 14:15:51 2021
  #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  -1_-1
  9   257034  rs573860    A   G   .   .   AC=0;AF=0.388699;CM=0;AN=2  GT  0|0
  9   270321  rs17720310  A   G   .   .   AC=0;AF=0.0820595;CM=0.007994;AN=2  GT  0|0
  
  However, this program is really used for phasing not for .vcf annotation.
  Ideally I'd like a simple command line program which takes input the .vcf and a genetic map and interpolates the genetic distance and adds a cumulative map. This could be done manually with a custom script, but quite frankly I can't be bothered to do that.
  Does anyone know of a tool that exists which will do this?
  I posted this to biostars a while ago and received one reply which linked to this post, which includes links to tables containing cM locations for different rs numbers.
  EDIT: I am interested in doing this for human data (although the same would be the case for any diploid organism).
  Sample vcf:
  https://pastebin.com/raw/YSbuU0qM
  
  user4413: I think a useful tool to address your question is QCTOOL v2. Particularly, the option you are looking for is -annotate-genetic-map. This tool has been developed originally for GWAS datasets. It has multiple inputs data format.
  If you could provide input data as an example, I will try working on it to provide the necessary steps to be done.
  Hope this answers your question.
  
original_text: 3694: <p>Some programs (e.g. shapeit4) automatically annotate an <code>INFO</code> tag into a .vcf file which gives the cumulative genetic distance in cM between each SNP:</p>
  <pre><code>##fileformat=VCFv4.2
  ##FILTER=&lt;ID=PASS,Description=&quot;All filters passed&quot;&gt;
  ##fileDate=10/11/2020 - 21:29:39
  ##source=G2H
  ##contig=&lt;ID=9&gt;
  ##INFO=&lt;ID=AF,Number=A,Type=Float,Description=&quot;Allele Frequency&quot;&gt;
  ##INFO=&lt;ID=AC,Number=1,Type=Integer,Description=&quot;Allele count&quot;&gt;
  ##INFO=&lt;ID=CM,Number=A,Type=Float,Description=&quot;Interpolated cM position&quot;&gt;
  ##FORMAT=&lt;ID=GT,Number=1,Type=String,Description=&quot;Phased genotypes&quot;&gt;
  ##INFO=&lt;ID=AN,Number=1,Type=Integer,Description=&quot;Total number of alleles in called genotypes&quot;&gt;
  ##bcftools_viewVersion=1.9-207-g2299ab6+htslib-1.9-271-g6738132
  ##bcftools_viewCommand=view -s -1_-1 ukb_cal_chr9_v2.HumanOrigins.common_snps.HumanOriginsInds.fiftyPercentEthnicUKBInds.PHASED.bgz.vcf.gz; Date=Mon May 24 14:15:51 2021
  #CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  -1_-1
  9   257034  rs573860    A   G   .   .   AC=0;AF=0.388699;CM=0;AN=2  GT  0|0
  9   270321  rs17720310  A   G   .   .   AC=0;AF=0.0820595;CM=0.007994;AN=2  GT  0|0
  </code></pre>
  <p>However, this program is really used for phasing not for .vcf annotation.</p>
  <p>Ideally I'd like a simple command line program which takes input the .vcf and a genetic map and interpolates the genetic distance and adds a cumulative map. This could be done manually with a custom script, but quite frankly I can't be bothered to do that.</p>
  <p>Does anyone know of a tool that exists which will do this?</p>
  <p>I <a href="https://www.biostars.org/p/488447/" rel="nofollow noreferrer">posted</a> this to biostars a while ago and received one reply which linked to <a href="https://www.biostars.org/p/16236/" rel="nofollow noreferrer">this post</a>, which includes links to tables containing cM locations for different rs numbers.</p>
  <p>EDIT: I am interested in doing this for human data (although the same would be the case for any diploid organism).</p>
  <p>Sample vcf:</p>
  <p><a href="https://pastebin.com/raw/YSbuU0qM" rel="nofollow noreferrer">https://pastebin.com/raw/YSbuU0qM</a></p>
   4413: <p>I think a useful tool to address your question is <a href="https://www.well.ox.ac.uk/%7Egav/qctool_v2/index.html" rel="nofollow noreferrer">QCTOOL v2</a>. Particularly, the option you are looking for is <a href="https://www.well.ox.ac.uk/%7Egav/qctool_v2/documentation/alphabetical_options.html" rel="nofollow noreferrer">-annotate-genetic-map</a>. This tool has been developed originally for GWAS datasets. It has <a href="https://www.well.ox.ac.uk/%7Egav/qctool_v2/documentation/genotype_file_formats.html" rel="nofollow noreferrer">multiple inputs</a> data format.</p>
  <p>If you could provide input data as an example, I will try working on it to provide the necessary steps to be done.</p>
  <p>Hope this answers your question.</p>
  