Commits

Davide Cittaro committed 0301a06

bugfixes

Comments (0)

Files changed (1)

         else:
           continue
       else:        
-      t_data  = [gene_codon[gene][x], gene_aa[gene][x], gene_effect[gene][x]] 
-    results = results t_data
+        t_data  = [gene_codon[gene][x], gene_aa[gene][x], gene_effect[gene][x]] 
+    results = results  + t_data
   return results
   
 
   header.append("%s:GT" % s)
   header.append("%s:A1" % s)
   header.append("%s:A2" % s)
-header = header ["GENE","CODOON","AA","EFFECT"]
+header = header["GENE","CODOON","AA","EFFECT"]
 ws.title = sys.argv[1]
 row = 1
 for idx, f in enumerate(header):
     try:
       ad = s['AD']
     except AttributeError:
-      ad = ['0','0']  
+      ad = ['0,0']  
     if not genotype:
-      s_data = ['./.', '0', '0']
+      s_data = ['./.', '0,0']
     elif not ad:
-      ad = ['0','0']  
+      ad = ['0,0']  
     else:
       s_data = [genotype] + ad
     line = line + s_data
     col = openpyxl.cell.get_column_letter(1 + idx)
     ws.cell("%s%s" % (col, row)).value = f
 
-ws.create_sheet()
+ws = wb.create_sheet()
 wb.save(filename = fileout)