PEATDB/plugins/KineticsAnalysis.py
def plotTemplatevsenzConcs(self, sets):
        """Compare our enzyme concs vs template, testing purposes only"""
        import matplotlib
        import matplotlib.pyplot as plt
        setfiles=[]
        for s in sets:
            setfiles.append('set'+s+'.defs')
        enzconcs={}
        templconcs = {}
        pathindex = {}
        for s in setfiles:
            self.parseDefs(s)
            try:
                enz,templ=self.readEnzymeConcs()
                templconcs.update(templ)
            except:
                enz = self.enzymeConcsfromTemplate()
            pathindex[self.setname] = self.path
            for k in enz:
                if not k in enzconcs.keys():
                    enzconcs[k] = enz[k]
                else:
                    pass

        if enzconcs !=None:
            print 'plotting enzyme concs. ours vs template'
            fig1=plt.figure()
            ax=fig1.add_subplot(111)
            xd=[]; yd=[]
            for n in enzconcs:
                if enzconcs[n]<20 and enzconcs[n]>0:
                    xd.append(templconcs[n])
                    yd.append(enzconcs[n])
            ax.plot(xd, yd, 'x')
            ax.plot(xd, xd, '-')
            ax.set_title('enzyme concentrations from AST: PEAT vs template')
            ax.set_ylabel('PEAT')
            ax.set_xlabel('template')
            ax.grid(True)
            fig1.savefig('enzymecvstemplate.png')
        return
Compare our enzyme concs vs template, testing purposes only
Compare our enzyme concs vs template, testing purposes only
Compare our enzyme concs vs template testing purposes only
def plotTemplatevsenzConcs(self, sets):
        import matplotlib
        import matplotlib.pyplot as plt
        setfiles=[]
        for s in sets:
            setfiles.append('set'+s+'.defs')
        enzconcs={}
        templconcs = {}
        pathindex = {}
        for s in setfiles:
            self.parseDefs(s)
            try:
                enz,templ=self.readEnzymeConcs()
                templconcs.update(templ)
            except:
                enz = self.enzymeConcsfromTemplate()
            pathindex[self.setname] = self.path
            for k in enz:
                if not k in enzconcs.keys():
                    enzconcs[k] = enz[k]
                else:
                    pass
        if enzconcs !=None:
            print 'plotting enzyme concs. ours vs template'
            fig1=plt.figure()
            ax=fig1.add_subplot(111)
            xd=[]; yd=[]
            for n in enzconcs:
                if enzconcs[n]<20 and enzconcs[n]>0:
                    xd.append(templconcs[n])
                    yd.append(enzconcs[n])
            ax.plot(xd, yd, 'x')
            ax.plot(xd, xd, '-')
            ax.set_title('enzyme concentrations from AST: PEAT vs template')
            ax.set_ylabel('PEAT')
            ax.set_xlabel('template')
            ax.grid(True)
            fig1.savefig('enzymecvstemplate.png')
        return
def plotTemplatevsenzConcs ( self , sets ) : import matplotlib import matplotlib . pyplot as plt setfiles = [ ] for s in sets : setfiles . append ( 'set' + s + '.defs' ) enzconcs = { } templconcs = { } pathindex = { } for s in setfiles : self . parseDefs ( s ) try : enz , templ = self . readEnzymeConcs ( ) templconcs . update ( templ ) except : enz = self . enzymeConcsfromTemplate ( ) pathindex [ self . setname ] = self . path for k in enz : if not k in enzconcs . keys ( ) : enzconcs [ k ] = enz [ k ] else : pass if enzconcs != None : print 'plotting enzyme concs. ours vs template' fig1 = plt . figure ( ) ax = fig1 . add_subplot ( 111 ) xd = [ ] ; yd = [ ] for n in enzconcs : if enzconcs [ n ] < 20 and enzconcs [ n ] > 0 : xd . append ( templconcs [ n ] ) yd . append ( enzconcs [ n ] ) ax . plot ( xd , yd , 'x' ) ax . plot ( xd , xd , '-' ) ax . set_title ( 'enzyme concentrations from AST: PEAT vs template' ) ax . set_ylabel ( 'PEAT' ) ax . set_xlabel ( 'template' ) ax . grid ( True ) fig1 . savefig ( 'enzymecvstemplate.png' ) return
Compare our enzyme concs vs template, testing purposes only
Compare our enzyme concs vs template testing purposes only
"""Compare our enzyme concs vs template, testing purposes only"""
self
sets