Skip to content

Commit 9484fdd

Browse files
Dom LaetschDom Laetsch
authored andcommitted
Fixed bug in BtPlot.compute_stats()
1 parent b8fe1bb commit 9484fdd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/BtPlot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ def compute_stats(self):
256256
for cov_lib in self.cov_libs:
257257
stats[label]['cov_mean'][cov_lib] = mean(array(stats[label]['covs'][cov_lib]))
258258
stats[label]['cov_std'][cov_lib] = std(array(stats[label]['covs'][cov_lib]))
259-
stats[label]['reads_mapped_perc'][cov_lib] = stats[label]['reads_mapped'][cov_lib]/self.cov_libs_total_reads_dict[cov_lib]
259+
if (self.cov_libs_total_reads_dict[cov_lib]):
260+
stats[label]['reads_mapped_perc'][cov_lib] = stats[label]['reads_mapped'][cov_lib]/self.cov_libs_total_reads_dict[cov_lib]
260261
self.stats = stats
261262
#for label in stats:
262263
# print label, stats[label]

0 commit comments

Comments
 (0)