Skip to content

Commit 25e2219

Browse files
Dom LaetschDom Laetsch
authored andcommitted
- modified order of parsing of nodesDB files(s)
1 parent daff0b2 commit 25e2219

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/BtCore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def getPlotData(self, rank, min_length, hide_nohits, taxrule, c_index, catcolour
145145
data_dict = {}
146146
read_cov_dict = {}
147147
max_cov = 0.0
148-
print self.covLibs
148+
149149
cov_lib_dict = self.covLibs
150150
#print cov_lib_dict
151151
cov_lib_names_l = self.covLibs.keys() # does not include cov_sum

lib/BtIO.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ def getNodesDB(**kwargs):
246246
'''
247247
nodesDB = {}
248248
nodesDB_f = ''
249-
if (kwargs['names'] and kwargs['nodes']):
249+
if (kwargs['nodesDB']):
250+
print BtLog.status_d['4'] % (kwargs['nodesDB'])
251+
nodesDB = readNodesDB(kwargs['nodesDB'])
252+
nodesDB_f = kwargs['nodesDB']
253+
elif (kwargs['names'] and kwargs['nodes']):
250254
print BtLog.status_d['3'] % (kwargs['nodes'], kwargs['names'])
251255
nodesDB = {}
252256
nodes_count = 0
@@ -266,10 +270,6 @@ def getNodesDB(**kwargs):
266270
nodesDB[names_col[0]]['name'] = names_col[2]
267271
nodesDB_f = kwargs['nodesDB']
268272
nodesDB['nodes_count'] = nodes_count
269-
elif(kwargs['nodesDB']):
270-
print BtLog.status_d['4'] % (kwargs['nodesDB'])
271-
nodesDB = readNodesDB(kwargs['nodesDB'])
272-
nodesDB_f = kwargs['nodesDB']
273273
else:
274274
BtLog.error('3')
275275
return nodesDB, nodesDB_f

plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@
138138
if taxrule not in blobDB.taxrules:
139139
BtLog.error('11', taxrule, blobDB.taxrules)
140140

141-
data_dict, max_cov, cov_lib_dict = blobDB.getPlotData(rank, min_length, hide_nohits, taxrule, c_index, catcolour_dict)
142-
plotObj = BtPlot.PlotObj(data_dict, cov_lib_dict)
141+
data_dict, max_cov, cov_libs, cov_libs_total_reads = blobDB.getPlotData(rank, min_length, hide_nohits, taxrule, c_index, catcolour_dict)
142+
plotObj = BtPlot.PlotObj(data_dict, cov_libs, cov_libs_total_reads)
143143
plotObj.exclude_groups = exclude_groups
144144
plotObj.format = format
145145
plotObj.max_cov = max_cov
@@ -164,7 +164,7 @@
164164
if (plotObj.title):
165165
plotObj.title = "%s.%s.%s" % (title, taxrule, cov_lib)
166166

167-
out_f = "%s.%s.%s.p%s" % (title, hist_type, rank, max_group_plot)
167+
out_f = "%s.%s.%s.p%s.%s" % (title, hist_type, rank, max_group_plot, cov_lib)
168168
if out_prefix:
169169
out_f = "%s.%s" % (out_prefix, out_f)
170170
if catcolour_dict:

0 commit comments

Comments
 (0)