hexsha
stringlengths
40
40
repo
stringlengths
7
114
path
stringlengths
4
124
license
listlengths
1
9
language
stringclasses
1 value
identifier
stringlengths
1
71
return_type
stringlengths
1
749
⌀
original_string
stringlengths
76
22.7k
original_docstring
stringlengths
16
7.61k
docstring
stringlengths
16
2.47k
docstring_tokens
listlengths
6
477
code
stringlengths
14
10.2k
code_tokens
listlengths
6
996
short_docstring
stringlengths
2
644
short_docstring_tokens
listlengths
1
116
comment
listlengths
1
89
parameters
listlengths
0
64
docstring_params
dict
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
jobsInState
<not_specific>
def jobsInState(self, state): '''Returns any job which is in state Valid states: UnderConstruction Ready Launched Running Finished''' #Refresh connection self.connection.commit() selectQuery = """SELECT JobID, State FROM %s""" % (self.jobTable) self.cursor.execute(selectQuery) rows...
Returns any job which is in state Valid states: UnderConstruction Ready Launched Running Finished
Returns any job which is in state Valid states: UnderConstruction Ready Launched Running Finished
[ "Returns", "any", "job", "which", "is", "in", "state", "Valid", "states", ":", "UnderConstruction", "Ready", "Launched", "Running", "Finished" ]
def jobsInState(self, state): self.connection.commit() selectQuery = """SELECT JobID, State FROM %s""" % (self.jobTable) self.cursor.execute(selectQuery) rows = self.cursor.fetchall() ids = [] for row in rows: if state in row: ids.append(row[0]) return ids
[ "def", "jobsInState", "(", "self", ",", "state", ")", ":", "self", ".", "connection", ".", "commit", "(", ")", "selectQuery", "=", "\"\"\"SELECT JobID, State FROM %s\"\"\"", "%", "(", "self", ".", "jobTable", ")", "self", ".", "cursor", ".", "execute", "(", ...
Returns any job which is in state Valid states: UnderConstruction Ready Launched Running Finished
[ "Returns", "any", "job", "which", "is", "in", "state", "Valid", "states", ":", "UnderConstruction", "Ready", "Launched", "Running", "Finished" ]
[ "'''Returns any job which is in state\n\t\t\n\t\tValid states:\n\t\t\tUnderConstruction\n\t\t\tReady\n\t\t\tLaunched\n\t\t\tRunning\n\t\t\tFinished'''", "#Refresh connection" ]
[ { "param": "self", "type": null }, { "param": "state", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "state", "type": null, "docstring": null, "docstring_tokens": ...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
logJobStates
null
def logJobStates(self, file): '''Writes the state of all jobs to file as a pickled dictionary. This method is thread-safe. As a result it will block if another thread is already executing this method''' self.threadLock.acquire() stateDict = self.jobStates() stream = open(file, 'w+') pickler = pickl...
Writes the state of all jobs to file as a pickled dictionary. This method is thread-safe. As a result it will block if another thread is already executing this method
Writes the state of all jobs to file as a pickled dictionary. This method is thread-safe. As a result it will block if another thread is already executing this method
[ "Writes", "the", "state", "of", "all", "jobs", "to", "file", "as", "a", "pickled", "dictionary", ".", "This", "method", "is", "thread", "-", "safe", ".", "As", "a", "result", "it", "will", "block", "if", "another", "thread", "is", "already", "executing",...
def logJobStates(self, file): self.threadLock.acquire() stateDict = self.jobStates() stream = open(file, 'w+') pickler = pickle.Pickler(stream) pickler.dump(stateDict) stream.flush() stream.close() self.threadLock.release()
[ "def", "logJobStates", "(", "self", ",", "file", ")", ":", "self", ".", "threadLock", ".", "acquire", "(", ")", "stateDict", "=", "self", ".", "jobStates", "(", ")", "stream", "=", "open", "(", "file", ",", "'w+'", ")", "pickler", "=", "pickle", ".",...
Writes the state of all jobs to file as a pickled dictionary.
[ "Writes", "the", "state", "of", "all", "jobs", "to", "file", "as", "a", "pickled", "dictionary", "." ]
[ "'''Writes the state of all jobs to file as a pickled dictionary.\n\t\t\n\t\tThis method is thread-safe. As a result it will block if another thread\n\t\tis already executing this method'''" ]
[ { "param": "self", "type": null }, { "param": "file", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "file", "type": null, "docstring": null, "docstring_tokens": [...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
isLogging
<not_specific>
def isLogging(self): '''Returns True if automatic logging is turned on''' return self.logging
Returns True if automatic logging is turned on
Returns True if automatic logging is turned on
[ "Returns", "True", "if", "automatic", "logging", "is", "turned", "on" ]
def isLogging(self): return self.logging
[ "def", "isLogging", "(", "self", ")", ":", "return", "self", ".", "logging" ]
Returns True if automatic logging is turned on
[ "Returns", "True", "if", "automatic", "logging", "is", "turned", "on" ]
[ "'''Returns True if automatic logging is turned on'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
email
<not_specific>
def email(self): '''Returns the email related to the job (if any)''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT Email FROM %s WHERE JobID='%s'""" % (self.jobTable, sel...
Returns the email related to the job (if any)
Returns the email related to the job (if any)
[ "Returns", "the", "email", "related", "to", "the", "job", "(", "if", "any", ")" ]
def email(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT Email FROM %s WHERE JobID='%s'""" % (self.jobTable, self.identification) self.cursor.execute(selectQuery) rows ...
[ "def", "email", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connection", "....
Returns the email related to the job (if any)
[ "Returns", "the", "email", "related", "to", "the", "job", "(", "if", "any", ")" ]
[ "'''Returns the email related to the job (if any)'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
error
<not_specific>
def error(self): '''If there was an error during the job returns a dictionary detailing the error, otherwise returns None The dictionary has two keys: ErrorDescription - A short description of the type of error DetailedDescription - A longer description of what went wrong''' if self.exists(): self...
If there was an error during the job returns a dictionary detailing the error, otherwise returns None The dictionary has two keys: ErrorDescription - A short description of the type of error DetailedDescription - A longer description of what went wrong
If there was an error during the job returns a dictionary detailing the error, otherwise returns None The dictionary has two keys: ErrorDescription - A short description of the type of error DetailedDescription - A longer description of what went wrong
[ "If", "there", "was", "an", "error", "during", "the", "job", "returns", "a", "dictionary", "detailing", "the", "error", "otherwise", "returns", "None", "The", "dictionary", "has", "two", "keys", ":", "ErrorDescription", "-", "A", "short", "description", "of", ...
def error(self): if self.exists(): self.connection.commit() statement = """SELECT Error, ErrorDescription, DetailedDescription FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification) self.cursor.execute(statement) rows = self.cursor.fetchall() if bool(rows[0][0]) == False: return None ...
[ "def", "error", "(", "self", ")", ":", "if", "self", ".", "exists", "(", ")", ":", "self", ".", "connection", ".", "commit", "(", ")", "statement", "=", "\"\"\"SELECT Error, ErrorDescription, DetailedDescription FROM %s WHERE JobID='%s' \"\"\"", "%", "(", "self", ...
If there was an error during the job returns a dictionary detailing the error, otherwise returns None The dictionary has two keys: ErrorDescription - A short description of the type of error DetailedDescription - A longer description of what went wrong
[ "If", "there", "was", "an", "error", "during", "the", "job", "returns", "a", "dictionary", "detailing", "the", "error", "otherwise", "returns", "None", "The", "dictionary", "has", "two", "keys", ":", "ErrorDescription", "-", "A", "short", "description", "of", ...
[ "'''If there was an error during the job returns a dictionary detailing the error, otherwise returns None\n\t\t\n\t\tThe dictionary has two keys:\n\t\t\tErrorDescription - A short description of the type of error\n\t\t\tDetailedDescription - A longer description of what went wrong'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
exists
<not_specific>
def exists(self): '''Returns True if data corresponding to the receiver exists in the database''' retval = True #Check the job entry exists in the database try: self.connection.commit() except Exception, data: print 'Caught exception', Exception, 'when attempting db commit' print 'Reason:', ...
Returns True if data corresponding to the receiver exists in the database
Returns True if data corresponding to the receiver exists in the database
[ "Returns", "True", "if", "data", "corresponding", "to", "the", "receiver", "exists", "in", "the", "database" ]
def exists(self): retval = True try: self.connection.commit() except Exception, data: print 'Caught exception', Exception, 'when attempting db commit' print 'Reason:', data print 'Attempting reconnect' self.connection.ping() query = "SELECT * FROM %s WHERE JobID = '%s'" % (self.jobTable, self.ide...
[ "def", "exists", "(", "self", ")", ":", "retval", "=", "True", "try", ":", "self", ".", "connection", ".", "commit", "(", ")", "except", "Exception", ",", "data", ":", "print", "'Caught exception'", ",", "Exception", ",", "'when attempting db commit'", "prin...
Returns True if data corresponding to the receiver exists in the database
[ "Returns", "True", "if", "data", "corresponding", "to", "the", "receiver", "exists", "in", "the", "database" ]
[ "'''Returns True if data corresponding to the receiver exists in the database'''", "#Check the job entry exists in the database" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
optionArguments
<not_specific>
def optionArguments(self): '''Returns the option arguments dictionary associated with the job. This dictionaries keys are command line option switches and values are the corresponding values. Note: This are NON file arguments i.e. they must not refer to a specific file or location. If no option argume...
Returns the option arguments dictionary associated with the job. This dictionaries keys are command line option switches and values are the corresponding values. Note: This are NON file arguments i.e. they must not refer to a specific file or location. If no option arguments were associated with the job t...
Returns the option arguments dictionary associated with the job. This dictionaries keys are command line option switches and values are the corresponding values. Note: This are NON file arguments i.e. they must not refer to a specific file or location. If no option arguments were associated with the job this method re...
[ "Returns", "the", "option", "arguments", "dictionary", "associated", "with", "the", "job", ".", "This", "dictionaries", "keys", "are", "command", "line", "option", "switches", "and", "values", "are", "the", "corresponding", "values", ".", "Note", ":", "This", ...
def optionArguments(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT OptionArguments FROM %s WHERE JobID='%s'""" % (self.jobTable, self.identification) self.cursor.execute(se...
[ "def", "optionArguments", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connect...
Returns the option arguments dictionary associated with the job.
[ "Returns", "the", "option", "arguments", "dictionary", "associated", "with", "the", "job", "." ]
[ "'''Returns the option arguments dictionary associated with the job.\n\t\t\n\t\tThis dictionaries keys are command line option switches and values are the corresponding values.\n\t\tNote: This are NON file arguments i.e. they must not refer to a specific file or location.\t\t\n\t\t\n\t\tIf no option arguments were ...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
fileArguments
<not_specific>
def fileArguments(self): '''Returns the file arguments dictionary associated with the job. This returns a dictionary whose keys are command line arguments that refer to files. The values of each key is another dictionary with two keys - contentsAttribute - fileName contentsAttribute is the name of a...
Returns the file arguments dictionary associated with the job. This returns a dictionary whose keys are command line arguments that refer to files. The values of each key is another dictionary with two keys - contentsAttribute - fileName contentsAttribute is the name of a method of this class (or a subc...
Returns the file arguments dictionary associated with the job. This returns a dictionary whose keys are command line arguments that refer to files. The values of each key is another dictionary with two keys contentsAttribute fileName contentsAttribute is the name of a method of this class (or a subclass) which returns...
[ "Returns", "the", "file", "arguments", "dictionary", "associated", "with", "the", "job", ".", "This", "returns", "a", "dictionary", "whose", "keys", "are", "command", "line", "arguments", "that", "refer", "to", "files", ".", "The", "values", "of", "each", "k...
def fileArguments(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT FileArguments FROM %s WHERE JobID='%s'""" % (self.jobTable, self.identification) self.cursor.execute(select...
[ "def", "fileArguments", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connectio...
Returns the file arguments dictionary associated with the job.
[ "Returns", "the", "file", "arguments", "dictionary", "associated", "with", "the", "job", "." ]
[ "'''Returns the file arguments dictionary associated with the job.\n\t\t\n\t\tThis returns a dictionary whose keys are command line arguments that refer to files.\n\t\tThe values of each key is another dictionary with two keys\n\t\t- contentsAttribute\n\t\t- fileName\n\t\t\n\t\tcontentsAttribute is the name of a me...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
metadata
<not_specific>
def metadata(self): '''Returns the metadata associated with the job. If no metadata was associated with the job this method returns None''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() sel...
Returns the metadata associated with the job. If no metadata was associated with the job this method returns None
Returns the metadata associated with the job. If no metadata was associated with the job this method returns None
[ "Returns", "the", "metadata", "associated", "with", "the", "job", ".", "If", "no", "metadata", "was", "associated", "with", "the", "job", "this", "method", "returns", "None" ]
def metadata(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT Metadata FROM %s WHERE JobID='%s'""" % (self.jobTable, self.identification) self.cursor.execute(selectQuery) ...
[ "def", "metadata", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connection", ...
Returns the metadata associated with the job.
[ "Returns", "the", "metadata", "associated", "with", "the", "job", "." ]
[ "'''Returns the metadata associated with the job.\n\t\t\n\t\tIf no metadata was associated with the job this method returns None'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
isEmailSent
<not_specific>
def isEmailSent(self): '''Returns True if an email has been sent in relation to this job already''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT SentMail FROM %s WHERE J...
Returns True if an email has been sent in relation to this job already
Returns True if an email has been sent in relation to this job already
[ "Returns", "True", "if", "an", "email", "has", "been", "sent", "in", "relation", "to", "this", "job", "already" ]
def isEmailSent(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT SentMail FROM %s WHERE JobID='%s'""" % (self.jobTable, self.identification) self.cursor.execute(selectQuery) ...
[ "def", "isEmailSent", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connection"...
Returns True if an email has been sent in relation to this job already
[ "Returns", "True", "if", "an", "email", "has", "been", "sent", "in", "relation", "to", "this", "job", "already" ]
[ "'''Returns True if an email has been sent in relation to this job already'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
state
<not_specific>
def state(self): '''Returns the jobs state See setState() for more information. Use calculationState() to get more detailed information on the status of the component calculations''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.id...
Returns the jobs state See setState() for more information. Use calculationState() to get more detailed information on the status of the component calculations
Returns the jobs state See setState() for more information. Use calculationState() to get more detailed information on the status of the component calculations
[ "Returns", "the", "jobs", "state", "See", "setState", "()", "for", "more", "information", ".", "Use", "calculationState", "()", "to", "get", "more", "detailed", "information", "on", "the", "status", "of", "the", "component", "calculations" ]
def state(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT State FROM %s WHERE JobID='%s'""" % (self.jobTable, self.identification) self.cursor.execute(selectQuery) rows ...
[ "def", "state", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connection", "....
Returns the jobs state See setState() for more information.
[ "Returns", "the", "jobs", "state", "See", "setState", "()", "for", "more", "information", "." ]
[ "'''Returns the jobs state\n\t\t\n\t\tSee setState() for more information.\n\t\tUse calculationState() to get more detailed information\n\t\ton the status of the component calculations'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
queueStatusMessage
<not_specific>
def queueStatusMessage(self): '''Returns the jobs queue status message (a string) The message has no predefined format. It is used to provide some informative details about the current position of a job in a queue to users''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s d...
Returns the jobs queue status message (a string) The message has no predefined format. It is used to provide some informative details about the current position of a job in a queue to users
Returns the jobs queue status message (a string) The message has no predefined format. It is used to provide some informative details about the current position of a job in a queue to users
[ "Returns", "the", "jobs", "queue", "status", "message", "(", "a", "string", ")", "The", "message", "has", "no", "predefined", "format", ".", "It", "is", "used", "to", "provide", "some", "informative", "details", "about", "the", "current", "position", "of", ...
def queueStatusMessage(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() selectQuery = """SELECT QueueStatusMessage FROM %s WHERE JobID='%s'""" % (self.jobTable, self.identification) self.cursor.exec...
[ "def", "queueStatusMessage", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "conn...
Returns the jobs queue status message (a string) The message has no predefined format.
[ "Returns", "the", "jobs", "queue", "status", "message", "(", "a", "string", ")", "The", "message", "has", "no", "predefined", "format", "." ]
[ "'''Returns the jobs queue status message (a string)\n\t\t\n\t\tThe message has no predefined format. It is used to provide some informative\n\t\tdetails about the current position of a job in a queue to users'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
addDataSet
null
def addDataSet(self, dataSet): '''Adds all the matrices in dataSet to the receiver Params: dataSet: A Core.Data.DataSet instance''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification for name in dataSet.matrixNames(): ...
Adds all the matrices in dataSet to the receiver Params: dataSet: A Core.Data.DataSet instance
Adds all the matrices in dataSet to the receiver
[ "Adds", "all", "the", "matrices", "in", "dataSet", "to", "the", "receiver" ]
def addDataSet(self, dataSet): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification for name in dataSet.matrixNames(): self.data.addMatrix(dataSet.__getattr__(name), name)
[ "def", "addDataSet", "(", "self", ",", "dataSet", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "for", "...
Adds all the matrices in dataSet to the receiver
[ "Adds", "all", "the", "matrices", "in", "dataSet", "to", "the", "receiver" ]
[ "'''Adds all the matrices in dataSet to the receiver\n\t\t\n\t\tParams:\n\t\t\tdataSet: A Core.Data.DataSet instance'''" ]
[ { "param": "self", "type": null }, { "param": "dataSet", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dataSet", "type": null, "docstring": "A Core.Data.DataSet instance"...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
addImageData
null
def addImageData(self, data, name): '''Adds the image data to the database calling it name''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification values = (self.identification, name, MySQLdb.escape_string(data), len(data), len(d...
Adds the image data to the database calling it name
Adds the image data to the database calling it name
[ "Adds", "the", "image", "data", "to", "the", "database", "calling", "it", "name" ]
def addImageData(self, data, name): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification values = (self.identification, name, MySQLdb.escape_string(data), len(data), len(data), MySQLdb.escape_string(data)) statement = """INSERT INTO Im...
[ "def", "addImageData", "(", "self", ",", "data", ",", "name", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identificatio...
Adds the image data to the database calling it name
[ "Adds", "the", "image", "data", "to", "the", "database", "calling", "it", "name" ]
[ "'''Adds the image data to the database calling it name'''" ]
[ { "param": "self", "type": null }, { "param": "data", "type": null }, { "param": "name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "data", "type": null, "docstring": null, "docstring_tokens": [...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
ligand
<not_specific>
def ligand(self): '''Returns a string containing the structure of the ligand in mol2 format. If no ligand is present the method returns None''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() sta...
Returns a string containing the structure of the ligand in mol2 format. If no ligand is present the method returns None
Returns a string containing the structure of the ligand in mol2 format. If no ligand is present the method returns None
[ "Returns", "a", "string", "containing", "the", "structure", "of", "the", "ligand", "in", "mol2", "format", ".", "If", "no", "ligand", "is", "present", "the", "method", "returns", "None" ]
def ligand(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() statement = """SELECT Ligand FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification) self.cursor.execute(statement) rows = s...
[ "def", "ligand", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connection", "...
Returns a string containing the structure of the ligand in mol2 format.
[ "Returns", "a", "string", "containing", "the", "structure", "of", "the", "ligand", "in", "mol2", "format", "." ]
[ "'''Returns a string containing the structure of the ligand in mol2 format.\n\t\t\n\t\tIf no ligand is present the method returns None'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
structure
<not_specific>
def structure(self): '''Returns a string containing the structure of the protein in PDB format''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() statement = """SELECT Structure FROM %s WHERE JobID='...
Returns a string containing the structure of the protein in PDB format
Returns a string containing the structure of the protein in PDB format
[ "Returns", "a", "string", "containing", "the", "structure", "of", "the", "protein", "in", "PDB", "format" ]
def structure(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() statement = """SELECT Structure FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification) self.cursor.execute(statement) r...
[ "def", "structure", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connection", ...
Returns a string containing the structure of the protein in PDB format
[ "Returns", "a", "string", "containing", "the", "structure", "of", "the", "protein", "in", "PDB", "format" ]
[ "'''Returns a string containing the structure of the protein in PDB format'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
protoolStructure
<not_specific>
def protoolStructure(self): '''Returns a protool structure instance initialised using the structure data stored in the database''' import tempfile, Protool structureData = self.structure() temp = tempfile.NamedTemporaryFile() temp.write(structureData) temp.flush() try: object = Protool.structu...
Returns a protool structure instance initialised using the structure data stored in the database
Returns a protool structure instance initialised using the structure data stored in the database
[ "Returns", "a", "protool", "structure", "instance", "initialised", "using", "the", "structure", "data", "stored", "in", "the", "database" ]
def protoolStructure(self): import tempfile, Protool structureData = self.structure() temp = tempfile.NamedTemporaryFile() temp.write(structureData) temp.flush() try: object = Protool.structureIO() object.readpdb(temp.name) except Exception, data: raise Exceptions.FileFormatError, 'Format of sto...
[ "def", "protoolStructure", "(", "self", ")", ":", "import", "tempfile", ",", "Protool", "structureData", "=", "self", ".", "structure", "(", ")", "temp", "=", "tempfile", ".", "NamedTemporaryFile", "(", ")", "temp", ".", "write", "(", "structureData", ")", ...
Returns a protool structure instance initialised using the structure data stored in the database
[ "Returns", "a", "protool", "structure", "instance", "initialised", "using", "the", "structure", "data", "stored", "in", "the", "database" ]
[ "'''Returns a protool structure instance initialised using the structure data stored in the database'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
calculationStates
<not_specific>
def calculationStates(self): '''Returns the state of the calculations. This is a dictionary of calculationName:JobState pairs. Valid States are - NotSelected - Selected - Queued - Waiting - Running - Finished''' #FIXME add test for valid job states if self.exists(): se...
Returns the state of the calculations. This is a dictionary of calculationName:JobState pairs. Valid States are - NotSelected - Selected - Queued - Waiting - Running - Finished
Returns the state of the calculations. This is a dictionary of calculationName:JobState pairs. Valid States are NotSelected Selected Queued Waiting Running Finished
[ "Returns", "the", "state", "of", "the", "calculations", ".", "This", "is", "a", "dictionary", "of", "calculationName", ":", "JobState", "pairs", ".", "Valid", "States", "are", "NotSelected", "Selected", "Queued", "Waiting", "Running", "Finished" ]
def calculationStates(self): if self.exists(): self.connection.commit() statement = """SELECT Stability, Scan, Binding FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification) self.cursor.execute(statement) rows = self.cursor.fetchall() return dict(zip(['Stability', 'Scan', 'Binding'], rows[...
[ "def", "calculationStates", "(", "self", ")", ":", "if", "self", ".", "exists", "(", ")", ":", "self", ".", "connection", ".", "commit", "(", ")", "statement", "=", "\"\"\"SELECT Stability, Scan, Binding FROM %s WHERE JobID='%s' \"\"\"", "%", "(", "self", ".", "...
Returns the state of the calculations.
[ "Returns", "the", "state", "of", "the", "calculations", "." ]
[ "'''Returns the state of the calculations.\n\t\t\n\t\tThis is a dictionary of calculationName:JobState pairs.\n\t\tValid States are \n\t\t\t- NotSelected\n\t\t\t- Selected\n\t\t\t- Queued\n\t\t\t- Waiting\n\t\t\t- Running\n\t\t\t- Finished'''", "#FIXME add test for valid job states\t\t\t\t\t\t\t\t\t" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
mutation
<not_specific>
def mutation(self): '''Retrieves the scan mutation the job should perform. If no mutation has been set, or a mutation list has been set instead, this method return None''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification ...
Retrieves the scan mutation the job should perform. If no mutation has been set, or a mutation list has been set instead, this method return None
Retrieves the scan mutation the job should perform. If no mutation has been set, or a mutation list has been set instead, this method return None
[ "Retrieves", "the", "scan", "mutation", "the", "job", "should", "perform", ".", "If", "no", "mutation", "has", "been", "set", "or", "a", "mutation", "list", "has", "been", "set", "instead", "this", "method", "return", "None" ]
def mutation(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification mutationData = None if not self.isMutationList(): self.connection.commit() statement = """SELECT MutationData FROM %s WHERE JobID='%s' """ % (self.jobTable, ...
[ "def", "mutation", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "mutationData", "=", "None",...
Retrieves the scan mutation the job should perform.
[ "Retrieves", "the", "scan", "mutation", "the", "job", "should", "perform", "." ]
[ "'''Retrieves the scan mutation the job should perform.\n\t\t\n\t\tIf no mutation has been set, or a mutation list has been set instead, this method return None'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
mutationListFile
<not_specific>
def mutationListFile(self): '''Returns a Core.Data.MutationListFile instance containing the mutations the job is to run on If the no mutationListFile has been set for the Job this method returns None''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the datab...
Returns a Core.Data.MutationListFile instance containing the mutations the job is to run on If the no mutationListFile has been set for the Job this method returns None
Returns a Core.Data.MutationListFile instance containing the mutations the job is to run on If the no mutationListFile has been set for the Job this method returns None
[ "Returns", "a", "Core", ".", "Data", ".", "MutationListFile", "instance", "containing", "the", "mutations", "the", "job", "is", "to", "run", "on", "If", "the", "no", "mutationListFile", "has", "been", "set", "for", "the", "Job", "this", "method", "returns", ...
def mutationListFile(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification mutationList = None if self.isMutationList(): self.connection.commit() statement = """SELECT MutationData FROM %s WHERE JobID='%s' """ % (self.jobTab...
[ "def", "mutationListFile", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "mutationList", "=", ...
Returns a Core.Data.MutationListFile instance containing the mutations the job is to run on If the no mutationListFile has been set for the Job this method returns None
[ "Returns", "a", "Core", ".", "Data", ".", "MutationListFile", "instance", "containing", "the", "mutations", "the", "job", "is", "to", "run", "on", "If", "the", "no", "mutationListFile", "has", "been", "set", "for", "the", "Job", "this", "method", "returns", ...
[ "'''Returns a Core.Data.MutationListFile instance containing the mutations the job is to run on\n\t\t\n\t\tIf the no mutationListFile has been set for the Job this method returns None'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
mutationList
<not_specific>
def mutationList(self): '''Returns the mutation list as a string if one has been set''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification mutationList = None if self.isMutationList(): self.connection.commit() statement ...
Returns the mutation list as a string if one has been set
Returns the mutation list as a string if one has been set
[ "Returns", "the", "mutation", "list", "as", "a", "string", "if", "one", "has", "been", "set" ]
def mutationList(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification mutationList = None if self.isMutationList(): self.connection.commit() statement = """SELECT MutationData FROM %s WHERE JobID='%s' """ % (self.jobTable, ...
[ "def", "mutationList", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "mutationList", "=", "No...
Returns the mutation list as a string if one has been set
[ "Returns", "the", "mutation", "list", "as", "a", "string", "if", "one", "has", "been", "set" ]
[ "'''Returns the mutation list as a string if one has been set'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
isMutationList
<not_specific>
def isMutationList(self): '''Returns True if the jobs mutations are specified by a mutation list''' if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification #FIXME: Catch index errors if nothing is returned - (if there are any) #I...
Returns True if the jobs mutations are specified by a mutation list
Returns True if the jobs mutations are specified by a mutation list
[ "Returns", "True", "if", "the", "jobs", "mutations", "are", "specified", "by", "a", "mutation", "list" ]
def isMutationList(self): if not self.exists(): raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification self.connection.commit() statement = """SELECT MutationCommand FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification) self.cursor.execute(stat...
[ "def", "isMutationList", "(", "self", ")", ":", "if", "not", "self", ".", "exists", "(", ")", ":", "raise", "Exceptions", ".", "DatabaseRetrievalError", ",", "\"Job Id %s does not exist in the database\"", "%", "self", ".", "identification", "self", ".", "connecti...
Returns True if the jobs mutations are specified by a mutation list
[ "Returns", "True", "if", "the", "jobs", "mutations", "are", "specified", "by", "a", "mutation", "list" ]
[ "'''Returns True if the jobs mutations are specified by a mutation list'''", "#FIXME: Catch index errors if nothing is returned - (if there are any)", "#It may be that always [[]] is returned if nothing is found\t" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
addOptionArgument
null
def addOptionArgument(self, option, value): '''Adds an argument and value to the job Params: option: A command line option for the program that does not specify a file value: The value of the option''' optionArgs = self.optionArguments() optionArgs[option] = value data = SerializeDictionary(optio...
Adds an argument and value to the job Params: option: A command line option for the program that does not specify a file value: The value of the option
Adds an argument and value to the job
[ "Adds", "an", "argument", "and", "value", "to", "the", "job" ]
def addOptionArgument(self, option, value): optionArgs = self.optionArguments() optionArgs[option] = value data = SerializeDictionary(optionArgs) data = MySQLdb.escape_string(data) statement = """UPDATE %s SET OptionArguments='%s' WHERE JobID='%s' """ % (self.jobTable, data, self.identification) self.cursor...
[ "def", "addOptionArgument", "(", "self", ",", "option", ",", "value", ")", ":", "optionArgs", "=", "self", ".", "optionArguments", "(", ")", "optionArgs", "[", "option", "]", "=", "value", "data", "=", "SerializeDictionary", "(", "optionArgs", ")", "data", ...
Adds an argument and value to the job
[ "Adds", "an", "argument", "and", "value", "to", "the", "job" ]
[ "'''Adds an argument and value to the job\n\t\t\n\t\tParams:\n\t\t\toption: A command line option for the program that does not specify a file\n\t\t\tvalue: The value of the option'''" ]
[ { "param": "self", "type": null }, { "param": "option", "type": null }, { "param": "value", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "option", "type": null, "docstring": "A command line option for the ...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
addFileArgument
null
def addFileArgument(self, option, contentsAttribute, fileName=None): '''Adds an argument whose value reference a file to the job Params: option: A command line option for the program that does not specify a file contentsAttribute: The name of the method that supplies the file contents fileName: The na...
Adds an argument whose value reference a file to the job Params: option: A command line option for the program that does not specify a file contentsAttribute: The name of the method that supplies the file contents fileName: The name of the file to write the contents to
Adds an argument whose value reference a file to the job
[ "Adds", "an", "argument", "whose", "value", "reference", "a", "file", "to", "the", "job" ]
def addFileArgument(self, option, contentsAttribute, fileName=None): if getattr(self, contentsAttribute) == None: raise AttributeError, 'Attribute %s does not exist - cannot use as content attribute' % contentsAttribute fileData = {'contentsAttribute':contentsAttribute} if fileName is not None: fileData['fi...
[ "def", "addFileArgument", "(", "self", ",", "option", ",", "contentsAttribute", ",", "fileName", "=", "None", ")", ":", "if", "getattr", "(", "self", ",", "contentsAttribute", ")", "==", "None", ":", "raise", "AttributeError", ",", "'Attribute %s does not exist ...
Adds an argument whose value reference a file to the job
[ "Adds", "an", "argument", "whose", "value", "reference", "a", "file", "to", "the", "job" ]
[ "'''Adds an argument whose value reference a file to the job\n\t\t\n\t\tParams:\n\t\t\toption: A command line option for the program that does not specify a file\n\t\t\tcontentsAttribute: The name of the method that supplies the file contents\n\t\t\tfileName: The name of the file to write the contents to'''" ]
[ { "param": "self", "type": null }, { "param": "option", "type": null }, { "param": "contentsAttribute", "type": null }, { "param": "fileName", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "option", "type": null, "docstring": "A command line option for the ...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
addMatrix
null
def addMatrix(self, matrix, name): '''Adds a matrix called name to the data dir. Note: Name is capitalized if its not already If data for name is already present, and overwriting is disabled, an Exceptions.DataAlreadyExistsError is raised. Otherwise the data is added to the self.data dictionary.''' ...
Adds a matrix called name to the data dir. Note: Name is capitalized if its not already If data for name is already present, and overwriting is disabled, an Exceptions.DataAlreadyExistsError is raised. Otherwise the data is added to the self.data dictionary.
Adds a matrix called name to the data dir. Note: Name is capitalized if its not already If data for name is already present, and overwriting is disabled, an Exceptions.DataAlreadyExistsError is raised. Otherwise the data is added to the self.data dictionary.
[ "Adds", "a", "matrix", "called", "name", "to", "the", "data", "dir", ".", "Note", ":", "Name", "is", "capitalized", "if", "its", "not", "already", "If", "data", "for", "name", "is", "already", "present", "and", "overwriting", "is", "disabled", "an", "Exc...
def addMatrix(self, matrix, name): if self.data.has_key(name) and self.data[name] is not None: if not self.overwrite: raise Core.Exceptions.DataAlreadyExistsError, 'A matrix called %s already present' % name name = name.capitalize()[0] + name[1:] self.__addMatrix__(matrix, name) self.data[name] = matrix
[ "def", "addMatrix", "(", "self", ",", "matrix", ",", "name", ")", ":", "if", "self", ".", "data", ".", "has_key", "(", "name", ")", "and", "self", ".", "data", "[", "name", "]", "is", "not", "None", ":", "if", "not", "self", ".", "overwrite", ":"...
Adds a matrix called name to the data dir.
[ "Adds", "a", "matrix", "called", "name", "to", "the", "data", "dir", "." ]
[ "'''Adds a matrix called name to the data dir.\n\t\t\n\t\tNote: Name is capitalized if its not already\n\t\t\n\t\tIf data for name is already present, and overwriting is disabled,\n\t\tan Exceptions.DataAlreadyExistsError is raised.\n\t\tOtherwise the data is added to the self.data dictionary.'''" ]
[ { "param": "self", "type": null }, { "param": "matrix", "type": null }, { "param": "name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "matrix", "type": null, "docstring": null, "docstring_tokens":...
6b67548826d8a7c8f85a1d16a2d00b5032538b55
shambo001/peat
PEATDB/plugins/PCA.py
[ "MIT" ]
Python
doPCA
<not_specific>
def doPCA(self,m,standardize=True): '''Performs pca on the Core.Matrix.Matrix instance m. Returns: eigenvalues - A numpy 1-D array. eigenvectors - A numpy 2-D array transformedData - A numpy 2-D array''' print >>sys.stderr, 'Calculating mean vec...
Performs pca on the Core.Matrix.Matrix instance m. Returns: eigenvalues - A numpy 1-D array. eigenvectors - A numpy 2-D array transformedData - A numpy 2-D array
Performs pca on the Core.Matrix.Matrix instance m.
[ "Performs", "pca", "on", "the", "Core", ".", "Matrix", ".", "Matrix", "instance", "m", "." ]
def doPCA(self,m,standardize=True): print >>sys.stderr, 'Calculating mean vector' data = numpy.array(m.matrix) if standardize==True: data = self.standardize(data) average = numpy.zeros(m.numberOfColumns()) for row in data: row = numpy.ar...
[ "def", "doPCA", "(", "self", ",", "m", ",", "standardize", "=", "True", ")", ":", "print", ">>", "sys", ".", "stderr", ",", "'Calculating mean vector'", "data", "=", "numpy", ".", "array", "(", "m", ".", "matrix", ")", "if", "standardize", "==", "True"...
Performs pca on the Core.Matrix.Matrix instance m.
[ "Performs", "pca", "on", "the", "Core", ".", "Matrix", ".", "Matrix", "instance", "m", "." ]
[ "'''Performs pca on the Core.Matrix.Matrix instance m.\n\n Returns: \n eigenvalues - A numpy 1-D array.\n eigenvectors - A numpy 2-D array\n transformedData - A numpy 2-D array'''" ]
[ { "param": "self", "type": null }, { "param": "m", "type": null }, { "param": "standardize", "type": null } ]
{ "returns": [ { "docstring": "A numpy 1-D array.\neigenvectors - A numpy 2-D array\ntransformedData - A numpy 2-D array", "docstring_tokens": [ "A", "numpy", "1", "-", "D", "array", ".", "eigenvectors", "-", "A", ...
6b67548826d8a7c8f85a1d16a2d00b5032538b55
shambo001/peat
PEATDB/plugins/PCA.py
[ "MIT" ]
Python
plotResults
<not_specific>
def plotResults(self,evals,evecs,b,m): """Plot results to help visualize components""" data = numpy.array(m.matrix) labels = m.columnHeaders() plt.rc('font', family='monospace') #plot first 2 PCs in 3d score plot '''x,y,z = b[:,0], b[:,1], b[:,2] f=plt.fi...
Plot results to help visualize components
Plot results to help visualize components
[ "Plot", "results", "to", "help", "visualize", "components" ]
def plotResults(self,evals,evecs,b,m): data = numpy.array(m.matrix) labels = m.columnHeaders() plt.rc('font', family='monospace') f=plt.figure() i=1 length = len(data[0]) if length>6: length=6 for i in range(0,length): ax=f.add_subplot(3,3,i+1)...
[ "def", "plotResults", "(", "self", ",", "evals", ",", "evecs", ",", "b", ",", "m", ")", ":", "data", "=", "numpy", ".", "array", "(", "m", ".", "matrix", ")", "labels", "=", "m", ".", "columnHeaders", "(", ")", "plt", ".", "rc", "(", "'font'", ...
Plot results to help visualize components
[ "Plot", "results", "to", "help", "visualize", "components" ]
[ "\"\"\"Plot results to help visualize components\"\"\"", "#plot first 2 PCs in 3d score plot ", "'''x,y,z = b[:,0], b[:,1], b[:,2]\n f=plt.figure()\n ax = Axes3D(f)\n ax.scatter(x,y,zs=z,marker='o',lw=2,alpha=0.5,c='b',s=30)\n ax.set_xlabel('PC1')\n ax.set_ylabel('PC2')...
[ { "param": "self", "type": null }, { "param": "evals", "type": null }, { "param": "evecs", "type": null }, { "param": "b", "type": null }, { "param": "m", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "evals", "type": null, "docstring": null, "docstring_tokens": ...
30ccef9b7c9a99acba05b69144ec28e66d45b8c6
shambo001/peat
pKa/find_simple.py
[ "MIT" ]
Python
desolvation
<not_specific>
def desolvation(): """Find correlation between desolvation and acc""" import os dirs=os.listdir('data') xs=[] ys=[] for dir in dirs: print 'Processing %s' %dir # # find the PDB file # realdir=os.path.join(os.getcwd(),'data',dir) files=os.listdir(re...
Find correlation between desolvation and acc
Find correlation between desolvation and acc
[ "Find", "correlation", "between", "desolvation", "and", "acc" ]
def desolvation(): import os dirs=os.listdir('data') xs=[] ys=[] for dir in dirs: print 'Processing %s' %dir find the PDB file realdir=os.path.join(os.getcwd(),'data',dir) files=os.listdir(realdir) for file in files: realfile=os.path.join(realdir,...
[ "def", "desolvation", "(", ")", ":", "import", "os", "dirs", "=", "os", ".", "listdir", "(", "'data'", ")", "xs", "=", "[", "]", "ys", "=", "[", "]", "for", "dir", "in", "dirs", ":", "print", "'Processing %s'", "%", "dir", "realdir", "=", "os", "...
Find correlation between desolvation and acc
[ "Find", "correlation", "between", "desolvation", "and", "acc" ]
[ "\"\"\"Find correlation between desolvation and acc\"\"\"", "#", "# find the PDB file", "#", "#", "# Hurra, the calc is complete. Load the desolvation energies", "#", "#", "# Now calculate the desolvation energies with Protool", "#", "#", "#" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
30ccef9b7c9a99acba05b69144ec28e66d45b8c6
shambo001/peat
pKa/find_simple.py
[ "MIT" ]
Python
background
<not_specific>
def background(): """Find correlation between background interaction energy and number of hbonds""" import os dirs=os.listdir('data') xs=[] ys=[] count=0 #dirs=['1bli'] for dir in dirs: print 'Processing %s' %dir # # find the PDB file # realdir=os....
Find correlation between background interaction energy and number of hbonds
Find correlation between background interaction energy and number of hbonds
[ "Find", "correlation", "between", "background", "interaction", "energy", "and", "number", "of", "hbonds" ]
def background(): import os dirs=os.listdir('data') xs=[] ys=[] count=0 for dir in dirs: print 'Processing %s' %dir find the PDB file realdir=os.path.join(os.getcwd(),'data',dir) files=os.listdir(realdir) for file in files: realfile=os.path.jo...
[ "def", "background", "(", ")", ":", "import", "os", "dirs", "=", "os", ".", "listdir", "(", "'data'", ")", "xs", "=", "[", "]", "ys", "=", "[", "]", "count", "=", "0", "for", "dir", "in", "dirs", ":", "print", "'Processing %s'", "%", "dir", "real...
Find correlation between background interaction energy and number of hbonds
[ "Find", "correlation", "between", "background", "interaction", "energy", "and", "number", "of", "hbonds" ]
[ "\"\"\"Find correlation between background interaction energy and number of hbonds\"\"\"", "#dirs=['1bli']", "#", "# find the PDB file", "#", "#", "# Hurra, the calc is complete. Load the desolvation energies", "#", "#", "# Now calculate the desolvation energies with Protool", "#", "#", "#",...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
30e5f654695b38b1614965d98e3e7109efe0dd76
shambo001/peat
DNATool2/RestrictionDigest.py
[ "MIT" ]
Python
selectEnzymes
<not_specific>
def selectEnzymes(self,include=[],exclude=[]): """Select enzymes based on length and mandatory inclusions and exclusions""" enzymes = RS # Calculate length and define isoschiziomers preferred_enzymes=['Aat II','Acc I','Acc III','Alu I', 'Bbu I','Bcl I','Bgl II','Bst...
Select enzymes based on length and mandatory inclusions and exclusions
Select enzymes based on length and mandatory inclusions and exclusions
[ "Select", "enzymes", "based", "on", "length", "and", "mandatory", "inclusions", "and", "exclusions" ]
def selectEnzymes(self,include=[],exclude=[]): enzymes = RS preferred_enzymes=['Aat II','Acc I','Acc III','Alu I', 'Bbu I','Bcl I','Bgl II','Bst98 I','BstE II','BstZ I', 'Cfo I','Sac I','EcoR I','EcoR V','Fok I','Hae II', 'Hae III','Hinc II','...
[ "def", "selectEnzymes", "(", "self", ",", "include", "=", "[", "]", ",", "exclude", "=", "[", "]", ")", ":", "enzymes", "=", "RS", "preferred_enzymes", "=", "[", "'Aat II'", ",", "'Acc I'", ",", "'Acc III'", ",", "'Alu I'", ",", "'Bbu I'", ",", "'Bcl I...
Select enzymes based on length and mandatory inclusions and exclusions
[ "Select", "enzymes", "based", "on", "length", "and", "mandatory", "inclusions", "and", "exclusions" ]
[ "\"\"\"Select enzymes based on length and mandatory\n inclusions and exclusions\"\"\"", "# Calculate length and define isoschiziomers", "# Check that we have all enzymes", "#for enzyme in preferred_enzymes:", "# if not enzyme in enzymes:", "# print 'Missing',enzyme", "# Do we have another ...
[ { "param": "self", "type": null }, { "param": "include", "type": null }, { "param": "exclude", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "include", "type": null, "docstring": null, "docstring_tokens"...
9404332e1d9e28d100d1da61de3129f5a96ae9f1
shambo001/peat
PEATDB/Ekin/Plotting.py
[ "MIT" ]
Python
applyOptions
<not_specific>
def applyOptions(self): """Apply the gui option vars to the plotter options""" self.setOptions(shape=self.pltsymbol.get(), grid=self.pltgrid.get(), xscale=self.xscalevar.get(), yscale=self.yscalevar.get(), xlim=self.xlimvar.get(),ylim=self.ylimvar.get(), show...
Apply the gui option vars to the plotter options
Apply the gui option vars to the plotter options
[ "Apply", "the", "gui", "option", "vars", "to", "the", "plotter", "options" ]
def applyOptions(self): self.setOptions(shape=self.pltsymbol.get(), grid=self.pltgrid.get(), xscale=self.xscalevar.get(), yscale=self.yscalevar.get(), xlim=self.xlimvar.get(),ylim=self.ylimvar.get(), showlegend = self.pltlegend.get(), legendloc = self....
[ "def", "applyOptions", "(", "self", ")", ":", "self", ".", "setOptions", "(", "shape", "=", "self", ".", "pltsymbol", ".", "get", "(", ")", ",", "grid", "=", "self", ".", "pltgrid", ".", "get", "(", ")", ",", "xscale", "=", "self", ".", "xscalevar"...
Apply the gui option vars to the plotter options
[ "Apply", "the", "gui", "option", "vars", "to", "the", "plotter", "options" ]
[ "\"\"\"Apply the gui option vars to the plotter options\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
9404332e1d9e28d100d1da61de3129f5a96ae9f1
shambo001/peat
PEATDB/Ekin/Plotting.py
[ "MIT" ]
Python
addToolBar
<not_specific>
def addToolBar(self): """Extra toolbar with save button etc""" t=Frame(self.parent) t.pack(fill=X) dpivar=IntVar() dpivar.set(300) Label(t, text='dpi:').pack(side=LEFT) Entry(t, textvariable=dpivar).pack(side=LEFT) b=Button(t, text='Save',width=5,command=l...
Extra toolbar with save button etc
Extra toolbar with save button etc
[ "Extra", "toolbar", "with", "save", "button", "etc" ]
def addToolBar(self): t=Frame(self.parent) t.pack(fill=X) dpivar=IntVar() dpivar.set(300) Label(t, text='dpi:').pack(side=LEFT) Entry(t, textvariable=dpivar).pack(side=LEFT) b=Button(t, text='Save',width=5,command=lambda:self.saveFigure(dpivar.get())) b.pa...
[ "def", "addToolBar", "(", "self", ")", ":", "t", "=", "Frame", "(", "self", ".", "parent", ")", "t", ".", "pack", "(", "fill", "=", "X", ")", "dpivar", "=", "IntVar", "(", ")", "dpivar", ".", "set", "(", "300", ")", "Label", "(", "t", ",", "t...
Extra toolbar with save button etc
[ "Extra", "toolbar", "with", "save", "button", "etc" ]
[ "\"\"\"Extra toolbar with save button etc\"\"\"", "#b=Button(t, text='Annotate',command=self.annotate)", "#b.pack(side=LEFT,padx=2,pady=2)" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
9404332e1d9e28d100d1da61de3129f5a96ae9f1
shambo001/peat
PEATDB/Ekin/Plotting.py
[ "MIT" ]
Python
plotOptions
<not_specific>
def plotOptions(self): """Create options for plotting using Pylab class""" if self.Opts == None: self.Opts = Options(redraw=self.plotCurrent) self.Opts.plotSetup() return
Create options for plotting using Pylab class
Create options for plotting using Pylab class
[ "Create", "options", "for", "plotting", "using", "Pylab", "class" ]
def plotOptions(self): if self.Opts == None: self.Opts = Options(redraw=self.plotCurrent) self.Opts.plotSetup() return
[ "def", "plotOptions", "(", "self", ")", ":", "if", "self", ".", "Opts", "==", "None", ":", "self", ".", "Opts", "=", "Options", "(", "redraw", "=", "self", ".", "plotCurrent", ")", "self", ".", "Opts", ".", "plotSetup", "(", ")", "return" ]
Create options for plotting using Pylab class
[ "Create", "options", "for", "plotting", "using", "Pylab", "class" ]
[ "\"\"\"Create options for plotting using Pylab class\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
9404332e1d9e28d100d1da61de3129f5a96ae9f1
shambo001/peat
PEATDB/Ekin/Plotting.py
[ "MIT" ]
Python
annotate
<not_specific>
def annotate(self): """Basic adding of annotation to a plot""" axes = self.fig.get_axes() def addObject(objtype='text',text='test',x=1,y=1): bbox_props = dict(boxstyle="round", fc="#FFFC17", ec="0.4", alpha=0.8) if objtype == 'text': axes[0].text(x,y, te...
Basic adding of annotation to a plot
Basic adding of annotation to a plot
[ "Basic", "adding", "of", "annotation", "to", "a", "plot" ]
def annotate(self): axes = self.fig.get_axes() def addObject(objtype='text',text='test',x=1,y=1): bbox_props = dict(boxstyle="round", fc="#FFFC17", ec="0.4", alpha=0.8) if objtype == 'text': axes[0].text(x,y, text, ha="center", va="center", size=12, bbox=bbox_prop...
[ "def", "annotate", "(", "self", ")", ":", "axes", "=", "self", ".", "fig", ".", "get_axes", "(", ")", "def", "addObject", "(", "objtype", "=", "'text'", ",", "text", "=", "'test'", ",", "x", "=", "1", ",", "y", "=", "1", ")", ":", "bbox_props", ...
Basic adding of annotation to a plot
[ "Basic", "adding", "of", "annotation", "to", "a", "plot" ]
[ "\"\"\"Basic adding of annotation to a plot\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
cc0fc5d5e1982b27ca1ff6cc0dcbfa84469ab759
shambo001/peat
PEATDB/Ekin/Utils.py
[ "MIT" ]
Python
leadingZeros
<not_specific>
def leadingZeros(value, desired_digits): """ Given an integer, returns a string representation, padded with [desired_digits] zeros. http://www.djangosnippets.org/snippets/543/ """ num_zeros = int(desired_digits) - len(str(value)) padded_value = [] while num_zeros >= 1: padded_value.a...
Given an integer, returns a string representation, padded with [desired_digits] zeros. http://www.djangosnippets.org/snippets/543/
Given an integer, returns a string representation, padded with [desired_digits] zeros.
[ "Given", "an", "integer", "returns", "a", "string", "representation", "padded", "with", "[", "desired_digits", "]", "zeros", "." ]
def leadingZeros(value, desired_digits): num_zeros = int(desired_digits) - len(str(value)) padded_value = [] while num_zeros >= 1: padded_value.append("0") num_zeros = num_zeros - 1 padded_value.append(str(value)) return "".join(padded_value)
[ "def", "leadingZeros", "(", "value", ",", "desired_digits", ")", ":", "num_zeros", "=", "int", "(", "desired_digits", ")", "-", "len", "(", "str", "(", "value", ")", ")", "padded_value", "=", "[", "]", "while", "num_zeros", ">=", "1", ":", "padded_value"...
Given an integer, returns a string representation, padded with [desired_digits] zeros.
[ "Given", "an", "integer", "returns", "a", "string", "representation", "padded", "with", "[", "desired_digits", "]", "zeros", "." ]
[ "\"\"\"\n Given an integer, returns a string representation, padded with [desired_digits] zeros.\n http://www.djangosnippets.org/snippets/543/\n \"\"\"" ]
[ { "param": "value", "type": null }, { "param": "desired_digits", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "value", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "desired_digits", "type": null, "docstring": null, "docstring...
cc0fc5d5e1982b27ca1ff6cc0dcbfa84469ab759
shambo001/peat
PEATDB/Ekin/Utils.py
[ "MIT" ]
Python
adjust_bars
<not_specific>
def adjust_bars(patches): """Adjust overlapping bars in a pylab plot so that smaller ones are in front""" l = len(patches[0]) for i in range(0,l): rects=[] heights=[] for p in patches: h = patches[p][i].get_height() rects.append((h, patches[p][i])) ...
Adjust overlapping bars in a pylab plot so that smaller ones are in front
Adjust overlapping bars in a pylab plot so that smaller ones are in front
[ "Adjust", "overlapping", "bars", "in", "a", "pylab", "plot", "so", "that", "smaller", "ones", "are", "in", "front" ]
def adjust_bars(patches): l = len(patches[0]) for i in range(0,l): rects=[] heights=[] for p in patches: h = patches[p][i].get_height() rects.append((h, patches[p][i])) rects.sort() i=len(rects) for r in rects: r[1].set_zorder(i...
[ "def", "adjust_bars", "(", "patches", ")", ":", "l", "=", "len", "(", "patches", "[", "0", "]", ")", "for", "i", "in", "range", "(", "0", ",", "l", ")", ":", "rects", "=", "[", "]", "heights", "=", "[", "]", "for", "p", "in", "patches", ":", ...
Adjust overlapping bars in a pylab plot so that smaller ones are in front
[ "Adjust", "overlapping", "bars", "in", "a", "pylab", "plot", "so", "that", "smaller", "ones", "are", "in", "front" ]
[ "\"\"\"Adjust overlapping bars in a pylab plot so that smaller ones\n are in front\"\"\"" ]
[ { "param": "patches", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "patches", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
cc0fc5d5e1982b27ca1ff6cc0dcbfa84469ab759
shambo001/peat
PEATDB/Ekin/Utils.py
[ "MIT" ]
Python
removeEmptyKeys
<not_specific>
def removeEmptyKeys(data): """Remove keys from a dict that have no data or zero len lists""" import types for i in data.keys(): if type(data[i]) is types.ListType: if len(data[i])==0: del data[i] return data
Remove keys from a dict that have no data or zero len lists
Remove keys from a dict that have no data or zero len lists
[ "Remove", "keys", "from", "a", "dict", "that", "have", "no", "data", "or", "zero", "len", "lists" ]
def removeEmptyKeys(data): import types for i in data.keys(): if type(data[i]) is types.ListType: if len(data[i])==0: del data[i] return data
[ "def", "removeEmptyKeys", "(", "data", ")", ":", "import", "types", "for", "i", "in", "data", ".", "keys", "(", ")", ":", "if", "type", "(", "data", "[", "i", "]", ")", "is", "types", ".", "ListType", ":", "if", "len", "(", "data", "[", "i", "]...
Remove keys from a dict that have no data or zero len lists
[ "Remove", "keys", "from", "a", "dict", "that", "have", "no", "data", "or", "zero", "len", "lists" ]
[ "\"\"\"Remove keys from a dict that have no data or zero len lists\"\"\"" ]
[ { "param": "data", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "data", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
cc0fc5d5e1982b27ca1ff6cc0dcbfa84469ab759
shambo001/peat
PEATDB/Ekin/Utils.py
[ "MIT" ]
Python
doFtest
<not_specific>
def doFtest(model1, model2, numparams1, numparams2, numdps, alpha=0.05): """Performs an F test between 2 fitted models. model1 represents the simpler null hypothesis model the null hypothesis will be that the simpler model fits better ss1 : sum of squared error 1 numdps: number of datapo...
Performs an F test between 2 fitted models. model1 represents the simpler null hypothesis model the null hypothesis will be that the simpler model fits better ss1 : sum of squared error 1 numdps: number of datapoints
Performs an F test between 2 fitted models. model1 represents the simpler null hypothesis model the null hypothesis will be that the simpler model fits better ss1 : sum of squared error 1 numdps: number of datapoints
[ "Performs", "an", "F", "test", "between", "2", "fitted", "models", ".", "model1", "represents", "the", "simpler", "null", "hypothesis", "model", "the", "null", "hypothesis", "will", "be", "that", "the", "simpler", "model", "fits", "better", "ss1", ":", "sum"...
def doFtest(model1, model2, numparams1, numparams2, numdps, alpha=0.05): def fdist(F,df_n,df_d): a = df_n/2. b = df_d/2. x = df_n*F/float(df_n*F+df_d) p = 1 - betai(a,b,x,) return p ss1 = float(model1['error']) ss2 = float(model2['error']) if ss1==0 or ss2==0: ...
[ "def", "doFtest", "(", "model1", ",", "model2", ",", "numparams1", ",", "numparams2", ",", "numdps", ",", "alpha", "=", "0.05", ")", ":", "def", "fdist", "(", "F", ",", "df_n", ",", "df_d", ")", ":", "a", "=", "df_n", "/", "2.", "b", "=", "df_d",...
Performs an F test between 2 fitted models.
[ "Performs", "an", "F", "test", "between", "2", "fitted", "models", "." ]
[ "\"\"\"Performs an F test between 2 fitted models.\n model1 represents the simpler null hypothesis model\n the null hypothesis will be that the simpler model fits better\n ss1 : sum of squared error 1\n numdps: number of datapoints \"\"\"", "#if same degrees of freedom then just compare sq...
[ { "param": "model1", "type": null }, { "param": "model2", "type": null }, { "param": "numparams1", "type": null }, { "param": "numparams2", "type": null }, { "param": "numdps", "type": null }, { "param": "alpha", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "model1", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "model2", "type": null, "docstring": null, "docstring_tokens...
2651bb1490bce86b49d3f86362ab19f3591b6654
shambo001/peat
pKaTool/Ghosts/Chemical_shift.py
[ "MIT" ]
Python
parseTitGroups
<not_specific>
def parseTitGroups(self): ''' Get the list of all titrating groups by comparing pKaDict and the groups parsed from PDB file ''' import pKaTool.Ghost.get_dEF as get_dEF X = get_dEF.map_struct(self.pdb) titGroupsPDB = X.PI.get_titratable_groups() for titGroup in titGroupsPDB: if (not self.pKaDict.has_k...
Get the list of all titrating groups by comparing pKaDict and the groups parsed from PDB file
Get the list of all titrating groups by comparing pKaDict and the groups parsed from PDB file
[ "Get", "the", "list", "of", "all", "titrating", "groups", "by", "comparing", "pKaDict", "and", "the", "groups", "parsed", "from", "PDB", "file" ]
def parseTitGroups(self): import pKaTool.Ghost.get_dEF as get_dEF X = get_dEF.map_struct(self.pdb) titGroupsPDB = X.PI.get_titratable_groups() for titGroup in titGroupsPDB: if (not self.pKaDict.has_key(titGroup)) and (getResName(titGroup) in ['ASP', 'GLU', 'HIS']): pka = modelPKA[getResName(titGroup)] ...
[ "def", "parseTitGroups", "(", "self", ")", ":", "import", "pKaTool", ".", "Ghost", ".", "get_dEF", "as", "get_dEF", "X", "=", "get_dEF", ".", "map_struct", "(", "self", ".", "pdb", ")", "titGroupsPDB", "=", "X", ".", "PI", ".", "get_titratable_groups", "...
Get the list of all titrating groups by comparing pKaDict and the groups parsed from PDB file
[ "Get", "the", "list", "of", "all", "titrating", "groups", "by", "comparing", "pKaDict", "and", "the", "groups", "parsed", "from", "PDB", "file" ]
[ "'''\n\t\tGet the list of all titrating groups by comparing pKaDict and\n\t\tthe groups parsed from PDB file\n\t\t'''", "#sorting pKaDict by pKa values in decending order " ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
2651bb1490bce86b49d3f86362ab19f3591b6654
shambo001/peat
pKaTool/Ghosts/Chemical_shift.py
[ "MIT" ]
Python
whatIF
<not_specific>
def whatIF(self): ''' Run what if on the original pdb file ''' try: import WHAT_IF except ImportError: import pKarun.WHAT_IF as WHAT_IF self.dirName = os.getcwd() os.chdir(self.tmpDirName) X = WHAT_IF.Whatif() X.RedirectOutput('whatif.log') command = 'GETMOL %s\n \n %%DELWAT\n %%DELLIG\n...
Run what if on the original pdb file
Run what if on the original pdb file
[ "Run", "what", "if", "on", "the", "original", "pdb", "file" ]
def whatIF(self): try: import WHAT_IF except ImportError: import pKarun.WHAT_IF as WHAT_IF self.dirName = os.getcwd() os.chdir(self.tmpDirName) X = WHAT_IF.Whatif() X.RedirectOutput('whatif.log') command = 'GETMOL %s\n \n %%DELWAT\n %%DELLIG\n %%CORALL\n N\n %%MAKMOL\n'%self.pdb command += '\n %s\...
[ "def", "whatIF", "(", "self", ")", ":", "try", ":", "import", "WHAT_IF", "except", "ImportError", ":", "import", "pKarun", ".", "WHAT_IF", "as", "WHAT_IF", "self", ".", "dirName", "=", "os", ".", "getcwd", "(", ")", "os", ".", "chdir", "(", "self", "...
Run what if on the original pdb file
[ "Run", "what", "if", "on", "the", "original", "pdb", "file" ]
[ "'''\n\t\tRun what if on the original pdb file\n\t\t'''", "#", "#change all GLU and ASP to be in the neutral form", "#", "#convert H names", "#change resName for the provided titGroupSpan" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
2651bb1490bce86b49d3f86362ab19f3591b6654
shambo001/peat
pKaTool/Ghosts/Chemical_shift.py
[ "MIT" ]
Python
calculateSpan
<not_specific>
def calculateSpan(self, titGroupSpan): ''' Calculates the CSP span coming from titGroups give in titGroupSpan. CSPs depend on the method used ''' titGroupList = [] for titGroup in titGroupSpan: titGroupList.append(titGroup[0]) try: fd = open(self.pdbPath, 'r') lines = fd.readlines() fd.close...
Calculates the CSP span coming from titGroups give in titGroupSpan. CSPs depend on the method used
Calculates the CSP span coming from titGroups give in titGroupSpan. CSPs depend on the method used
[ "Calculates", "the", "CSP", "span", "coming", "from", "titGroups", "give", "in", "titGroupSpan", ".", "CSPs", "depend", "on", "the", "method", "used" ]
def calculateSpan(self, titGroupSpan): titGroupList = [] for titGroup in titGroupSpan: titGroupList.append(titGroup[0]) try: fd = open(self.pdbPath, 'r') lines = fd.readlines() fd.close() except IOError: print '\n\t\tFATAL: Cannot open %s file'%pdbCha sys.exit(1) Print PDB files on low and ...
[ "def", "calculateSpan", "(", "self", ",", "titGroupSpan", ")", ":", "titGroupList", "=", "[", "]", "for", "titGroup", "in", "titGroupSpan", ":", "titGroupList", ".", "append", "(", "titGroup", "[", "0", "]", ")", "try", ":", "fd", "=", "open", "(", "se...
Calculates the CSP span coming from titGroups give in titGroupSpan.
[ "Calculates", "the", "CSP", "span", "coming", "from", "titGroups", "give", "in", "titGroupSpan", "." ]
[ "'''\n\t\tCalculates the CSP span coming from titGroups\n\t\tgive in titGroupSpan.\n\t\tCSPs depend on the method used\n\t\t'''", "#", "#Print PDB files on low and high pH values", "#", "#change resName for the provided titGroupSpan", "#", "# Run PDB2PQR", "#", "#", "# calculate span(CSPs)", "#"...
[ { "param": "self", "type": null }, { "param": "titGroupSpan", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "titGroupSpan", "type": null, "docstring": null, "docstring_to...
2651bb1490bce86b49d3f86362ab19f3591b6654
shambo001/peat
pKaTool/Ghosts/Chemical_shift.py
[ "MIT" ]
Python
callpdb2pqr
<not_specific>
def callpdb2pqr(self, pdbPath, pdbPathNew, pqrPath, pqrPathNew): ''' Run pdb2pqr and convert pdb into pqr files ''' try: from main import mainCommand except ImportError: from pdb2pqr.main import mainCommand # #using a system call # dir_name = os.getcwd() source = '%s/pqr.txt'%dir_name fd = o...
Run pdb2pqr and convert pdb into pqr files
Run pdb2pqr and convert pdb into pqr files
[ "Run", "pdb2pqr", "and", "convert", "pdb", "into", "pqr", "files" ]
def callpdb2pqr(self, pdbPath, pdbPathNew, pqrPath, pqrPathNew): try: from main import mainCommand except ImportError: from pdb2pqr.main import mainCommand using a system call dir_name = os.getcwd() source = '%s/pqr.txt'%dir_name fd = open(source, 'w') fd.writelines([ 'python ~/python/pdb2pqr/pdb...
[ "def", "callpdb2pqr", "(", "self", ",", "pdbPath", ",", "pdbPathNew", ",", "pqrPath", ",", "pqrPathNew", ")", ":", "try", ":", "from", "main", "import", "mainCommand", "except", "ImportError", ":", "from", "pdb2pqr", ".", "main", "import", "mainCommand", "di...
Run pdb2pqr and convert pdb into pqr files
[ "Run", "pdb2pqr", "and", "convert", "pdb", "into", "pqr", "files" ]
[ "'''\n\t\tRun pdb2pqr and convert pdb into pqr files\n\t\t'''", "#", "#using a system call", "#", "#", "#without a system call", "#", "'''command1 = ['/home/predrag/python/pdb2pqr_svn/pdb2pqr.py', '--ff=amber', '%s'%pdbPathNew, '%s'%pqrPathNew]\n\t\tcommand2 = ['/home/predrag/python/pdb2pqr_svn/pdb2pq...
[ { "param": "self", "type": null }, { "param": "pdbPath", "type": null }, { "param": "pdbPathNew", "type": null }, { "param": "pqrPath", "type": null }, { "param": "pqrPathNew", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdbPath", "type": null, "docstring": null, "docstring_tokens"...
2651bb1490bce86b49d3f86362ab19f3591b6654
shambo001/peat
pKaTool/Ghosts/Chemical_shift.py
[ "MIT" ]
Python
parseCSP
<not_specific>
def parseCSP(): ''' Parse the options from the command line ''' parser=optparse.OptionParser() # #set optparse options # parser.add_option( '--pdb', dest='pdb', default=None, type='string', help='<name of the pdb file>', ) parser.add_option( '--nucleus', dest='nucleus', default='N', type...
Parse the options from the command line
Parse the options from the command line
[ "Parse", "the", "options", "from", "the", "command", "line" ]
def parseCSP(): parser=optparse.OptionParser() set optparse options parser.add_option( '--pdb', dest='pdb', default=None, type='string', help='<name of the pdb file>', ) parser.add_option( '--nucleus', dest='nucleus', default='N', type='choice', choices=('N','H',), help='<nucleus type (N, H)...
[ "def", "parseCSP", "(", ")", ":", "parser", "=", "optparse", ".", "OptionParser", "(", ")", "parser", ".", "add_option", "(", "'--pdb'", ",", "dest", "=", "'pdb'", ",", "default", "=", "None", ",", "type", "=", "'string'", ",", "help", "=", "'<name of ...
Parse the options from the command line
[ "Parse", "the", "options", "from", "the", "command", "line" ]
[ "'''\n\tParse the options from the command line\n\t'''", "#", "#set optparse options", "#", "##", "##parse optparse options", "##", "#" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
1b06089722db99b6aafc9308345f5778ac9d7abb
shambo001/peat
PEATDB/Utils.py
[ "MIT" ]
Python
loadDB
<not_specific>
def loadDB(prj=None, remote=False, settings={}): """Load a local or remote db, settings are the remote db arguments such as server, username, password and project name""" if settings.has_key('port'): settings['port'] = int(settings['port']) if remote==True: DB = PDatabase(project=prj,...
Load a local or remote db, settings are the remote db arguments such as server, username, password and project name
Load a local or remote db, settings are the remote db arguments such as server, username, password and project name
[ "Load", "a", "local", "or", "remote", "db", "settings", "are", "the", "remote", "db", "arguments", "such", "as", "server", "username", "password", "and", "project", "name" ]
def loadDB(prj=None, remote=False, settings={}): if settings.has_key('port'): settings['port'] = int(settings['port']) if remote==True: DB = PDatabase(project=prj,**settings) else: DB = PDatabase(local=prj) return DB
[ "def", "loadDB", "(", "prj", "=", "None", ",", "remote", "=", "False", ",", "settings", "=", "{", "}", ")", ":", "if", "settings", ".", "has_key", "(", "'port'", ")", ":", "settings", "[", "'port'", "]", "=", "int", "(", "settings", "[", "'port'", ...
Load a local or remote db, settings are the remote db arguments such as server, username, password and project name
[ "Load", "a", "local", "or", "remote", "db", "settings", "are", "the", "remote", "db", "arguments", "such", "as", "server", "username", "password", "and", "project", "name" ]
[ "\"\"\"Load a local or remote db, settings are the remote db arguments\n such as server, username, password and project name\"\"\"" ]
[ { "param": "prj", "type": null }, { "param": "remote", "type": null }, { "param": "settings", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "prj", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "remote", "type": null, "docstring": null, "docstring_tokens": ...
1b06089722db99b6aafc9308345f5778ac9d7abb
shambo001/peat
PEATDB/Utils.py
[ "MIT" ]
Python
saveDBCopy
<not_specific>
def saveDBCopy(DB, filename, callback=None): """Save local copy of a remote or another local DB""" import copy total = len(DB.getRecs()) if filename == '' or filename == None: return False if os.path.exists(filename): for i in ['.lock','.index','']: os.remove(filename+i) ...
Save local copy of a remote or another local DB
Save local copy of a remote or another local DB
[ "Save", "local", "copy", "of", "a", "remote", "or", "another", "local", "DB" ]
def saveDBCopy(DB, filename, callback=None): import copy total = len(DB.getRecs()) if filename == '' or filename == None: return False if os.path.exists(filename): for i in ['.lock','.index','']: os.remove(filename+i) newDB = PDatabase(local=filename) newDB = copyDB(D...
[ "def", "saveDBCopy", "(", "DB", ",", "filename", ",", "callback", "=", "None", ")", ":", "import", "copy", "total", "=", "len", "(", "DB", ".", "getRecs", "(", ")", ")", "if", "filename", "==", "''", "or", "filename", "==", "None", ":", "return", "...
Save local copy of a remote or another local DB
[ "Save", "local", "copy", "of", "a", "remote", "or", "another", "local", "DB" ]
[ "\"\"\"Save local copy of a remote or another local DB\"\"\"" ]
[ { "param": "DB", "type": null }, { "param": "filename", "type": null }, { "param": "callback", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens":...
1b06089722db99b6aafc9308345f5778ac9d7abb
shambo001/peat
PEATDB/Utils.py
[ "MIT" ]
Python
createDBonServer
<not_specific>
def createDBonServer(prj, settings={}, callback=None, access=None): """Create a project on the mysql server""" import MySQLdb as mysql db = mysql.connect(**settings) c = db.cursor() cmd = "create database " + prj + ";" try: c.execute(cmd) except: pass if access != None: ...
Create a project on the mysql server
Create a project on the mysql server
[ "Create", "a", "project", "on", "the", "mysql", "server" ]
def createDBonServer(prj, settings={}, callback=None, access=None): import MySQLdb as mysql db = mysql.connect(**settings) c = db.cursor() cmd = "create database " + prj + ";" try: c.execute(cmd) except: pass if access != None: cmd = "grant all privileges on " + prj +...
[ "def", "createDBonServer", "(", "prj", ",", "settings", "=", "{", "}", ",", "callback", "=", "None", ",", "access", "=", "None", ")", ":", "import", "MySQLdb", "as", "mysql", "db", "=", "mysql", ".", "connect", "(", "**", "settings", ")", "c", "=", ...
Create a project on the mysql server
[ "Create", "a", "project", "on", "the", "mysql", "server" ]
[ "\"\"\"Create a project on the mysql server\"\"\"" ]
[ { "param": "prj", "type": null }, { "param": "settings", "type": null }, { "param": "callback", "type": null }, { "param": "access", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "prj", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "settings", "type": null, "docstring": null, "docstring_tokens"...
1b06089722db99b6aafc9308345f5778ac9d7abb
shambo001/peat
PEATDB/Utils.py
[ "MIT" ]
Python
copyDBtoServer
<not_specific>
def copyDBtoServer(DB, prj, settings): """Copy the contents of a local db to a remote one, requires settings to make the remote connection and get the remote db object""" remoteDB = loadDB(prj, remote=True, settings=settings) print 'source db: %s, remote db: %s' %(DB, remoteDB) newDB = copyD...
Copy the contents of a local db to a remote one, requires settings to make the remote connection and get the remote db object
Copy the contents of a local db to a remote one, requires settings to make the remote connection and get the remote db object
[ "Copy", "the", "contents", "of", "a", "local", "db", "to", "a", "remote", "one", "requires", "settings", "to", "make", "the", "remote", "connection", "and", "get", "the", "remote", "db", "object" ]
def copyDBtoServer(DB, prj, settings): remoteDB = loadDB(prj, remote=True, settings=settings) print 'source db: %s, remote db: %s' %(DB, remoteDB) newDB = copyDB(DB, remoteDB) newDB.commit(note='copy') return True
[ "def", "copyDBtoServer", "(", "DB", ",", "prj", ",", "settings", ")", ":", "remoteDB", "=", "loadDB", "(", "prj", ",", "remote", "=", "True", ",", "settings", "=", "settings", ")", "print", "'source db: %s, remote db: %s'", "%", "(", "DB", ",", "remoteDB",...
Copy the contents of a local db to a remote one, requires settings to make the remote connection and get the remote db object
[ "Copy", "the", "contents", "of", "a", "local", "db", "to", "a", "remote", "one", "requires", "settings", "to", "make", "the", "remote", "connection", "and", "get", "the", "remote", "db", "object" ]
[ "\"\"\"Copy the contents of a local db to a remote one, requires\n settings to make the remote connection and get\n the remote db object\"\"\"" ]
[ { "param": "DB", "type": null }, { "param": "prj", "type": null }, { "param": "settings", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "prj", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
do_summary
<not_specific>
def do_summary(self, DB, cols=None): """Print a summary of the current data loaded - no longer used""" summary=[] self.model_count={} self.residue_count={} self.residue_models={} self.atom_count={} for m in self.allmodels: self.model_count[m]=0 ...
Print a summary of the current data loaded - no longer used
Print a summary of the current data loaded - no longer used
[ "Print", "a", "summary", "of", "the", "current", "data", "loaded", "-", "no", "longer", "used" ]
def do_summary(self, DB, cols=None): summary=[] self.model_count={} self.residue_count={} self.residue_models={} self.atom_count={} for m in self.allmodels: self.model_count[m]=0 for res in self.residue_list: self.residue_count[res]=0 ...
[ "def", "do_summary", "(", "self", ",", "DB", ",", "cols", "=", "None", ")", ":", "summary", "=", "[", "]", "self", ".", "model_count", "=", "{", "}", "self", ".", "residue_count", "=", "{", "}", "self", ".", "residue_models", "=", "{", "}", "self",...
Print a summary of the current data loaded - no longer used
[ "Print", "a", "summary", "of", "the", "current", "data", "loaded", "-", "no", "longer", "used" ]
[ "\"\"\"Print a summary of the current data loaded - no longer used\"\"\"", "#store per residue model data", "#print dataset, fdata" ]
[ { "param": "self", "type": null }, { "param": "DB", "type": null }, { "param": "cols", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [],...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
dotitDBStats
<not_specific>
def dotitDBStats(self, ekindata, proteins=None, redirect=False): """Stats for titration datasets - takes a dict of ekindata, with the nmr column name as the key""" totaldatasets=0 totalphpoints=[] minphpoints=[];maxphpoints=[] phranges=[] stdevphrange=0 ...
Stats for titration datasets - takes a dict of ekindata, with the nmr column name as the key
Stats for titration datasets - takes a dict of ekindata, with the nmr column name as the key
[ "Stats", "for", "titration", "datasets", "-", "takes", "a", "dict", "of", "ekindata", "with", "the", "nmr", "column", "name", "as", "the", "key" ]
def dotitDBStats(self, ekindata, proteins=None, redirect=False): totaldatasets=0 totalphpoints=[] minphpoints=[];maxphpoints=[] phranges=[] stdevphrange=0 residuestats={} proteinstats={} lessXphstep=0 totaltitres=0 for t in self.residue_lis...
[ "def", "dotitDBStats", "(", "self", ",", "ekindata", ",", "proteins", "=", "None", ",", "redirect", "=", "False", ")", ":", "totaldatasets", "=", "0", "totalphpoints", "=", "[", "]", "minphpoints", "=", "[", "]", ";", "maxphpoints", "=", "[", "]", "phr...
Stats for titration datasets - takes a dict of ekindata, with the nmr column name as the key
[ "Stats", "for", "titration", "datasets", "-", "takes", "a", "dict", "of", "ekindata", "with", "the", "nmr", "column", "name", "as", "the", "key" ]
[ "\"\"\"Stats for titration datasets - takes a dict of ekindata, with the nmr\n column name as the key\"\"\"", "#stats on fits", "#print '<td>%s</td>' %total", "#breakdown" ]
[ { "param": "self", "type": null }, { "param": "ekindata", "type": null }, { "param": "proteins", "type": null }, { "param": "redirect", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindata", "type": null, "docstring": null, "docstring_tokens...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
exportAll
<not_specific>
def exportAll(self, DB, col=None): """Export all data as text to a single zipped file""" import shutil path = os.path.join(os.getcwd(), 'DBexport') if os.path.exists(path): shutil.rmtree(path) os.mkdir(path) self.getProtNames(DB) #print 'exporting..' ...
Export all data as text to a single zipped file
Export all data as text to a single zipped file
[ "Export", "all", "data", "as", "text", "to", "a", "single", "zipped", "file" ]
def exportAll(self, DB, col=None): import shutil path = os.path.join(os.getcwd(), 'DBexport') if os.path.exists(path): shutil.rmtree(path) os.mkdir(path) self.getProtNames(DB) total=0 if col == None: cols = ['1H NMR','15N NMR','13C NMR'] ...
[ "def", "exportAll", "(", "self", ",", "DB", ",", "col", "=", "None", ")", ":", "import", "shutil", "path", "=", "os", ".", "path", ".", "join", "(", "os", ".", "getcwd", "(", ")", ",", "'DBexport'", ")", "if", "os", ".", "path", ".", "exists", ...
Export all data as text to a single zipped file
[ "Export", "all", "data", "as", "text", "to", "a", "single", "zipped", "file" ]
[ "\"\"\"Export all data as text to a single zipped file\"\"\"", "#print 'exporting..'", "#if column not given we use all three", "#print 'processing %s' %name", "#zip everything into one file", "#path from current dir" ]
[ { "param": "self", "type": null }, { "param": "DB", "type": null }, { "param": "col", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [],...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
fitAll
<not_specific>
def fitAll(self, DB, col, proteins=None, models=None, strictchecking=False): """Fit selected recs/col in DB using find best model""" stats={} if strictchecking == True: checkfunc=self.dostrictchecking else: checkfunc=None for m in models: stats[m]=0 ...
Fit selected recs/col in DB using find best model
Fit selected recs/col in DB using find best model
[ "Fit", "selected", "recs", "/", "col", "in", "DB", "using", "find", "best", "model" ]
def fitAll(self, DB, col, proteins=None, models=None, strictchecking=False): stats={} if strictchecking == True: checkfunc=self.dostrictchecking else: checkfunc=None for m in models: stats[m]=0 if models == None: models = self.models if...
[ "def", "fitAll", "(", "self", ",", "DB", ",", "col", ",", "proteins", "=", "None", ",", "models", "=", "None", ",", "strictchecking", "=", "False", ")", ":", "stats", "=", "{", "}", "if", "strictchecking", "==", "True", ":", "checkfunc", "=", "self",...
Fit selected recs/col in DB using find best model
[ "Fit", "selected", "recs", "/", "col", "in", "DB", "using", "find", "best", "model" ]
[ "\"\"\"Fit selected recs/col in DB using find best model\"\"\"", "#we don't do f-test if only one model" ]
[ { "param": "self", "type": null }, { "param": "DB", "type": null }, { "param": "col", "type": null }, { "param": "proteins", "type": null }, { "param": "models", "type": null }, { "param": "strictchecking", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [],...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
findBest
<not_specific>
def findBest(self, E, models, geterrs=False, xuncert=0.1, yuncert=0.03): """Find best model for all datasets in an ekin project""" for d in E.datasets: fdata, p = E.findBestModel(d, models=models)#, checkfunc=self.dostrictchecking) if geterrs==True: ferrs = E.esti...
Find best model for all datasets in an ekin project
Find best model for all datasets in an ekin project
[ "Find", "best", "model", "for", "all", "datasets", "in", "an", "ekin", "project" ]
def findBest(self, E, models, geterrs=False, xuncert=0.1, yuncert=0.03): for d in E.datasets: fdata, p = E.findBestModel(d, models=models) if geterrs==True: ferrs = E.estimateExpUncertainty(d, runs=20, xuncert=xuncert, yuncert=yuncert) if ferrs == None: ...
[ "def", "findBest", "(", "self", ",", "E", ",", "models", ",", "geterrs", "=", "False", ",", "xuncert", "=", "0.1", ",", "yuncert", "=", "0.03", ")", ":", "for", "d", "in", "E", ".", "datasets", ":", "fdata", ",", "p", "=", "E", ".", "findBestMode...
Find best model for all datasets in an ekin project
[ "Find", "best", "model", "for", "all", "datasets", "in", "an", "ekin", "project" ]
[ "\"\"\"Find best model for all datasets in an ekin project\"\"\"", "#, checkfunc=self.dostrictchecking)" ]
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "models", "type": null }, { "param": "geterrs", "type": null }, { "param": "xuncert", "type": null }, { "param": "yuncert", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
showMeta
<not_specific>
def showMeta(cls, ekindata): """Print out meta data for all recs - debug""" proteins = ekindata.keys() for prot in proteins: print prot edata = ekindata[prot] E = EkinProject(data=edata) E.printMeta() return
Print out meta data for all recs - debug
Print out meta data for all recs - debug
[ "Print", "out", "meta", "data", "for", "all", "recs", "-", "debug" ]
def showMeta(cls, ekindata): proteins = ekindata.keys() for prot in proteins: print prot edata = ekindata[prot] E = EkinProject(data=edata) E.printMeta() return
[ "def", "showMeta", "(", "cls", ",", "ekindata", ")", ":", "proteins", "=", "ekindata", ".", "keys", "(", ")", "for", "prot", "in", "proteins", ":", "print", "prot", "edata", "=", "ekindata", "[", "prot", "]", "E", "=", "EkinProject", "(", "data", "="...
Print out meta data for all recs - debug
[ "Print", "out", "meta", "data", "for", "all", "recs", "-", "debug" ]
[ "\"\"\"Print out meta data for all recs - debug\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "ekindata", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindata", "type": null, "docstring": null, "docstring_tokens"...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
dostrictchecking
<not_specific>
def dostrictchecking(cls, datapoints, fitdata): """Do some checking of pKa models as per McIntosh suggestions 1. check pKa values are not too close to the end of the data points""" ph = datapoints phmin = min(ph) phmax = max(ph) model = fitdata['model'] vrs = ...
Do some checking of pKa models as per McIntosh suggestions 1. check pKa values are not too close to the end of the data points
Do some checking of pKa models as per McIntosh suggestions 1. check pKa values are not too close to the end of the data points
[ "Do", "some", "checking", "of", "pKa", "models", "as", "per", "McIntosh", "suggestions", "1", ".", "check", "pKa", "values", "are", "not", "too", "close", "to", "the", "end", "of", "the", "data", "points" ]
def dostrictchecking(cls, datapoints, fitdata): ph = datapoints phmin = min(ph) phmax = max(ph) model = fitdata['model'] vrs = Fitting.getFitVars(fitdata) X = Fitting.getFitter(model, vrs=vrs) fit = X.getFitDict() print fit pkas=[] for p in...
[ "def", "dostrictchecking", "(", "cls", ",", "datapoints", ",", "fitdata", ")", ":", "ph", "=", "datapoints", "phmin", "=", "min", "(", "ph", ")", "phmax", "=", "max", "(", "ph", ")", "model", "=", "fitdata", "[", "'model'", "]", "vrs", "=", "Fitting"...
Do some checking of pKa models as per McIntosh suggestions 1. check pKa values are not too close to the end of the data points
[ "Do", "some", "checking", "of", "pKa", "models", "as", "per", "McIntosh", "suggestions", "1", ".", "check", "pKa", "values", "are", "not", "too", "close", "to", "the", "end", "of", "the", "data", "points" ]
[ "\"\"\"Do some checking of pKa models as per McIntosh suggestions\n 1. check pKa values are not too close to the end of the data points\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "datapoints", "type": null }, { "param": "fitdata", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "datapoints", "type": null, "docstring": null, "docstring_token...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
findpKas
<not_specific>
def findpKas(cls, E, titratable=True, reliable=True, minspan=0.06): """Get pkas for an ekin project""" pkasdict = {} for d in E.datasets: resdata = E.getMetaData(d) if not resdata.has_key('residue') or not resdata.has_key('res_num'): #print d ...
Get pkas for an ekin project
Get pkas for an ekin project
[ "Get", "pkas", "for", "an", "ekin", "project" ]
def findpKas(cls, E, titratable=True, reliable=True, minspan=0.06): pkasdict = {} for d in E.datasets: resdata = E.getMetaData(d) if not resdata.has_key('residue') or not resdata.has_key('res_num'): continue res = resdata['residue'] try: ...
[ "def", "findpKas", "(", "cls", ",", "E", ",", "titratable", "=", "True", ",", "reliable", "=", "True", ",", "minspan", "=", "0.06", ")", ":", "pkasdict", "=", "{", "}", "for", "d", "in", "E", ".", "datasets", ":", "resdata", "=", "E", ".", "getMe...
Get pkas for an ekin project
[ "Get", "pkas", "for", "an", "ekin", "project" ]
[ "\"\"\"Get pkas for an ekin project\"\"\"", "#print d", "#normally we should have stored this already", "#print 'failed to get exp errs'", "#print d, plst#, pkaerr, spanerr", "#print d, 'exp error too big, omitting: %s %s' %(pkaerr, spanerr)" ]
[ { "param": "cls", "type": null }, { "param": "E", "type": null }, { "param": "titratable", "type": null }, { "param": "reliable", "type": null }, { "param": "minspan", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
extractpKas
<not_specific>
def extractpKas(cls, DB, col, names=None, minspan=0.06, reliable=True, titratable=True, silent=False): """Extract all or just reliable pKas from a set of ekin projects in the DB. Returns a dictionary with record/dataset keys storing pka info""" cls.getProtN...
Extract all or just reliable pKas from a set of ekin projects in the DB. Returns a dictionary with record/dataset keys storing pka info
Extract all or just reliable pKas from a set of ekin projects in the DB. Returns a dictionary with record/dataset keys storing pka info
[ "Extract", "all", "or", "just", "reliable", "pKas", "from", "a", "set", "of", "ekin", "projects", "in", "the", "DB", ".", "Returns", "a", "dictionary", "with", "record", "/", "dataset", "keys", "storing", "pka", "info" ]
def extractpKas(cls, DB, col, names=None, minspan=0.06, reliable=True, titratable=True, silent=False): cls.getProtNames(DB) if silent == False: print 'extracting pka values..' pkainfo={} total=0 for prot in DB.getRecs(): name = cls....
[ "def", "extractpKas", "(", "cls", ",", "DB", ",", "col", ",", "names", "=", "None", ",", "minspan", "=", "0.06", ",", "reliable", "=", "True", ",", "titratable", "=", "True", ",", "silent", "=", "False", ")", ":", "cls", ".", "getProtNames", "(", "...
Extract all or just reliable pKas from a set of ekin projects in the DB.
[ "Extract", "all", "or", "just", "reliable", "pKas", "from", "a", "set", "of", "ekin", "projects", "in", "the", "DB", "." ]
[ "\"\"\"Extract all or just reliable pKas from a set of ekin projects in the\n DB.\n Returns a dictionary with record/dataset keys storing pka info\"\"\"", "#print names" ]
[ { "param": "cls", "type": null }, { "param": "DB", "type": null }, { "param": "col", "type": null }, { "param": "names", "type": null }, { "param": "minspan", "type": null }, { "param": "reliable", "type": null }, { "param": "titratable", ...
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
analysepKas
<not_specific>
def analysepKas(cls, pkainfo, satoms='all', path=None, exclude=[], silent=False, prefix=''): """Read in the pkainfo dict from extractpkas method and do additional analyses, makes plots for titdb""" if path==None: path=os.getcwd() aminoacids = cls.re...
Read in the pkainfo dict from extractpkas method and do additional analyses, makes plots for titdb
Read in the pkainfo dict from extractpkas method and do additional analyses, makes plots for titdb
[ "Read", "in", "the", "pkainfo", "dict", "from", "extractpkas", "method", "and", "do", "additional", "analyses", "makes", "plots", "for", "titdb" ]
def analysepKas(cls, pkainfo, satoms='all', path=None, exclude=[], silent=False, prefix=''): if path==None: path=os.getcwd() aminoacids = cls.residue_names.keys() titratable = cls.titratable titrspans = {} primaryspans = {} all...
[ "def", "analysepKas", "(", "cls", ",", "pkainfo", ",", "satoms", "=", "'all'", ",", "path", "=", "None", ",", "exclude", "=", "[", "]", ",", "silent", "=", "False", ",", "prefix", "=", "''", ")", ":", "if", "path", "==", "None", ":", "path", "=",...
Read in the pkainfo dict from extractpkas method and do additional analyses, makes plots for titdb
[ "Read", "in", "the", "pkainfo", "dict", "from", "extractpkas", "method", "and", "do", "additional", "analyses", "makes", "plots", "for", "titdb" ]
[ "\"\"\"Read in the pkainfo dict from extractpkas method and do\n additional analyses, makes plots for titdb\"\"\"", "#histogram of reliable spans, for titr groups", "#primary spans, for titr groups", "#histogram of all spans for all groups", "#histogram of average shifts", "#store per atom", "#...
[ { "param": "cls", "type": null }, { "param": "pkainfo", "type": null }, { "param": "satoms", "type": null }, { "param": "path", "type": null }, { "param": "exclude", "type": null }, { "param": "silent", "type": null }, { "param": "prefix", ...
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pkainfo", "type": null, "docstring": null, "docstring_tokens":...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
makepKasTable
<not_specific>
def makepKasTable(cls, pkainfo=None, outfile=None, primary=False): """make table of pka fit/analysis results""" if outfile != None: saveout = sys.stdout fsock = open(outfile, 'w') sys.stdout = fsock kys = sorted(pkainfo.keys()) resinfo = {} #f...
make table of pka fit/analysis results
make table of pka fit/analysis results
[ "make", "table", "of", "pka", "fit", "/", "analysis", "results" ]
def makepKasTable(cls, pkainfo=None, outfile=None, primary=False): if outfile != None: saveout = sys.stdout fsock = open(outfile, 'w') sys.stdout = fsock kys = sorted(pkainfo.keys()) resinfo = {} for r in cls.residue_names.keys(): resinfo[r...
[ "def", "makepKasTable", "(", "cls", ",", "pkainfo", "=", "None", ",", "outfile", "=", "None", ",", "primary", "=", "False", ")", ":", "if", "outfile", "!=", "None", ":", "saveout", "=", "sys", ".", "stdout", "fsock", "=", "open", "(", "outfile", ",",...
make table of pka fit/analysis results
[ "make", "table", "of", "pka", "fit", "/", "analysis", "results" ]
[ "\"\"\"make table of pka fit/analysis results\"\"\"", "#for r in cls.titratable:", "#print name, res, resnum, atom, span, spanerr, pka, pkaerr, model", "#summary table for average pKas per residue" ]
[ { "param": "cls", "type": null }, { "param": "pkainfo", "type": null }, { "param": "outfile", "type": null }, { "param": "primary", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pkainfo", "type": null, "docstring": null, "docstring_tokens":...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
combineCurves
<not_specific>
def combineCurves(cls, d1, d2, factor=5): """Combine 2 sets of chem shifts to get one pH titr""" ph1,ch1 = d1.getxy() ph2,ch2 = d2.getxy() def getnearest(x, v): #get index of nearest val n=100 c=0 for val in x: i = abs(val-...
Combine 2 sets of chem shifts to get one pH titr
Combine 2 sets of chem shifts to get one pH titr
[ "Combine", "2", "sets", "of", "chem", "shifts", "to", "get", "one", "pH", "titr" ]
def combineCurves(cls, d1, d2, factor=5): ph1,ch1 = d1.getxy() ph2,ch2 = d2.getxy() def getnearest(x, v): n=100 c=0 for val in x: i = abs(val-v) if v < n: n = v i = c c=c+1...
[ "def", "combineCurves", "(", "cls", ",", "d1", ",", "d2", ",", "factor", "=", "5", ")", ":", "ph1", ",", "ch1", "=", "d1", ".", "getxy", "(", ")", "ph2", ",", "ch2", "=", "d2", ".", "getxy", "(", ")", "def", "getnearest", "(", "x", ",", "v", ...
Combine 2 sets of chem shifts to get one pH titr
[ "Combine", "2", "sets", "of", "chem", "shifts", "to", "get", "one", "pH", "titr" ]
[ "\"\"\"Combine 2 sets of chem shifts to get one pH titr\"\"\"", "#get index of nearest val", "#get ref vals for both , ie. min val", "#combine nearest ph vals instead", "#get nearest in ph2 to v1" ]
[ { "param": "cls", "type": null }, { "param": "d1", "type": null }, { "param": "d2", "type": null }, { "param": "factor", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "d1", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
makeCombined
<not_specific>
def makeCombined(cls, ekindata1, ekindata2, names=None): """Make combined chem shft and fit,then compare to originals""" proteins = ekindata1.keys() ekindatac = {} E1 = EkinProject(ekindata1) E2 = EkinProject(ekindata2) for prot in proteins: print ...
Make combined chem shft and fit,then compare to originals
Make combined chem shft and fit,then compare to originals
[ "Make", "combined", "chem", "shft", "and", "fit", "then", "compare", "to", "originals" ]
def makeCombined(cls, ekindata1, ekindata2, names=None): proteins = ekindata1.keys() ekindatac = {} E1 = EkinProject(ekindata1) E2 = EkinProject(ekindata2) for prot in proteins: print if cls.protnames != None: name = cls.protnames[prot] ...
[ "def", "makeCombined", "(", "cls", ",", "ekindata1", ",", "ekindata2", ",", "names", "=", "None", ")", ":", "proteins", "=", "ekindata1", ".", "keys", "(", ")", "ekindatac", "=", "{", "}", "E1", "=", "EkinProject", "(", "ekindata1", ")", "E2", "=", "...
Make combined chem shft and fit,then compare to originals
[ "Make", "combined", "chem", "shft", "and", "fit", "then", "compare", "to", "originals" ]
[ "\"\"\"Make combined chem shft and fit,then compare to originals\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "ekindata1", "type": null }, { "param": "ekindata2", "type": null }, { "param": "names", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindata1", "type": null, "docstring": null, "docstring_tokens...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
comparepKas
<not_specific>
def comparepKas(cls, E1, E2, d, titratable=False, errcutoff=1e2): """Compare pKas from fits in two ekin datasets returns: None if fails to find meaningful pKas from fits otherwise returns tuple of results""" reliable=True #print d try: ...
Compare pKas from fits in two ekin datasets returns: None if fails to find meaningful pKas from fits otherwise returns tuple of results
Compare pKas from fits in two ekin datasets returns: None if fails to find meaningful pKas from fits otherwise returns tuple of results
[ "Compare", "pKas", "from", "fits", "in", "two", "ekin", "datasets", "returns", ":", "None", "if", "fails", "to", "find", "meaningful", "pKas", "from", "fits", "otherwise", "returns", "tuple", "of", "results" ]
def comparepKas(cls, E1, E2, d, titratable=False, errcutoff=1e2): reliable=True try: res1 = E1.getMetaData(d)['residue'] except: return if titratable == True and not res1 in cls.titratable: return None fitdata1 = E1.getFitData(d) fitdat...
[ "def", "comparepKas", "(", "cls", ",", "E1", ",", "E2", ",", "d", ",", "titratable", "=", "False", ",", "errcutoff", "=", "1e2", ")", ":", "reliable", "=", "True", "try", ":", "res1", "=", "E1", ".", "getMetaData", "(", "d", ")", "[", "'residue'", ...
Compare pKas from fits in two ekin datasets returns: None if fails to find meaningful pKas from fits otherwise returns tuple of results
[ "Compare", "pKas", "from", "fits", "in", "two", "ekin", "datasets", "returns", ":", "None", "if", "fails", "to", "find", "meaningful", "pKas", "from", "fits", "otherwise", "returns", "tuple", "of", "results" ]
[ "\"\"\"Compare pKas from fits in two ekin datasets\n returns:\n None if fails to find meaningful pKas from fits\n otherwise returns tuple of results\"\"\"", "#print d", "#print E1.getDataset(d)", "#if model1 != model2:", "# print 'different models'", "#return None"...
[ { "param": "cls", "type": null }, { "param": "E1", "type": null }, { "param": "E2", "type": null }, { "param": "d", "type": null }, { "param": "titratable", "type": null }, { "param": "errcutoff", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E1", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
compareAllpKas
<not_specific>
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=[] fo...
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...
[ "def", "compareAllpKas", "(", "cls", ",", "E1", ",", "E2", ",", "titratable", "=", "False", ",", "exclude", "=", "None", ",", "errcutoff", "=", "1e2", ")", ":", "relpkas1", "=", "[", "]", ";", "relpkas2", "=", "[", "]", "relspans1", "=", "[", "]", ...
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)" ]
[ { "param": "cls", "type": null }, { "param": "E1", "type": null }, { "param": "E2", "type": null }, { "param": "titratable", "type": null }, { "param": "exclude", "type": null }, { "param": "errcutoff", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E1", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
compareNuclei
<not_specific>
def compareNuclei(cls, DB, col1, col2, names=None, titratable=True, silent=False, path=None): """Compare corresponding datasets for proteins that have data for 2 different NMR nuclei e.g. 1H vs 15N over entire DB""" relpkas1=[] relpkas2=[] relspans1=[] ...
Compare corresponding datasets for proteins that have data for 2 different NMR nuclei e.g. 1H vs 15N over entire DB
Compare corresponding datasets for proteins that have data for 2 different NMR nuclei e.g. 1H vs 15N over entire DB
[ "Compare", "corresponding", "datasets", "for", "proteins", "that", "have", "data", "for", "2", "different", "NMR", "nuclei", "e", ".", "g", ".", "1H", "vs", "15N", "over", "entire", "DB" ]
def compareNuclei(cls, DB, col1, col2, names=None, titratable=True, silent=False, path=None): relpkas1=[] relpkas2=[] relspans1=[] relspans2=[] otherpkas1=[] otherpkas2=[] pkasbyres1={} pkasbyres2={} for t in cls.residue_lis...
[ "def", "compareNuclei", "(", "cls", ",", "DB", ",", "col1", ",", "col2", ",", "names", "=", "None", ",", "titratable", "=", "True", ",", "silent", "=", "False", ",", "path", "=", "None", ")", ":", "relpkas1", "=", "[", "]", "relpkas2", "=", "[", ...
Compare corresponding datasets for proteins that have data for 2 different NMR nuclei e.g.
[ "Compare", "corresponding", "datasets", "for", "proteins", "that", "have", "data", "for", "2", "different", "NMR", "nuclei", "e", ".", "g", "." ]
[ "\"\"\"Compare corresponding datasets for proteins that have data\n for 2 different NMR nuclei e.g. 1H vs 15N over entire DB\"\"\"", "#names=[]", "#print r,a,b", "#names=names,", "#print 'reliable pKas, correl coeff:', cc", "#print 'other pKas, correl coeff:', cc", "#pylab.show()" ]
[ { "param": "cls", "type": null }, { "param": "DB", "type": null }, { "param": "col1", "type": null }, { "param": "col2", "type": null }, { "param": "names", "type": null }, { "param": "titratable", "type": null }, { "param": "silent", "...
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
compareExtractedpKas
<not_specific>
def compareExtractedpKas(cls, DB, col, prot1, prot2): """Compare extracted pKas across similar proteins and plot correlations per res""" pkas = cls.extractpKas(DB, col) p1={};p2={};p1errs={};p2errs={} labels={} tp=['conserved','non-conserved'] for t in tp: p1...
Compare extracted pKas across similar proteins and plot correlations per res
Compare extracted pKas across similar proteins and plot correlations per res
[ "Compare", "extracted", "pKas", "across", "similar", "proteins", "and", "plot", "correlations", "per", "res" ]
def compareExtractedpKas(cls, DB, col, prot1, prot2): pkas = cls.extractpKas(DB, col) p1={};p2={};p1errs={};p2errs={} labels={} tp=['conserved','non-conserved'] for t in tp: p1[t]=[];p2[t]=[] p1errs[t]=[];p2errs[t]=[] labels[t]=[] s1=[]...
[ "def", "compareExtractedpKas", "(", "cls", ",", "DB", ",", "col", ",", "prot1", ",", "prot2", ")", ":", "pkas", "=", "cls", ".", "extractpKas", "(", "DB", ",", "col", ")", "p1", "=", "{", "}", ";", "p2", "=", "{", "}", ";", "p1errs", "=", "{", ...
Compare extracted pKas across similar proteins and plot correlations per res
[ "Compare", "extracted", "pKas", "across", "similar", "proteins", "and", "plot", "correlations", "per", "res" ]
[ "\"\"\"Compare extracted pKas across similar proteins and plot correlations per res\"\"\"", "#this part requires alignment info!!", "# and res1 in cls.titratable:", "#s1.append(pkas1[n]['span']); s2.append(pkas2[n]['span']);", "'''fig2=pylab.figure()\n cc = cls.doXYPlot(fig2, s1, s2, xerrs=p1errs, ye...
[ { "param": "cls", "type": null }, { "param": "DB", "type": null }, { "param": "col", "type": null }, { "param": "prot1", "type": null }, { "param": "prot2", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
mappKas
<not_specific>
def mappKas(self, DB, col, pkainfo,names=None,spansfile=None, nucleus='H',calculatespans=True): """Create mapping of pKas to nearby titratable groups, we use the dict of extracted pKas, but also requires the DB for structural info""" self.getProtNames(DB) path...
Create mapping of pKas to nearby titratable groups, we use the dict of extracted pKas, but also requires the DB for structural info
Create mapping of pKas to nearby titratable groups, we use the dict of extracted pKas, but also requires the DB for structural info
[ "Create", "mapping", "of", "pKas", "to", "nearby", "titratable", "groups", "we", "use", "the", "dict", "of", "extracted", "pKas", "but", "also", "requires", "the", "DB", "for", "structural", "info" ]
def mappKas(self, DB, col, pkainfo,names=None,spansfile=None, nucleus='H',calculatespans=True): self.getProtNames(DB) path = os.getcwd() for prot in DB.getRecs(): name = self.protnames[prot] fname = name.replace(' ','').replace('(','').replace(')',...
[ "def", "mappKas", "(", "self", ",", "DB", ",", "col", ",", "pkainfo", ",", "names", "=", "None", ",", "spansfile", "=", "None", ",", "nucleus", "=", "'H'", ",", "calculatespans", "=", "True", ")", ":", "self", ".", "getProtNames", "(", "DB", ")", "...
Create mapping of pKas to nearby titratable groups, we use the dict of extracted pKas, but also requires the DB for structural info
[ "Create", "mapping", "of", "pKas", "to", "nearby", "titratable", "groups", "we", "use", "the", "dict", "of", "extracted", "pKas", "but", "also", "requires", "the", "DB", "for", "structural", "info" ]
[ "\"\"\"Create mapping of pKas to nearby titratable groups, we use the\n dict of extracted pKas, but also requires the DB for structural info\"\"\"", "#structure", "#ekin project with exp data", "#actual titr grp pKa values we get from labbook", "#call CSP analysis", "#assign ghosts - we use the ...
[ { "param": "self", "type": null }, { "param": "DB", "type": null }, { "param": "col", "type": null }, { "param": "pkainfo", "type": null }, { "param": "names", "type": null }, { "param": "spansfile", "type": null }, { "param": "nucleus", ...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "DB", "type": null, "docstring": null, "docstring_tokens": [],...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
assignGhosts
<not_specific>
def assignGhosts(self, pkainfo, calculatedspans, titrpkas, pdbfile): """Rough attempt to assign titrations using calculated spans for all titr grps and exp fits""" ghosts = {} from pKaTool.Ghosts.CSP_explicit import CSP_coulomb import pKaTool.Ghosts.utilities_CSP as CSPutils ...
Rough attempt to assign titrations using calculated spans for all titr grps and exp fits
Rough attempt to assign titrations using calculated spans for all titr grps and exp fits
[ "Rough", "attempt", "to", "assign", "titrations", "using", "calculated", "spans", "for", "all", "titr", "grps", "and", "exp", "fits" ]
def assignGhosts(self, pkainfo, calculatedspans, titrpkas, pdbfile): ghosts = {} from pKaTool.Ghosts.CSP_explicit import CSP_coulomb import pKaTool.Ghosts.utilities_CSP as CSPutils CC = CSP_coulomb(None, None) coordmol, chargemol = CC.parseCoordCharges(pdbfile, pdb=True) ...
[ "def", "assignGhosts", "(", "self", ",", "pkainfo", ",", "calculatedspans", ",", "titrpkas", ",", "pdbfile", ")", ":", "ghosts", "=", "{", "}", "from", "pKaTool", ".", "Ghosts", ".", "CSP_explicit", "import", "CSP_coulomb", "import", "pKaTool", ".", "Ghosts"...
Rough attempt to assign titrations using calculated spans for all titr grps and exp fits
[ "Rough", "attempt", "to", "assign", "titrations", "using", "calculated", "spans", "for", "all", "titr", "grps", "and", "exp", "fits" ]
[ "\"\"\"Rough attempt to assign titrations using calculated\n spans for all titr grps and exp fits\"\"\"", "#get titr residue coords first", "#iterate over spans and get matching exp fits", "#calculated titr spans for this residue", "#get largest span", "#print res, tmax, mx", "#find exp fits f...
[ { "param": "self", "type": null }, { "param": "pkainfo", "type": null }, { "param": "calculatedspans", "type": null }, { "param": "titrpkas", "type": null }, { "param": "pdbfile", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pkainfo", "type": null, "docstring": null, "docstring_tokens"...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
filterGhost
<not_specific>
def filterGhost(self, calcspan, expspan, titrpka, exppka, distance): """Apply criteria for assignment of ghost""" pkacutoff=1 spancutoff=0.01 #print calcspan, expspan, titrpka, exppka if abs(calcspan) < spancutoff: return False if calcspan>0 and expspan<0: ...
Apply criteria for assignment of ghost
Apply criteria for assignment of ghost
[ "Apply", "criteria", "for", "assignment", "of", "ghost" ]
def filterGhost(self, calcspan, expspan, titrpka, exppka, distance): pkacutoff=1 spancutoff=0.01 if abs(calcspan) < spancutoff: return False if calcspan>0 and expspan<0: return False if calcspan<0 and expspan>0: return False if abs(expp...
[ "def", "filterGhost", "(", "self", ",", "calcspan", ",", "expspan", ",", "titrpka", ",", "exppka", ",", "distance", ")", ":", "pkacutoff", "=", "1", "spancutoff", "=", "0.01", "if", "abs", "(", "calcspan", ")", "<", "spancutoff", ":", "return", "False", ...
Apply criteria for assignment of ghost
[ "Apply", "criteria", "for", "assignment", "of", "ghost" ]
[ "\"\"\"Apply criteria for assignment of ghost\"\"\"", "#print calcspan, expspan, titrpka, exppka", "#if distance > 20:", "# return False" ]
[ { "param": "self", "type": null }, { "param": "calcspan", "type": null }, { "param": "expspan", "type": null }, { "param": "titrpka", "type": null }, { "param": "exppka", "type": null }, { "param": "distance", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "calcspan", "type": null, "docstring": null, "docstring_tokens...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
compareCSPCurves
<not_specific>
def compareCSPCurves(self, E1, E2): """Get normalised rmsd between 2 ekin proj""" rmsdvals={} for d1 in E1.datasets: ed1 = E1.getDataset(d1) r = ed1['res_num'] if not r in E2.datasets: continue ed2 = E2.getDataset(r) x1,...
Get normalised rmsd between 2 ekin proj
Get normalised rmsd between 2 ekin proj
[ "Get", "normalised", "rmsd", "between", "2", "ekin", "proj" ]
def compareCSPCurves(self, E1, E2): rmsdvals={} for d1 in E1.datasets: ed1 = E1.getDataset(d1) r = ed1['res_num'] if not r in E2.datasets: continue ed2 = E2.getDataset(r) x1,y1 = ed1.getxy() x2,y2 = ed2.getxy() ...
[ "def", "compareCSPCurves", "(", "self", ",", "E1", ",", "E2", ")", ":", "rmsdvals", "=", "{", "}", "for", "d1", "in", "E1", ".", "datasets", ":", "ed1", "=", "E1", ".", "getDataset", "(", "d1", ")", "r", "=", "ed1", "[", "'res_num'", "]", "if", ...
Get normalised rmsd between 2 ekin proj
[ "Get", "normalised", "rmsd", "between", "2", "ekin", "proj" ]
[ "\"\"\"Get normalised rmsd between 2 ekin proj\"\"\"", "#offset y1 to zero", "#get rmsd, we assume x pts. match" ]
[ { "param": "self", "type": null }, { "param": "E1", "type": null }, { "param": "E2", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E1", "type": null, "docstring": null, "docstring_tokens": [],...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
convertpkadict
<not_specific>
def convertpkadict(self, t): """Convert pka info from table into format for CSP func""" P={} s=':' for r in t: resnum = string.zfill(t[r]['resnum'], 4) name = 'A'+s+resnum+s+t[r]['resname'] if t[r]['pka'] != '': P[name] = float(t[r]['pk...
Convert pka info from table into format for CSP func
Convert pka info from table into format for CSP func
[ "Convert", "pka", "info", "from", "table", "into", "format", "for", "CSP", "func" ]
def convertpkadict(self, t): P={} s=':' for r in t: resnum = string.zfill(t[r]['resnum'], 4) name = 'A'+s+resnum+s+t[r]['resname'] if t[r]['pka'] != '': P[name] = float(t[r]['pka']) return P
[ "def", "convertpkadict", "(", "self", ",", "t", ")", ":", "P", "=", "{", "}", "s", "=", "':'", "for", "r", "in", "t", ":", "resnum", "=", "string", ".", "zfill", "(", "t", "[", "r", "]", "[", "'resnum'", "]", ",", "4", ")", "name", "=", "'A...
Convert pka info from table into format for CSP func
[ "Convert", "pka", "info", "from", "table", "into", "format", "for", "CSP", "func" ]
[ "\"\"\"Convert pka info from table into format for CSP func\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "t", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "t", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
correlatewithStructure
<not_specific>
def correlatewithStructure(cls, ekindata, peatdb, pdbs=None): """Correlate a structural or other single property with each residue pKa/span""" #example here is for %surface accessibility import random count=0 pkas=[] spans={} other={} for t in cls.titrat...
Correlate a structural or other single property with each residue pKa/span
Correlate a structural or other single property with each residue pKa/span
[ "Correlate", "a", "structural", "or", "other", "single", "property", "with", "each", "residue", "pKa", "/", "span" ]
def correlatewithStructure(cls, ekindata, peatdb, pdbs=None): import random count=0 pkas=[] spans={} other={} for t in cls.titratable: spans[t]=[] other[t]=[] failedpdb=[] proteins = ekindata.keys() for prot in proteins: ...
[ "def", "correlatewithStructure", "(", "cls", ",", "ekindata", ",", "peatdb", ",", "pdbs", "=", "None", ")", ":", "import", "random", "count", "=", "0", "pkas", "=", "[", "]", "spans", "=", "{", "}", "other", "=", "{", "}", "for", "t", "in", "cls", ...
Correlate a structural or other single property with each residue pKa/span
[ "Correlate", "a", "structural", "or", "other", "single", "property", "with", "each", "residue", "pKa", "/", "span" ]
[ "\"\"\"Correlate a structural or other single property with each residue pKa/span\"\"\"", "#example here is for %surface accessibility", "#for structure stuff, we need pdb file here", "#get pdb file", "#pdblines = cls.getPDBfromFile(pdbfile)", "#get another attribute here eg. % rel. access.", "#resdata ...
[ { "param": "cls", "type": null }, { "param": "ekindata", "type": null }, { "param": "peatdb", "type": null }, { "param": "pdbs", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindata", "type": null, "docstring": null, "docstring_tokens"...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
checkStructMapProp
<not_specific>
def checkStructMapProp(cls, structmap, prop): """Check if a particular property is in the struct map""" found=0 for i in structmap.keys(): for props in structmap[i]['Data property']: if prop in props: found=1 break retur...
Check if a particular property is in the struct map
Check if a particular property is in the struct map
[ "Check", "if", "a", "particular", "property", "is", "in", "the", "struct", "map" ]
def checkStructMapProp(cls, structmap, prop): found=0 for i in structmap.keys(): for props in structmap[i]['Data property']: if prop in props: found=1 break return found
[ "def", "checkStructMapProp", "(", "cls", ",", "structmap", ",", "prop", ")", ":", "found", "=", "0", "for", "i", "in", "structmap", ".", "keys", "(", ")", ":", "for", "props", "in", "structmap", "[", "i", "]", "[", "'Data property'", "]", ":", "if", ...
Check if a particular property is in the struct map
[ "Check", "if", "a", "particular", "property", "is", "in", "the", "struct", "map" ]
[ "\"\"\"Check if a particular property is in the struct map\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "structmap", "type": null }, { "param": "prop", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "structmap", "type": null, "docstring": null, "docstring_tokens...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
save_PEAT_Structure
<not_specific>
def save_PEAT_Structure(cls, peatdata, protein): """Save a PDB file from a Structure cell""" pdblines,X = cls.getPDBfromPEAT(peatdata, protein) if pdblines == None: return None import os filename=os.path.join(os.getcwd(),'temp') if filename: if fil...
Save a PDB file from a Structure cell
Save a PDB file from a Structure cell
[ "Save", "a", "PDB", "file", "from", "a", "Structure", "cell" ]
def save_PEAT_Structure(cls, peatdata, protein): pdblines,X = cls.getPDBfromPEAT(peatdata, protein) if pdblines == None: return None import os filename=os.path.join(os.getcwd(),'temp') if filename: if filename[-4:]!='.pdb': filename=filenam...
[ "def", "save_PEAT_Structure", "(", "cls", ",", "peatdata", ",", "protein", ")", ":", "pdblines", ",", "X", "=", "cls", ".", "getPDBfromPEAT", "(", "peatdata", ",", "protein", ")", "if", "pdblines", "==", "None", ":", "return", "None", "import", "os", "fi...
Save a PDB file from a Structure cell
[ "Save", "a", "PDB", "file", "from", "a", "Structure", "cell" ]
[ "\"\"\"Save a PDB file from a Structure cell\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "peatdata", "type": null }, { "param": "protein", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "peatdata", "type": null, "docstring": null, "docstring_tokens"...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
fetchPMIDSummary
<not_specific>
def fetchPMIDSummary(cls, pmid): """Get summary of paper from pmid""" h=Entrez.esummary(db="pubmed", id=pmid) r=Entrez.read(h) author = r[0]['AuthorList'] title = r[0]['Title'] return author, title
Get summary of paper from pmid
Get summary of paper from pmid
[ "Get", "summary", "of", "paper", "from", "pmid" ]
def fetchPMIDSummary(cls, pmid): h=Entrez.esummary(db="pubmed", id=pmid) r=Entrez.read(h) author = r[0]['AuthorList'] title = r[0]['Title'] return author, title
[ "def", "fetchPMIDSummary", "(", "cls", ",", "pmid", ")", ":", "h", "=", "Entrez", ".", "esummary", "(", "db", "=", "\"pubmed\"", ",", "id", "=", "pmid", ")", "r", "=", "Entrez", ".", "read", "(", "h", ")", "author", "=", "r", "[", "0", "]", "["...
Get summary of paper from pmid
[ "Get", "summary", "of", "paper", "from", "pmid" ]
[ "\"\"\"Get summary of paper from pmid\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "pmid", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pmid", "type": null, "docstring": null, "docstring_tokens": []...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
plotHistograms
<not_specific>
def plotHistograms(cls, ax, data, bins=25, title='', xlabel=None, ylabel=None, color=None, colors=False, xticks=True, yticks=True, xlim=None): """Do a pylab histogram overlaying 1 or more dicts on the same axis and using the same bins, so that they are clearly visible""" ...
Do a pylab histogram overlaying 1 or more dicts on the same axis and using the same bins, so that they are clearly visible
Do a pylab histogram overlaying 1 or more dicts on the same axis and using the same bins, so that they are clearly visible
[ "Do", "a", "pylab", "histogram", "overlaying", "1", "or", "more", "dicts", "on", "the", "same", "axis", "and", "using", "the", "same", "bins", "so", "that", "they", "are", "clearly", "visible" ]
def plotHistograms(cls, ax, data, bins=25, title='', xlabel=None, ylabel=None, color=None, colors=False, xticks=True, yticks=True, xlim=None): import Utils pyclrs = cls.pylabcolors if color == None: clr = 'blue' else: clr = color ...
[ "def", "plotHistograms", "(", "cls", ",", "ax", ",", "data", ",", "bins", "=", "25", ",", "title", "=", "''", ",", "xlabel", "=", "None", ",", "ylabel", "=", "None", ",", "color", "=", "None", ",", "colors", "=", "False", ",", "xticks", "=", "Tru...
Do a pylab histogram overlaying 1 or more dicts on the same axis and using the same bins, so that they are clearly visible
[ "Do", "a", "pylab", "histogram", "overlaying", "1", "or", "more", "dicts", "on", "the", "same", "axis", "and", "using", "the", "same", "bins", "so", "that", "they", "are", "clearly", "visible" ]
[ "\"\"\"Do a pylab histogram overlaying 1 or more dicts on the same axis\n and using the same bins, so that they are clearly visible\"\"\"", "#if len(data) > 1:", "#else:", "# mybins = bins", "# w=1.0/bins", "#, alpha=0.9)", "#patches[h] = ax.bar(mybins[:len(mybins)-1], hd, width=w, colo...
[ { "param": "cls", "type": null }, { "param": "ax", "type": null }, { "param": "data", "type": null }, { "param": "bins", "type": null }, { "param": "title", "type": null }, { "param": "xlabel", "type": null }, { "param": "ylabel", "type...
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ax", "type": null, "docstring": null, "docstring_tokens": [], ...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
doMultipleHistograms
<not_specific>
def doMultipleHistograms(cls, fig, recs, bins=20, title='', xlabel=None, ylabel=None, color=None, subplots=True, colors=False, xticks=True, yticks=True, xlim=None): """Do a pylab histogram of a dict of 1 or more dicts """ subplots=[] dim=int(math.ceil(len(recs)/2.0)) ...
Do a pylab histogram of a dict of 1 or more dicts
Do a pylab histogram of a dict of 1 or more dicts
[ "Do", "a", "pylab", "histogram", "of", "a", "dict", "of", "1", "or", "more", "dicts" ]
def doMultipleHistograms(cls, fig, recs, bins=20, title='', xlabel=None, ylabel=None, color=None, subplots=True, colors=False, xticks=True, yticks=True, xlim=None): subplots=[] dim=int(math.ceil(len(recs)/2.0)) i=1 for r in recs: if len(recs[r])==0: ...
[ "def", "doMultipleHistograms", "(", "cls", ",", "fig", ",", "recs", ",", "bins", "=", "20", ",", "title", "=", "''", ",", "xlabel", "=", "None", ",", "ylabel", "=", "None", ",", "color", "=", "None", ",", "subplots", "=", "True", ",", "colors", "="...
Do a pylab histogram of a dict of 1 or more dicts
[ "Do", "a", "pylab", "histogram", "of", "a", "dict", "of", "1", "or", "more", "dicts" ]
[ "\"\"\"Do a pylab histogram of a dict of 1 or more dicts \"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "fig", "type": null }, { "param": "recs", "type": null }, { "param": "bins", "type": null }, { "param": "title", "type": null }, { "param": "xlabel", "type": null }, { "param": "ylabel", "typ...
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fig", "type": null, "docstring": null, "docstring_tokens": [],...
468d4601fe3ee70290c489563bc230f6b386e0ad
shambo001/peat
PEATDB/Ekin/Titration.py
[ "MIT" ]
Python
doXYPlot
<not_specific>
def doXYPlot(cls, ax, x, y, names=None, err=0.5, title=None, xerrs=None, yerrs=None, xlabel=None, ylabel=None, xaxislabels=None, color=None, symbol=None, markersize=30): """Do xy plot of 2 lists and show correlation annotate is a list of tup...
Do xy plot of 2 lists and show correlation annotate is a list of tuples with x,y coord and text to print at that pt
Do xy plot of 2 lists and show correlation annotate is a list of tuples with x,y coord and text to print at that pt
[ "Do", "xy", "plot", "of", "2", "lists", "and", "show", "correlation", "annotate", "is", "a", "list", "of", "tuples", "with", "x", "y", "coord", "and", "text", "to", "print", "at", "that", "pt" ]
def doXYPlot(cls, ax, x, y, names=None, err=0.5, title=None, xerrs=None, yerrs=None, xlabel=None, ylabel=None, xaxislabels=None, color=None, symbol=None, markersize=30): if len(x) == 0: return None if color == None: clr ...
[ "def", "doXYPlot", "(", "cls", ",", "ax", ",", "x", ",", "y", ",", "names", "=", "None", ",", "err", "=", "0.5", ",", "title", "=", "None", ",", "xerrs", "=", "None", ",", "yerrs", "=", "None", ",", "xlabel", "=", "None", ",", "ylabel", "=", ...
Do xy plot of 2 lists and show correlation annotate is a list of tuples with x,y coord and text to print at that pt
[ "Do", "xy", "plot", "of", "2", "lists", "and", "show", "correlation", "annotate", "is", "a", "list", "of", "tuples", "with", "x", "y", "coord", "and", "text", "to", "print", "at", "that", "pt" ]
[ "\"\"\"Do xy plot of 2 lists and show correlation\n annotate is a list of tuples with x,y coord and text to print at that pt\"\"\"", "#z = pylab.Circle((i[0], i[1]), 0.2,fill=False,alpha=0.7)", "#ax.add_patch(z)", "#print 'corr. coeff:', cc", "#print 'RMSE:', rmse" ]
[ { "param": "cls", "type": null }, { "param": "ax", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "names", "type": null }, { "param": "err", "type": null }, { "param": "title", "type": null ...
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ax", "type": null, "docstring": null, "docstring_tokens": [], ...
46a0b1abdfb374d8d4be16d8d31ce7b7f058bfd5
shambo001/peat
PEATSA/Core/Tests/RegressionTests/RegressionTest.py
[ "MIT" ]
Python
TestPEAT_SA
<not_specific>
def TestPEAT_SA(pdbFile, workingDir, outputDir, calculation, ligand=None): '''Runs a test for a calculation on a given pdbFile''' runString = "%sProteinDesignTool.py -p %s -w %s -o %s %s --mutationList=testList -v" % (location, pdbFile, workingDir, outputDir, calculation) name = os.path.split(outputDir)[1] if os...
Runs a test for a calculation on a given pdbFile
Runs a test for a calculation on a given pdbFile
[ "Runs", "a", "test", "for", "a", "calculation", "on", "a", "given", "pdbFile" ]
def TestPEAT_SA(pdbFile, workingDir, outputDir, calculation, ligand=None): runString = "%sProteinDesignTool.py -p %s -w %s -o %s %s --mutationList=testList -v" % (location, pdbFile, workingDir, outputDir, calculation) name = os.path.split(outputDir)[1] if os.path.exists(outputDir): shutil.rmtree(outputDir) os.mk...
[ "def", "TestPEAT_SA", "(", "pdbFile", ",", "workingDir", ",", "outputDir", ",", "calculation", ",", "ligand", "=", "None", ")", ":", "runString", "=", "\"%sProteinDesignTool.py -p %s -w %s -o %s %s --mutationList=testList -v\"", "%", "(", "location", ",", "pdbFile", "...
Runs a test for a calculation on a given pdbFile
[ "Runs", "a", "test", "for", "a", "calculation", "on", "a", "given", "pdbFile" ]
[ "'''Runs a test for a calculation on a given pdbFile'''" ]
[ { "param": "pdbFile", "type": null }, { "param": "workingDir", "type": null }, { "param": "outputDir", "type": null }, { "param": "calculation", "type": null }, { "param": "ligand", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbFile", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "workingDir", "type": null, "docstring": null, "docstring_t...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
GetPDB
<not_specific>
def GetPDB(pdbCode, dict={}): '''Fetches a pdb from the pdb. Returns a stream to the pdb contents. If dict is provided it contains the key 'stream' on success whose value is the stream. On fail it contains two keys 'error' and 'description''' url = "http://www.rcsb.org//pdb/download/downloadFile.do?fileFormat=...
Fetches a pdb from the pdb. Returns a stream to the pdb contents. If dict is provided it contains the key 'stream' on success whose value is the stream. On fail it contains two keys 'error' and 'description
Fetches a pdb from the pdb. Returns a stream to the pdb contents. If dict is provided it contains the key 'stream' on success whose value is the stream. On fail it contains two keys 'error' and 'description
[ "Fetches", "a", "pdb", "from", "the", "pdb", ".", "Returns", "a", "stream", "to", "the", "pdb", "contents", ".", "If", "dict", "is", "provided", "it", "contains", "the", "key", "'", "stream", "'", "on", "success", "whose", "value", "is", "the", "stream...
def GetPDB(pdbCode, dict={}): url = "http://www.rcsb.org//pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=" + pdbCode try: if sys.version_info[:2] == (2,5): import socket socket.setdefaulttimeout(10) stream = urllib2.urlopen(url) else: stream = urllib2.urlopen(url, None, timeo...
[ "def", "GetPDB", "(", "pdbCode", ",", "dict", "=", "{", "}", ")", ":", "url", "=", "\"http://www.rcsb.org//pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=\"", "+", "pdbCode", "try", ":", "if", "sys", ".", "version_info", "[", ":", "2", "]", ...
Fetches a pdb from the pdb.
[ "Fetches", "a", "pdb", "from", "the", "pdb", "." ]
[ "'''Fetches a pdb from the pdb. Returns a stream to the pdb contents.\n\t\n\tIf dict is provided it contains the key 'stream' on success whose value is the stream.\n\tOn fail it contains two keys 'error' and 'description'''", "#URLLib API changed in 2.6", "#Check for an error" ]
[ { "param": "pdbCode", "type": null }, { "param": "dict", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbCode", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dict", "type": null, "docstring": null, "docstring_tokens"...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
CreateMutationString
<not_specific>
def CreateMutationString(mutationData, webStorageDirectory, jobInputDirectory, job): '''Creates the mutation part of the command line arguments based on the mutationData dictionary''' mutationType = mutationData['Type'] mutationString = "--%s=%s" if mutationType == 'mutationList': #Write out the file to the we...
Creates the mutation part of the command line arguments based on the mutationData dictionary
Creates the mutation part of the command line arguments based on the mutationData dictionary
[ "Creates", "the", "mutation", "part", "of", "the", "command", "line", "arguments", "based", "on", "the", "mutationData", "dictionary" ]
def CreateMutationString(mutationData, webStorageDirectory, jobInputDirectory, job): mutationType = mutationData['Type'] mutationString = "--%s=%s" if mutationType == 'mutationList': filename = os.path.join(webStorageDirectory, 'mutationList') stream = open(filename, 'w+') stream.write(mutationData['Data'].rea...
[ "def", "CreateMutationString", "(", "mutationData", ",", "webStorageDirectory", ",", "jobInputDirectory", ",", "job", ")", ":", "mutationType", "=", "mutationData", "[", "'Type'", "]", "mutationString", "=", "\"--%s=%s\"", "if", "mutationType", "==", "'mutationList'",...
Creates the mutation part of the command line arguments based on the mutationData dictionary
[ "Creates", "the", "mutation", "part", "of", "the", "command", "line", "arguments", "based", "on", "the", "mutationData", "dictionary" ]
[ "'''Creates the mutation part of the command line arguments based on the mutationData dictionary'''", "#Write out the file to the web storage directory", "#Fixme - catch mutation list exception", "#Create the string", "#Note we must give the path to the mutationFile as it will ", "#be when the job is run"...
[ { "param": "mutationData", "type": null }, { "param": "webStorageDirectory", "type": null }, { "param": "jobInputDirectory", "type": null }, { "param": "job", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "mutationData", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "webStorageDirectory", "type": null, "docstring": null, ...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
CreateCalculationString
<not_specific>
def CreateCalculationString(calculations, ligandFile): '''Creates the calculation parts of the command line arguments bassed on the calculations list''' calculationString = "" if calculations.count('scan') != 0: calculationString = calculationString + "--scan " if calculations.count('stability') != 0: cal...
Creates the calculation parts of the command line arguments bassed on the calculations list
Creates the calculation parts of the command line arguments bassed on the calculations list
[ "Creates", "the", "calculation", "parts", "of", "the", "command", "line", "arguments", "bassed", "on", "the", "calculations", "list" ]
def CreateCalculationString(calculations, ligandFile): calculationString = "" if calculations.count('scan') != 0: calculationString = calculationString + "--scan " if calculations.count('stability') != 0: calculationString = calculationString + " --stability" if ligandFile is not None and calculations.count('bi...
[ "def", "CreateCalculationString", "(", "calculations", ",", "ligandFile", ")", ":", "calculationString", "=", "\"\"", "if", "calculations", ".", "count", "(", "'scan'", ")", "!=", "0", ":", "calculationString", "=", "calculationString", "+", "\"--scan \"", "if", ...
Creates the calculation parts of the command line arguments bassed on the calculations list
[ "Creates", "the", "calculation", "parts", "of", "the", "command", "line", "arguments", "bassed", "on", "the", "calculations", "list" ]
[ "'''Creates the calculation parts of the command line arguments bassed on the calculations list'''" ]
[ { "param": "calculations", "type": null }, { "param": "ligandFile", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "calculations", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ligandFile", "type": null, "docstring": null, "docstr...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
ConstructErrorURL
<not_specific>
def ConstructErrorURL(domain="PDT.UnknownDomain", description="Unexpected Error", detailedDescription="Unknown error while processing job", recoverySuggestion="Please contact the developers with details of what you were doing"): '''Constructs an URL for the WebApps error page Automatically determines the s...
Constructs an URL for the WebApps error page Automatically determines the server name and port from os.envrion Parameters domain - The domain of the error - Indicates what part of the program failed description - A short string which very briefly describes what happened detailedDescription - A longer string...
Constructs an URL for the WebApps error page Automatically determines the server name and port from os.envrion Return A string containing an URL
[ "Constructs", "an", "URL", "for", "the", "WebApps", "error", "page", "Automatically", "determines", "the", "server", "name", "and", "port", "from", "os", ".", "envrion", "Return", "A", "string", "containing", "an", "URL" ]
def ConstructErrorURL(domain="PDT.UnknownDomain", description="Unexpected Error", detailedDescription="Unknown error while processing job", recoverySuggestion="Please contact the developers with details of what you were doing"): dataDict = {"domain":domain, "description":description, "detailedDescriptio...
[ "def", "ConstructErrorURL", "(", "domain", "=", "\"PDT.UnknownDomain\"", ",", "description", "=", "\"Unexpected Error\"", ",", "detailedDescription", "=", "\"Unknown error while processing job\"", ",", "recoverySuggestion", "=", "\"Please contact the developers with details of what...
Constructs an URL for the WebApps error page Automatically determines the server name and port from os.envrion
[ "Constructs", "an", "URL", "for", "the", "WebApps", "error", "page", "Automatically", "determines", "the", "server", "name", "and", "port", "from", "os", ".", "envrion" ]
[ "'''Constructs an URL for the WebApps error page\n\t\n\tAutomatically determines the server name and port from os.envrion\n\t\n\tParameters\n\t\tdomain - The domain of the error - Indicates what part of the program failed\n\t\tdescription - A short string which very briefly describes what happened\n\t\tdetailedDesc...
[ { "param": "domain", "type": null }, { "param": "description", "type": null }, { "param": "detailedDescription", "type": null }, { "param": "recoverySuggestion", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "domain", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "description", "type": null, "docstring": null, "docstring_t...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
ProcessPDBFilename
<not_specific>
def ProcessPDBFilename(filename): '''Processes the input string to be of the form "PDBID.pdb" This is done in the following way: - filename is split into base + extension - Trailing whitespace and underlines are removed - All punctuation (except for underlines) is removed - All spaces are replaces with underli...
Processes the input string to be of the form "PDBID.pdb" This is done in the following way: - filename is split into base + extension - Trailing whitespace and underlines are removed - All punctuation (except for underlines) is removed - All spaces are replaces with underlines - The base is lower-cased and appe...
Processes the input string to be of the form "PDBID.pdb" This is done in the following way: filename is split into base + extension Trailing whitespace and underlines are removed All punctuation (except for underlines) is removed All spaces are replaces with underlines The base is lower-cased and appended with .pdb If...
[ "Processes", "the", "input", "string", "to", "be", "of", "the", "form", "\"", "PDBID", ".", "pdb", "\"", "This", "is", "done", "in", "the", "following", "way", ":", "filename", "is", "split", "into", "base", "+", "extension", "Trailing", "whitespace", "a...
def ProcessPDBFilename(filename): filename = os.path.basename(filename) extension = os.path.splitext(filename)[1] if extension.lower() != ".pdb": return "" pdbId = os.path.splitext(filename)[0] pdbId = pdbId.strip() pdbId = pdbId.strip("_") pdbId = pdbId.replace("_", " ") for character in string.punctuation:...
[ "def", "ProcessPDBFilename", "(", "filename", ")", ":", "filename", "=", "os", ".", "path", ".", "basename", "(", "filename", ")", "extension", "=", "os", ".", "path", ".", "splitext", "(", "filename", ")", "[", "1", "]", "if", "extension", ".", "lower...
Processes the input string to be of the form "PDBID.pdb" This is done in the following way: filename is split into base + extension Trailing whitespace and underlines are removed All punctuation (except for underlines) is removed All spaces are replaces with underlines The base is lower-cased and appended with .pd...
[ "Processes", "the", "input", "string", "to", "be", "of", "the", "form", "\"", "PDBID", ".", "pdb", "\"", "This", "is", "done", "in", "the", "following", "way", ":", "filename", "is", "split", "into", "base", "+", "extension", "Trailing", "whitespace", "a...
[ "'''Processes the input string to be of the form \"PDBID.pdb\"\n\t\n\tThis is done in the following way:\n\t- filename is split into base + extension\n\t- Trailing whitespace and underlines are removed\n\t- All punctuation (except for underlines) is removed\n\t- All spaces are replaces with underlines\n\t- The base...
[ { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
_checkUploadedFiles
<not_specific>
def _checkUploadedFiles(self): '''Checks all the uploaded files to see if they are within limits''' #If a PKA code wasn't provided a #pdb file must be present - check the file size if not self.formData.isPKACodePresent(): content = self.formData.pdbFileStream().read() if len(content) > self.uploadLim...
Checks all the uploaded files to see if they are within limits
Checks all the uploaded files to see if they are within limits
[ "Checks", "all", "the", "uploaded", "files", "to", "see", "if", "they", "are", "within", "limits" ]
def _checkUploadedFiles(self): if not self.formData.isPKACodePresent(): content = self.formData.pdbFileStream().read() if len(content) > self.uploadLimit: self.errorData = {"domain":"PDT.SubmissionDomain", "description":"Error with pdb.", "detailedDescription":"Filesize exceeds size limit (%.2lf...
[ "def", "_checkUploadedFiles", "(", "self", ")", ":", "if", "not", "self", ".", "formData", ".", "isPKACodePresent", "(", ")", ":", "content", "=", "self", ".", "formData", ".", "pdbFileStream", "(", ")", ".", "read", "(", ")", "if", "len", "(", "conten...
Checks all the uploaded files to see if they are within limits
[ "Checks", "all", "the", "uploaded", "files", "to", "see", "if", "they", "are", "within", "limits" ]
[ "'''Checks all the uploaded files to see if they are within limits'''", "#If a PKA code wasn't provided a ", "#pdb file must be present - check the file size" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
_setErrorData
null
def _setErrorData(self, data): '''Convenience method for creating errorData due to a configuration error. The exact reason for the error is provided by data.''' self.errorData = {"domain":"PDT.ConfigurationDomain", "description":"Error initialising job submission environment.", "detailedDescription...
Convenience method for creating errorData due to a configuration error. The exact reason for the error is provided by data.
Convenience method for creating errorData due to a configuration error. The exact reason for the error is provided by data.
[ "Convenience", "method", "for", "creating", "errorData", "due", "to", "a", "configuration", "error", ".", "The", "exact", "reason", "for", "the", "error", "is", "provided", "by", "data", "." ]
def _setErrorData(self, data): self.errorData = {"domain":"PDT.ConfigurationDomain", "description":"Error initialising job submission environment.", "detailedDescription":data, "recoverySuggestion":"This is a bug - please contact the developers."}
[ "def", "_setErrorData", "(", "self", ",", "data", ")", ":", "self", ".", "errorData", "=", "{", "\"domain\"", ":", "\"PDT.ConfigurationDomain\"", ",", "\"description\"", ":", "\"Error initialising job submission environment.\"", ",", "\"detailedDescription\"", ":", "dat...
Convenience method for creating errorData due to a configuration error.
[ "Convenience", "method", "for", "creating", "errorData", "due", "to", "a", "configuration", "error", "." ]
[ "'''Convenience method for creating errorData due to a configuration error.\n\t\t\n\t\tThe exact reason for the error is provided by data.'''" ]
[ { "param": "self", "type": null }, { "param": "data", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "data", "type": null, "docstring": null, "docstring_tokens": [...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
_writeStringToFile
null
def _writeStringToFile(self, string, filename): '''Convenience method for writing to a file''' stream = open(filename, "w+") stream.write(string) stream.close()
Convenience method for writing to a file
Convenience method for writing to a file
[ "Convenience", "method", "for", "writing", "to", "a", "file" ]
def _writeStringToFile(self, string, filename): stream = open(filename, "w+") stream.write(string) stream.close()
[ "def", "_writeStringToFile", "(", "self", ",", "string", ",", "filename", ")", ":", "stream", "=", "open", "(", "filename", ",", "\"w+\"", ")", "stream", ".", "write", "(", "string", ")", "stream", ".", "close", "(", ")" ]
Convenience method for writing to a file
[ "Convenience", "method", "for", "writing", "to", "a", "file" ]
[ "'''Convenience method for writing to a file'''" ]
[ { "param": "self", "type": null }, { "param": "string", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "string", "type": null, "docstring": null, "docstring_tokens":...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
construct
<not_specific>
def construct(self): '''Performs all necessary steps for setting up a WebApp job based on the data submitted by a user via the WebApp main page. This basically involves three steps. - Creation of a entry for the Job in the WebApp database - Outputing the job files uploaded by the user to correct locat...
Performs all necessary steps for setting up a WebApp job based on the data submitted by a user via the WebApp main page. This basically involves three steps. - Creation of a entry for the Job in the WebApp database - Outputing the job files uploaded by the user to correct locations - Assembing the comm...
Performs all necessary steps for setting up a WebApp job based on the data submitted by a user via the WebApp main page. This basically involves three steps. Creation of a entry for the Job in the WebApp database Outputing the job files uploaded by the user to correct locations Assembing the command line string that w...
[ "Performs", "all", "necessary", "steps", "for", "setting", "up", "a", "WebApp", "job", "based", "on", "the", "data", "submitted", "by", "a", "user", "via", "the", "WebApp", "main", "page", ".", "This", "basically", "involves", "three", "steps", ".", "Creat...
def construct(self): self.job = self.jobManager.createJob(self.formData.pdbId(), self.formData.calculations()) try: jobOutputDirectory = self.options.get('WEB APPLICATION', 'jobOutputDirectory') jobInputDirectory = self.options.get('WEB APPLICATION', 'jobInputDirectory') pKaDataDirectory = self.options.ge...
[ "def", "construct", "(", "self", ")", ":", "self", ".", "job", "=", "self", ".", "jobManager", ".", "createJob", "(", "self", ".", "formData", ".", "pdbId", "(", ")", ",", "self", ".", "formData", ".", "calculations", "(", ")", ")", "try", ":", "jo...
Performs all necessary steps for setting up a WebApp job based on the data submitted by a user via the WebApp main page.
[ "Performs", "all", "necessary", "steps", "for", "setting", "up", "a", "WebApp", "job", "based", "on", "the", "data", "submitted", "by", "a", "user", "via", "the", "WebApp", "main", "page", "." ]
[ "'''Performs all necessary steps for setting up a WebApp job based on the data submitted by a user via the WebApp main page.\n\t\t\n\t\tThis basically involves three steps.\n\t\t\n\t\t\t- Creation of a entry for the Job in the WebApp database\n\t\t\t- Outputing the job files uploaded by the user to correct location...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
runBackend
<not_specific>
def runBackend(self): '''Executes the command string for the job via Popen Returns: An URL which specifies a page giving information about the Job or None if construct() has not been called.''' if self.runString == None: return try: #Put selected calculations into state Queued regardless of...
Executes the command string for the job via Popen Returns: An URL which specifies a page giving information about the Job or None if construct() has not been called.
Executes the command string for the job via Popen
[ "Executes", "the", "command", "string", "for", "the", "job", "via", "Popen" ]
def runBackend(self): if self.runString == None: return try: states = self.job.calculationStates() for calculation in states.keys(): if states[calculation] != "NotSelected": self.job.setCalculationState(calculation, "Queued") standardOut = open(os.path.join(self.webServerDirectory, "PDTWebRuns....
[ "def", "runBackend", "(", "self", ")", ":", "if", "self", ".", "runString", "==", "None", ":", "return", "try", ":", "states", "=", "self", ".", "job", ".", "calculationStates", "(", ")", "for", "calculation", "in", "states", ".", "keys", "(", ")", "...
Executes the command string for the job via Popen
[ "Executes", "the", "command", "string", "for", "the", "job", "via", "Popen" ]
[ "'''Executes the command string for the job via Popen\n\t\t\n\t\tReturns:\n\t\t\tAn URL which specifies a page giving information about the Job\n\t\t\tor None if construct() has not been called.'''", "#Put selected calculations into state Queued regardless of whether this following works or not.", "#This avoid ...
[ { "param": "self", "type": null } ]
{ "returns": [ { "docstring": "An URL which specifies a page giving information about the Job\nor None if construct() has not been called.", "docstring_tokens": [ "An", "URL", "which", "specifies", "a", "page", "giving", "information", ...
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
errorURL
<not_specific>
def errorURL(self): '''Returns an URL for the WebApp error page if there was an error with the form data. On loading this URL the user will be presented with information regarding what went wrong. If there was no problem this methods return None''' if self.errorData is None: return None return ...
Returns an URL for the WebApp error page if there was an error with the form data. On loading this URL the user will be presented with information regarding what went wrong. If there was no problem this methods return None
Returns an URL for the WebApp error page if there was an error with the form data. On loading this URL the user will be presented with information regarding what went wrong. If there was no problem this methods return None
[ "Returns", "an", "URL", "for", "the", "WebApp", "error", "page", "if", "there", "was", "an", "error", "with", "the", "form", "data", ".", "On", "loading", "this", "URL", "the", "user", "will", "be", "presented", "with", "information", "regarding", "what", ...
def errorURL(self): if self.errorData is None: return None return ConstructErrorURL(domain=self.errorData["domain"], description=self.errorData["description"], detailedDescription=self.errorData["detailedDescription"], recoverySuggestion=self.errorData["recoverySuggestion"])
[ "def", "errorURL", "(", "self", ")", ":", "if", "self", ".", "errorData", "is", "None", ":", "return", "None", "return", "ConstructErrorURL", "(", "domain", "=", "self", ".", "errorData", "[", "\"domain\"", "]", ",", "description", "=", "self", ".", "err...
Returns an URL for the WebApp error page if there was an error with the form data.
[ "Returns", "an", "URL", "for", "the", "WebApp", "error", "page", "if", "there", "was", "an", "error", "with", "the", "form", "data", "." ]
[ "'''Returns an URL for the WebApp error page if there was an error with the form data.\n\t\t\n\t\tOn loading this URL the user will be presented with information regarding what went wrong.\n\t\t\n\t\tIf there was no problem this methods return None'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
error
<not_specific>
def error(self): '''See FormData.errorURL docs for information''' return self.errorData
See FormData.errorURL docs for information
See FormData.errorURL docs for information
[ "See", "FormData", ".", "errorURL", "docs", "for", "information" ]
def error(self): return self.errorData
[ "def", "error", "(", "self", ")", ":", "return", "self", ".", "errorData" ]
See FormData.errorURL docs for information
[ "See", "FormData", ".", "errorURL", "docs", "for", "information" ]
[ "'''See FormData.errorURL docs for information'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
_setPDBStream
null
def _setPDBStream(self): '''Assigns a stream to the pdb data to the pdbStream ivar. If the stream cannot be created it sets an error. Note, a stream is only created if a delta-pKa calculation is not requested. In this case the pdb file to be used is already available''' if self.isPDBFilePresent(): ...
Assigns a stream to the pdb data to the pdbStream ivar. If the stream cannot be created it sets an error. Note, a stream is only created if a delta-pKa calculation is not requested. In this case the pdb file to be used is already available
Assigns a stream to the pdb data to the pdbStream ivar. If the stream cannot be created it sets an error. Note, a stream is only created if a delta-pKa calculation is not requested. In this case the pdb file to be used is already available
[ "Assigns", "a", "stream", "to", "the", "pdb", "data", "to", "the", "pdbStream", "ivar", ".", "If", "the", "stream", "cannot", "be", "created", "it", "sets", "an", "error", ".", "Note", "a", "stream", "is", "only", "created", "if", "a", "delta", "-", ...
def _setPDBStream(self): if self.isPDBFilePresent(): self.pdbStream = self.formData["pdbFile"].file self.pdbStream.seek(0) elif self.isPDBCodePresent(): data = {} self.pdbStream = GetPDB(self.pdbId(), dict=data) if data.has_key('error'): self.errorData = {"domain":"PDT.SubmissionDomain", "...
[ "def", "_setPDBStream", "(", "self", ")", ":", "if", "self", ".", "isPDBFilePresent", "(", ")", ":", "self", ".", "pdbStream", "=", "self", ".", "formData", "[", "\"pdbFile\"", "]", ".", "file", "self", ".", "pdbStream", ".", "seek", "(", "0", ")", "...
Assigns a stream to the pdb data to the pdbStream ivar.
[ "Assigns", "a", "stream", "to", "the", "pdb", "data", "to", "the", "pdbStream", "ivar", "." ]
[ "'''Assigns a stream to the pdb data to the pdbStream ivar.\n\t\t\n\t\tIf the stream cannot be created it sets an error.\n\t\tNote, a stream is only created if a delta-pKa calculation is not requested.\n\t\tIn this case the pdb file to be used is already available'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
_checkSubmittedData
<not_specific>
def _checkSubmittedData(self): '''Performs a series of checks on the submitted data''' if not self.isPDBFilePresent() and not (self.isPDBCodePresent() or self.isPKACodePresent()): #No pdb supplied - error self.errorData = {"domain":"PDT.SubmissionDomain", "description":"Error in submitted form data."...
Performs a series of checks on the submitted data
Performs a series of checks on the submitted data
[ "Performs", "a", "series", "of", "checks", "on", "the", "submitted", "data" ]
def _checkSubmittedData(self): if not self.isPDBFilePresent() and not (self.isPDBCodePresent() or self.isPKACodePresent()): self.errorData = {"domain":"PDT.SubmissionDomain", "description":"Error in submitted form data.", "detailedDescription":"No PDB file was uploaded and no PDB code was provided. H...
[ "def", "_checkSubmittedData", "(", "self", ")", ":", "if", "not", "self", ".", "isPDBFilePresent", "(", ")", "and", "not", "(", "self", ".", "isPDBCodePresent", "(", ")", "or", "self", ".", "isPKACodePresent", "(", ")", ")", ":", "self", ".", "errorData"...
Performs a series of checks on the submitted data
[ "Performs", "a", "series", "of", "checks", "on", "the", "submitted", "data" ]
[ "'''Performs a series of checks on the submitted data'''", "#No pdb supplied - error", "#No calculation specified", "#If theres been an error at this stage return now", "#Check the submitted PDB filename", "# In order to standardize the names of the directories ", "# (so each can be identified with a sp...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isPDBFilePresent
<not_specific>
def isPDBFilePresent(self): '''Returns True if the form data contains a PDB file''' pdbProvided = False if self.formData.has_key("pdbFile"): if self.formData["pdbFile"].filename != "": pdbProvided = True; return pdbProvided
Returns True if the form data contains a PDB file
Returns True if the form data contains a PDB file
[ "Returns", "True", "if", "the", "form", "data", "contains", "a", "PDB", "file" ]
def isPDBFilePresent(self): pdbProvided = False if self.formData.has_key("pdbFile"): if self.formData["pdbFile"].filename != "": pdbProvided = True; return pdbProvided
[ "def", "isPDBFilePresent", "(", "self", ")", ":", "pdbProvided", "=", "False", "if", "self", ".", "formData", ".", "has_key", "(", "\"pdbFile\"", ")", ":", "if", "self", ".", "formData", "[", "\"pdbFile\"", "]", ".", "filename", "!=", "\"\"", ":", "pdbPr...
Returns True if the form data contains a PDB file
[ "Returns", "True", "if", "the", "form", "data", "contains", "a", "PDB", "file" ]
[ "'''Returns True if the form data contains a PDB file'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isLigandPresent
<not_specific>
def isLigandPresent(self): '''Returns True if formData contains a PDB file''' provided = False if self.formData.has_key("ligandFile"): if self.formData["ligandFile"].filename != "": provided = True; return provided
Returns True if formData contains a PDB file
Returns True if formData contains a PDB file
[ "Returns", "True", "if", "formData", "contains", "a", "PDB", "file" ]
def isLigandPresent(self): provided = False if self.formData.has_key("ligandFile"): if self.formData["ligandFile"].filename != "": provided = True; return provided
[ "def", "isLigandPresent", "(", "self", ")", ":", "provided", "=", "False", "if", "self", ".", "formData", ".", "has_key", "(", "\"ligandFile\"", ")", ":", "if", "self", ".", "formData", "[", "\"ligandFile\"", "]", ".", "filename", "!=", "\"\"", ":", "pro...
Returns True if formData contains a PDB file
[ "Returns", "True", "if", "formData", "contains", "a", "PDB", "file" ]
[ "'''Returns True if formData contains a PDB file'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isCodePresent
<not_specific>
def isCodePresent(self): '''Returns True if the code field contains text''' codeProvided = False if self.formData.getvalue("pdbCode") != "": codeProvided = True return codeProvided
Returns True if the code field contains text
Returns True if the code field contains text
[ "Returns", "True", "if", "the", "code", "field", "contains", "text" ]
def isCodePresent(self): codeProvided = False if self.formData.getvalue("pdbCode") != "": codeProvided = True return codeProvided
[ "def", "isCodePresent", "(", "self", ")", ":", "codeProvided", "=", "False", "if", "self", ".", "formData", ".", "getvalue", "(", "\"pdbCode\"", ")", "!=", "\"\"", ":", "codeProvided", "=", "True", "return", "codeProvided" ]
Returns True if the code field contains text
[ "Returns", "True", "if", "the", "code", "field", "contains", "text" ]
[ "'''Returns True if the code field contains text'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isPDBCodePresent
<not_specific>
def isPDBCodePresent(self): '''Returns True if the form data contains a PDB code. The form data contains a PDB code is their is an entry in the code field and "Scan" is not selected''' pdbProvided = False if self.isCodePresent() and not self.isDeltaPKACalculationRequested(): pdbProvided = True ...
Returns True if the form data contains a PDB code. The form data contains a PDB code is their is an entry in the code field and "Scan" is not selected
Returns True if the form data contains a PDB code. The form data contains a PDB code is their is an entry in the code field and "Scan" is not selected
[ "Returns", "True", "if", "the", "form", "data", "contains", "a", "PDB", "code", ".", "The", "form", "data", "contains", "a", "PDB", "code", "is", "their", "is", "an", "entry", "in", "the", "code", "field", "and", "\"", "Scan", "\"", "is", "not", "sel...
def isPDBCodePresent(self): pdbProvided = False if self.isCodePresent() and not self.isDeltaPKACalculationRequested(): pdbProvided = True return pdbProvided
[ "def", "isPDBCodePresent", "(", "self", ")", ":", "pdbProvided", "=", "False", "if", "self", ".", "isCodePresent", "(", ")", "and", "not", "self", ".", "isDeltaPKACalculationRequested", "(", ")", ":", "pdbProvided", "=", "True", "return", "pdbProvided" ]
Returns True if the form data contains a PDB code.
[ "Returns", "True", "if", "the", "form", "data", "contains", "a", "PDB", "code", "." ]
[ "'''Returns True if the form data contains a PDB code.\n\t\t\n\t\tThe form data contains a PDB code is their is an entry in the \n\t\tcode field and \"Scan\" is not selected'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isPKACodePresent
<not_specific>
def isPKACodePresent(self): '''Returns True of formData contain a pKa code The form data contains a pKa code if "Scan" is selected and their is an entry in the code field''' pKaProvided = False if self.isCodePresent() and self.isDeltaPKACalculationRequested(): pKaProvided = True return pKaProv...
Returns True of formData contain a pKa code The form data contains a pKa code if "Scan" is selected and their is an entry in the code field
Returns True of formData contain a pKa code The form data contains a pKa code if "Scan" is selected and their is an entry in the code field
[ "Returns", "True", "of", "formData", "contain", "a", "pKa", "code", "The", "form", "data", "contains", "a", "pKa", "code", "if", "\"", "Scan", "\"", "is", "selected", "and", "their", "is", "an", "entry", "in", "the", "code", "field" ]
def isPKACodePresent(self): pKaProvided = False if self.isCodePresent() and self.isDeltaPKACalculationRequested(): pKaProvided = True return pKaProvided
[ "def", "isPKACodePresent", "(", "self", ")", ":", "pKaProvided", "=", "False", "if", "self", ".", "isCodePresent", "(", ")", "and", "self", ".", "isDeltaPKACalculationRequested", "(", ")", ":", "pKaProvided", "=", "True", "return", "pKaProvided" ]
Returns True of formData contain a pKa code The form data contains a pKa code if "Scan" is selected and their is an entry in the code field
[ "Returns", "True", "of", "formData", "contain", "a", "pKa", "code", "The", "form", "data", "contains", "a", "pKa", "code", "if", "\"", "Scan", "\"", "is", "selected", "and", "their", "is", "an", "entry", "in", "the", "code", "field" ]
[ "'''Returns True of formData contain a pKa code\n\t\t\n\t\tThe form data contains a pKa code if \"Scan\" is selected\n\t\tand their is an entry in the code field'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isDeltaPKACalculationRequested
<not_specific>
def isDeltaPKACalculationRequested(self): '''Returns True if a delta pKa calculation was requested''' provided = False if self.calculations().count('scan') == 1: provided = True return provided
Returns True if a delta pKa calculation was requested
Returns True if a delta pKa calculation was requested
[ "Returns", "True", "if", "a", "delta", "pKa", "calculation", "was", "requested" ]
def isDeltaPKACalculationRequested(self): provided = False if self.calculations().count('scan') == 1: provided = True return provided
[ "def", "isDeltaPKACalculationRequested", "(", "self", ")", ":", "provided", "=", "False", "if", "self", ".", "calculations", "(", ")", ".", "count", "(", "'scan'", ")", "==", "1", ":", "provided", "=", "True", "return", "provided" ]
Returns True if a delta pKa calculation was requested
[ "Returns", "True", "if", "a", "delta", "pKa", "calculation", "was", "requested" ]
[ "'''Returns True if a delta pKa calculation was requested'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isMutationDataPresent
<not_specific>
def isMutationDataPresent(self): '''Returns True if formData contains mutation information''' mutationProvided = False mutationChoice = self.formData.getlist("mutation") if len(mutationChoice) == 1: mutationProvided = True return mutationProvided
Returns True if formData contains mutation information
Returns True if formData contains mutation information
[ "Returns", "True", "if", "formData", "contains", "mutation", "information" ]
def isMutationDataPresent(self): mutationProvided = False mutationChoice = self.formData.getlist("mutation") if len(mutationChoice) == 1: mutationProvided = True return mutationProvided
[ "def", "isMutationDataPresent", "(", "self", ")", ":", "mutationProvided", "=", "False", "mutationChoice", "=", "self", ".", "formData", ".", "getlist", "(", "\"mutation\"", ")", "if", "len", "(", "mutationChoice", ")", "==", "1", ":", "mutationProvided", "=",...
Returns True if formData contains mutation information
[ "Returns", "True", "if", "formData", "contains", "mutation", "information" ]
[ "'''Returns True if formData contains mutation information'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isCalculationDataPresent
<not_specific>
def isCalculationDataPresent(self): '''Returns True if data on what calculations to perform is present''' present = False if len(self.calculations()) != 0: present = True return present
Returns True if data on what calculations to perform is present
Returns True if data on what calculations to perform is present
[ "Returns", "True", "if", "data", "on", "what", "calculations", "to", "perform", "is", "present" ]
def isCalculationDataPresent(self): present = False if len(self.calculations()) != 0: present = True return present
[ "def", "isCalculationDataPresent", "(", "self", ")", ":", "present", "=", "False", "if", "len", "(", "self", ".", "calculations", "(", ")", ")", "!=", "0", ":", "present", "=", "True", "return", "present" ]
Returns True if data on what calculations to perform is present
[ "Returns", "True", "if", "data", "on", "what", "calculations", "to", "perform", "is", "present" ]
[ "'''Returns True if data on what calculations to perform is present'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
936f5d385510f58d67f5d9798af4c311b9dc86cd
shambo001/peat
PEATSA/WebApp/JobSubmission.py
[ "MIT" ]
Python
isIonisableGroupsPresent
<not_specific>
def isIonisableGroupsPresent(self): '''Returns True if ionisable groups were specified AND a dpKa calculation was requested''' present = False if self.isDeltaPKACalculationRequested(): string = self.ionisableGroups() if string != "" and string.lower() != "all": present = True return present
Returns True if ionisable groups were specified AND a dpKa calculation was requested
Returns True if ionisable groups were specified AND a dpKa calculation was requested
[ "Returns", "True", "if", "ionisable", "groups", "were", "specified", "AND", "a", "dpKa", "calculation", "was", "requested" ]
def isIonisableGroupsPresent(self): present = False if self.isDeltaPKACalculationRequested(): string = self.ionisableGroups() if string != "" and string.lower() != "all": present = True return present
[ "def", "isIonisableGroupsPresent", "(", "self", ")", ":", "present", "=", "False", "if", "self", ".", "isDeltaPKACalculationRequested", "(", ")", ":", "string", "=", "self", ".", "ionisableGroups", "(", ")", "if", "string", "!=", "\"\"", "and", "string", "."...
Returns True if ionisable groups were specified AND a dpKa calculation was requested
[ "Returns", "True", "if", "ionisable", "groups", "were", "specified", "AND", "a", "dpKa", "calculation", "was", "requested" ]
[ "'''Returns True if ionisable groups were specified AND a dpKa calculation was requested'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }