PEATDB/Ekin/Titration.py
def compareAllpKas(cls, E1, E2, titratable=False, exclude=None, errcutoff=1e2):
        """Compare all pKas from 2 ekin projects"""

        relpkas1=[]; relpkas2=[]
        relspans1=[]; relspans2=[]
        otherpkas1=[]; otherpkas2=[]
        errs1=[]
        errs2=[]
        names=[]
        residues=[]

        for d in E1.datasets:
            if exclude!=None and d in exclude: continue
            if not d in E2.datasets: continue
            X = cls.comparepKas(E1, E2, d, titratable, errcutoff)
            if X == None:
                continue
            p1val, p2val, sp1, sp2, err1, err2, rel = X
            if rel == True:
                relpkas1.append(p1val)
                relpkas2.append(p2val)
                relspans1.append(sp1)
                relspans2.append(sp2)
                errs1.append(err1)
                errs2.append(err2)
                names.append(d)
                res = E1.getMetaData(d)['residue']
                residues.append(res)
            else:
                otherpkas1.append(p1val)
                otherpkas2.append(p2val)
        #print names,residues
        #print 'reliable pkas matched:', len(relpkas1)
        #print 'others:', len(otherpkas1)
        return relpkas1, relpkas2, otherpkas1, otherpkas2, relspans1, relspans2, errs1, errs2, residues
Compare all pKas from 2 ekin projects
Compare all pKas from 2 ekin projects
Compare all pKas from 2 ekin projects
def compareAllpKas(cls, E1, E2, titratable=False, exclude=None, errcutoff=1e2):
        relpkas1=[]; relpkas2=[]
        relspans1=[]; relspans2=[]
        otherpkas1=[]; otherpkas2=[]
        errs1=[]
        errs2=[]
        names=[]
        residues=[]
        for d in E1.datasets:
            if exclude!=None and d in exclude: continue
            if not d in E2.datasets: continue
            X = cls.comparepKas(E1, E2, d, titratable, errcutoff)
            if X == None:
                continue
            p1val, p2val, sp1, sp2, err1, err2, rel = X
            if rel == True:
                relpkas1.append(p1val)
                relpkas2.append(p2val)
                relspans1.append(sp1)
                relspans2.append(sp2)
                errs1.append(err1)
                errs2.append(err2)
                names.append(d)
                res = E1.getMetaData(d)['residue']
                residues.append(res)
            else:
                otherpkas1.append(p1val)
                otherpkas2.append(p2val)
        return relpkas1, relpkas2, otherpkas1, otherpkas2, relspans1, relspans2, errs1, errs2, residues
def compareAllpKas ( cls , E1 , E2 , titratable = False , exclude = None , errcutoff = 1e2 ) : relpkas1 = [ ] ; relpkas2 = [ ] relspans1 = [ ] ; relspans2 = [ ] otherpkas1 = [ ] ; otherpkas2 = [ ] errs1 = [ ] errs2 = [ ] names = [ ] residues = [ ] for d in E1 . datasets : if exclude != None and d in exclude : continue if not d in E2 . datasets : continue X = cls . comparepKas ( E1 , E2 , d , titratable , errcutoff ) if X == None : continue p1val , p2val , sp1 , sp2 , err1 , err2 , rel = X if rel == True : relpkas1 . append ( p1val ) relpkas2 . append ( p2val ) relspans1 . append ( sp1 ) relspans2 . append ( sp2 ) errs1 . append ( err1 ) errs2 . append ( err2 ) names . append ( d ) res = E1 . getMetaData ( d ) [ 'residue' ] residues . append ( res ) else : otherpkas1 . append ( p1val ) otherpkas2 . append ( p2val ) return relpkas1 , relpkas2 , otherpkas1 , otherpkas2 , relspans1 , relspans2 , errs1 , errs2 , residues
Compare all pKas from 2 ekin projects
Compare all pKas from 2 ekin projects
"""Compare all pKas from 2 ekin projects""" #print names,residues #print 'reliable pkas matched:', len(relpkas1) #print 'others:', len(otherpkas1)
cls
E1
E2
titratable
exclude
errcutoff