Hi,
I wonder if there are functions in HAIL 0.2 that are similar to linreg3 and hl.map in HAIL 0.1.
I would like to implement the following in HAIL 0.2 -
ht = ht.annotate(‘set_of_codes = [{}].toSet()’.format(df[0])) 
for x in df[1:]: 
ht = ht.annotate(‘set_of_codes = set_of_codes.add({})’.format(x)) 
ht = ht.annotate(‘set_of_codes = set_of_codes.remove("")’)
Thanks, 
Emily
             
            
               
               
              1 Like 
            
            
           
          
            
            
              yes, this is going to be way easier in 0.2. What is df, though?
             
            
               
               
               
            
            
           
          
            
            
              also, hl.linear_regression has all the functionality that linreg3 used to, plus a fair bit more.
             
            
               
               
               
            
            
           
          
            
            
              
 tpoterba:
 
linear_regression
 
 
should I loop through the list of phenotypes and run hl.linear_regression if I want to do a phewas?
             
            
               
               
               
            
            
           
          
            
            
              Here’s the docs for linear regression in 0.2: https://hail.is/docs/devel/methods/stats.html#hail.methods.linear_regression 
One difference between linreg3 and linreg in 0.1 is that linreg3 was capable of doing multiple phenotypes at once. In 0.2 this is possible too! Just pass a list of phenotype expressions as the y parameter.
             
            
               
               
               
            
            
           
          
            
            
              I’m also having a bit of trouble understanding what you’re trying to do with the code in your original post – another example might help.