Skip to content

Commit

Permalink
- modified order of parsing of nodesDB files(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Laetsch authored and Dom Laetsch committed Feb 16, 2016
1 parent daff0b2 commit 25e2219
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/BtCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def getPlotData(self, rank, min_length, hide_nohits, taxrule, c_index, catcolour
data_dict = {}
read_cov_dict = {}
max_cov = 0.0
print self.covLibs

cov_lib_dict = self.covLibs
#print cov_lib_dict
cov_lib_names_l = self.covLibs.keys() # does not include cov_sum
Expand Down
10 changes: 5 additions & 5 deletions lib/BtIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,11 @@ def getNodesDB(**kwargs):
'''
nodesDB = {}
nodesDB_f = ''
if (kwargs['names'] and kwargs['nodes']):
if (kwargs['nodesDB']):
print BtLog.status_d['4'] % (kwargs['nodesDB'])
nodesDB = readNodesDB(kwargs['nodesDB'])
nodesDB_f = kwargs['nodesDB']
elif (kwargs['names'] and kwargs['nodes']):
print BtLog.status_d['3'] % (kwargs['nodes'], kwargs['names'])
nodesDB = {}
nodes_count = 0
Expand All @@ -266,10 +270,6 @@ def getNodesDB(**kwargs):
nodesDB[names_col[0]]['name'] = names_col[2]
nodesDB_f = kwargs['nodesDB']
nodesDB['nodes_count'] = nodes_count
elif(kwargs['nodesDB']):
print BtLog.status_d['4'] % (kwargs['nodesDB'])
nodesDB = readNodesDB(kwargs['nodesDB'])
nodesDB_f = kwargs['nodesDB']
else:
BtLog.error('3')
return nodesDB, nodesDB_f
Expand Down
6 changes: 3 additions & 3 deletions plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@
if taxrule not in blobDB.taxrules:
BtLog.error('11', taxrule, blobDB.taxrules)

data_dict, max_cov, cov_lib_dict = blobDB.getPlotData(rank, min_length, hide_nohits, taxrule, c_index, catcolour_dict)
plotObj = BtPlot.PlotObj(data_dict, cov_lib_dict)
data_dict, max_cov, cov_libs, cov_libs_total_reads = blobDB.getPlotData(rank, min_length, hide_nohits, taxrule, c_index, catcolour_dict)
plotObj = BtPlot.PlotObj(data_dict, cov_libs, cov_libs_total_reads)
plotObj.exclude_groups = exclude_groups
plotObj.format = format
plotObj.max_cov = max_cov
Expand All @@ -164,7 +164,7 @@
if (plotObj.title):
plotObj.title = "%s.%s.%s" % (title, taxrule, cov_lib)

out_f = "%s.%s.%s.p%s" % (title, hist_type, rank, max_group_plot)
out_f = "%s.%s.%s.p%s.%s" % (title, hist_type, rank, max_group_plot, cov_lib)
if out_prefix:
out_f = "%s.%s" % (out_prefix, out_f)
if catcolour_dict:
Expand Down

0 comments on commit 25e2219

Please sign in to comment.