Commits

Davide Cittaro  committed 61ce7ce

fixed missing samples in breakdancer

  • Participants
  • Parent commits 00a10e0

Comments (0)

Files changed (1)

File breakdancer2vcf.py

     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()