# Are 0/0 genotypes counted as defined in hl.is\_defined(mt.GT)? And are NA genotypes counted as missing in hl.is\_missing(mt.GT)?

**URL:** <https://discuss.hail.is/t/are-0-0-genotypes-counted-as-defined-in-hl-is-defined-mt-gt-and-are-na-genotypes-counted-as-missing-in-hl-is-missing-mt-gt/3806>\
**Category:** Hail Query & hailctl\
**Created:** [April 22, 2024, 4:31pm UTC](https://discuss.hail.is/t/are-0-0-genotypes-counted-as-defined-in-hl-is-defined-mt-gt-and-are-na-genotypes-counted-as-missing-in-hl-is-missing-mt-gt/3806 "2024-04-22T16:31:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jennifer](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@Jennifer](https://discuss.hail.is/u/Jennifer)\
**Post date:** [April 22, 2024, 4:31pm UTC](https://discuss.hail.is/t/are-0-0-genotypes-counted-as-defined-in-hl-is-defined-mt-gt-and-are-na-genotypes-counted-as-missing-in-hl-is-missing-mt-gt/3806/1 "2024-04-22T16:31:07Z")

</div>

Hello,

I’ve observed some "NA"s in the GT field, but the result of mt.aggregate\_entries(hl.agg.count\_where(hl.is\_missing(mt.GT))) is 0. Is this the expected behavior? Which command should I use to count the "NA"s in the GT field of the MT?

Additionally, I’ve observed that the results of mt.aggregate\_entries(hl.agg.count\_where(mt.GT.is\_non\_ref)) and mt.aggregate\_entries(hl.agg.count\_where(hl.is\_defined(mt.GT))) are the same. Is this the expected outcome? Does the call\_rate in sample\_qc include 0/0 genotypes in the numerator？

Thank you for your help!  
Jennifer

---

<div class="post-metadata">

**Author:** ![jsmadsen](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@jsmadsen](https://discuss.hail.is/u/jsmadsen)\
**Post date:** [April 26, 2024, 3:25pm UTC](https://discuss.hail.is/t/are-0-0-genotypes-counted-as-defined-in-hl-is-defined-mt-gt-and-are-na-genotypes-counted-as-missing-in-hl-is-missing-mt-gt/3806/2 "2024-04-26T15:25:50Z")

</div>

There is a bit of information on how filtered entries are handled in [filter\_entries](https://hail.is/docs/0.2/hail.MatrixTable.html#hail.MatrixTable.compute_entry_filter_stats). I am pretty sure 0/0 is called as hom\_ref and NA is not called.
