Arwa  
                
                  
                    November 24, 2020,  5:18pm
                   
                  1 
               
             
            
              Hello.
how can I do it?
             
            
              
            
           
          
            
              
                danking  
              
                  
                    November 24, 2020,  7:50pm
                   
                  2 
               
             
            
              Hail does not support this operation (transposition) because usually VCFs are very very large and transposition is very very expensive.
If your data is small enough to fit on one machine, I recommend using numpy instead:
variant_by_sample = np.array(mt.GT.n_alt_alleles().collect()).reshape(mt.count())
sample_by_variant = variant_by_sample.t
 
            
              
            
           
          
            
              
                Arwa  
              
                  
                    November 25, 2020,  9:06pm
                   
                  3 
               
             
            
              Hi danking.
sample_by_variant = variant_by_sample.t
 
this error that occur:
AttributeError: ‘numpy.ndarray’ object has no attribute ‘t’
 
So, how can I solve this error?
             
            
              
            
           
          
            
              
                danking  
              
                  
                    November 25, 2020, 10:35pm
                   
                  4 
               
             
            
              I meant you need to transpose the NumPy matrix, apparently that’s capital T in NumPy. You should read the NumPy Quickstart .