Exemplo n.º 1
0
    def showAnalysis(self):
        """Analysis of current pKas"""
        from PEATDB.Ekin.Titration import TitrationAnalyser
        self.showHeader(menu=1)
        DB = self.DB = self.connect()
        t = TitrationAnalyser()

        print '<div class="main">'
        print '<p>Selected plots below reflect some of the analysis shown in the \
               <a href="%s/paper_2010.pdf"> original paper</a> updated for the current dataset. </p>' %self.bindir
        print '<a>The distributions shown are of the change in chemical shift over all\
                detected titrations. `Reliable` pKas are those associated with\
                the largest chemical shift changes in a titration curve and that meets the criteria defined in\
                the paper. We define primary pKa values simply as the subset of the reliable pKa values \
                that originate from titration curves with with only one titration.</a>'
        sys.stdout.flush()

        colnames = ['1H NMR','15N NMR','13C NMR']

        for col in colnames:
            p = t.extractpKas(DB,col,silent=True,minspan=0.06)
            print '<div>'
            print "<h2>%s: Distribution of &Delta;&delta; for fitted pKa values</h2>" %col
            img1 = t.analysepKas(p, silent=True, prefix=col, path=self.imagepath)
            #t.makepKasTable(p)
            print '<img src="%s/%s" align=center width=800 class="plot">' %(self.plotsdir, img1)
            print '</div>'
            sys.stdout.flush()

        #compare nuclei
        img2, img3 = t.compareNuclei(DB, '15N NMR', '1H NMR', titratable=False, silent=True, path=self.imagepath)
        print '<p>Below is an analysis of the correspondence between fitted pKas for 1H and 15N \
                where they are available for the same residue in the same protein. This is the same\
                plot as figure 4 in the original paper updated for the current dataset.\
                The plots are divided into reliable and other pKas for comparison.</p>'
        print '<div>'
        print '<center><img src="%s/%s" align=center width=600 class="plot"></center>' %(self.plotsdir, img2)
        print '</div>'
        print '<p>The same plot as above broken down by residue type and shown only for titratable\
                residues.</p>'
        print '<div>'
        print '<center><img src="%s/%s" align=center width=600 class="plot"></center>' %(self.plotsdir, img3)
        print '</div>'

        self.footer()
        return
Exemplo n.º 2
0
from PEATDB.Ekin.Titration import TitrationAnalyser
from PEATDB.Base import PDatabase
from PEATDB.Ekin.Base import EkinProject
from PEATDB.DictEdit import DictEditor
import os
import pickle

cols =  ['15N NMR', '1H NMR']
nuclnames = {'1H NMR':'H','15N NMR':'N'}
complete = ['HEWL', 'Bovine Beta-Lactoglobulin',
                'Plastocyanin (Anabaena variabilis)',
                'Plastocyanin (Phormidium)',
                'Glutaredoxin', 'CexCD (Apo)',
                'Protein G B1','Xylanase (Bacillus subtilus)']

col=cols[0]
nucl = nuclnames[col]
t = TitrationAnalyser()

#ghost mapping..
DB = PDatabase(server='peat.ucd.ie', username='******',
               password='******', project='titration_db',
               port=8080)
p=t.extractpKas(DB, col, names=['HEWL'], titratable=False, reliable=False, minspan=0.06)
t.mappKas(DB,col,p,names=['HEWL'],
          nucleus=nucl,calculatespans=False)       




Exemplo n.º 3
0
from PEATDB.Ekin.Base import EkinProject
from PEATDB.DictEdit import DictEditor
import os
import pickle

cols = ['15N NMR', '1H NMR']
nuclnames = {'1H NMR': 'H', '15N NMR': 'N'}
complete = [
    'HEWL', 'Bovine Beta-Lactoglobulin', 'Plastocyanin (Anabaena variabilis)',
    'Plastocyanin (Phormidium)', 'Glutaredoxin', 'CexCD (Apo)', 'Protein G B1',
    'Xylanase (Bacillus subtilus)'
]

col = cols[0]
nucl = nuclnames[col]
t = TitrationAnalyser()

#ghost mapping..
DB = PDatabase(server='peat.ucd.ie',
               username='******',
               password='******',
               project='titration_db',
               port=8080)
p = t.extractpKas(DB,
                  col,
                  names=['HEWL'],
                  titratable=False,
                  reliable=False,
                  minspan=0.06)
t.mappKas(DB, col, p, names=['HEWL'], nucleus=nucl, calculatespans=False)