Commits

Davide Cittaro committed 7d1005d

fixed missing samples in breakdancer

Comments (0)

Files changed (1)

     if samples:
       fixed_fields += "\tGT:DP"
       for s in samples:
-        fixed_fields = "%s\t1/.:%s" % (fixed_fields, self._sample_dp[s])
+        try:
+          fixed_fields = "%s\t1/.:%s" % (fixed_fields, self._sample_dp[s])
+        except KeyError:
+          # breakdancer does not put all samples in the line if no SV are found
+          fixed_fields = "%s\t./.:0" % (fixed_fields)
     
     return fixed_fields + "\n"
        
   
 
 if __name__ == '__main__':
-  convert_breakdancer()  
+  convert_breakdancer()