Package CHEM :: Package Web :: Package cgibin :: Module ChemicalSearchWeb :: Class ChemicalSearchWeb
[hide private]
[frames] | no frames]

Class ChemicalSearchWeb



BaseWeb.BaseWeb --+
                  |
                 ChemicalSearchWeb

Instance Methods [hide private]
 
__init__(self)
Constructor.
 
action_default(self)
Search for chemicals based on various criteria and report them, up to some maxPerPage limit.
 
action_prevPage(self)
Change parameters for the previous maxPerPage items before next search
 
action_nextPage(self)
Change parameters for the next maxPerPage items before next search
 
prepareDBResults(self, dbResults)
Before outputting the DB results, modify the contents slightly for useful web output.
 
buildPropertyHtml(self, chemical, resultIndex)
Build an HTML table to display the primary properties of the chemical.
 
buildHiddenSmilesFieldsHtml(self, dbResults)
Look for the can_smiles column in the dbResults and build hidden fields for the SMILES strings.
 
buildHistogramHtml(self, histogram, resultsStart, resultsEnd)
Given a list of integer counts, build the HTML to present this as a nice chart.
 
logSearch(self)
Record all of the HTTP request parameters to track what searches are run
 
updateSearchLog(self, search_log_id, timer)
Assuming the search completed successfully, record the completion time
 
__canonizeSmilesList(self, valueList)
Given a list of SMILES strings to search for, make sure they're all in some standard, canonical form for consistent searching

Inherited from BaseWeb.BaseWeb: action_uploadFiles, addHandler, clearHandlers, errorResponse, getTemplateFilename, handleRequest, maintainParams, optionTagsFromField, optionTagsFromList, printTemplate, replaceWhitespace, response, setTemplateFilename

Static Methods [hide private]

Inherited from BaseWeb.BaseWeb: javascriptString, quoteFilepath, quoteSmiles, unquoteSmiles

Class Variables [hide private]

Inherited from BaseWeb.BaseWeb: FILE_FIELD_SUFFIX, OPTIONS_FIELD_SUFFIX, OPTION_TAG, SELECT_FIELD_SUFFIX, TEMPLATE_SUFFIX, UPLOAD_FILE_CMD, disableResponse, mForm, mHandlers, mTemplateDict, mTemplateFilename, req, requestData

Method Details [hide private]

__init__(self)
(Constructor)

 
Constructor. Just some initializations such as addition of default mTemplateDict values and command handlers (e.g. File uploads). Be sure the subclasses call this method in their own __init__!
Overrides: BaseWeb.BaseWeb.__init__
(inherited documentation)

prepareDBResults(self, dbResults)

 

Before outputting the DB results, modify the contents slightly for useful web output. For example, generate links to chemical detail pages for each item, add a thumbnail depiction image and format the similarity score number.

Also adds a column header row and returns that list of columns to output.

buildPropertyHtml(self, chemical, resultIndex)

 
Build an HTML table to display the primary properties of the chemical. Which particular attributes / columns to be displayed will be based on the selections in the form's chemicalDiscreteColSelect and chemicalRangeColXSelect values.