Commits

Davide Cittaro  committed f8c79c1

added freebayes allelec ounts

  • Participants
  • Parent commits 6271313

Comments (0)

Files changed (1)

         allele_depth = sample['AD']
       except AttributeError:
         # maybe check that other allele depth fields are available, freebayes does not report AD
-        allele_depth = ','.join(['0'] * genotype.count('.'))
+        try:
+          allele_ro = sample['RO']
+          allele_ao = sample['AO']
+          allele_depth = "%d,%d" % (allele_ro, allele_ao)
+        except AttributeError:  
+          allele_depth = ','.join(['0'] * genotype.count('.'))
       if not allele_depth:
         allele_depth = ','.join(['0'] * genotype.count('.'))
       fill_cell(ws, col_n, row, ','.join([str(v) for v in allele_depth]))