# Method for inherited variants?

**URL:** <https://discuss.hail.is/t/method-for-inherited-variants/2731>\
**Category:** Hail Query & hailctl\
**Created:** [June 25, 2022, 2:13am UTC](https://discuss.hail.is/t/method-for-inherited-variants/2731 "2022-06-25T02:13:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixel\_123](https://avatars.discourse-cdn.com/v4/letter/p/6bbea6/32.png) [@pixel\_123](https://discuss.hail.is/u/pixel_123)\
**Post date:** [June 25, 2022, 2:13am UTC](https://discuss.hail.is/t/method-for-inherited-variants/2731/1 "2022-06-25T02:13:55Z")

</div>

Hello. Can I know if there is an in-built method to call inherited variants from trios? I am interested in these scenarios:

1. Het in one parent / het in child.
2. Het in one parent / hom ref in child
3. Het in both parents / hom alt in child

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [June 27, 2022, 6:07pm UTC](https://discuss.hail.is/t/method-for-inherited-variants/2731/2 "2022-06-27T18:07:09Z")

</div>

@pixel_123, you can use [`trio_matrix`](https://hail.is/docs/0.2/methods/genetics.html#hail.methods.trio_matrix) with a pedigree file to get a Matrix Table with an easy-to-use structure. From there your queries are relatively straightforward:

```python
mt = mt.entries()
calls = mt.filter(
    (mt.proband_entry.is_het() & mt.father_entry.is_het() & ~mt.mother_entry.is_het())
    | (mt.proband_entry.is_het() & ~mt.father_entry.is_het() & mt.mother_entry.is_het())
)

```
