@@ -147,8 +147,8 @@ def getPlotData(self, rank, min_length, hide_nohits, taxrule, c_index, catcolour
147
147
'span_visible' : 0 ,
148
148
}
149
149
if len (cov_libs ) > 1 :
150
- data_dict [group ]['covs' ]['sum ' ] = []
151
- data_dict [group ]['reads_mapped' ]['sum ' ] = 0
150
+ data_dict [group ]['covs' ]['cov_sum ' ] = []
151
+ data_dict [group ]['reads_mapped' ]['cov_sum ' ] = 0
152
152
153
153
if ((hide_nohits ) and group == 'no-hit' ) or length < min_length : # hidden
154
154
data_dict [group ]['count_hidden' ] = data_dict [group ].get ('count_hidden' , 0 ) + 1
@@ -177,15 +177,20 @@ def getPlotData(self, rank, min_length, hide_nohits, taxrule, c_index, catcolour
177
177
178
178
if len (cov_libs ) > 1 :
179
179
cov_sum = cov_sum if cov_sum > 0.02 else 0.02
180
- data_dict [group ]['covs' ]['sum ' ].append (cov_sum )
180
+ data_dict [group ]['covs' ]['cov_sum ' ].append (cov_sum )
181
181
if cov > max_cov :
182
182
max_cov = cov
183
183
if (reads_mapped_sum ):
184
- data_dict [group ]['reads_mapped' ]['sum ' ] += reads_mapped_sum
184
+ data_dict [group ]['reads_mapped' ]['cov_sum ' ] += reads_mapped_sum
185
185
186
186
data_dict [group ]['count' ] = data_dict [group ].get ('count' , 0 ) + 1
187
187
data_dict [group ]['span' ] = data_dict [group ].get ('span' , 0 ) + int (length )
188
188
189
+ if len (cov_libs ) > 1 :
190
+ cov_libs .append ('cov_sum' )
191
+ for cov_lib , data in self .covLibs .items ():
192
+ cov_libs_reads_total ['cov_sum' ] = cov_libs_reads_total .get ('cov_sum' , 0 ) + data ['reads_total' ]
193
+
189
194
return data_dict , max_cov , cov_libs , cov_libs_reads_total
190
195
191
196
def addCovLib (self , covLib ):
0 commit comments