<p>When i was still working in the field of genotype imputation, a dosage was the expectation (average) of the (posterior) genotype probabilities, coded as GP in the OP's VCF. I once contributed code to bcftools to convert genotype probabilities stored in the GP field to dosages. It looks like that code may now live in a bcftools plugin called &quot;dosage&quot;: <a href="https://samtools.github.io/bcftools/howtos/plugins.html" rel="nofollow noreferrer">https://samtools.github.io/bcftools/howtos/plugins.html</a></p>

CC BY-SA 4.0
2022-01-18T18:32:26.433Z
Yes, I used bcftools +dosage function to extract the GP field only. thank you.
Rhea Bedi
CC BY-SA 4.0
2022-01-16T12:06:05.853Z
2022-01-16T12:06:05.853Z
winni2k
<p>I have one more question related to genotype file. I submitted the job in michigan imputation server.</p>
<p>and my imputed dosage for chr 22 file is:</p>
<blockquote>
<p>22 16050435 22:16050435:T:C T C . PASS
AF=0.00098;MAF=0.00098;R2=0.23769;IMPUTED GT:DS:HDS:GP
0|0:0.002:0.001,0.000:0.998,0.002,0.000 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0.001:0.000,0.001:0.999,0.001,0.000
0|0:0:0,0:1,0,0 0|0:0.001:0.001,0.000:0.999,0.001,0.000
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
0|0:0.001:0.001,0.000:0.999,0.001,0.000
0|0:0.002:0.000,0.002:0.998,0.002,0.000 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
0|0:0.001:0.000,0.001:0.999,0.001,0.000 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
0|0:0:0,0:1,0,0 0|0:0.002:0.000,0.002:0.998,0.002,0.000
0|0:0:0,0:1,0,0 0|0:0.001:0.001,0.000:0.999,0.001,0.000
0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0</p>
</blockquote>
<p>Its coming like this.</p>
<p>wherein the test data provided in your predixcan tutorial looks like this:</p>
<blockquote>
<p>22_16494187_C_A_b37 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0</p>
</blockquote>
<p>Also it states that the imputed dosage should be encoded on a 0-2 scale representing the number imputed or number of the effect alleles the sample posseses. Do anyone know should I convert my vcf files to the desired input genotype file to train the model. I don't understand in my vcf files which column is representing dosage values Thank you.</p>

CC BY-SA 4.0
2022-01-16T01:09:14.390Z
Does this answer your question? [edit dosage file for various columns](https://bioinformatics.stackexchange.com/questions/18328/edit-dosage-file-for-various-columns)
user324810
CC BY-SA 4.0
2022-01-17T18:50:39.127Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
<vcf><snp><genotyping><imputation><chromosomes>
imputed dosage values for vcf files
# imputed dosage values for vcf files

(Asked by: username_0 on 2022-01-14)

I have one more question related to genotype file. I submitted the job in michigan imputation server.

and my imputed dosage for chr 22 file is:

> 22 16050435 22:16050435:T:C T C . PASS
> AF=0.00098;MAF=0.00098;R2=0.23769;IMPUTED GT:DS:HDS:GP
> 0|0:0.002:0.001,0.000:0.998,0.002,0.000 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0.001:0.000,0.001:0.999,0.001,0.000
> 0|0:0:0,0:1,0,0 0|0:0.001:0.001,0.000:0.999,0.001,0.000
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
> 0|0:0.001:0.001,0.000:0.999,0.001,0.000
> 0|0:0.002:0.000,0.002:0.998,0.002,0.000 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
> 0|0:0.001:0.000,0.001:0.999,0.001,0.000 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0
> 0|0:0:0,0:1,0,0 0|0:0.002:0.000,0.002:0.998,0.002,0.000
> 0|0:0:0,0:1,0,0 0|0:0.001:0.001,0.000:0.999,0.001,0.000
> 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0 0|0:0:0,0:1,0,0

Its coming like this.

wherein the test data provided in your predixcan tutorial looks like this:

> 22\_16494187\_C\_A\_b37 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0
> 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1
> 0 0 0 0 0 0 0

Also it states that the imputed dosage should be encoded on a 0-2 scale representing the number imputed or number of the effect alleles the sample posseses. Do anyone know should I convert my vcf files to the desired input genotype file to train the model. I don't understand in my vcf files which column is representing dosage values Thank you.

**Tags:** vcf, snp, genotyping, imputation, chromosomes
> **Comments:**
> **username_1**: Does this answer your question? [edit dosage file for various columns](https://bioinformatics.stackexchange.com/questions/18328/edit-dosage-file-for-various-columns)  
> **username_2**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  

---

## 1 answers

### Answer by username_3 on 2022-01-16. Score: 1 | Accepted answer

When i was still working in the field of genotype imputation, a dosage was the expectation (average) of the (posterior) genotype probabilities, coded as GP in the OP's VCF. I once contributed code to bcftools to convert genotype probabilities stored in the GP field to dosages. It looks like that code may now live in a bcftools plugin called "dosage": <https://samtools.github.io/bcftools/howtos/plugins.html>

> **Comments:**
> **username_0**: Yes, I used bcftools +dosage function to extract the GP field only. thank you.  

---

