<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>

CC BY-SA 4.0
2021-05-31T15:07:19.950Z
Sorry took a while, have added the sample vcf
user438383
CC BY-SA 4.0
2021-06-01T09:44:01.103Z
@user438383 could you please specify whether your VCF is of `hg38` or `hg19`? Also, do provide a proper VCF format (it is missing some columns like `FORMAT` followed by another column like in your original post example ). I tried using the file you provided, it is giving an error of segmentation fault. When I tried to add a vcf header with the proper format aforementioned, it works.
user324810
CC BY-SA 4.0
2021-05-27T15:09:22.177Z
2021-05-27T15:21:42.967Z
2021-05-27T15:21:42.967Z
user324810
<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>

<vcf><sequence-annotation>
Annotating a .vcf with centimorgan information
# Annotating a .vcf with centimorgan information

(Asked by: username_0 on 2021-05-24)

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=
##fileDate=10/11/2020 - 21:29:39
##source=G2H
##contig=
##INFO=
##INFO=
##INFO=
##FORMAT=
##INFO=
##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

**Tags:** vcf, sequence-annotation

---

## 1 answers

### Answer by username_1 on 2021-05-27. Score: 2

I think a useful tool to address your question is [QCTOOL v2](https://www.well.ox.ac.uk/%7Egav/qctool_v2/index.html). Particularly, the option you are looking for is [-annotate-genetic-map](https://www.well.ox.ac.uk/%7Egav/qctool_v2/documentation/alphabetical_options.html). This tool has been developed originally for GWAS datasets. It has [multiple inputs](https://www.well.ox.ac.uk/%7Egav/qctool_v2/documentation/genotype_file_formats.html) 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.

> **Comments:**
> **username_0**: Sorry took a while, have added the sample vcf  
> **username_1**: @user438383 could you please specify whether your VCF is of `hg38` or `hg19`? Also, do provide a proper VCF format (it is missing some columns like `FORMAT` followed by another column like in your original post example ). I tried using the file you provided, it is giving an error of segmentation fault. When I tried to add a vcf header with the proper format aforementioned, it works.  

---

