def plotMerged(self, matrix, expcol, expdata=None, title='', showtable=True, ax=None, name=None, stats=True): """Merge a set of exp vals with predictions and plot""" if expdata == None: expdata = self.parent.tablemodel.simpleCopy(include=['Mutations']) merged = self.mergeMatrix(matrix, expdata) x, y, names, muts = merged.getColumns( ['Total', expcol, 'name', 'Mutations'], allowempty=False) from Correlation import CorrelationAnalyser C = CorrelationAnalyser() muts = ['mutation: ' + i for i in muts] labels = zip(names, muts) ax, frame, mh = C.plotCorrelation(x, y, labels, title=title, ylabel=expcol, ax=ax, plotname=name, stats=stats, err=4) x = [round(float(i), 2) for i in x] y = [round(float(i), 2) for i in y] if showtable == True: table = self.showTable(frame, merged) mh.table = table return ax, mh, x, y
def showAllResults(self): """Show results for single or multiple jobs together""" names = self.jobstable.get_selectedRecordNames() if len(names) == 1: ax, mh, x, y = self.showResults() else: tx = [] ty = [] import pylab as plt f = plt.figure(figsize=(8, 8)) ax = f.add_subplot(111) for n in names: a, mh, x, y = self.showResults(n, showtable=False, ax=ax, stats=False) tx.extend(x) ty.extend(y) ax.legend() #add stats for summary from Correlation import CorrelationAnalyser C = CorrelationAnalyser() C.addStats(ax, tx, ty) f.show() return
def plotMerged(self, matrix, expcol, expdata=None, title='', showtable=True, ax=None, name=None, stats=True): """Merge a set of exp vals with predictions and plot""" if expdata==None: expdata = self.parent.tablemodel.simpleCopy(include=['Mutations']) merged = self.mergeMatrix(matrix, expdata) x,y,names,muts = merged.getColumns(['Total',expcol,'name','Mutations'],allowempty=False) from Correlation import CorrelationAnalyser C = CorrelationAnalyser() muts = ['mutation: '+i for i in muts] labels = zip(names, muts) ax,frame,mh = C.plotCorrelation(x,y,labels,title=title,ylabel=expcol, ax=ax,plotname=name,stats=stats,err=4) x=[round(float(i),2) for i in x] y=[round(float(i),2) for i in y] if showtable == True: table = self.showTable(frame, merged) mh.table = table return ax,mh,x,y
def showAllResults(self): """Show results for single or multiple jobs together""" names = self.jobstable.get_selectedRecordNames() if len(names)==1: ax,mh,x,y=self.showResults() else: tx=[]; ty=[] import pylab as plt f=plt.figure(figsize=(8,8)) ax=f.add_subplot(111) for n in names: a,mh,x,y = self.showResults(n,showtable=False, ax=ax,stats=False) tx.extend(x) ty.extend(y) ax.legend() #add stats for summary from Correlation import CorrelationAnalyser C = CorrelationAnalyser() C.addStats(ax,tx,ty) f.show() return