File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ def parseCovs(self, covLibObjs):
300
300
for name , cov in cov_dict .items ():
301
301
covLib .cov_sum += cov
302
302
self .dict_of_blobs [name ].addCov (covLib .name , cov )
303
- self .dict_of_blobs [name ].read_cov = { covLib .name : read_cov_dict [name ]}
303
+ self .dict_of_blobs [name ].addReadCov ( covLib .name , read_cov_dict [name ])
304
304
305
305
elif covLib .fmt == 'cov' :
306
306
cov_dict = BtIO .readCov (covLib .f , set (self .dict_of_blobs ))
Original file line number Diff line number Diff line change @@ -324,7 +324,8 @@ def compute_stats(self):
324
324
for cov_lib in self .cov_libs :
325
325
stats [label ]['cov_mean' ][cov_lib ] = mean (array (stats [label ]['covs' ][cov_lib ])) if stats [label ]['count_visible' ] > 0 else 0.0
326
326
stats [label ]['cov_std' ][cov_lib ] = std (array (stats [label ]['covs' ][cov_lib ])) if stats [label ]['count_visible' ] > 0 else 0.0
327
- stats [label ]['reads_mapped_perc' ][cov_lib ] = stats [label ]['reads_mapped' ][cov_lib ]/ self .cov_libs_total_reads_dict [cov_lib ]
327
+ if self .cov_libs_total_reads_dict [cov_lib ]:
328
+ stats [label ]['reads_mapped_perc' ][cov_lib ] = stats [label ]['reads_mapped' ][cov_lib ]/ self .cov_libs_total_reads_dict [cov_lib ]
328
329
329
330
self .stats = stats
330
331
You can’t perform that action at this time.
0 commit comments