PEATDB/plugins/PEATSAplugin.py
def showResults(self, name=None, showtable=True, ax=None, stats=True):
        """Show results with correlation plot from selected job"""
        job, name = self.getJob(name)
        
        if job == None:
            print 'job not in DB'
            return
        if job.state() != 'Finished':
            print 'job not finished'
            return

        self.matrices = job.data.allMatrices()
        #print self.matrices['ModellingResults'].csvRepresentation()
        jobmeta = job.metadata()
        cols = self.DB.getSimpleFields()
        expcol = None
        expdata = None
        #print jobmeta
        if jobmeta.has_key('expcol'):
            expcol = jobmeta['expcol']
        if expcol not in cols and jobmeta.has_key('project'):
            #we may have stored the exp data in another project
            prjdata = jobmeta['project']
            print 'trying to loading exp data from external project(s)'
            from PEATDB.Base import PDatabase
            from PEATTables import PEATTableModel
            
            tmpdb = PDatabase(**prjdata)
            print tmpdb
            S = PEATTableModel(tmpdb)
            expdata = S.simpleCopy(include=['Mutations'])
            print expdata  
            
        #if exp column not known then ask user              
        if expcol == '' or expcol == None:                      
            mpDlg = MultipleValDialog(title='Select Experimental Data',
                                        initialvalues=[cols],
                                        labels=['exp data column:'],
                                        types=['list'],
                                        parent=self.mainwin)
            if mpDlg.result == True:
                expcol = mpDlg.results[0]
            else:
                return

        for m in self.matrices:
            matrix = self.matrices[m]
            if matrix == None or not 'Total' in matrix.columnHeaders():
                continue
            
            ax,mh,x,y = self.plotMerged(matrix, expcol, expdata, m,
                                    showtable, ax, name, stats)
            
            #need to add this for mousehandler to work.. hack       
            '''from Correlation import MouseHandler
            mh = MouseHandler(ax, labels=expcol, key='Mutations')
            mh.connect()'''

        return ax,mh,x,y
Show results with correlation plot from selected job
Show results with correlation plot from selected job
Show results with correlation plot from selected job
def showResults(self, name=None, showtable=True, ax=None, stats=True):
        job, name = self.getJob(name)
        if job == None:
            print 'job not in DB'
            return
        if job.state() != 'Finished':
            print 'job not finished'
            return
        self.matrices = job.data.allMatrices()
        jobmeta = job.metadata()
        cols = self.DB.getSimpleFields()
        expcol = None
        expdata = None
        if jobmeta.has_key('expcol'):
            expcol = jobmeta['expcol']
        if expcol not in cols and jobmeta.has_key('project'):
            prjdata = jobmeta['project']
            print 'trying to loading exp data from external project(s)'
            from PEATDB.Base import PDatabase
            from PEATTables import PEATTableModel
            tmpdb = PDatabase(**prjdata)
            print tmpdb
            S = PEATTableModel(tmpdb)
            expdata = S.simpleCopy(include=['Mutations'])
            print expdata  
        if expcol == '' or expcol == None:                      
            mpDlg = MultipleValDialog(title='Select Experimental Data',
                                        initialvalues=[cols],
                                        labels=['exp data column:'],
                                        types=['list'],
                                        parent=self.mainwin)
            if mpDlg.result == True:
                expcol = mpDlg.results[0]
            else:
                return
        for m in self.matrices:
            matrix = self.matrices[m]
            if matrix == None or not 'Total' in matrix.columnHeaders():
                continue
            ax,mh,x,y = self.plotMerged(matrix, expcol, expdata, m,
                                    showtable, ax, name, stats)
        return ax,mh,x,y
def showResults ( self , name = None , showtable = True , ax = None , stats = True ) : job , name = self . getJob ( name ) if job == None : print 'job not in DB' return if job . state ( ) != 'Finished' : print 'job not finished' return self . matrices = job . data . allMatrices ( ) jobmeta = job . metadata ( ) cols = self . DB . getSimpleFields ( ) expcol = None expdata = None if jobmeta . has_key ( 'expcol' ) : expcol = jobmeta [ 'expcol' ] if expcol not in cols and jobmeta . has_key ( 'project' ) : prjdata = jobmeta [ 'project' ] print 'trying to loading exp data from external project(s)' from PEATDB . Base import PDatabase from PEATTables import PEATTableModel tmpdb = PDatabase ( ** prjdata ) print tmpdb S = PEATTableModel ( tmpdb ) expdata = S . simpleCopy ( include = [ 'Mutations' ] ) print expdata if expcol == '' or expcol == None : mpDlg = MultipleValDialog ( title = 'Select Experimental Data' , initialvalues = [ cols ] , labels = [ 'exp data column:' ] , types = [ 'list' ] , parent = self . mainwin ) if mpDlg . result == True : expcol = mpDlg . results [ 0 ] else : return for m in self . matrices : matrix = self . matrices [ m ] if matrix == None or not 'Total' in matrix . columnHeaders ( ) : continue ax , mh , x , y = self . plotMerged ( matrix , expcol , expdata , m , showtable , ax , name , stats ) '''from Correlation import MouseHandler
            mh = MouseHandler(ax, labels=expcol, key='Mutations')
            mh.connect()''' return ax , mh , x , y
Show results with correlation plot from selected job
Show results with correlation plot from selected job
"""Show results with correlation plot from selected job""" #print self.matrices['ModellingResults'].csvRepresentation() #print jobmeta #we may have stored the exp data in another project #if exp column not known then ask user               #need to add this for mousehandler to work.. hack        '''from Correlation import MouseHandler
            mh = MouseHandler(ax, labels=expcol, key='Mutations')
            mh.connect()'''
self
name
showtable
ax
stats