diff --git a/lib/BtCore.py b/lib/BtCore.py index 6d55941..f78586e 100644 --- a/lib/BtCore.py +++ b/lib/BtCore.py @@ -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 diff --git a/lib/BtIO.py b/lib/BtIO.py index 3cea3cf..b3a80cd 100644 --- a/lib/BtIO.py +++ b/lib/BtIO.py @@ -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 @@ -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 diff --git a/plot.py b/plot.py index 32db099..630c535 100644 --- a/plot.py +++ b/plot.py @@ -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 @@ -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: