# Quad data with trio\_matrix

**URL:** <https://discuss.hail.is/t/quad-data-with-trio-matrix/2831>\
**Category:** Hail Query & hailctl\
**Created:** [September 11, 2022, 2:10pm UTC](https://discuss.hail.is/t/quad-data-with-trio-matrix/2831 "2022-09-11T14:10:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CuriousGeneticist](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@CuriousGeneticist](https://discuss.hail.is/u/CuriousGeneticist)\
**Post date:** [September 11, 2022, 2:10pm UTC](https://discuss.hail.is/t/quad-data-with-trio-matrix/2831/1 "2022-09-11T14:10:29Z")

</div>

Hello all! I have a dataset with quads (father, mother, proband, unaffected sibling). I am planning to use `trio_matrix` with all four members under the same family ID (proband’s ID). As I am interested in mtDNA, I am planning to filter out denovo variants that are homo/heteroplasmic in the child, but homozygous reference in the mother using `proband_entry` and `mother_entry`.  
If I am using quad data with a Trio Matrix, can I check if this behavior makes sense? Thank you.

---

<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:** [September 14, 2022, 1:13pm UTC](https://discuss.hail.is/t/quad-data-with-trio-matrix/2831/2 "2022-09-14T13:13:19Z")

</div>

I think the trio\_matrix abstraction won’t directly work here, but it’s certainly possible to do something like:

```python
trio_mat = trio_mat.key_cols_by('fam_id')
trio_mat = trio_mat.collect_cols_by_key()

```

now you have the array of all trios per fam\_id in the entry of the resulting matrix, and if you have a way to identify the proband from unaffected sib you can write the filter above.
