# Genotypic Phase

**URL:** <https://discuss.hail.is/t/genotypic-phase/1930>\
**Category:** Hail Query & hailctl\
**Created:** [February 26, 2021, 8:07pm UTC](https://discuss.hail.is/t/genotypic-phase/1930 "2021-02-26T20:07:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NLSVTN](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/nlsvtn/32/339_2.png) [@NLSVTN](https://discuss.hail.is/u/NLSVTN)\
**Post date:** [February 26, 2021, 8:07pm UTC](https://discuss.hail.is/t/genotypic-phase/1930/1 "2021-02-26T20:07:48Z")

</div>

Hi,

I need to work with phased **VCF** genotype field, so I am wondering how it is managed in **Hail 0.2**. Could you give me some directions on that? For instance, is there a way to see which variants have phased **mt.GT** and which samples? When I print out **mt.GT** I don’t really see any phasing defined as ‘|’ lines. Basically I am wondering whats the mechanism for handling them in **Hail 0.2** , and interested in seeing several examples of how it could be approached.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 1, 2021, 6:14pm UTC](https://discuss.hail.is/t/genotypic-phase/1930/2 "2021-03-01T18:14:46Z")

</div>

What do you want to do with the phased genotypes? It’s possible we need to fix our print to accommodate phase, but that’s probably a distinct issue.

---

<div class="post-metadata">

**Author:** ![NLSVTN](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/nlsvtn/32/339_2.png) [@NLSVTN](https://discuss.hail.is/u/NLSVTN)\
**Post date:** [March 1, 2021, 9:42pm UTC](https://discuss.hail.is/t/genotypic-phase/1930/3 "2021-03-01T21:42:53Z")

</div>

I want to store VCF phased data in the appropriate data structure (would be better it to be already inside MatrixTable as GT), and just write it to the index. Right now as I understand phased data will be lost if I just stick to MatrixTable without using anything else, right? It would also be nice to have some tutorial on how to work with it in Hail and what we could do with it. Currently its just the easy task: read in phased data → write it to ES, but we may need to do some calculations based on phased data in Hail too, just not now.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 1, 2021, 9:44pm UTC](https://discuss.hail.is/t/genotypic-phase/1930/4 "2021-03-01T21:44:36Z")

</div>

Hail preserves phased genotypes from VCFs (not from BGEN currently), so this should be fine.

---

<div class="post-metadata">

**Author:** ![RossDeVito](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/rossdevito/32/877_2.png) [@RossDeVito](https://discuss.hail.is/u/RossDeVito)\
**Post date:** [August 21, 2023, 11:04pm UTC](https://discuss.hail.is/t/genotypic-phase/1930/5 "2023-08-21T23:04:46Z")

</div>

Is there any chance you could add phased support for import\_bgen?
