PEATDB/scripts/titDB_Stats.py
def analyseHill(ekindicts):
    """make hist of n coefficents for hill fits"""

    import pylab
    pylab.rc('text', usetex=True)
    f=pylab.figure()
    f.suptitle('n distributions- No linear (case 3)')
    i=1
    for e in ekindicts:
        ekindata = ekindicts[e]
        proteins = ekindata.keys()
        nvals = []
        for prot in proteins:
            edata = ekindata[prot]
            E = EkinProject(data=edata)
            for d in E.datasets:
                fdata = E.getMetaData(d)
                if fdata != None and fdata.has_key('model'):
                    if fdata['model'] == 'Modified Hill':
                        n=fdata['n']
                        if n<5 and n>-5:
                            nvals.append(n)
                            print 'n=', n

        ax = f.add_subplot(2,2,i)
        n, b, patches = pylab.hist(nvals, 30, histtype='bar', alpha=0.8)
        std = round(numpy.std(nvals), 2)
        ave = round(numpy.mean(nvals), 2)
        ax.set_title(e +' mean= '+str(ave)+r' $\sigma$= '+str(std))
        i+=1
    f.subplots_adjust(hspace=0.4)
    f.savefig('n_hist.png')
    return
make hist of n coefficents for hill fits
make hist of n coefficents for hill fits
make hist of n coefficents for hill fits
def analyseHill(ekindicts):
    import pylab
    pylab.rc('text', usetex=True)
    f=pylab.figure()
    f.suptitle('n distributions- No linear (case 3)')
    i=1
    for e in ekindicts:
        ekindata = ekindicts[e]
        proteins = ekindata.keys()
        nvals = []
        for prot in proteins:
            edata = ekindata[prot]
            E = EkinProject(data=edata)
            for d in E.datasets:
                fdata = E.getMetaData(d)
                if fdata != None and fdata.has_key('model'):
                    if fdata['model'] == 'Modified Hill':
                        n=fdata['n']
                        if n<5 and n>-5:
                            nvals.append(n)
                            print 'n=', n
        ax = f.add_subplot(2,2,i)
        n, b, patches = pylab.hist(nvals, 30, histtype='bar', alpha=0.8)
        std = round(numpy.std(nvals), 2)
        ave = round(numpy.mean(nvals), 2)
        ax.set_title(e +' mean= '+str(ave)+r' $\sigma$= '+str(std))
        i+=1
    f.subplots_adjust(hspace=0.4)
    f.savefig('n_hist.png')
    return
def analyseHill ( ekindicts ) : import pylab pylab . rc ( 'text' , usetex = True ) f = pylab . figure ( ) f . suptitle ( 'n distributions- No linear (case 3)' ) i = 1 for e in ekindicts : ekindata = ekindicts [ e ] proteins = ekindata . keys ( ) nvals = [ ] for prot in proteins : edata = ekindata [ prot ] E = EkinProject ( data = edata ) for d in E . datasets : fdata = E . getMetaData ( d ) if fdata != None and fdata . has_key ( 'model' ) : if fdata [ 'model' ] == 'Modified Hill' : n = fdata [ 'n' ] if n < 5 and n > - 5 : nvals . append ( n ) print 'n=' , n ax = f . add_subplot ( 2 , 2 , i ) n , b , patches = pylab . hist ( nvals , 30 , histtype = 'bar' , alpha = 0.8 ) std = round ( numpy . std ( nvals ) , 2 ) ave = round ( numpy . mean ( nvals ) , 2 ) ax . set_title ( e + ' mean= ' + str ( ave ) + r' $\sigma$= ' + str ( std ) ) i += 1 f . subplots_adjust ( hspace = 0.4 ) f . savefig ( 'n_hist.png' ) return
make hist of n coefficents for hill fits
make hist of n coefficents for hill fits
"""make hist of n coefficents for hill fits"""
ekindicts