# Use agg.linreg for GWAS

**URL:** <https://discuss.hail.is/t/use-agg-linreg-for-gwas/1496>\
**Category:** Hail Query & hailctl\
**Created:** [June 30, 2020, 3:58am UTC](https://discuss.hail.is/t/use-agg-linreg-for-gwas/1496 "2020-06-30T03:58:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EZXYZ](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@EZXYZ](https://discuss.hail.is/u/EZXYZ)\
**Post date:** [June 30, 2020, 3:58am UTC](https://discuss.hail.is/t/use-agg-linreg-for-gwas/1496/1 "2020-06-30T03:58:04Z")

</div>

Hi there,

I was trying to run a GWAS using the agg.linreg function. In order to test the code, I modified your GWAS tutorial by changing the hl.linear\_regression\_rows() to hl.agg.linreg(). However, I encountered the following exception when I ran the code:

 ![Screen Shot 2020-06-29 at 10.50.24 PM](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/75128275f4297d84d7820dbd473d2f36780d674c.png)  
May I ask what’s going on here? I couldn’t spot any issue with my code. Thanks!

Ethan

---

<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:** [June 30, 2020, 11:22am UTC](https://discuss.hail.is/t/use-agg-linreg-for-gwas/1496/2 "2020-06-30T11:22:10Z")

</div>

This is a Hail bug, thanks for the report. Will fix this morning.

---

<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:** [June 30, 2020, 11:34am UTC](https://discuss.hail.is/t/use-agg-linreg-for-gwas/1496/3 "2020-06-30T11:34:03Z")

</div>

Here’s the fix:

> <https://github.com/hail-is/hail/pull/9029>

Should go in today, and we can release 0.2.48 in the next day or so.
