PEATDB/web.py
def show_specific(self):
        """Show datasets for an individual cell, depends on fieldtype"""

        protein = self.form.getfirst('protein')
        rectype = self.form.getfirst('rectype')
        col = self.form.getfirst('column')
        sys.stdout.flush()

        DB = self.DB = self.connect()
        ptmodel = PEATTableModel(DB)
        ekincols = ptmodel.ekintypes
        fieldtype = DB['userfields'][col]['field_type']
        protname = DB[protein]['name']

        self.showHeader(title=str(protname+': '+col), menu=1)
        print '<div><a>Protein: %s </a><br>' %protname
        print 'Column data: %s </div>' %col
        from PEATDB.Ekin.Web import EkinWeb

        if fieldtype in ekincols:
            fieldtype = 'ekindata'
        #plot ekin data curves, if fieldtype is ekindata
        if fieldtype == 'ekindata':
            E = DB[protein][col]
            EW = EkinWeb()
            EW.showEkinPlots(project=E, datasets='ALL', path=self.plotsdir,
                             imgpath=self.imagepath)
            print '</table>'
        #save the pdb structure to a file and provide url link to it
        elif fieldtype == 'structure':
            recdata = DB[protein][col]
            for k in recdata:
                print '<br><a> %s</a>' %str(k)
        elif fieldtype == 'Notes':
            recdata = DB[protein][col]
            print '<br><a> %s</a>' %recdata['text']
        elif fieldtype == 'File':
            recdata = DB[protein][col]
            print '<p> This record contains a data file. Click link to open.'
            print '<a href="http://peat.ucd.ie/titration_db/%s">Open link</a>' %recdata['location']
        else:
            print '<br>Sorry, no handler for this data right now..</br>'
        self.footer()
        return
Show datasets for an individual cell, depends on fieldtype
Show datasets for an individual cell, depends on fieldtype
Show datasets for an individual cell depends on fieldtype
def show_specific(self):
        protein = self.form.getfirst('protein')
        rectype = self.form.getfirst('rectype')
        col = self.form.getfirst('column')
        sys.stdout.flush()
        DB = self.DB = self.connect()
        ptmodel = PEATTableModel(DB)
        ekincols = ptmodel.ekintypes
        fieldtype = DB['userfields'][col]['field_type']
        protname = DB[protein]['name']
        self.showHeader(title=str(protname+': '+col), menu=1)
        print '<div><a>Protein: %s </a><br>' %protname
        print 'Column data: %s </div>' %col
        from PEATDB.Ekin.Web import EkinWeb
        if fieldtype in ekincols:
            fieldtype = 'ekindata'
        if fieldtype == 'ekindata':
            E = DB[protein][col]
            EW = EkinWeb()
            EW.showEkinPlots(project=E, datasets='ALL', path=self.plotsdir,
                             imgpath=self.imagepath)
            print '</table>'
        elif fieldtype == 'structure':
            recdata = DB[protein][col]
            for k in recdata:
                print '<br><a> %s</a>' %str(k)
        elif fieldtype == 'Notes':
            recdata = DB[protein][col]
            print '<br><a> %s</a>' %recdata['text']
        elif fieldtype == 'File':
            recdata = DB[protein][col]
            print '<p> This record contains a data file. Click link to open.'
            print '<a href="http://peat.ucd.ie/titration_db/%s">Open link</a>' %recdata['location']
        else:
            print '<br>Sorry, no handler for this data right now..</br>'
        self.footer()
        return
def show_specific ( self ) : protein = self . form . getfirst ( 'protein' ) rectype = self . form . getfirst ( 'rectype' ) col = self . form . getfirst ( 'column' ) sys . stdout . flush ( ) DB = self . DB = self . connect ( ) ptmodel = PEATTableModel ( DB ) ekincols = ptmodel . ekintypes fieldtype = DB [ 'userfields' ] [ col ] [ 'field_type' ] protname = DB [ protein ] [ 'name' ] self . showHeader ( title = str ( protname + ': ' + col ) , menu = 1 ) print '<div><a>Protein: %s </a><br>' % protname print 'Column data: %s </div>' % col from PEATDB . Ekin . Web import EkinWeb if fieldtype in ekincols : fieldtype = 'ekindata' if fieldtype == 'ekindata' : E = DB [ protein ] [ col ] EW = EkinWeb ( ) EW . showEkinPlots ( project = E , datasets = 'ALL' , path = self . plotsdir , imgpath = self . imagepath ) print '</table>' elif fieldtype == 'structure' : recdata = DB [ protein ] [ col ] for k in recdata : print '<br><a> %s</a>' % str ( k ) elif fieldtype == 'Notes' : recdata = DB [ protein ] [ col ] print '<br><a> %s</a>' % recdata [ 'text' ] elif fieldtype == 'File' : recdata = DB [ protein ] [ col ] print '<p> This record contains a data file. Click link to open.' print '<a href="http://peat.ucd.ie/titration_db/%s">Open link</a>' % recdata [ 'location' ] else : print '<br>Sorry, no handler for this data right now..</br>' self . footer ( ) return
Show datasets for an individual cell, depends on fieldtype
Show datasets for an individual cell depends on fieldtype
"""Show datasets for an individual cell, depends on fieldtype""" #plot ekin data curves, if fieldtype is ekindata #save the pdb structure to a file and provide url link to it
self