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
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
startDNAtool
<not_specific>
def startDNAtool(self, data=None): """Start DNAtool - this function is far too long and should be simplified""" self.DNAtool_instance = None if self.DB == None: return DB = self.DB D = DB.data M = DB.meta #DNAtool/primers stuff is now stored in DB.meta ...
Start DNAtool - this function is far too long and should be simplified
Start DNAtool - this function is far too long and should be simplified
[ "Start", "DNAtool", "-", "this", "function", "is", "far", "too", "long", "and", "should", "be", "simplified" ]
def startDNAtool(self, data=None): self.DNAtool_instance = None if self.DB == None: return DB = self.DB D = DB.data M = DB.meta self.DBfiledir = os.getcwd() if not self.DNAtool_instance: data_passed = {} if self.DNAtool_state:...
[ "def", "startDNAtool", "(", "self", ",", "data", "=", "None", ")", ":", "self", ".", "DNAtool_instance", "=", "None", "if", "self", ".", "DB", "==", "None", ":", "return", "DB", "=", "self", ".", "DB", "D", "=", "DB", ".", "data", "M", "=", "DB",...
Start DNAtool - this function is far too long and should be simplified
[ "Start", "DNAtool", "-", "this", "function", "is", "far", "too", "long", "and", "should", "be", "simplified" ]
[ "\"\"\"Start DNAtool - this function is far too long and should be simplified\"\"\"", "#DNAtool/primers stuff is now stored in DB.meta", "#change this later", "# Do we have data to pass?", "# Load the primer dictionary into the dictionary that are being passed", "# Delete any data that we only transfer if...
[ { "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": [...
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
startLabbook
<not_specific>
def startLabbook(self, protein=None, field_name=None): """Edit a labbook style sub-table""" if self.DB == None: return D = self.DB.data tabledata = None info = None #protein is ALL means we are using the main labbook if protein == 'ALL': t...
Edit a labbook style sub-table
Edit a labbook style sub-table
[ "Edit", "a", "labbook", "style", "sub", "-", "table" ]
def startLabbook(self, protein=None, field_name=None): if self.DB == None: return D = self.DB.data tabledata = None info = None if protein == 'ALL': tabledata = self.DB.meta['labbook'] if tabledata == {}: tabledata=None elif hasattr(sel...
[ "def", "startLabbook", "(", "self", ",", "protein", "=", "None", ",", "field_name", "=", "None", ")", ":", "if", "self", ".", "DB", "==", "None", ":", "return", "D", "=", "self", ".", "DB", ".", "data", "tabledata", "=", "None", "info", "=", "None"...
Edit a labbook style sub-table
[ "Edit", "a", "labbook", "style", "sub", "-", "table" ]
[ "\"\"\"Edit a labbook style sub-table\"\"\"", "#protein is ALL means we are using the main labbook", "# did we get any data back?", "#self.updateTable(protein, field_name)" ]
[ { "param": "self", "type": null }, { "param": "protein", "type": null }, { "param": "field_name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "protein", "type": null, "docstring": null, "docstring_tokens"...
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
updateLabbooksMenu
<not_specific>
def updateLabbooksMenu(self ): """Add existing laboooks to tools menu""" import string, types self.labbookmenu.delete(0, self.labbookmenu.index('last')) self.labbookmenu.add_command(label='New Labbook', command=self.addLabbook) self.labbookmenu.add_command(label='Manage Labbooks...
Add existing laboooks to tools menu
Add existing laboooks to tools menu
[ "Add", "existing", "laboooks", "to", "tools", "menu" ]
def updateLabbooksMenu(self ): import string, types self.labbookmenu.delete(0, self.labbookmenu.index('last')) self.labbookmenu.add_command(label='New Labbook', command=self.addLabbook) self.labbookmenu.add_command(label='Manage Labbooks', command=self.manageLabbooks) if not hasa...
[ "def", "updateLabbooksMenu", "(", "self", ")", ":", "import", "string", ",", "types", "self", ".", "labbookmenu", ".", "delete", "(", "0", ",", "self", ".", "labbookmenu", ".", "index", "(", "'last'", ")", ")", "self", ".", "labbookmenu", ".", "add_comma...
Add existing laboooks to tools menu
[ "Add", "existing", "laboooks", "to", "tools", "menu" ]
[ "\"\"\"Add existing laboooks to tools menu\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
updateMutations
<not_specific>
def updateMutations(self): """Check sequences and create mutation names""" if not hasattr(self.DB.meta, 'refprotein'): return ref = self.DB.meta.refprotein for p in self.DB.getRecs(): DBActions.checkMutation(self.DB, p, ref) self.updateTable() retu...
Check sequences and create mutation names
Check sequences and create mutation names
[ "Check", "sequences", "and", "create", "mutation", "names" ]
def updateMutations(self): if not hasattr(self.DB.meta, 'refprotein'): return ref = self.DB.meta.refprotein for p in self.DB.getRecs(): DBActions.checkMutation(self.DB, p, ref) self.updateTable() return
[ "def", "updateMutations", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ".", "DB", ".", "meta", ",", "'refprotein'", ")", ":", "return", "ref", "=", "self", ".", "DB", ".", "meta", ".", "refprotein", "for", "p", "in", "self", ".", "DB...
Check sequences and create mutation names
[ "Check", "sequences", "and", "create", "mutation", "names" ]
[ "\"\"\"Check sequences and create mutation names\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
updateAASequences
<not_specific>
def updateAASequences(self): """Update the AA sequences for mutants, usually applied to those mutants that don't have a DNA sequence, so at any time we can change their AA seq if the ref prot is altered requires: reference protein to be set""" if not hasattr(self.DB.meta, 'refpro...
Update the AA sequences for mutants, usually applied to those mutants that don't have a DNA sequence, so at any time we can change their AA seq if the ref prot is altered requires: reference protein to be set
Update the AA sequences for mutants, usually applied to those mutants that don't have a DNA sequence, so at any time we can change their AA seq if the ref prot is altered requires: reference protein to be set
[ "Update", "the", "AA", "sequences", "for", "mutants", "usually", "applied", "to", "those", "mutants", "that", "don", "'", "t", "have", "a", "DNA", "sequence", "so", "at", "any", "time", "we", "can", "change", "their", "AA", "seq", "if", "the", "ref", "...
def updateAASequences(self): if not hasattr(self.DB.meta, 'refprotein') or self.DB.meta.refprotein == None: tkMessageBox.showinfo('No ref protein', 'Set a reference (wt) protein first') return sel = self.table.get_selectedRecordNames() DB...
[ "def", "updateAASequences", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ".", "DB", ".", "meta", ",", "'refprotein'", ")", "or", "self", ".", "DB", ".", "meta", ".", "refprotein", "==", "None", ":", "tkMessageBox", ".", "showinfo", "(", ...
Update the AA sequences for mutants, usually applied to those mutants that don't have a DNA sequence, so at any time we can change their AA seq if the ref prot is altered requires: reference protein to be set
[ "Update", "the", "AA", "sequences", "for", "mutants", "usually", "applied", "to", "those", "mutants", "that", "don", "'", "t", "have", "a", "DNA", "sequence", "so", "at", "any", "time", "we", "can", "change", "their", "AA", "seq", "if", "the", "ref", "...
[ "\"\"\"Update the AA sequences for mutants, usually applied to\n those mutants that don't have a DNA sequence, so at any time we\n can change their AA seq if the ref prot is altered\n requires: reference protein to be set\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
createRecsOptsMenu
<not_specific>
def createRecsOptsMenu(self, parent, callback=None): """Get an option menu with a list of the records""" def setref(evt=None): prot = var.get() if self.DB[prot].Structure == None: tkMessageBox.showinfo("Warning", 'There is no s...
Get an option menu with a list of the records
Get an option menu with a list of the records
[ "Get", "an", "option", "menu", "with", "a", "list", "of", "the", "records" ]
def createRecsOptsMenu(self, parent, callback=None): def setref(evt=None): prot = var.get() if self.DB[prot].Structure == None: tkMessageBox.showinfo("Warning", 'There is no structure for this record! ' ...
[ "def", "createRecsOptsMenu", "(", "self", ",", "parent", ",", "callback", "=", "None", ")", ":", "def", "setref", "(", "evt", "=", "None", ")", ":", "prot", "=", "var", ".", "get", "(", ")", "if", "self", ".", "DB", "[", "prot", "]", ".", "Struct...
Get an option menu with a list of the records
[ "Get", "an", "option", "menu", "with", "a", "list", "of", "the", "records" ]
[ "\"\"\"Get an option menu with a list of the records\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "parent", "type": null }, { "param": "callback", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parent", "type": null, "docstring": null, "docstring_tokens":...
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
remodelPEATModels
<not_specific>
def remodelPEATModels(self): """Remodel current mutant sequences using ref protein""" if self.DB == None: return # Delete the temp models if getattr(self.DB,'3Dmodels', None): self.DB.tmp_3Dmodels={} c = self.createChildFrame() from Dialogs impor...
Remodel current mutant sequences using ref protein
Remodel current mutant sequences using ref protein
[ "Remodel", "current", "mutant", "sequences", "using", "ref", "protein" ]
def remodelPEATModels(self): if self.DB == None: return if getattr(self.DB,'3Dmodels', None): self.DB.tmp_3Dmodels={} c = self.createChildFrame() from Dialogs import PEATDialog Label(c, text='Construct Homology Models').pack(side=TOP,pady=4) o = se...
[ "def", "remodelPEATModels", "(", "self", ")", ":", "if", "self", ".", "DB", "==", "None", ":", "return", "if", "getattr", "(", "self", ".", "DB", ",", "'3Dmodels'", ",", "None", ")", ":", "self", ".", "DB", ".", "tmp_3Dmodels", "=", "{", "}", "c", ...
Remodel current mutant sequences using ref protein
[ "Remodel", "current", "mutant", "sequences", "using", "ref", "protein" ]
[ "\"\"\"Remodel current mutant sequences using ref protein\"\"\"", "# Delete the temp models", "#log.delete(1.0,END)" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
fetchPDB
<not_specific>
def fetchPDB(self): """Allow user to fetch a pdb file from net and store to record""" mpDlg = MultipleValDialog(title='Fetch PDB', initialvalues=('', self.DB.getRecs()), labels=('pdb id','record'), ...
Allow user to fetch a pdb file from net and store to record
Allow user to fetch a pdb file from net and store to record
[ "Allow", "user", "to", "fetch", "a", "pdb", "file", "from", "net", "and", "store", "to", "record" ]
def fetchPDB(self): mpDlg = MultipleValDialog(title='Fetch PDB', initialvalues=('', self.DB.getRecs()), labels=('pdb id','record'), types=('string','list'), parent=self...
[ "def", "fetchPDB", "(", "self", ")", ":", "mpDlg", "=", "MultipleValDialog", "(", "title", "=", "'Fetch PDB'", ",", "initialvalues", "=", "(", "''", ",", "self", ".", "DB", ".", "getRecs", "(", ")", ")", ",", "labels", "=", "(", "'pdb id'", ",", "'re...
Allow user to fetch a pdb file from net and store to record
[ "Allow", "user", "to", "fetch", "a", "pdb", "file", "from", "net", "and", "store", "to", "record" ]
[ "\"\"\"Allow user to fetch a pdb file from net and store to record\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
testsDialog
<not_specific>
def testsDialog(self): """Allow users to set up a test DB""" import zodbtest def createDB(): mpDlg = MultipleValDialog(title='Create Test DB', initialvalues=('testdb.fs', 1000), ...
Allow users to set up a test DB
Allow users to set up a test DB
[ "Allow", "users", "to", "set", "up", "a", "test", "DB" ]
def testsDialog(self): import zodbtest def createDB(): mpDlg = MultipleValDialog(title='Create Test DB', initialvalues=('testdb.fs', 1000), labels=('filename...
[ "def", "testsDialog", "(", "self", ")", ":", "import", "zodbtest", "def", "createDB", "(", ")", ":", "mpDlg", "=", "MultipleValDialog", "(", "title", "=", "'Create Test DB'", ",", "initialvalues", "=", "(", "'testdb.fs'", ",", "1000", ")", ",", "labels", "...
Allow users to set up a test DB
[ "Allow", "users", "to", "set", "up", "a", "test", "DB" ]
[ "\"\"\"Allow users to set up a test DB\"\"\"", "#clears it" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
advancedSearch
<not_specific>
def advancedSearch(self): """Search DB with current search class, which should be replaceable by another search class if needed""" if self.DB==None: return self.resetSidePane(width=400) def close(): frame.destroy() self.resetSidePane(width=2...
Search DB with current search class, which should be replaceable by another search class if needed
Search DB with current search class, which should be replaceable by another search class if needed
[ "Search", "DB", "with", "current", "search", "class", "which", "should", "be", "replaceable", "by", "another", "search", "class", "if", "needed" ]
def advancedSearch(self): if self.DB==None: return self.resetSidePane(width=400) def close(): frame.destroy() self.resetSidePane(width=20) return from Search import searchDialog S = searchDialog(self.sidepane, self.DB) S.pa...
[ "def", "advancedSearch", "(", "self", ")", ":", "if", "self", ".", "DB", "==", "None", ":", "return", "self", ".", "resetSidePane", "(", "width", "=", "400", ")", "def", "close", "(", ")", ":", "frame", ".", "destroy", "(", ")", "self", ".", "reset...
Search DB with current search class, which should be replaceable by another search class if needed
[ "Search", "DB", "with", "current", "search", "class", "which", "should", "be", "replaceable", "by", "another", "search", "class", "if", "needed" ]
[ "\"\"\"Search DB with current search class, which should be replaceable by\n another search class if needed\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
createDBonServerDialog
<not_specific>
def createDBonServerDialog(self): """Allow users with admin passwd to create a project on the remote MySql DB. Relstorage only.""" import MySQLdb as mysql mpDlg = MultipleValDialog(title='Create DB on Server', initialvalues=(self.server, self.port, ...
Allow users with admin passwd to create a project on the remote MySql DB. Relstorage only.
Allow users with admin passwd to create a project on the remote MySql DB. Relstorage only.
[ "Allow", "users", "with", "admin", "passwd", "to", "create", "a", "project", "on", "the", "remote", "MySql", "DB", ".", "Relstorage", "only", "." ]
def createDBonServerDialog(self): import MySQLdb as mysql mpDlg = MultipleValDialog(title='Create DB on Server', initialvalues=(self.server, self.port, self.project,'peatadmin','',self.username), ...
[ "def", "createDBonServerDialog", "(", "self", ")", ":", "import", "MySQLdb", "as", "mysql", "mpDlg", "=", "MultipleValDialog", "(", "title", "=", "'Create DB on Server'", ",", "initialvalues", "=", "(", "self", ".", "server", ",", "self", ".", "port", ",", "...
Allow users with admin passwd to create a project on the remote MySql DB.
[ "Allow", "users", "with", "admin", "passwd", "to", "create", "a", "project", "on", "the", "remote", "MySql", "DB", "." ]
[ "\"\"\"Allow users with admin passwd to create a project\n on the remote MySql DB. Relstorage only.\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d71e084ddc7784f35b79a8714d486016cc84b74a
shambo001/peat
PEATDB/PEATApp.py
[ "MIT" ]
Python
doRecentMenu
<not_specific>
def doRecentMenu(self, preferences): """Returns a menu of recent projects""" preferences.get('recent') menu = Menu() return menu
Returns a menu of recent projects
Returns a menu of recent projects
[ "Returns", "a", "menu", "of", "recent", "projects" ]
def doRecentMenu(self, preferences): preferences.get('recent') menu = Menu() return menu
[ "def", "doRecentMenu", "(", "self", ",", "preferences", ")", ":", "preferences", ".", "get", "(", "'recent'", ")", "menu", "=", "Menu", "(", ")", "return", "menu" ]
Returns a menu of recent projects
[ "Returns", "a", "menu", "of", "recent", "projects" ]
[ "\"\"\"Returns a menu of recent projects\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "preferences", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "preferences", "type": null, "docstring": null, "docstring_tok...
d721363572aac2cd941e0482052e2836fc33e69f
shambo001/peat
PEATDB/Ekin/Convert.py
[ "MIT" ]
Python
ekin2xy
<not_specific>
def ekin2xy(cls, ekindataset, getall=0, geterrors=False): """Convert ekin datapoint storage to seprate x-y lists, can be used for plotting in gnuplot or Plotter for example""" #newer format uses 2 sub-fields for point, old is just a string #active field is ignored in final lists ...
Convert ekin datapoint storage to seprate x-y lists, can be used for plotting in gnuplot or Plotter for example
Convert ekin datapoint storage to seprate x-y lists, can be used for plotting in gnuplot or Plotter for example
[ "Convert", "ekin", "datapoint", "storage", "to", "seprate", "x", "-", "y", "lists", "can", "be", "used", "for", "plotting", "in", "gnuplot", "or", "Plotter", "for", "example" ]
def ekin2xy(cls, ekindataset, getall=0, geterrors=False): import copy import re s=re.compile('[0-9]') xlist=[] ylist=[] activelist=[] xerrors=[] yerrors=[] inactivelist=[] if not isinstance(ekindataset, dict): return None ...
[ "def", "ekin2xy", "(", "cls", ",", "ekindataset", ",", "getall", "=", "0", ",", "geterrors", "=", "False", ")", ":", "import", "copy", "import", "re", "s", "=", "re", ".", "compile", "(", "'[0-9]'", ")", "xlist", "=", "[", "]", "ylist", "=", "[", ...
Convert ekin datapoint storage to seprate x-y lists, can be used for plotting in gnuplot or Plotter for example
[ "Convert", "ekin", "datapoint", "storage", "to", "seprate", "x", "-", "y", "lists", "can", "be", "used", "for", "plotting", "in", "gnuplot", "or", "Plotter", "for", "example" ]
[ "\"\"\"Convert ekin datapoint storage to seprate x-y lists, can be used\n for plotting in gnuplot or Plotter for example\"\"\"", "#newer format uses 2 sub-fields for point, old is just a string", "#active field is ignored in final lists", "#to store which points are inactive", "# Get the number of...
[ { "param": "cls", "type": null }, { "param": "ekindataset", "type": null }, { "param": "getall", "type": null }, { "param": "geterrors", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindataset", "type": null, "docstring": null, "docstring_toke...
d721363572aac2cd941e0482052e2836fc33e69f
shambo001/peat
PEATDB/Ekin/Convert.py
[ "MIT" ]
Python
xy2ekin
<not_specific>
def xy2ekin(cls, inputlists, errorlists=None, activelist=None, labels=None): """Convert xyz lists to ekin dataset, accepts lists tuple""" if labels == None: labels = ('x','y','z') if len(inputlists[0]) != len(inputlists[1]): return ekindataset = {0:{},1:{}...
Convert xyz lists to ekin dataset, accepts lists tuple
Convert xyz lists to ekin dataset, accepts lists tuple
[ "Convert", "xyz", "lists", "to", "ekin", "dataset", "accepts", "lists", "tuple" ]
def xy2ekin(cls, inputlists, errorlists=None, activelist=None, labels=None): if labels == None: labels = ('x','y','z') if len(inputlists[0]) != len(inputlists[1]): return ekindataset = {0:{},1:{}} for n in range(len(inputlists)): ekindataset[n]['label'...
[ "def", "xy2ekin", "(", "cls", ",", "inputlists", ",", "errorlists", "=", "None", ",", "activelist", "=", "None", ",", "labels", "=", "None", ")", ":", "if", "labels", "==", "None", ":", "labels", "=", "(", "'x'", ",", "'y'", ",", "'z'", ")", "if", ...
Convert xyz lists to ekin dataset, accepts lists tuple
[ "Convert", "xyz", "lists", "to", "ekin", "dataset", "accepts", "lists", "tuple" ]
[ "\"\"\"Convert xyz lists to ekin dataset, accepts lists tuple\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "inputlists", "type": null }, { "param": "errorlists", "type": null }, { "param": "activelist", "type": null }, { "param": "labels", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "inputlists", "type": null, "docstring": null, "docstring_token...
d721363572aac2cd941e0482052e2836fc33e69f
shambo001/peat
PEATDB/Ekin/Convert.py
[ "MIT" ]
Python
check_ekin_dataset
<not_specific>
def check_ekin_dataset(cls, ekindatasets): """Check if an ekin dataset has an data points in it at all""" for k in ekindatasets.keys(): ekindataset = ekindatasets[k] xdatapoints=ekindataset[0].keys() count=0 for datapoint in xdatapoints: if...
Check if an ekin dataset has an data points in it at all
Check if an ekin dataset has an data points in it at all
[ "Check", "if", "an", "ekin", "dataset", "has", "an", "data", "points", "in", "it", "at", "all" ]
def check_ekin_dataset(cls, ekindatasets): for k in ekindatasets.keys(): ekindataset = ekindatasets[k] xdatapoints=ekindataset[0].keys() count=0 for datapoint in xdatapoints: if datapoint=='label' or datapoint=='label_widget': c...
[ "def", "check_ekin_dataset", "(", "cls", ",", "ekindatasets", ")", ":", "for", "k", "in", "ekindatasets", ".", "keys", "(", ")", ":", "ekindataset", "=", "ekindatasets", "[", "k", "]", "xdatapoints", "=", "ekindataset", "[", "0", "]", ".", "keys", "(", ...
Check if an ekin dataset has an data points in it at all
[ "Check", "if", "an", "ekin", "dataset", "has", "an", "data", "points", "in", "it", "at", "all" ]
[ "\"\"\"Check if an ekin dataset has an data points in it at all\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "ekindatasets", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindatasets", "type": null, "docstring": null, "docstring_tok...
d721363572aac2cd941e0482052e2836fc33e69f
shambo001/peat
PEATDB/Ekin/Convert.py
[ "MIT" ]
Python
add_offset
<not_specific>
def add_offset(cls, ekindataset, offset=0, column=0): """Add an offset value to one of the ekin data columns""" data=ekindataset[0].keys() for dp in data: if dp =='label' or dp=='label_widget': continue else: if ekindataset[column][dp]['va...
Add an offset value to one of the ekin data columns
Add an offset value to one of the ekin data columns
[ "Add", "an", "offset", "value", "to", "one", "of", "the", "ekin", "data", "columns" ]
def add_offset(cls, ekindataset, offset=0, column=0): data=ekindataset[0].keys() for dp in data: if dp =='label' or dp=='label_widget': continue else: if ekindataset[column][dp]['var']!='': p=float(ekindataset[column][dp]['var']...
[ "def", "add_offset", "(", "cls", ",", "ekindataset", ",", "offset", "=", "0", ",", "column", "=", "0", ")", ":", "data", "=", "ekindataset", "[", "0", "]", ".", "keys", "(", ")", "for", "dp", "in", "data", ":", "if", "dp", "==", "'label'", "or", ...
Add an offset value to one of the ekin data columns
[ "Add", "an", "offset", "value", "to", "one", "of", "the", "ekin", "data", "columns" ]
[ "\"\"\"Add an offset value to one of the ekin data columns\"\"\"" ]
[ { "param": "cls", "type": null }, { "param": "ekindataset", "type": null }, { "param": "offset", "type": null }, { "param": "column", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "cls", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindataset", "type": null, "docstring": null, "docstring_toke...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
callfromGUI
<not_specific>
def callfromGUI(self): """Run from GUI, passing opt vars""" opts, remainder = self.parser.parse_args() for o in opts.__dict__.keys(): if o in self.optvars: opts.__dict__[o] = self.optvars[o].get() #redirect stdout to log win self.log.delete(1.0,END) ...
Run from GUI, passing opt vars
Run from GUI, passing opt vars
[ "Run", "from", "GUI", "passing", "opt", "vars" ]
def callfromGUI(self): opts, remainder = self.parser.parse_args() for o in opts.__dict__.keys(): if o in self.optvars: opts.__dict__[o] = self.optvars[o].get() self.log.delete(1.0,END) sys.stdout = self sys.stderr = self self.run(opts) ...
[ "def", "callfromGUI", "(", "self", ")", ":", "opts", ",", "remainder", "=", "self", ".", "parser", ".", "parse_args", "(", ")", "for", "o", "in", "opts", ".", "__dict__", ".", "keys", "(", ")", ":", "if", "o", "in", "self", ".", "optvars", ":", "...
Run from GUI, passing opt vars
[ "Run", "from", "GUI", "passing", "opt", "vars" ]
[ "\"\"\"Run from GUI, passing opt vars\"\"\"", "#redirect stdout to log win" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
loadTempData
<not_specific>
def loadTempData(self): """Import temp data from 2 xls files for each set set1.xls contains duplicate data for variants 1-6 i.e. columns 1-6 and 7-12 are repeats for 6 variants""" print 'importing temp data..' filename1 = os.path.join('temp', 'set1.xls') #variants 1-6 ...
Import temp data from 2 xls files for each set set1.xls contains duplicate data for variants 1-6 i.e. columns 1-6 and 7-12 are repeats for 6 variants
Import temp data from 2 xls files for each set set1.xls contains duplicate data for variants 1-6 i.e. columns 1-6 and 7-12 are repeats for 6 variants
[ "Import", "temp", "data", "from", "2", "xls", "files", "for", "each", "set", "set1", ".", "xls", "contains", "duplicate", "data", "for", "variants", "1", "-", "6", "i", ".", "e", ".", "columns", "1", "-", "6", "and", "7", "-", "12", "are", "repeats...
def loadTempData(self): print 'importing temp data..' filename1 = os.path.join('temp', 'set1.xls') filename2 = os.path.join('temp', 'set2.xls') book1 = xlrd.open_workbook(os.path.join(self.path, filename1)) try: book2 = xlrd.open_workbook(os.path.join(self.path, fil...
[ "def", "loadTempData", "(", "self", ")", ":", "print", "'importing temp data..'", "filename1", "=", "os", ".", "path", ".", "join", "(", "'temp'", ",", "'set1.xls'", ")", "filename2", "=", "os", ".", "path", ".", "join", "(", "'temp'", ",", "'set2.xls'", ...
Import temp data from 2 xls files for each set set1.xls contains duplicate data for variants 1-6 i.e.
[ "Import", "temp", "data", "from", "2", "xls", "files", "for", "each", "set", "set1", ".", "xls", "contains", "duplicate", "data", "for", "variants", "1", "-", "6", "i", ".", "e", "." ]
[ "\"\"\"Import temp data from 2 xls files for each set\n set1.xls contains duplicate data for variants 1-6\n i.e. columns 1-6 and 7-12 are repeats for 6 variants\"\"\"", "#variants 1-6", "#variants 7-12", "#7-12 are duplicates", "#get raw data from cols 1-6 in sheet", "#print book, sh, dup,...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
loadRawData
<not_specific>
def loadRawData(self, path, variantnames, phvalues, date, setname, run=None, subconcs=None, dilutions=None): """Load raw MM data for one set of replicates and return dict of variants. raw data is loaded from text files containing sets per pH and the other args prov...
Load raw MM data for one set of replicates and return dict of variants. raw data is loaded from text files containing sets per pH and the other args provide the exp conditions parseMMdefs uses MM.def to get exp details and provide them here
Load raw MM data for one set of replicates and return dict of variants. raw data is loaded from text files containing sets per pH and the other args provide the exp conditions parseMMdefs uses MM.def to get exp details and provide them here
[ "Load", "raw", "MM", "data", "for", "one", "set", "of", "replicates", "and", "return", "dict", "of", "variants", ".", "raw", "data", "is", "loaded", "from", "text", "files", "containing", "sets", "per", "pH", "and", "the", "other", "args", "provide", "th...
def loadRawData(self, path, variantnames, phvalues, date, setname, run=None, subconcs=None, dilutions=None): print 'processing raw data..' rawdata = {} for name in variantnames: rawdata[name] = {} for ph in phvalues: rawdata[name][...
[ "def", "loadRawData", "(", "self", ",", "path", ",", "variantnames", ",", "phvalues", ",", "date", ",", "setname", ",", "run", "=", "None", ",", "subconcs", "=", "None", ",", "dilutions", "=", "None", ")", ":", "print", "'processing raw data..'", "rawdata"...
Load raw MM data for one set of replicates and return dict of variants.
[ "Load", "raw", "MM", "data", "for", "one", "set", "of", "replicates", "and", "return", "dict", "of", "variants", "." ]
[ "\"\"\"Load raw MM data for one set of replicates and return dict of variants.\n raw data is loaded from text files containing sets per pH and\n the other args provide the exp conditions\n parseMMdefs uses MM.def to get exp details and provide them here\n \"\"\"", "#get raw...
[ { "param": "self", "type": null }, { "param": "path", "type": null }, { "param": "variantnames", "type": null }, { "param": "phvalues", "type": null }, { "param": "date", "type": null }, { "param": "setname", "type": null }, { "param": "run...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "path", "type": null, "docstring": null, "docstring_tokens": [...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
processKineticsRaw
<not_specific>
def processKineticsRaw(self, variantdata, phvalues): """Get raw data for a variant into ekin projects, fit MM and save""" E = EkinProject(mode='General') for ph in variantdata.keys(): for s in variantdata[ph].keys(): E.insertDataset(variantdata[ph][s], ph+'_'+str(s))...
Get raw data for a variant into ekin projects, fit MM and save
Get raw data for a variant into ekin projects, fit MM and save
[ "Get", "raw", "data", "for", "a", "variant", "into", "ekin", "projects", "fit", "MM", "and", "save" ]
def processKineticsRaw(self, variantdata, phvalues): E = EkinProject(mode='General') for ph in variantdata.keys(): for s in variantdata[ph].keys(): E.insertDataset(variantdata[ph][s], ph+'_'+str(s)) print 'fitting raw velocity data..' E.fitDatasets(models=['Li...
[ "def", "processKineticsRaw", "(", "self", ",", "variantdata", ",", "phvalues", ")", ":", "E", "=", "EkinProject", "(", "mode", "=", "'General'", ")", "for", "ph", "in", "variantdata", ".", "keys", "(", ")", ":", "for", "s", "in", "variantdata", "[", "p...
Get raw data for a variant into ekin projects, fit MM and save
[ "Get", "raw", "data", "for", "a", "variant", "into", "ekin", "projects", "fit", "MM", "and", "save" ]
[ "\"\"\"Get raw data for a variant into ekin projects, fit MM and save\"\"\"", "#inital fit of raw data to get slopes", "#check linear fits applying criteria", "#estimate exp uncertainty and save linear fit errors in the meta_data", "#Extract mm data and fit to michealis-menten", "#print ph, name, n, sconc...
[ { "param": "self", "type": null }, { "param": "variantdata", "type": null }, { "param": "phvalues", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "variantdata", "type": null, "docstring": null, "docstring_tok...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
analyseKinetics
<not_specific>
def analyseKinetics(self, name, enzymeconc, enzymeconcerr, dilution, altdilution, doftest=True, run=None): """Analyse MM kinetics fits from ekin project to extract kcats and kms etc""" print 'analysing MM data..' E = EkinProject() E.openProject(os.path.joi...
Analyse MM kinetics fits from ekin project to extract kcats and kms etc
Analyse MM kinetics fits from ekin project to extract kcats and kms etc
[ "Analyse", "MM", "kinetics", "fits", "from", "ekin", "project", "to", "extract", "kcats", "and", "kms", "etc" ]
def analyseKinetics(self, name, enzymeconc, enzymeconcerr, dilution, altdilution, doftest=True, run=None): print 'analysing MM data..' E = EkinProject() E.openProject(os.path.join(self.path, name)) kcatdatasets = [] phs=[]; kcats=[]; kms=[]; kcatkms=...
[ "def", "analyseKinetics", "(", "self", ",", "name", ",", "enzymeconc", ",", "enzymeconcerr", ",", "dilution", ",", "altdilution", ",", "doftest", "=", "True", ",", "run", "=", "None", ")", ":", "print", "'analysing MM data..'", "E", "=", "EkinProject", "(", ...
Analyse MM kinetics fits from ekin project to extract kcats and kms etc
[ "Analyse", "MM", "kinetics", "fits", "from", "ekin", "project", "to", "extract", "kcats", "and", "kms", "etc" ]
[ "\"\"\"Analyse MM kinetics fits from ekin project to extract kcats and kms etc\"\"\"", "#We iterate over the phs to get kcats vs pH etc.", "#introduce an error factor for the enzyme conc here to account", "#for variance in kcats between replicates..", "#send output to log files as html tables", "#kmpercer...
[ { "param": "self", "type": null }, { "param": "name", "type": null }, { "param": "enzymeconc", "type": null }, { "param": "enzymeconcerr", "type": null }, { "param": "dilution", "type": null }, { "param": "altdilution", "type": null }, { "p...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "name", "type": null, "docstring": null, "docstring_tokens": [...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
combineKcatProjects
<not_specific>
def combineKcatProjects(self): """put kcats, kms and kcats/kms for all variants into single projects""" print 'creating kcat/km projects..' Ekcats = EkinProject() Ekms = EkinProject() Ekcatskms = EkinProject() Ekslopes = EkinProject() required = self.required ...
put kcats, kms and kcats/kms for all variants into single projects
put kcats, kms and kcats/kms for all variants into single projects
[ "put", "kcats", "kms", "and", "kcats", "/", "kms", "for", "all", "variants", "into", "single", "projects" ]
def combineKcatProjects(self): print 'creating kcat/km projects..' Ekcats = EkinProject() Ekms = EkinProject() Ekcatskms = EkinProject() Ekslopes = EkinProject() required = self.required runs = self.runs kd = {'Kcat':Ekcats, 'Km':Ekms, 'Kcat/Km':Ekcatskms,...
[ "def", "combineKcatProjects", "(", "self", ")", ":", "print", "'creating kcat/km projects..'", "Ekcats", "=", "EkinProject", "(", ")", "Ekms", "=", "EkinProject", "(", ")", "Ekcatskms", "=", "EkinProject", "(", ")", "Ekslopes", "=", "EkinProject", "(", ")", "r...
put kcats, kms and kcats/kms for all variants into single projects
[ "put", "kcats", "kms", "and", "kcats", "/", "kms", "for", "all", "variants", "into", "single", "projects" ]
[ "\"\"\"put kcats, kms and kcats/kms for all variants into single projects\"\"\"", "#estimating exp error for fit in kcats" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
loadASTData
<not_specific>
def loadASTData(self, path, variantnames, date, setname, inhibconcs=None): """requires us to get the dilution factor for each conc""" filename = 'set%s_%s_ast.xls' % (setname, date) filename = os.path.join('AST', filename) print filename book = xlrd.open_workbook(os.path.join(...
requires us to get the dilution factor for each conc
requires us to get the dilution factor for each conc
[ "requires", "us", "to", "get", "the", "dilution", "factor", "for", "each", "conc" ]
def loadASTData(self, path, variantnames, date, setname, inhibconcs=None): filename = 'set%s_%s_ast.xls' % (setname, date) filename = os.path.join('AST', filename) print filename book = xlrd.open_workbook(os.path.join(path, filename)) sh1 = book.sheet_by_index(0) rawdata=...
[ "def", "loadASTData", "(", "self", ",", "path", ",", "variantnames", ",", "date", ",", "setname", ",", "inhibconcs", "=", "None", ")", ":", "filename", "=", "'set%s_%s_ast.xls'", "%", "(", "setname", ",", "date", ")", "filename", "=", "os", ".", "path", ...
requires us to get the dilution factor for each conc
[ "requires", "us", "to", "get", "the", "dilution", "factor", "for", "each", "conc" ]
[ "\"\"\"requires us to get the dilution factor for each conc\"\"\"", "#get raw enzyme abs data from sheet and put into ekin", "#print s, t, r, c, sh1.col_values(c)[r]" ]
[ { "param": "self", "type": null }, { "param": "path", "type": null }, { "param": "variantnames", "type": null }, { "param": "date", "type": null }, { "param": "setname", "type": null }, { "param": "inhibconcs", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "path", "type": null, "docstring": null, "docstring_tokens": [...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
fitAST
<not_specific>
def fitAST(self, variantdata=None, dilution=None, Eraw=None): """Fit velocities vs inhibitor conc. to get enzyme concentrations, we get the error on the enz conc from the exp uncert of fit""" E = EkinProject(mode='General') for i in variantdata.keys(): E.insertDataset(var...
Fit velocities vs inhibitor conc. to get enzyme concentrations, we get the error on the enz conc from the exp uncert of fit
Fit velocities vs inhibitor conc. to get enzyme concentrations, we get the error on the enz conc from the exp uncert of fit
[ "Fit", "velocities", "vs", "inhibitor", "conc", ".", "to", "get", "enzyme", "concentrations", "we", "get", "the", "error", "on", "the", "enz", "conc", "from", "the", "exp", "uncert", "of", "fit" ]
def fitAST(self, variantdata=None, dilution=None, Eraw=None): E = EkinProject(mode='General') for i in variantdata.keys(): E.insertDataset(variantdata[i], str(i)) E.fitDatasets(models=['Linear'], noiter=200, conv=1e-8, grad=1e-8, silent=True) active=[] for d in E.data...
[ "def", "fitAST", "(", "self", ",", "variantdata", "=", "None", ",", "dilution", "=", "None", ",", "Eraw", "=", "None", ")", ":", "E", "=", "EkinProject", "(", "mode", "=", "'General'", ")", "for", "i", "in", "variantdata", ".", "keys", "(", ")", ":...
Fit velocities vs inhibitor conc.
[ "Fit", "velocities", "vs", "inhibitor", "conc", "." ]
[ "\"\"\"Fit velocities vs inhibitor conc. to get enzyme concentrations,\n we get the error on the enz conc from the exp uncert of fit\"\"\"", "#inital fit of raw data to get slopes", "#check fits applying criteria and deactivate points accordingly", "#criteria: V>0, leave out 3.2 val, check err on sl...
[ { "param": "self", "type": null }, { "param": "variantdata", "type": null }, { "param": "dilution", "type": null }, { "param": "Eraw", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "variantdata", "type": null, "docstring": null, "docstring_tok...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
fitAST2
<not_specific>
def fitAST2(self, variantdata=None, dilution=None, Eraw=None): """Fit AST using Lars method, we fit each raw abs data to MM by first transforming Abs vals to [S] and getting a Vmax for each [I]""" import copy E = EkinProject(mode='General') for i in variantdata.keys(): ...
Fit AST using Lars method, we fit each raw abs data to MM by first transforming Abs vals to [S] and getting a Vmax for each [I]
Fit AST using Lars method, we fit each raw abs data to MM by first transforming Abs vals to [S] and getting a Vmax for each [I]
[ "Fit", "AST", "using", "Lars", "method", "we", "fit", "each", "raw", "abs", "data", "to", "MM", "by", "first", "transforming", "Abs", "vals", "to", "[", "S", "]", "and", "getting", "a", "Vmax", "for", "each", "[", "I", "]" ]
def fitAST2(self, variantdata=None, dilution=None, Eraw=None): import copy E = EkinProject(mode='General') for i in variantdata.keys(): E.insertDataset(variantdata[i], str(i)) Sinit = 1 Es = EkinProject() Amax = 0 for d in E.datasets: x,y,a...
[ "def", "fitAST2", "(", "self", ",", "variantdata", "=", "None", ",", "dilution", "=", "None", ",", "Eraw", "=", "None", ")", ":", "import", "copy", "E", "=", "EkinProject", "(", "mode", "=", "'General'", ")", "for", "i", "in", "variantdata", ".", "ke...
Fit AST using Lars method, we fit each raw abs data to MM by first transforming Abs vals to [S] and getting a Vmax for each [I]
[ "Fit", "AST", "using", "Lars", "method", "we", "fit", "each", "raw", "abs", "data", "to", "MM", "by", "first", "transforming", "Abs", "vals", "to", "[", "S", "]", "and", "getting", "a", "Vmax", "for", "each", "[", "I", "]" ]
[ "\"\"\"Fit AST using Lars method, we fit each raw abs data to MM by first\n transforming Abs vals to [S] and getting a Vmax for each [I]\"\"\"", "#transform dataset in terms of [S] vs V vals using Ainit, Amax", "#using eq: [S] = [S]init * (1 - (A405 - A405,init) / (A405,max - A405,init))", "#get Amax?"...
[ { "param": "self", "type": null }, { "param": "variantdata", "type": null }, { "param": "dilution", "type": null }, { "param": "Eraw", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "variantdata", "type": null, "docstring": null, "docstring_tok...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
checkFit
<not_specific>
def checkFit(self, E, d, cutoff): """Rough check of any fit using percsqdiff and return status based on cutoff""" edata = E.data[d] ekd = EkinDataset(edata) currfit = E.getFitData(d) if currfit == None or len(currfit) == 0: return 0 expdata = Fitting.getExpD...
Rough check of any fit using percsqdiff and return status based on cutoff
Rough check of any fit using percsqdiff and return status based on cutoff
[ "Rough", "check", "of", "any", "fit", "using", "percsqdiff", "and", "return", "status", "based", "on", "cutoff" ]
def checkFit(self, E, d, cutoff): edata = E.data[d] ekd = EkinDataset(edata) currfit = E.getFitData(d) if currfit == None or len(currfit) == 0: return 0 expdata = Fitting.getExpData(edata) X = Fitting.makeFitter(currfit, expdata=expdata) sqdiff = X.get...
[ "def", "checkFit", "(", "self", ",", "E", ",", "d", ",", "cutoff", ")", ":", "edata", "=", "E", ".", "data", "[", "d", "]", "ekd", "=", "EkinDataset", "(", "edata", ")", "currfit", "=", "E", ".", "getFitData", "(", "d", ")", "if", "currfit", "=...
Rough check of any fit using percsqdiff and return status based on cutoff
[ "Rough", "check", "of", "any", "fit", "using", "percsqdiff", "and", "return", "status", "based", "on", "cutoff" ]
[ "\"\"\"Rough check of any fit using percsqdiff and return status based on cutoff\"\"\"", "#print d, sqdiff" ]
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "d", "type": null }, { "param": "cutoff", "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": [], ...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
checkLinearFit
<not_specific>
def checkLinearFit(self, E, d, cutoff, fromstart=True, percs=None): """Check linear fit for raw abs data to get best fit. 1. get best fit from 0.7, 0.5, 0.3 removed from end 2. compare with original and pick the best fit We then return a flag stating if this point is to be use...
Check linear fit for raw abs data to get best fit. 1. get best fit from 0.7, 0.5, 0.3 removed from end 2. compare with original and pick the best fit We then return a flag stating if this point is to be used in the using percent sumsqdiff vals
Check linear fit for raw abs data to get best fit. 1.
[ "Check", "linear", "fit", "for", "raw", "abs", "data", "to", "get", "best", "fit", ".", "1", "." ]
def checkLinearFit(self, E, d, cutoff, fromstart=True, percs=None): edata = E.data[d] ekd = EkinDataset(edata) currfit = E.getFitData(d) if currfit == None or len(currfit) == 0: return 0 expdata = Fitting.getExpData(edata) X = Fitting.makeFitter(currfit, expda...
[ "def", "checkLinearFit", "(", "self", ",", "E", ",", "d", ",", "cutoff", ",", "fromstart", "=", "True", ",", "percs", "=", "None", ")", ":", "edata", "=", "E", ".", "data", "[", "d", "]", "ekd", "=", "EkinDataset", "(", "edata", ")", "currfit", "...
Check linear fit for raw abs data to get best fit.
[ "Check", "linear", "fit", "for", "raw", "abs", "data", "to", "get", "best", "fit", "." ]
[ "\"\"\"Check linear fit for raw abs data to get best fit.\n 1. get best fit from 0.7, 0.5, 0.3 removed from end\n 2. compare with original and pick the best fit\n We then return a flag stating if this point is to be used in the\n using percent sumsqdiff vals\"\"\"", "#rem...
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "d", "type": null }, { "param": "cutoff", "type": null }, { "param": "fromstart", "type": null }, { "param": "percs", "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": [], ...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
fitportion
<not_specific>
def fitportion(self, edata, currfit, reverse=True, percs=None, X=None): """Compare fits using different portions of the data and return best. This method is not that reliable.. as its biased towards the fits with least no of points as they have lower sum sq diffs... """ import copy...
Compare fits using different portions of the data and return best. This method is not that reliable.. as its biased towards the fits with least no of points as they have lower sum sq diffs...
Compare fits using different portions of the data and return best. This method is not that reliable.. as its biased towards the fits with least no of points as they have lower sum sq diffs
[ "Compare", "fits", "using", "different", "portions", "of", "the", "data", "and", "return", "best", ".", "This", "method", "is", "not", "that", "reliable", "..", "as", "its", "biased", "towards", "the", "fits", "with", "least", "no", "of", "points", "as", ...
def fitportion(self, edata, currfit, reverse=True, percs=None, X=None): import copy if percs==None: percs = [0.7, 0.5, 0.3] currsqdiff = 100 currdata = edata currX=X for perc in percs: tmpdata = copy.deepcopy(edata) ekd = EkinDataset(tm...
[ "def", "fitportion", "(", "self", ",", "edata", ",", "currfit", ",", "reverse", "=", "True", ",", "percs", "=", "None", ",", "X", "=", "None", ")", ":", "import", "copy", "if", "percs", "==", "None", ":", "percs", "=", "[", "0.7", ",", "0.5", ","...
Compare fits using different portions of the data and return best.
[ "Compare", "fits", "using", "different", "portions", "of", "the", "data", "and", "return", "best", "." ]
[ "\"\"\"Compare fits using different portions of the data and return best.\n This method is not that reliable.. as its biased towards the fits with\n least no of points as they have lower sum sq diffs... \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "edata", "type": null }, { "param": "currfit", "type": null }, { "param": "reverse", "type": null }, { "param": "percs", "type": null }, { "param": "X", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "edata", "type": null, "docstring": null, "docstring_tokens": ...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
makeASTHtml
<not_specific>
def makeASTHtml(self): """make html page of ast raw fits""" ew = EkinWeb() path = os.path.join(self.path, 'plots') images=[] rownames=[] for name in self.required: E = EkinProject() E.openProject(os.path.join(self.path, name.replace(' ','')+'_ast')...
make html page of ast raw fits
make html page of ast raw fits
[ "make", "html", "page", "of", "ast", "raw", "fits" ]
def makeASTHtml(self): ew = EkinWeb() path = os.path.join(self.path, 'plots') images=[] rownames=[] for name in self.required: E = EkinProject() E.openProject(os.path.join(self.path, name.replace(' ','')+'_ast')) E.datasets.sort() c...
[ "def", "makeASTHtml", "(", "self", ")", ":", "ew", "=", "EkinWeb", "(", ")", "path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "path", ",", "'plots'", ")", "images", "=", "[", "]", "rownames", "=", "[", "]", "for", "name", "in", "s...
make html page of ast raw fits
[ "make", "html", "page", "of", "ast", "raw", "fits" ]
[ "\"\"\"make html page of ast raw fits\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
makeKineticsHtml
<not_specific>
def makeKineticsHtml(self, run=None): """make html pages of kinetics raw and MM fits""" if run != None: runs=[run] else: runs=self.runs import gc ew = EkinWeb() path = os.path.join(self.path, 'plots') import copy rownames = copy.dee...
make html pages of kinetics raw and MM fits
make html pages of kinetics raw and MM fits
[ "make", "html", "pages", "of", "kinetics", "raw", "and", "MM", "fits" ]
def makeKineticsHtml(self, run=None): if run != None: runs=[run] else: runs=self.runs import gc ew = EkinWeb() path = os.path.join(self.path, 'plots') import copy rownames = copy.deepcopy(self.required) colnames = self.phlist ...
[ "def", "makeKineticsHtml", "(", "self", ",", "run", "=", "None", ")", ":", "if", "run", "!=", "None", ":", "runs", "=", "[", "run", "]", "else", ":", "runs", "=", "self", ".", "runs", "import", "gc", "ew", "=", "EkinWeb", "(", ")", "path", "=", ...
make html pages of kinetics raw and MM fits
[ "make", "html", "pages", "of", "kinetics", "raw", "and", "MM", "fits" ]
[ "\"\"\"make html pages of kinetics raw and MM fits\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "run", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "run", "type": null, "docstring": null, "docstring_tokens": []...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
makekcatsHtml
<not_specific>
def makekcatsHtml(self, E=None, dataname='kcats'): """make html page of pka vs. kcat plots per variant""" if E==None: E = EkinProject() E.openProject(os.path.join(self.path, dataname)) ew = EkinWeb() images=[] required = self.required runs = self.r...
make html page of pka vs. kcat plots per variant
make html page of pka vs. kcat plots per variant
[ "make", "html", "page", "of", "pka", "vs", ".", "kcat", "plots", "per", "variant" ]
def makekcatsHtml(self, E=None, dataname='kcats'): if E==None: E = EkinProject() E.openProject(os.path.join(self.path, dataname)) ew = EkinWeb() images=[] required = self.required runs = self.runs path = os.path.join(self.path, 'plots') if ...
[ "def", "makekcatsHtml", "(", "self", ",", "E", "=", "None", ",", "dataname", "=", "'kcats'", ")", ":", "if", "E", "==", "None", ":", "E", "=", "EkinProject", "(", ")", "E", ".", "openProject", "(", "os", ".", "path", ".", "join", "(", "self", "."...
make html page of pka vs. kcat plots per variant
[ "make", "html", "page", "of", "pka", "vs", ".", "kcat", "plots", "per", "variant" ]
[ "\"\"\"make html page of pka vs. kcat plots per variant\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "dataname", "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": [], ...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
comparedpKas
<not_specific>
def comparedpKas(self): """predicted dpka vs. our crappy dpkas""" import matplotlib.pyplot as plt f= open('/enc/Novozymes/Data/Hwbb/jan/dpkas.csv') cw = csv.reader(f) predicted={} for r in cw: name = string.lower(r[0]+' '+r[1]) predicted[name]=r[2]...
predicted dpka vs. our crappy dpkas
predicted dpka vs. our crappy dpkas
[ "predicted", "dpka", "vs", ".", "our", "crappy", "dpkas" ]
def comparedpKas(self): import matplotlib.pyplot as plt f= open('/enc/Novozymes/Data/Hwbb/jan/dpkas.csv') cw = csv.reader(f) predicted={} for r in cw: name = string.lower(r[0]+' '+r[1]) predicted[name]=r[2] fig=plt.figure() ax=fig.add_subpl...
[ "def", "comparedpKas", "(", "self", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "f", "=", "open", "(", "'/enc/Novozymes/Data/Hwbb/jan/dpkas.csv'", ")", "cw", "=", "csv", ".", "reader", "(", "f", ")", "predicted", "=", "{", "}", "for", "...
predicted dpka vs. our crappy dpkas
[ "predicted", "dpka", "vs", ".", "our", "crappy", "dpkas" ]
[ "\"\"\"predicted dpka vs. our crappy dpkas\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
readEnzymeConcs
<not_specific>
def readEnzymeConcs(self): """Read previously calculated enzyme concs from the file""" ef = open(os.path.join(self.path,'enzymeconcs.txt')) cw=csv.reader(ef) enzconcs = {} templateconcs = {} for r in cw: enzconcs[r[0]] = float(r[1]) templateconcs[r...
Read previously calculated enzyme concs from the file
Read previously calculated enzyme concs from the file
[ "Read", "previously", "calculated", "enzyme", "concs", "from", "the", "file" ]
def readEnzymeConcs(self): ef = open(os.path.join(self.path,'enzymeconcs.txt')) cw=csv.reader(ef) enzconcs = {} templateconcs = {} for r in cw: enzconcs[r[0]] = float(r[1]) templateconcs[r[0]] = float(r[3]) return enzconcs, templateconcs
[ "def", "readEnzymeConcs", "(", "self", ")", ":", "ef", "=", "open", "(", "os", ".", "path", ".", "join", "(", "self", ".", "path", ",", "'enzymeconcs.txt'", ")", ")", "cw", "=", "csv", ".", "reader", "(", "ef", ")", "enzconcs", "=", "{", "}", "te...
Read previously calculated enzyme concs from the file
[ "Read", "previously", "calculated", "enzyme", "concs", "from", "the", "file" ]
[ "\"\"\"Read previously calculated enzyme concs from the file\"\"\"", "#print enzconcs" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
combinedSummary
<not_specific>
def combinedSummary(self, sets=None, variants=None): """Put all results in one project and plot summary""" if sets == None: sets = self.sets setfiles=[] for s in sets: setfiles.append('set'+s+'.defs') if variants!=None: print ' doing variants',...
Put all results in one project and plot summary
Put all results in one project and plot summary
[ "Put", "all", "results", "in", "one", "project", "and", "plot", "summary" ]
def combinedSummary(self, sets=None, variants=None): if sets == None: sets = self.sets setfiles=[] for s in sets: setfiles.append('set'+s+'.defs') if variants!=None: print ' doing variants', variants Ekcat=EkinProject() Ekcatkm=EkinProj...
[ "def", "combinedSummary", "(", "self", ",", "sets", "=", "None", ",", "variants", "=", "None", ")", ":", "if", "sets", "==", "None", ":", "sets", "=", "self", ".", "sets", "setfiles", "=", "[", "]", "for", "s", "in", "sets", ":", "setfiles", ".", ...
Put all results in one project and plot summary
[ "Put", "all", "results", "in", "one", "project", "and", "plot", "summary" ]
[ "\"\"\"Put all results in one project and plot summary\"\"\"", "#if not v in enzconcs.keys():" ]
[ { "param": "self", "type": null }, { "param": "sets", "type": null }, { "param": "variants", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sets", "type": null, "docstring": null, "docstring_tokens": [...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
plotTemplatevsenzConcs
<not_specific>
def plotTemplatevsenzConcs(self, sets): """Compare our enzyme concs vs template, testing purposes only""" import matplotlib import matplotlib.pyplot as plt setfiles=[] for s in sets: setfiles.append('set'+s+'.defs') enzconcs={} templconcs = {} ...
Compare our enzyme concs vs template, testing purposes only
Compare our enzyme concs vs template, testing purposes only
[ "Compare", "our", "enzyme", "concs", "vs", "template", "testing", "purposes", "only" ]
def plotTemplatevsenzConcs(self, sets): import matplotlib import matplotlib.pyplot as plt setfiles=[] for s in sets: setfiles.append('set'+s+'.defs') enzconcs={} templconcs = {} pathindex = {} for s in setfiles: self.parseDefs(s) ...
[ "def", "plotTemplatevsenzConcs", "(", "self", ",", "sets", ")", ":", "import", "matplotlib", "import", "matplotlib", ".", "pyplot", "as", "plt", "setfiles", "=", "[", "]", "for", "s", "in", "sets", ":", "setfiles", ".", "append", "(", "'set'", "+", "s", ...
Compare our enzyme concs vs template, testing purposes only
[ "Compare", "our", "enzyme", "concs", "vs", "template", "testing", "purposes", "only" ]
[ "\"\"\"Compare our enzyme concs vs template, testing purposes only\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "sets", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sets", "type": null, "docstring": null, "docstring_tokens": [...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
doAST
<not_specific>
def doAST(self, noraw=False): """Do AST using current defs Ekinraw is the optional manually re-fitted raw ast data""" enzymeconcs={} enzymeconcs1={} self.astdilutions, xx = self.getDilutions(os.path.join(self.path, self.astdilfile)) if hasattr(self, 'template_enzconcs'...
Do AST using current defs Ekinraw is the optional manually re-fitted raw ast data
Do AST using current defs Ekinraw is the optional manually re-fitted raw ast data
[ "Do", "AST", "using", "current", "defs", "Ekinraw", "is", "the", "optional", "manually", "re", "-", "fitted", "raw", "ast", "data" ]
def doAST(self, noraw=False): enzymeconcs={} enzymeconcs1={} self.astdilutions, xx = self.getDilutions(os.path.join(self.path, self.astdilfile)) if hasattr(self, 'template_enzconcs'): print self.template_enzconcs self.astraw = self.loadASTData(path=self.path, variantn...
[ "def", "doAST", "(", "self", ",", "noraw", "=", "False", ")", ":", "enzymeconcs", "=", "{", "}", "enzymeconcs1", "=", "{", "}", "self", ".", "astdilutions", ",", "xx", "=", "self", ".", "getDilutions", "(", "os", ".", "path", ".", "join", "(", "sel...
Do AST using current defs Ekinraw is the optional manually re-fitted raw ast data
[ "Do", "AST", "using", "current", "defs", "Ekinraw", "is", "the", "optional", "manually", "re", "-", "fitted", "raw", "ast", "data" ]
[ "\"\"\"Do AST using current defs\n Ekinraw is the optional manually re-fitted raw ast data\"\"\"", "#if noraw is true we don't get the raw data, but use the already made", "#ekin fits to extract the enzyme concs - handy for manually refit ast data", "#Ea, enzymeconc1 = self.fitAST2(self.astraw[name]...
[ { "param": "self", "type": null }, { "param": "noraw", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "noraw", "type": null, "docstring": null, "docstring_tokens": ...
98470c081f53fcb14bbe1172e7e3e1b98dad0525
shambo001/peat
PEATDB/plugins/KineticsAnalysis.py
[ "MIT" ]
Python
sendtoPEAT
<not_specific>
def sendtoPEAT(self, server='localhost'): """Send all the data to PEATDB""" from PEATDB.Base import PDatabase self.DB = PDatabase(server=server, username='farrell', password='123', project='novo') print self.DB DB=self.DB DB.addField('setname','te...
Send all the data to PEATDB
Send all the data to PEATDB
[ "Send", "all", "the", "data", "to", "PEATDB" ]
def sendtoPEAT(self, server='localhost'): from PEATDB.Base import PDatabase self.DB = PDatabase(server=server, username='farrell', password='123', project='novo') print self.DB DB=self.DB DB.addField('setname','text') DB.addField('clonename','text...
[ "def", "sendtoPEAT", "(", "self", ",", "server", "=", "'localhost'", ")", ":", "from", "PEATDB", ".", "Base", "import", "PDatabase", "self", ".", "DB", "=", "PDatabase", "(", "server", "=", "server", ",", "username", "=", "'farrell'", ",", "password", "=...
Send all the data to PEATDB
[ "Send", "all", "the", "data", "to", "PEATDB" ]
[ "\"\"\"Send all the data to PEATDB\"\"\"", "#DB.addField('mutation','text')", "#kinetics data ", "#add kcat etc. vals for each run", "'''for k in kprj:\n for r in self.runs:\n d = name+'_'+str(r)\n col = k+'_'+str(r)\n ...
[ { "param": "self", "type": null }, { "param": "server", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "server", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
scanCollection
<not_specific>
def scanCollection(pdbFile, mutation, skipResidueTypes=['ALA', 'GLY'], ligandFiles=[], location=None, name=None, clean=True, temporary=False, overwrite=True): '''Convience function for creating a set of scan mutants.''' mutationList = CreateScanList(pdbFile, mutation=mutation, skipResidueTypes=skipResidu...
Convience function for creating a set of scan mutants.
Convience function for creating a set of scan mutants.
[ "Convience", "function", "for", "creating", "a", "set", "of", "scan", "mutants", "." ]
def scanCollection(pdbFile, mutation, skipResidueTypes=['ALA', 'GLY'], ligandFiles=[], location=None, name=None, clean=True, temporary=False, overwrite=True): mutationList = CreateScanList(pdbFile, mutation=mutation, skipResidueTypes=skipResidueTypes) return MutantCollection(pdbFile, mutationList=mutationList,...
[ "def", "scanCollection", "(", "pdbFile", ",", "mutation", ",", "skipResidueTypes", "=", "[", "'ALA'", ",", "'GLY'", "]", ",", "ligandFiles", "=", "[", "]", ",", "location", "=", "None", ",", "name", "=", "None", ",", "clean", "=", "True", ",", "tempora...
Convience function for creating a set of scan mutants.
[ "Convience", "function", "for", "creating", "a", "set", "of", "scan", "mutants", "." ]
[ "'''Convience function for creating a set of scan mutants.'''" ]
[ { "param": "pdbFile", "type": null }, { "param": "mutation", "type": null }, { "param": "skipResidueTypes", "type": null }, { "param": "ligandFiles", "type": null }, { "param": "location", "type": null }, { "param": "name", "type": null }, { ...
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbFile", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutation", "type": null, "docstring": null, "docstring_tok...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
CreateScanList
<not_specific>
def CreateScanList(pdbFile, mutation='ALA', skipResidueTypes=['ALA', 'GLY']): '''Creates a list representing the mutation of each residue to the specified residue Errors: Raises an FileFormatError if the pdb file is not valid''' if mutation == "ALL": return CreateCompleteScanList(pdbFile) #Create a protool...
Creates a list representing the mutation of each residue to the specified residue Errors: Raises an FileFormatError if the pdb file is not valid
Creates a list representing the mutation of each residue to the specified residue Errors: Raises an FileFormatError if the pdb file is not valid
[ "Creates", "a", "list", "representing", "the", "mutation", "of", "each", "residue", "to", "the", "specified", "residue", "Errors", ":", "Raises", "an", "FileFormatError", "if", "the", "pdb", "file", "is", "not", "valid" ]
def CreateScanList(pdbFile, mutation='ALA', skipResidueTypes=['ALA', 'GLY']): if mutation == "ALL": return CreateCompleteScanList(pdbFile) import Protool try: pdb = Protool.structureIO() pdb.readpdb(pdbFile) except Exception, data: raise Exceptions.FileFormatError, 'Format of specified PDB file %s not vali...
[ "def", "CreateScanList", "(", "pdbFile", ",", "mutation", "=", "'ALA'", ",", "skipResidueTypes", "=", "[", "'ALA'", ",", "'GLY'", "]", ")", ":", "if", "mutation", "==", "\"ALL\"", ":", "return", "CreateCompleteScanList", "(", "pdbFile", ")", "import", "Proto...
Creates a list representing the mutation of each residue to the specified residue Errors: Raises an FileFormatError if the pdb file is not valid
[ "Creates", "a", "list", "representing", "the", "mutation", "of", "each", "residue", "to", "the", "specified", "residue", "Errors", ":", "Raises", "an", "FileFormatError", "if", "the", "pdb", "file", "is", "not", "valid" ]
[ "'''Creates a list representing the mutation of each residue to the specified residue\n\t\n\tErrors:\n\t\tRaises an FileFormatError if the pdb file is not valid'''", "#Create a protool instance of the pdb", "#Create a list where each element is a residue, mutation pair.", "#The mutation in each case is the sa...
[ { "param": "pdbFile", "type": null }, { "param": "mutation", "type": null }, { "param": "skipResidueTypes", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbFile", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutation", "type": null, "docstring": null, "docstring_tok...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
ParseMutationList
<not_specific>
def ParseMutationList(filename): '''Parses the mutation lists in filename. Note: Currently no checking is performed to see if the format or content is valid''' stream = open(filename) #Simple parse lines = [line.strip('\n') for line in stream.readlines()] stream.close() lines = [line.split(",") for line in...
Parses the mutation lists in filename. Note: Currently no checking is performed to see if the format or content is valid
Parses the mutation lists in filename. Note: Currently no checking is performed to see if the format or content is valid
[ "Parses", "the", "mutation", "lists", "in", "filename", ".", "Note", ":", "Currently", "no", "checking", "is", "performed", "to", "see", "if", "the", "format", "or", "content", "is", "valid" ]
def ParseMutationList(filename): stream = open(filename) lines = [line.strip('\n') for line in stream.readlines()] stream.close() lines = [line.split(",") for line in lines] mutationList = [] for line in lines: code = line[0].strip() chain, residueIndex = Utilities.ParseResidueCode(code) mutations = [elemen...
[ "def", "ParseMutationList", "(", "filename", ")", ":", "stream", "=", "open", "(", "filename", ")", "lines", "=", "[", "line", ".", "strip", "(", "'\\n'", ")", "for", "line", "in", "stream", ".", "readlines", "(", ")", "]", "stream", ".", "close", "(...
Parses the mutation lists in filename.
[ "Parses", "the", "mutation", "lists", "in", "filename", "." ]
[ "'''Parses the mutation lists in filename.\n\t\n\tNote: Currently no checking is performed to see if the format or content is valid'''", "#Simple parse" ]
[ { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
MutantFromRotamerOperations
<not_specific>
def MutantFromRotamerOperations(structure, operations): '''Convert a protool structure into a mutant using the information in operations structure: A protool instance representing a structure to be mutated operations: A list containing information on how to create a mutant relative to structure It is assumed t...
Convert a protool structure into a mutant using the information in operations structure: A protool instance representing a structure to be mutated operations: A list containing information on how to create a mutant relative to structure It is assumed this list was obtained by calling 'rotamerOperationsForMutant:...
Convert a protool structure into a mutant using the information in operations structure: A protool instance representing a structure to be mutated A list containing information on how to create a mutant relative to structure It is assumed this list was obtained by calling 'rotamerOperationsForMutant:() on a MutantColl...
[ "Convert", "a", "protool", "structure", "into", "a", "mutant", "using", "the", "information", "in", "operations", "structure", ":", "A", "protool", "instance", "representing", "a", "structure", "to", "be", "mutated", "A", "list", "containing", "information", "on...
def MutantFromRotamerOperations(structure, operations): mutant = copy.deepcopy(structure) mutationSet = mutationSetFromRotamerOperations(operations) for operation, atomCode, atomData in operations: if operation == 'delete': mutant.remove_atom(atomCode) for operation, atomCode, atomData in operations: if ope...
[ "def", "MutantFromRotamerOperations", "(", "structure", ",", "operations", ")", ":", "mutant", "=", "copy", ".", "deepcopy", "(", "structure", ")", "mutationSet", "=", "mutationSetFromRotamerOperations", "(", "operations", ")", "for", "operation", ",", "atomCode", ...
Convert a protool structure into a mutant using the information in operations structure: A protool instance representing a structure to be mutated
[ "Convert", "a", "protool", "structure", "into", "a", "mutant", "using", "the", "information", "in", "operations", "structure", ":", "A", "protool", "instance", "representing", "a", "structure", "to", "be", "mutated" ]
[ "'''Convert a protool structure into a mutant using the information in operations\n\t\n\tstructure: A protool instance representing a structure to be mutated\n\t\n\toperations: A list containing information on how to create a mutant relative to structure\n\tIt is assumed this list was obtained by calling 'rotamerOp...
[ { "param": "structure", "type": null }, { "param": "operations", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "structure", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "operations", "type": null, "docstring": null, "docstring...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutationListFileFromStream
<not_specific>
def mutationListFileFromStream(stream): '''Returns a mutation list instance initialised from stream The returned MutationListFile instance is associated with a temporary filename. This file is not created unless writeToFile() is called on the returned object''' return MutationListFile(filename=None, mutationDa...
Returns a mutation list instance initialised from stream The returned MutationListFile instance is associated with a temporary filename. This file is not created unless writeToFile() is called on the returned object
Returns a mutation list instance initialised from stream The returned MutationListFile instance is associated with a temporary filename. This file is not created unless writeToFile() is called on the returned object
[ "Returns", "a", "mutation", "list", "instance", "initialised", "from", "stream", "The", "returned", "MutationListFile", "instance", "is", "associated", "with", "a", "temporary", "filename", ".", "This", "file", "is", "not", "created", "unless", "writeToFile", "()"...
def mutationListFileFromStream(stream): return MutationListFile(filename=None, mutationData=stream.read(), update=False)
[ "def", "mutationListFileFromStream", "(", "stream", ")", ":", "return", "MutationListFile", "(", "filename", "=", "None", ",", "mutationData", "=", "stream", ".", "read", "(", ")", ",", "update", "=", "False", ")" ]
Returns a mutation list instance initialised from stream The returned MutationListFile instance is associated with a temporary filename.
[ "Returns", "a", "mutation", "list", "instance", "initialised", "from", "stream", "The", "returned", "MutationListFile", "instance", "is", "associated", "with", "a", "temporary", "filename", "." ]
[ "'''Returns a mutation list instance initialised from stream\n\t\n\tThe returned MutationListFile instance is associated with a temporary filename.\n\tThis file is not created unless writeToFile() is called on the returned object'''" ]
[ { "param": "stream", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_isSinglePointMutationFormat
<not_specific>
def _isSinglePointMutationFormat(self, stream): '''Returns True if filename is in single point mutation format Note: This is a very simple check. It only looks to see if the first line from stream is in a valid SPM format''' isSPM = True stream.seek(0) line = stream.readline() components = ...
Returns True if filename is in single point mutation format Note: This is a very simple check. It only looks to see if the first line from stream is in a valid SPM format
Returns True if filename is in single point mutation format Note: This is a very simple check. It only looks to see if the first line from stream is in a valid SPM format
[ "Returns", "True", "if", "filename", "is", "in", "single", "point", "mutation", "format", "Note", ":", "This", "is", "a", "very", "simple", "check", ".", "It", "only", "looks", "to", "see", "if", "the", "first", "line", "from", "stream", "is", "in", "a...
def _isSinglePointMutationFormat(self, stream): isSPM = True stream.seek(0) line = stream.readline() components = line.split(",") try: if len(components) != 0: code = components[0].strip() parts = Utilities.ParseResidueCode(code) if len(parts) == 3: isSPM = False else: isSPM = Fal...
[ "def", "_isSinglePointMutationFormat", "(", "self", ",", "stream", ")", ":", "isSPM", "=", "True", "stream", ".", "seek", "(", "0", ")", "line", "=", "stream", ".", "readline", "(", ")", "components", "=", "line", ".", "split", "(", "\",\"", ")", "try"...
Returns True if filename is in single point mutation format Note: This is a very simple check.
[ "Returns", "True", "if", "filename", "is", "in", "single", "point", "mutation", "format", "Note", ":", "This", "is", "a", "very", "simple", "check", "." ]
[ "'''Returns True if filename is in single point mutation format\n\t\t\n\t\tNote: This is a very simple check.\n\t\tIt only looks to see if the first line from stream is in a valid SPM format'''", "#Check the first component", "#should only have two components Chain:Number for SPM", "#Check the mutation codes\...
[ { "param": "self", "type": null }, { "param": "stream", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_parseSinglePointMutationList
null
def _parseSinglePointMutationList(self, stream): '''Parses a mutation list in simple format Assumes the data read from stream is in single point mutation format. Exceptions: Raises an Exceptions.MutationListFileFormatError if the file format is invalid''' stream.seek(0) lines = [line.strip('\n')...
Parses a mutation list in simple format Assumes the data read from stream is in single point mutation format. Exceptions: Raises an Exceptions.MutationListFileFormatError if the file format is invalid
Parses a mutation list in simple format Assumes the data read from stream is in single point mutation format. Raises an Exceptions.MutationListFileFormatError if the file format is invalid
[ "Parses", "a", "mutation", "list", "in", "simple", "format", "Assumes", "the", "data", "read", "from", "stream", "is", "in", "single", "point", "mutation", "format", ".", "Raises", "an", "Exceptions", ".", "MutationListFileFormatError", "if", "the", "file", "f...
def _parseSinglePointMutationList(self, stream): stream.seek(0) lines = [line.strip('\n') for line in stream.readlines()] lines = [line.strip('\t') for line in lines] lines = [line for line in lines if line != ""] lines = [line.split(",") for line in lines] for line in lines: code = line[0].strip() tr...
[ "def", "_parseSinglePointMutationList", "(", "self", ",", "stream", ")", ":", "stream", ".", "seek", "(", "0", ")", "lines", "=", "[", "line", ".", "strip", "(", "'\\n'", ")", "for", "line", "in", "stream", ".", "readlines", "(", ")", "]", "lines", "...
Parses a mutation list in simple format Assumes the data read from stream is in single point mutation format.
[ "Parses", "a", "mutation", "list", "in", "simple", "format", "Assumes", "the", "data", "read", "from", "stream", "is", "in", "single", "point", "mutation", "format", "." ]
[ "'''Parses a mutation list in simple format\n\t\t\n\t\tAssumes the data read from stream is in single point mutation format.\n\t\t\n\t\tExceptions:\n\t\t\tRaises an Exceptions.MutationListFileFormatError if the file format is invalid'''", "#Use ParseStandardResidueCode as we know that this is the format it should...
[ { "param": "self", "type": null }, { "param": "stream", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_parseStandardMutationList
null
def _parseStandardMutationList(self, stream): '''Parses a mutation list in standard format''' stream.seek(0) lines = [line.strip('\n') for line in stream.readlines()] lines = [line.strip() for line in lines] lines = [line for line in lines if line != ""] for line in lines: try: set = MutationSe...
Parses a mutation list in standard format
Parses a mutation list in standard format
[ "Parses", "a", "mutation", "list", "in", "standard", "format" ]
def _parseStandardMutationList(self, stream): stream.seek(0) lines = [line.strip('\n') for line in stream.readlines()] lines = [line.strip() for line in lines] lines = [line for line in lines if line != ""] for line in lines: try: set = MutationSet(code=line) self.addMutant(set, autoUpdate=False) ...
[ "def", "_parseStandardMutationList", "(", "self", ",", "stream", ")", ":", "stream", ".", "seek", "(", "0", ")", "lines", "=", "[", "line", ".", "strip", "(", "'\\n'", ")", "for", "line", "in", "stream", ".", "readlines", "(", ")", "]", "lines", "=",...
Parses a mutation list in standard format
[ "Parses", "a", "mutation", "list", "in", "standard", "format" ]
[ "'''Parses a mutation list in standard format'''" ]
[ { "param": "self", "type": null }, { "param": "stream", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_parseMutationList
null
def _parseMutationList(self, stream): '''Parses the mutation list in stream. The instance variable self.mutants is filled during the parse Exceptions Raises an Exceptions.MutationListFileFormatError if there is an error with the files format. Raises an Exceptions.MutationListDuplicateEntryError if ...
Parses the mutation list in stream. The instance variable self.mutants is filled during the parse Exceptions Raises an Exceptions.MutationListFileFormatError if there is an error with the files format. Raises an Exceptions.MutationListDuplicateEntryError if the file contains duplicates
Parses the mutation list in stream. The instance variable self.mutants is filled during the parse Exceptions Raises an Exceptions.MutationListFileFormatError if there is an error with the files format. Raises an Exceptions.MutationListDuplicateEntryError if the file contains duplicates
[ "Parses", "the", "mutation", "list", "in", "stream", ".", "The", "instance", "variable", "self", ".", "mutants", "is", "filled", "during", "the", "parse", "Exceptions", "Raises", "an", "Exceptions", ".", "MutationListFileFormatError", "if", "there", "is", "an", ...
def _parseMutationList(self, stream): if self._isSinglePointMutationFormat(stream): self._parseSinglePointMutationList(stream) else: self._parseStandardMutationList(stream)
[ "def", "_parseMutationList", "(", "self", ",", "stream", ")", ":", "if", "self", ".", "_isSinglePointMutationFormat", "(", "stream", ")", ":", "self", ".", "_parseSinglePointMutationList", "(", "stream", ")", "else", ":", "self", ".", "_parseStandardMutationList",...
Parses the mutation list in stream.
[ "Parses", "the", "mutation", "list", "in", "stream", "." ]
[ "'''Parses the mutation list in stream. \n\t\t\n\t\tThe instance variable self.mutants is filled during the parse\n\t\t\n\t\tExceptions\n\t\t\tRaises an Exceptions.MutationListFileFormatError if there is an error with the files format.\n\t\t\tRaises an Exceptions.MutationListDuplicateEntryError if the file contains...
[ { "param": "self", "type": null }, { "param": "stream", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
addMutant
null
def addMutant(self, mutant, autoUpdate=True, ignoreDuplicates=False): '''Adds an entry for mutant to the mutation list file. Parameters: mutant - A MutationSet instance. autoUpdate - The underlying file is updated automatically. Errors: If the file is not writable an IOError is raised. If m...
Adds an entry for mutant to the mutation list file. Parameters: mutant - A MutationSet instance. autoUpdate - The underlying file is updated automatically. Errors: If the file is not writable an IOError is raised. If mutant is not a MutationSet instance an Exceptions.MutationListEntryError is r...
Adds an entry for mutant to the mutation list file. Parameters: mutant - A MutationSet instance. autoUpdate - The underlying file is updated automatically. If the file is not writable an IOError is raised. If mutant is not a MutationSet instance an Exceptions.MutationListEntryError is raised' If the receiver already c...
[ "Adds", "an", "entry", "for", "mutant", "to", "the", "mutation", "list", "file", ".", "Parameters", ":", "mutant", "-", "A", "MutationSet", "instance", ".", "autoUpdate", "-", "The", "underlying", "file", "is", "updated", "automatically", ".", "If", "the", ...
def addMutant(self, mutant, autoUpdate=True, ignoreDuplicates=False): if not ignoreDuplicates: if self.mutants.count(mutant) is not 0: raise Exceptions.MutationListDuplicatEntryError, "Mutant %s is already present in the list" % mutant self.mutants.append(mutant) if autoUpdate: try: self.writeToFil...
[ "def", "addMutant", "(", "self", ",", "mutant", ",", "autoUpdate", "=", "True", ",", "ignoreDuplicates", "=", "False", ")", ":", "if", "not", "ignoreDuplicates", ":", "if", "self", ".", "mutants", ".", "count", "(", "mutant", ")", "is", "not", "0", ":"...
Adds an entry for mutant to the mutation list file.
[ "Adds", "an", "entry", "for", "mutant", "to", "the", "mutation", "list", "file", "." ]
[ "'''Adds an entry for mutant to the mutation list file.\n\t\t\n\t\tParameters: \n\t\t\tmutant - A MutationSet instance.\n\t\t\tautoUpdate - The underlying file is updated automatically.\n\t\t\t\n\t\tErrors: \n\t\t\tIf the file is not writable an IOError is raised.\n\t\t\tIf mutant is not a MutationSet instance an E...
[ { "param": "self", "type": null }, { "param": "mutant", "type": null }, { "param": "autoUpdate", "type": null }, { "param": "ignoreDuplicates", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutant", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
removeMutant
null
def removeMutant(self, mutant): '''Removes the entry for mutant from the file Does nothing if no entry for mutant exists''' if self.mutants.count(mutant) == 1: self.mutants.remove(mutant) self.writeToFile()
Removes the entry for mutant from the file Does nothing if no entry for mutant exists
Removes the entry for mutant from the file Does nothing if no entry for mutant exists
[ "Removes", "the", "entry", "for", "mutant", "from", "the", "file", "Does", "nothing", "if", "no", "entry", "for", "mutant", "exists" ]
def removeMutant(self, mutant): if self.mutants.count(mutant) == 1: self.mutants.remove(mutant) self.writeToFile()
[ "def", "removeMutant", "(", "self", ",", "mutant", ")", ":", "if", "self", ".", "mutants", ".", "count", "(", "mutant", ")", "==", "1", ":", "self", ".", "mutants", ".", "remove", "(", "mutant", ")", "self", ".", "writeToFile", "(", ")" ]
Removes the entry for mutant from the file Does nothing if no entry for mutant exists
[ "Removes", "the", "entry", "for", "mutant", "from", "the", "file", "Does", "nothing", "if", "no", "entry", "for", "mutant", "exists" ]
[ "'''Removes the entry for mutant from the file\t\n\t\t\n\t\tDoes nothing if no entry for mutant exists'''" ]
[ { "param": "self", "type": null }, { "param": "mutant", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutant", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutantList
<not_specific>
def mutantList(self): '''Returns a list of MutationSet instances corresponding to the mutants specified in the file''' return copy.copy(self.mutants)
Returns a list of MutationSet instances corresponding to the mutants specified in the file
Returns a list of MutationSet instances corresponding to the mutants specified in the file
[ "Returns", "a", "list", "of", "MutationSet", "instances", "corresponding", "to", "the", "mutants", "specified", "in", "the", "file" ]
def mutantList(self): return copy.copy(self.mutants)
[ "def", "mutantList", "(", "self", ")", ":", "return", "copy", ".", "copy", "(", "self", ".", "mutants", ")" ]
Returns a list of MutationSet instances corresponding to the mutants specified in the file
[ "Returns", "a", "list", "of", "MutationSet", "instances", "corresponding", "to", "the", "mutants", "specified", "in", "the", "file" ]
[ "'''Returns a list of MutationSet instances corresponding to the mutants specified in the file'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
numberOfMutants
<not_specific>
def numberOfMutants(self): '''Returns the number of mutants in the list''' return len(self.mutants)
Returns the number of mutants in the list
Returns the number of mutants in the list
[ "Returns", "the", "number", "of", "mutants", "in", "the", "list" ]
def numberOfMutants(self): return len(self.mutants)
[ "def", "numberOfMutants", "(", "self", ")", ":", "return", "len", "(", "self", ".", "mutants", ")" ]
Returns the number of mutants in the list
[ "Returns", "the", "number", "of", "mutants", "in", "the", "list" ]
[ "'''Returns the number of mutants in the list'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
stringRepresentation
<not_specific>
def stringRepresentation(self): '''Returns the string that would be written if writeToFile() was called''' stream = StringIO.StringIO() self.writeToStream(stream) stream.flush() data = stream.getvalue() stream.close() return data
Returns the string that would be written if writeToFile() was called
Returns the string that would be written if writeToFile() was called
[ "Returns", "the", "string", "that", "would", "be", "written", "if", "writeToFile", "()", "was", "called" ]
def stringRepresentation(self): stream = StringIO.StringIO() self.writeToStream(stream) stream.flush() data = stream.getvalue() stream.close() return data
[ "def", "stringRepresentation", "(", "self", ")", ":", "stream", "=", "StringIO", ".", "StringIO", "(", ")", "self", ".", "writeToStream", "(", "stream", ")", "stream", ".", "flush", "(", ")", "data", "=", "stream", ".", "getvalue", "(", ")", "stream", ...
Returns the string that would be written if writeToFile() was called
[ "Returns", "the", "string", "that", "would", "be", "written", "if", "writeToFile", "()", "was", "called" ]
[ "'''Returns the string that would be written if writeToFile() was called'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
removeDuplicates
null
def removeDuplicates(self, autoUpdate=True): '''Removes any duplicates in the current in memory list and optionally the underlying file''' seen = {} result = [] for set in self.mutants: #Check if set is in the seen dictionary if set.filename(reduced=True) in seen: continue #First time ...
Removes any duplicates in the current in memory list and optionally the underlying file
Removes any duplicates in the current in memory list and optionally the underlying file
[ "Removes", "any", "duplicates", "in", "the", "current", "in", "memory", "list", "and", "optionally", "the", "underlying", "file" ]
def removeDuplicates(self, autoUpdate=True): seen = {} result = [] for set in self.mutants: if set.filename(reduced=True) in seen: continue seen[set.filename(reduced=True)] = 1 result.append(set) self.mutants = result if autoUpdate is True: self.writeToFile()
[ "def", "removeDuplicates", "(", "self", ",", "autoUpdate", "=", "True", ")", ":", "seen", "=", "{", "}", "result", "=", "[", "]", "for", "set", "in", "self", ".", "mutants", ":", "if", "set", ".", "filename", "(", "reduced", "=", "True", ")", "in",...
Removes any duplicates in the current in memory list and optionally the underlying file
[ "Removes", "any", "duplicates", "in", "the", "current", "in", "memory", "list", "and", "optionally", "the", "underlying", "file" ]
[ "'''Removes any duplicates in the current in memory list and optionally the underlying file'''", "#Check if set is in the seen dictionary\t\t\t\t", "#First time seeing this set - add it to seen\t" ]
[ { "param": "self", "type": null }, { "param": "autoUpdate", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "autoUpdate", "type": null, "docstring": null, "docstring_toke...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_writeSinglePointMutationListToStream
null
def _writeSinglePointMutationListToStream(self, stream): '''Write the mutants to stream in single point mutation format''' residues = {} #Find which residues have SPM's for set in self.mutantList(): residueCode = set.residueCodes(reduced=False)[0] chain, index, mutation = Utilities.ParseMutationCode(s...
Write the mutants to stream in single point mutation format
Write the mutants to stream in single point mutation format
[ "Write", "the", "mutants", "to", "stream", "in", "single", "point", "mutation", "format" ]
def _writeSinglePointMutationListToStream(self, stream): residues = {} for set in self.mutantList(): residueCode = set.residueCodes(reduced=False)[0] chain, index, mutation = Utilities.ParseMutationCode(set.mutationCodes(reduced=False)[0]) if not residues.has_key(residueCode): residues[residueCode] = [...
[ "def", "_writeSinglePointMutationListToStream", "(", "self", ",", "stream", ")", ":", "residues", "=", "{", "}", "for", "set", "in", "self", ".", "mutantList", "(", ")", ":", "residueCode", "=", "set", ".", "residueCodes", "(", "reduced", "=", "False", ")"...
Write the mutants to stream in single point mutation format
[ "Write", "the", "mutants", "to", "stream", "in", "single", "point", "mutation", "format" ]
[ "'''Write the mutants to stream in single point mutation format'''", "#Find which residues have SPM's", "#Write out the mutants of each residue\t" ]
[ { "param": "self", "type": null }, { "param": "stream", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_writeStandardMutationListToStream
null
def _writeStandardMutationListToStream(self, stream, reduced=True): '''Writes the mutations to stream in standard format''' for set in self.mutantList(): stream.write("+".join(set.mutationCodes(reduced=True))) stream.write("\n")
Writes the mutations to stream in standard format
Writes the mutations to stream in standard format
[ "Writes", "the", "mutations", "to", "stream", "in", "standard", "format" ]
def _writeStandardMutationListToStream(self, stream, reduced=True): for set in self.mutantList(): stream.write("+".join(set.mutationCodes(reduced=True))) stream.write("\n")
[ "def", "_writeStandardMutationListToStream", "(", "self", ",", "stream", ",", "reduced", "=", "True", ")", ":", "for", "set", "in", "self", ".", "mutantList", "(", ")", ":", "stream", ".", "write", "(", "\"+\"", ".", "join", "(", "set", ".", "mutationCod...
Writes the mutations to stream in standard format
[ "Writes", "the", "mutations", "to", "stream", "in", "standard", "format" ]
[ "'''Writes the mutations to stream in standard format'''" ]
[ { "param": "self", "type": null }, { "param": "stream", "type": null }, { "param": "reduced", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
writeToFile
null
def writeToFile(self, filename=None, reduced=True): '''Writes the contents of the receiver to filename as a mutation list. Parameters filename: The file to write to. If None the information is written to the default file provided on initialisation reduced: If True list is written in reduced format (if...
Writes the contents of the receiver to filename as a mutation list. Parameters filename: The file to write to. If None the information is written to the default file provided on initialisation reduced: If True list is written in reduced format (if it is a Standard Format list) Exceptions: Raises ...
Writes the contents of the receiver to filename as a mutation list. Parameters filename: The file to write to. If None the information is written to the default file provided on initialisation reduced: If True list is written in reduced format (if it is a Standard Format list) Raises an IOError if the file can't be wr...
[ "Writes", "the", "contents", "of", "the", "receiver", "to", "filename", "as", "a", "mutation", "list", ".", "Parameters", "filename", ":", "The", "file", "to", "write", "to", ".", "If", "None", "the", "information", "is", "written", "to", "the", "default",...
def writeToFile(self, filename=None, reduced=True): if filename is None: filename = self.filename stream = open(filename, "w+") self.writeToStream(stream, reduced=reduced) stream.close() if filename == self.filename: self.fileExists = True
[ "def", "writeToFile", "(", "self", ",", "filename", "=", "None", ",", "reduced", "=", "True", ")", ":", "if", "filename", "is", "None", ":", "filename", "=", "self", ".", "filename", "stream", "=", "open", "(", "filename", ",", "\"w+\"", ")", "self", ...
Writes the contents of the receiver to filename as a mutation list.
[ "Writes", "the", "contents", "of", "the", "receiver", "to", "filename", "as", "a", "mutation", "list", "." ]
[ "'''Writes the contents of the receiver to filename as a mutation list.\n\t\t\n\t\tParameters\n\t\t\tfilename: The file to write to.\n\t\t\tIf None the information is written to the default file provided on initialisation\n\t\t\treduced: If True list is written in reduced format (if it is a Standard Format list)\n\...
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "reduced", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
writeToStream
null
def writeToStream(self, stream, reduced=True): '''Writes the contents of the receiver to stream as a mutation list. Parameters filename: The stream to write to. Exceptions: Raises an IOError if the file can't be written to for any reason''' if self.isSinglePointMutationFormat(): self._writeS...
Writes the contents of the receiver to stream as a mutation list. Parameters filename: The stream to write to. Exceptions: Raises an IOError if the file can't be written to for any reason
Writes the contents of the receiver to stream as a mutation list. Parameters filename: The stream to write to. Raises an IOError if the file can't be written to for any reason
[ "Writes", "the", "contents", "of", "the", "receiver", "to", "stream", "as", "a", "mutation", "list", ".", "Parameters", "filename", ":", "The", "stream", "to", "write", "to", ".", "Raises", "an", "IOError", "if", "the", "file", "can", "'", "t", "be", "...
def writeToStream(self, stream, reduced=True): if self.isSinglePointMutationFormat(): self._writeSinglePointMutationListToStream(stream) else: self._writeStandardMutationListToStream(stream, reduced=reduced)
[ "def", "writeToStream", "(", "self", ",", "stream", ",", "reduced", "=", "True", ")", ":", "if", "self", ".", "isSinglePointMutationFormat", "(", ")", ":", "self", ".", "_writeSinglePointMutationListToStream", "(", "stream", ")", "else", ":", "self", ".", "_...
Writes the contents of the receiver to stream as a mutation list.
[ "Writes", "the", "contents", "of", "the", "receiver", "to", "stream", "as", "a", "mutation", "list", "." ]
[ "'''Writes the contents of the receiver to stream as a mutation list.\n\t\t\n\t\tParameters\n\t\t\tfilename: The stream to write to.\n\t\t\t\n\t\tExceptions:\n\t\t\tRaises an IOError if the file can't be written to for any reason'''" ]
[ { "param": "self", "type": null }, { "param": "stream", "type": null }, { "param": "reduced", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "stream", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
isSinglePointMutationFormat
<not_specific>
def isSinglePointMutationFormat(self): '''Returns True if the list is in SPM format. A list is in SPM format if every entry refers to a SPM.''' result = False #If each MutationSet instance ony contains one residue code then they #are single point mutations mutationsPerSet = [len(set.residueCodes())...
Returns True if the list is in SPM format. A list is in SPM format if every entry refers to a SPM.
Returns True if the list is in SPM format. A list is in SPM format if every entry refers to a SPM.
[ "Returns", "True", "if", "the", "list", "is", "in", "SPM", "format", ".", "A", "list", "is", "in", "SPM", "format", "if", "every", "entry", "refers", "to", "a", "SPM", "." ]
def isSinglePointMutationFormat(self): result = False mutationsPerSet = [len(set.residueCodes()) for set in self.mutantList()] if mutationsPerSet.count(1) == len(self.mutants): result = True return result
[ "def", "isSinglePointMutationFormat", "(", "self", ")", ":", "result", "=", "False", "mutationsPerSet", "=", "[", "len", "(", "set", ".", "residueCodes", "(", ")", ")", "for", "set", "in", "self", ".", "mutantList", "(", ")", "]", "if", "mutationsPerSet", ...
Returns True if the list is in SPM format.
[ "Returns", "True", "if", "the", "list", "is", "in", "SPM", "format", "." ]
[ "'''Returns True if the list is in SPM format.\n\t\t\n\t\tA list is in SPM format if every entry refers to a SPM.'''", "#If each MutationSet instance ony contains one residue code then they ", "#are single point mutations" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
isStandardMutationFormat
<not_specific>
def isStandardMutationFormat(self): '''Returns True if the list is in full format. A list is in full format if any entry does not refer to a SPM''' return not self.isSinglePointMutationFormat()
Returns True if the list is in full format. A list is in full format if any entry does not refer to a SPM
Returns True if the list is in full format. A list is in full format if any entry does not refer to a SPM
[ "Returns", "True", "if", "the", "list", "is", "in", "full", "format", ".", "A", "list", "is", "in", "full", "format", "if", "any", "entry", "does", "not", "refer", "to", "a", "SPM" ]
def isStandardMutationFormat(self): return not self.isSinglePointMutationFormat()
[ "def", "isStandardMutationFormat", "(", "self", ")", ":", "return", "not", "self", ".", "isSinglePointMutationFormat", "(", ")" ]
Returns True if the list is in full format.
[ "Returns", "True", "if", "the", "list", "is", "in", "full", "format", "." ]
[ "'''Returns True if the list is in full format.\n\t\t\n\t\tA list is in full format if any entry does not refer to a SPM'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
format
<not_specific>
def format(self): '''Returns the format of the receivers list Returns: A string. Standard or SinglePointMutation''' if self.isStandardMutationFormat(): return 'Standard' return 'SinglePointMutation'
Returns the format of the receivers list Returns: A string. Standard or SinglePointMutation
Returns the format of the receivers list
[ "Returns", "the", "format", "of", "the", "receivers", "list" ]
def format(self): if self.isStandardMutationFormat(): return 'Standard' return 'SinglePointMutation'
[ "def", "format", "(", "self", ")", ":", "if", "self", ".", "isStandardMutationFormat", "(", ")", ":", "return", "'Standard'", "return", "'SinglePointMutation'" ]
Returns the format of the receivers list
[ "Returns", "the", "format", "of", "the", "receivers", "list" ]
[ "'''Returns the format of the receivers list\n\n\t\tReturns:\n\t\t\tA string. Standard or SinglePointMutation'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [ { "docstring": "A string. Standard or SinglePointMutation", "docstring_tokens": [ "A", "string", ".", "Standard", "or", "SinglePointMutation" ], "type": null } ], "raises": [], "params": [ { "identifier": "s...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
validateOnPDB
<not_specific>
def validateOnPDB(self, pdbFile, errors={}): '''Validates the mutants defined by the list on a pdb file Returns NO if there are problems and the dictionary errors contains the following keys errorString - A string describing the validation problems. errorList - A list continaing the mutation codes that fai...
Validates the mutants defined by the list on a pdb file Returns NO if there are problems and the dictionary errors contains the following keys errorString - A string describing the validation problems. errorList - A list continaing the mutation codes that failed validation Raises Exceptions.FileFormatErro...
Validates the mutants defined by the list on a pdb file Returns NO if there are problems and the dictionary errors contains the following keys errorString - A string describing the validation problems. errorList - A list continaing the mutation codes that failed validation Raises Exceptions.FileFormatError if there is...
[ "Validates", "the", "mutants", "defined", "by", "the", "list", "on", "a", "pdb", "file", "Returns", "NO", "if", "there", "are", "problems", "and", "the", "dictionary", "errors", "contains", "the", "following", "keys", "errorString", "-", "A", "string", "desc...
def validateOnPDB(self, pdbFile, errors={}): import Protool try: pdb = Protool.structureIO() pdb.readpdb(pdbFile) except Exception, data: raise Exceptions.FileFormatError, 'Format of specified PDB file %s not valid.\nUnderlying error - %s' % (pdbFile, data) errorList = [] invalid = 0 reason = "" ...
[ "def", "validateOnPDB", "(", "self", ",", "pdbFile", ",", "errors", "=", "{", "}", ")", ":", "import", "Protool", "try", ":", "pdb", "=", "Protool", ".", "structureIO", "(", ")", "pdb", ".", "readpdb", "(", "pdbFile", ")", "except", "Exception", ",", ...
Validates the mutants defined by the list on a pdb file Returns NO if there are problems and the dictionary errors contains the following keys errorString - A string describing the validation problems.
[ "Validates", "the", "mutants", "defined", "by", "the", "list", "on", "a", "pdb", "file", "Returns", "NO", "if", "there", "are", "problems", "and", "the", "dictionary", "errors", "contains", "the", "following", "keys", "errorString", "-", "A", "string", "desc...
[ "'''Validates the mutants defined by the list on a pdb file\n\t\t\n\t\tReturns NO if there are problems and the dictionary errors contains the following keys\n\t\terrorString - A string describing the validation problems.\n\t\terrorList - A list continaing the mutation codes that failed validation\n\t\t\n\t\tRaises...
[ { "param": "self", "type": null }, { "param": "pdbFile", "type": null }, { "param": "errors", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdbFile", "type": null, "docstring": null, "docstring_tokens"...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_writeMatrixNames
<not_specific>
def _writeMatrixNames(self): '''Writes the names of the current matrices to the on-disk archive''' matrixNames = self.data.keys() if self.environment.isRoot(): stream = open(os.path.join(self.path, 'matrixNames'), 'w') pickle.dump(matrixNames, stream) stream.close() return matrixNames
Writes the names of the current matrices to the on-disk archive
Writes the names of the current matrices to the on-disk archive
[ "Writes", "the", "names", "of", "the", "current", "matrices", "to", "the", "on", "-", "disk", "archive" ]
def _writeMatrixNames(self): matrixNames = self.data.keys() if self.environment.isRoot(): stream = open(os.path.join(self.path, 'matrixNames'), 'w') pickle.dump(matrixNames, stream) stream.close() return matrixNames
[ "def", "_writeMatrixNames", "(", "self", ")", ":", "matrixNames", "=", "self", ".", "data", ".", "keys", "(", ")", "if", "self", ".", "environment", ".", "isRoot", "(", ")", ":", "stream", "=", "open", "(", "os", ".", "path", ".", "join", "(", "sel...
Writes the names of the current matrices to the on-disk archive
[ "Writes", "the", "names", "of", "the", "current", "matrices", "to", "the", "on", "-", "disk", "archive" ]
[ "'''Writes the names of the current matrices to the on-disk archive'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_removeErrorHandler
null
def _removeErrorHandler(self): '''Handler for shutil.rmtree - Does nothing at the moment except raise an exception''' raise Exceptions.UnableToRemoveDataError, "Unable to remove .peatsa data directory"
Handler for shutil.rmtree - Does nothing at the moment except raise an exception
Handler for shutil.rmtree - Does nothing at the moment except raise an exception
[ "Handler", "for", "shutil", ".", "rmtree", "-", "Does", "nothing", "at", "the", "moment", "except", "raise", "an", "exception" ]
def _removeErrorHandler(self): raise Exceptions.UnableToRemoveDataError, "Unable to remove .peatsa data directory"
[ "def", "_removeErrorHandler", "(", "self", ")", ":", "raise", "Exceptions", ".", "UnableToRemoveDataError", ",", "\"Unable to remove .peatsa data directory\"" ]
Handler for shutil.rmtree - Does nothing at the moment except raise an exception
[ "Handler", "for", "shutil", ".", "rmtree", "-", "Does", "nothing", "at", "the", "moment", "except", "raise", "an", "exception" ]
[ "'''Handler for shutil.rmtree - Does nothing at the moment except raise an exception'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_loadMatrix
<not_specific>
def _loadMatrix(self, name): '''Unarchives the matrix called name from the data dir and returns it. Return None if no matrix called name exists or if the data could not be read.''' filename = os.path.join(self.path, name) try: matrix = Matrix.matrixFromCSVFile(filename) except IOError: print 'Expec...
Unarchives the matrix called name from the data dir and returns it. Return None if no matrix called name exists or if the data could not be read.
Unarchives the matrix called name from the data dir and returns it. Return None if no matrix called name exists or if the data could not be read.
[ "Unarchives", "the", "matrix", "called", "name", "from", "the", "data", "dir", "and", "returns", "it", ".", "Return", "None", "if", "no", "matrix", "called", "name", "exists", "or", "if", "the", "data", "could", "not", "be", "read", "." ]
def _loadMatrix(self, name): filename = os.path.join(self.path, name) try: matrix = Matrix.matrixFromCSVFile(filename) except IOError: print 'Expected matrix %s - missing ...' % filename matrix = None except TypeError: print 'Unable to read matrix %s - Possible file corruption. Ignoring ...' % filen...
[ "def", "_loadMatrix", "(", "self", ",", "name", ")", ":", "filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "path", ",", "name", ")", "try", ":", "matrix", "=", "Matrix", ".", "matrixFromCSVFile", "(", "filename", ")", "except", "IOE...
Unarchives the matrix called name from the data dir and returns it.
[ "Unarchives", "the", "matrix", "called", "name", "from", "the", "data", "dir", "and", "returns", "it", "." ]
[ "'''Unarchives the matrix called name from the data dir and returns it.\n\t\t\n\t\tReturn None if no matrix called name exists or if the data could not be read.'''" ]
[ { "param": "self", "type": null }, { "param": "name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "name", "type": null, "docstring": null, "docstring_tokens": [...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/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): if not self.overwrite: raise Exceptions.DataAlreadyExistsError, 'A matrix called %s already present' % name name = name.capitalize()[0] + name[1:] if self.environment.isRoot(): filename = os.path.join(self.path, name + '.csv') file = open...
[ "def", "addMatrix", "(", "self", ",", "matrix", ",", "name", ")", ":", "if", "self", ".", "data", ".", "has_key", "(", "name", ")", ":", "if", "not", "self", ".", "overwrite", ":", "raise", "Exceptions", ".", "DataAlreadyExistsError", ",", "'A matrix cal...
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.'''", "#Update the m...
[ { "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":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
matrixNames
<not_specific>
def matrixNames(self): '''Returns a list containing the names of all the matrices in the receiver. These can be used as attributes of the receiver to access the matrices''' names = self.data.keys() names.sort(lambda a, b: cmp(a.lower(), b.lower())) return names
Returns a list containing the names of all the matrices in the receiver. These can be used as attributes of the receiver to access the matrices
Returns a list containing the names of all the matrices in the receiver. These can be used as attributes of the receiver to access the matrices
[ "Returns", "a", "list", "containing", "the", "names", "of", "all", "the", "matrices", "in", "the", "receiver", ".", "These", "can", "be", "used", "as", "attributes", "of", "the", "receiver", "to", "access", "the", "matrices" ]
def matrixNames(self): names = self.data.keys() names.sort(lambda a, b: cmp(a.lower(), b.lower())) return names
[ "def", "matrixNames", "(", "self", ")", ":", "names", "=", "self", ".", "data", ".", "keys", "(", ")", "names", ".", "sort", "(", "lambda", "a", ",", "b", ":", "cmp", "(", "a", ".", "lower", "(", ")", ",", "b", ".", "lower", "(", ")", ")", ...
Returns a list containing the names of all the matrices in the receiver.
[ "Returns", "a", "list", "containing", "the", "names", "of", "all", "the", "matrices", "in", "the", "receiver", "." ]
[ "'''Returns a list containing the names of all the matrices in the receiver.\n\t\t\n\t\tThese can be used as attributes of the receiver to access the matrices'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
allMatrices
<not_specific>
def allMatrices(self): '''Returns a dictionary whose keys are the stored matrix names and values are matrices''' return copy.copy(self.data)
Returns a dictionary whose keys are the stored matrix names and values are matrices
Returns a dictionary whose keys are the stored matrix names and values are matrices
[ "Returns", "a", "dictionary", "whose", "keys", "are", "the", "stored", "matrix", "names", "and", "values", "are", "matrices" ]
def allMatrices(self): return copy.copy(self.data)
[ "def", "allMatrices", "(", "self", ")", ":", "return", "copy", ".", "copy", "(", "self", ".", "data", ")" ]
Returns a dictionary whose keys are the stored matrix names and values are matrices
[ "Returns", "a", "dictionary", "whose", "keys", "are", "the", "stored", "matrix", "names", "and", "values", "are", "matrices" ]
[ "'''Returns a dictionary whose keys are the stored matrix names and values are matrices'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
synchronize
null
def synchronize(self): '''Synchronizes the in memory contents of the data sets matrices with the disk versions''' if self.environment.isRoot(): for name in self.data.keys(): matrix = self.data[name] filename = os.path.join(self.path, name + '.csv') file = open(filename, 'w') file.write(matri...
Synchronizes the in memory contents of the data sets matrices with the disk versions
Synchronizes the in memory contents of the data sets matrices with the disk versions
[ "Synchronizes", "the", "in", "memory", "contents", "of", "the", "data", "sets", "matrices", "with", "the", "disk", "versions" ]
def synchronize(self): if self.environment.isRoot(): for name in self.data.keys(): matrix = self.data[name] filename = os.path.join(self.path, name + '.csv') file = open(filename, 'w') file.write(matrix.csvRepresentation()) file.close() self.environment.wait()
[ "def", "synchronize", "(", "self", ")", ":", "if", "self", ".", "environment", ".", "isRoot", "(", ")", ":", "for", "name", "in", "self", ".", "data", ".", "keys", "(", ")", ":", "matrix", "=", "self", ".", "data", "[", "name", "]", "filename", "...
Synchronizes the in memory contents of the data sets matrices with the disk versions
[ "Synchronizes", "the", "in", "memory", "contents", "of", "the", "data", "sets", "matrices", "with", "the", "disk", "versions" ]
[ "'''Synchronizes the in memory contents of the data sets matrices with the disk versions'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutantCollectionFromRotamerOperations
<not_specific>
def mutantCollectionFromRotamerOperations(operationsList, pdbFile, name, location='.'): '''Creates a mutant collection using a list of rotamer operations Each element of operationsList describes the operations required to create a single mutant. Note: If a collection already exists at location/name it is overw...
Creates a mutant collection using a list of rotamer operations Each element of operationsList describes the operations required to create a single mutant. Note: If a collection already exists at location/name it is overwritten Params: operationsList - List of rotamer operations describing the mutants to cre...
Creates a mutant collection using a list of rotamer operations Each element of operationsList describes the operations required to create a single mutant. If a collection already exists at location/name it is overwritten List of rotamer operations describing the mutants to create pdbFile - The path to the pdb file re...
[ "Creates", "a", "mutant", "collection", "using", "a", "list", "of", "rotamer", "operations", "Each", "element", "of", "operationsList", "describes", "the", "operations", "required", "to", "create", "a", "single", "mutant", ".", "If", "a", "collection", "already"...
def mutantCollectionFromRotamerOperations(operationsList, pdbFile, name, location='.'): collection = MutantCollection(name=name, location=location, pdbFile=pdbFile) protoolStructure = collection.pdb print '[MUTATE] Creating new collection from %d operations' % len(operationsList) for operations in operationsList: ...
[ "def", "mutantCollectionFromRotamerOperations", "(", "operationsList", ",", "pdbFile", ",", "name", ",", "location", "=", "'.'", ")", ":", "collection", "=", "MutantCollection", "(", "name", "=", "name", ",", "location", "=", "location", ",", "pdbFile", "=", "...
Creates a mutant collection using a list of rotamer operations Each element of operationsList describes the operations required to create a single mutant.
[ "Creates", "a", "mutant", "collection", "using", "a", "list", "of", "rotamer", "operations", "Each", "element", "of", "operationsList", "describes", "the", "operations", "required", "to", "create", "a", "single", "mutant", "." ]
[ "'''Creates a mutant collection using a list of rotamer operations\n\t\n\tEach element of operationsList describes the operations required\n\tto create a single mutant.\n\t\n\tNote: If a collection already exists at location/name it is overwritten\n\t\n\tParams:\n\t\toperationsList - List of rotamer operations desc...
[ { "param": "operationsList", "type": null }, { "param": "pdbFile", "type": null }, { "param": "name", "type": null }, { "param": "location", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "operationsList", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdbFile", "type": null, "docstring": null, "docstri...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_createDirectories
null
def _createDirectories(self, pdbFile, ligandFiles): '''Does all the necessary directory creation for the instance''' #Check if the output directory already exits #If it does and self.overwrite is True delete it if os.path.isdir(self.location): if self.overwrite is True and self.environment.isRoot(): ...
Does all the necessary directory creation for the instance
Does all the necessary directory creation for the instance
[ "Does", "all", "the", "necessary", "directory", "creation", "for", "the", "instance" ]
def _createDirectories(self, pdbFile, ligandFiles): if os.path.isdir(self.location): if self.overwrite is True and self.environment.isRoot(): self.environment.output('[MUTATE] Warning - Removing previously existing directory at %s' % self.location) shutil.rmtree(self.path(), ignore_errors=1, onerror=self._...
[ "def", "_createDirectories", "(", "self", ",", "pdbFile", ",", "ligandFiles", ")", ":", "if", "os", ".", "path", ".", "isdir", "(", "self", ".", "location", ")", ":", "if", "self", ".", "overwrite", "is", "True", "and", "self", ".", "environment", ".",...
Does all the necessary directory creation for the instance
[ "Does", "all", "the", "necessary", "directory", "creation", "for", "the", "instance" ]
[ "'''Does all the necessary directory creation for the instance'''", "#Check if the output directory already exits", "#If it does and self.overwrite is True delete it", "#Create the collection directory and sub-directories", "#Copy original file to the collection directory", "#Make self temporary so on dea...
[ { "param": "self", "type": null }, { "param": "pdbFile", "type": null }, { "param": "ligandFiles", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdbFile", "type": null, "docstring": null, "docstring_tokens"...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_removeErrorHandler
null
def _removeErrorHandler(self): '''Handler for shutil.rmtree - Does nothing at the moment except raise an exception''' raise Exceptions.MutantCollectionError, "Unable to remove mutant collection directory"
Handler for shutil.rmtree - Does nothing at the moment except raise an exception
Handler for shutil.rmtree - Does nothing at the moment except raise an exception
[ "Handler", "for", "shutil", ".", "rmtree", "-", "Does", "nothing", "at", "the", "moment", "except", "raise", "an", "exception" ]
def _removeErrorHandler(self): raise Exceptions.MutantCollectionError, "Unable to remove mutant collection directory"
[ "def", "_removeErrorHandler", "(", "self", ")", ":", "raise", "Exceptions", ".", "MutantCollectionError", ",", "\"Unable to remove mutant collection directory\"" ]
Handler for shutil.rmtree - Does nothing at the moment except raise an exception
[ "Handler", "for", "shutil", ".", "rmtree", "-", "Does", "nothing", "at", "the", "moment", "except", "raise", "an", "exception" ]
[ "'''Handler for shutil.rmtree - Does nothing at the moment except raise an exception'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_updateMutationList
null
def _updateMutationList(self): '''Private method - Updates the on-disk pickle of the mutationList ivar''' if self.environment.isRoot(): stream = open(os.path.join(self.location, 'mutationList'), 'w+') archiver = pickle.Pickler(stream) archiver.dump(self.mutationList) stream.close() self.enviro...
Private method - Updates the on-disk pickle of the mutationList ivar
Private method - Updates the on-disk pickle of the mutationList ivar
[ "Private", "method", "-", "Updates", "the", "on", "-", "disk", "pickle", "of", "the", "mutationList", "ivar" ]
def _updateMutationList(self): if self.environment.isRoot(): stream = open(os.path.join(self.location, 'mutationList'), 'w+') archiver = pickle.Pickler(stream) archiver.dump(self.mutationList) stream.close() self.environment.wait()
[ "def", "_updateMutationList", "(", "self", ")", ":", "if", "self", ".", "environment", ".", "isRoot", "(", ")", ":", "stream", "=", "open", "(", "os", ".", "path", ".", "join", "(", "self", ".", "location", ",", "'mutationList'", ")", ",", "'w+'", ")...
Private method - Updates the on-disk pickle of the mutationList ivar
[ "Private", "method", "-", "Updates", "the", "on", "-", "disk", "pickle", "of", "the", "mutationList", "ivar" ]
[ "'''Private method - Updates the on-disk pickle of the mutationList ivar'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_updateMutationOperations
null
def _updateMutationOperations(self): '''Private method - Updates the on-disk pickle of the mutationOperations ivar''' if self.environment.isRoot(): stream = open(os.path.join(self.location, 'mutationOperations'), 'w+') archiver = pickle.Pickler(stream) archiver.dump(self.mutationOperations) stream....
Private method - Updates the on-disk pickle of the mutationOperations ivar
Private method - Updates the on-disk pickle of the mutationOperations ivar
[ "Private", "method", "-", "Updates", "the", "on", "-", "disk", "pickle", "of", "the", "mutationOperations", "ivar" ]
def _updateMutationOperations(self): if self.environment.isRoot(): stream = open(os.path.join(self.location, 'mutationOperations'), 'w+') archiver = pickle.Pickler(stream) archiver.dump(self.mutationOperations) stream.close() self.environment.wait()
[ "def", "_updateMutationOperations", "(", "self", ")", ":", "if", "self", ".", "environment", ".", "isRoot", "(", ")", ":", "stream", "=", "open", "(", "os", ".", "path", ".", "join", "(", "self", ".", "location", ",", "'mutationOperations'", ")", ",", ...
Private method - Updates the on-disk pickle of the mutationOperations ivar
[ "Private", "method", "-", "Updates", "the", "on", "-", "disk", "pickle", "of", "the", "mutationOperations", "ivar" ]
[ "'''Private method - Updates the on-disk pickle of the mutationOperations ivar'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_createMutant
null
def _createMutant(self, element, location, successes, failures, qualities, operations, standardOut): '''Private method - creates the mutant represented by mutationCode. Note: Other objects should never call this method Params: element - A MutationSet instance representing the mutant location - The m...
Private method - creates the mutant represented by mutationCode. Note: Other objects should never call this method Params: element - A MutationSet instance representing the mutant location - The mutant output directory successes - A list: If successful the filename of the created mutant is appended t...
Private method - creates the mutant represented by mutationCode. Note: Other objects should never call this method
[ "Private", "method", "-", "creates", "the", "mutant", "represented", "by", "mutationCode", ".", "Note", ":", "Other", "objects", "should", "never", "call", "this", "method" ]
def _createMutant(self, element, location, successes, failures, qualities, operations, standardOut): import Protool.mutate mutationCodes = element.mutationCodes(self.pdb, reduced=False) name = element.codeString(pdb=self.pdb, reduced=False) self.environment.output('[MUTATE] (%d) Creating mutant %s\n' % (self....
[ "def", "_createMutant", "(", "self", ",", "element", ",", "location", ",", "successes", ",", "failures", ",", "qualities", ",", "operations", ",", "standardOut", ")", ":", "import", "Protool", ".", "mutate", "mutationCodes", "=", "element", ".", "mutationCodes...
Private method - creates the mutant represented by mutationCode.
[ "Private", "method", "-", "creates", "the", "mutant", "represented", "by", "mutationCode", "." ]
[ "'''Private method - creates the mutant represented by mutationCode.\n\t\t\n\t\tNote: Other objects should never call this method\n\t\t\n\t\tParams:\n\t\t\telement - A MutationSet instance representing the mutant\n\t\t\tlocation - The mutant output directory\n\t\t\tsuccesses - A list: If successful the filename of ...
[ { "param": "self", "type": null }, { "param": "element", "type": null }, { "param": "location", "type": null }, { "param": "successes", "type": null }, { "param": "failures", "type": null }, { "param": "qualities", "type": null }, { "param"...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "element", "type": null, "docstring": null, "docstring_tokens"...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
createMutants
null
def createMutants(self, mutationList=[]): '''Creates all the mutants represented by the MutationSet instances in mutationList and adds them to the collection. If modelling a mutant fails it is skipped - see mutationList() for more. Note: The default naming of the MutationSets is overridden by the naming sche...
Creates all the mutants represented by the MutationSet instances in mutationList and adds them to the collection. If modelling a mutant fails it is skipped - see mutationList() for more. Note: The default naming of the MutationSets is overridden by the naming scheme of the receiver which is set on initialisati...
Creates all the mutants represented by the MutationSet instances in mutationList and adds them to the collection. If modelling a mutant fails it is skipped - see mutationList() for more. Note: The default naming of the MutationSets is overridden by the naming scheme of the receiver which is set on initialisation
[ "Creates", "all", "the", "mutants", "represented", "by", "the", "MutationSet", "instances", "in", "mutationList", "and", "adds", "them", "to", "the", "collection", ".", "If", "modelling", "a", "mutant", "fails", "it", "is", "skipped", "-", "see", "mutationList...
def createMutants(self, mutationList=[]): print 'Creating mutants' filename = os.path.join(self.location, 'Mutate.log') mutateLog = open(filename, 'a+') standardOut = sys.stdout standardError = sys.stderr sys.stdout = mutateLog standardOut.flush() if len(mutationList) == 0: raise Exceptions.MutantC...
[ "def", "createMutants", "(", "self", ",", "mutationList", "=", "[", "]", ")", ":", "print", "'Creating mutants'", "filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "location", ",", "'Mutate.log'", ")", "mutateLog", "=", "open", "(", "fil...
Creates all the mutants represented by the MutationSet instances in mutationList and adds them to the collection.
[ "Creates", "all", "the", "mutants", "represented", "by", "the", "MutationSet", "instances", "in", "mutationList", "and", "adds", "them", "to", "the", "collection", "." ]
[ "'''Creates all the mutants represented by the MutationSet instances in mutationList and adds them to the collection.\n\t\t\n\t\tIf modelling a mutant fails it is skipped - see mutationList() for more.\n\t\tNote: The default naming of the MutationSets is overridden by the naming scheme of the receiver which is\n\t\...
[ { "param": "self", "type": null }, { "param": "mutationList", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutationList", "type": null, "docstring": null, "docstring_to...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
addMutant
null
def addMutant(self, mutant, mutationSet, quality=0.0, operations=None): '''Adds a mutant (represented by a Protool instance) to the collection. Note: Its is assumed that mutant is an mutant of the pdb provided on initialisation Parameters: mutant - A protool instance representing the mutant pdb. mu...
Adds a mutant (represented by a Protool instance) to the collection. Note: Its is assumed that mutant is an mutant of the pdb provided on initialisation Parameters: mutant - A protool instance representing the mutant pdb. mutationSet - Describes the mutations in mutant relative the receivers pdb qua...
Adds a mutant (represented by a Protool instance) to the collection. Note: Its is assumed that mutant is an mutant of the pdb provided on initialisation A protool instance representing the mutant pdb. mutationSet - Describes the mutations in mutant relative the receivers pdb quality - The bump score of the mutant. Def...
[ "Adds", "a", "mutant", "(", "represented", "by", "a", "Protool", "instance", ")", "to", "the", "collection", ".", "Note", ":", "Its", "is", "assumed", "that", "mutant", "is", "an", "mutant", "of", "the", "pdb", "provided", "on", "initialisation", "A", "p...
def addMutant(self, mutant, mutationSet, quality=0.0, operations=None): mutant.remove_atoms_with_tag('LIGAND') self.mutationList.append(copy.deepcopy(mutationSet)) self._updateMutationList() mutationSet.reducedDefault = self.useReducedNaming filename = mutationSet.defaultFilename(pdb=self.pdb) mutantDirec...
[ "def", "addMutant", "(", "self", ",", "mutant", ",", "mutationSet", ",", "quality", "=", "0.0", ",", "operations", "=", "None", ")", ":", "mutant", ".", "remove_atoms_with_tag", "(", "'LIGAND'", ")", "self", ".", "mutationList", ".", "append", "(", "copy",...
Adds a mutant (represented by a Protool instance) to the collection.
[ "Adds", "a", "mutant", "(", "represented", "by", "a", "Protool", "instance", ")", "to", "the", "collection", "." ]
[ "'''Adds a mutant (represented by a Protool instance) to the collection. \n\t\t\n\t\tNote: Its is assumed that mutant is an mutant of the pdb provided on initialisation\n\t\t\n\t\tParameters:\n\t\t\tmutant - A protool instance representing the mutant pdb.\n\t\t\tmutationSet - Describes the mutations in mutant relat...
[ { "param": "self", "type": null }, { "param": "mutant", "type": null }, { "param": "mutationSet", "type": null }, { "param": "quality", "type": null }, { "param": "operations", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutant", "type": null, "docstring": null, "docstring_tokens":...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
path
<not_specific>
def path(self): '''Returns the path to the collection''' return self.location
Returns the path to the collection
Returns the path to the collection
[ "Returns", "the", "path", "to", "the", "collection" ]
def path(self): return self.location
[ "def", "path", "(", "self", ")", ":", "return", "self", ".", "location" ]
Returns the path to the collection
[ "Returns", "the", "path", "to", "the", "collection" ]
[ "'''Returns the path to the collection'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutantFiles
<not_specific>
def mutantFiles(self): '''Returns a list containing the paths to all the mutant pdbs This the contents of the Mutants subdirectory''' return copy.copy(self.collection)
Returns a list containing the paths to all the mutant pdbs This the contents of the Mutants subdirectory
Returns a list containing the paths to all the mutant pdbs This the contents of the Mutants subdirectory
[ "Returns", "a", "list", "containing", "the", "paths", "to", "all", "the", "mutant", "pdbs", "This", "the", "contents", "of", "the", "Mutants", "subdirectory" ]
def mutantFiles(self): return copy.copy(self.collection)
[ "def", "mutantFiles", "(", "self", ")", ":", "return", "copy", ".", "copy", "(", "self", ".", "collection", ")" ]
Returns a list containing the paths to all the mutant pdbs This the contents of the Mutants subdirectory
[ "Returns", "a", "list", "containing", "the", "paths", "to", "all", "the", "mutant", "pdbs", "This", "the", "contents", "of", "the", "Mutants", "subdirectory" ]
[ "'''Returns a list containing the paths to all the mutant pdbs\n\t\t\n\t\tThis the contents of the Mutants subdirectory'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
ligandFiles
<not_specific>
def ligandFiles(self): '''Returns a list containing the paths to ligand files used This is the contents of the Ligand subdirectory''' return copy.copy(self.ligands)
Returns a list containing the paths to ligand files used This is the contents of the Ligand subdirectory
Returns a list containing the paths to ligand files used This is the contents of the Ligand subdirectory
[ "Returns", "a", "list", "containing", "the", "paths", "to", "ligand", "files", "used", "This", "is", "the", "contents", "of", "the", "Ligand", "subdirectory" ]
def ligandFiles(self): return copy.copy(self.ligands)
[ "def", "ligandFiles", "(", "self", ")", ":", "return", "copy", ".", "copy", "(", "self", ".", "ligands", ")" ]
Returns a list containing the paths to ligand files used This is the contents of the Ligand subdirectory
[ "Returns", "a", "list", "containing", "the", "paths", "to", "ligand", "files", "used", "This", "is", "the", "contents", "of", "the", "Ligand", "subdirectory" ]
[ "'''Returns a list containing the paths to ligand files used\n\t\t\n\t\tThis is the contents of the Ligand subdirectory'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutations
<not_specific>
def mutations(self): '''Returns a list of the mutations in the collection. Each element in the list is a Data.MutationSet instance. Note that any mutants that the receiver failed to model will not' be in this list.''' return copy.deepcopy(self.mutationList)
Returns a list of the mutations in the collection. Each element in the list is a Data.MutationSet instance. Note that any mutants that the receiver failed to model will not' be in this list.
Returns a list of the mutations in the collection. Each element in the list is a Data.MutationSet instance. Note that any mutants that the receiver failed to model will not' be in this list.
[ "Returns", "a", "list", "of", "the", "mutations", "in", "the", "collection", ".", "Each", "element", "in", "the", "list", "is", "a", "Data", ".", "MutationSet", "instance", ".", "Note", "that", "any", "mutants", "that", "the", "receiver", "failed", "to", ...
def mutations(self): return copy.deepcopy(self.mutationList)
[ "def", "mutations", "(", "self", ")", ":", "return", "copy", ".", "deepcopy", "(", "self", ".", "mutationList", ")" ]
Returns a list of the mutations in the collection.
[ "Returns", "a", "list", "of", "the", "mutations", "in", "the", "collection", "." ]
[ "'''Returns a list of the mutations in the collection.\n\t\t\n\t\tEach element in the list is a Data.MutationSet instance.\n\t\t\n\t\tNote that any mutants that the receiver failed to model will not'\n\t\tbe in this list.'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutationListFile
<not_specific>
def mutationListFile(self, filename): '''Returns a MutationListFile instance detailing the mutants in the receiver MutationListFile objects represent files containing a list of mutation codes. Params: filename - The name of the file associated with the list Note: This method does not create the f...
Returns a MutationListFile instance detailing the mutants in the receiver MutationListFile objects represent files containing a list of mutation codes. Params: filename - The name of the file associated with the list Note: This method does not create the file. To do so writeToFile() must be called ...
Returns a MutationListFile instance detailing the mutants in the receiver MutationListFile objects represent files containing a list of mutation codes. The name of the file associated with the list This method does not create the file. To do so writeToFile() must be called on the returned object
[ "Returns", "a", "MutationListFile", "instance", "detailing", "the", "mutants", "in", "the", "receiver", "MutationListFile", "objects", "represent", "files", "containing", "a", "list", "of", "mutation", "codes", ".", "The", "name", "of", "the", "file", "associated"...
def mutationListFile(self, filename): mutations = self.mutations() list = MutationListFile(filename=filename, create=True) for set in mutations: list.addMutant(set, autoUpdate=False) return list
[ "def", "mutationListFile", "(", "self", ",", "filename", ")", ":", "mutations", "=", "self", ".", "mutations", "(", ")", "list", "=", "MutationListFile", "(", "filename", "=", "filename", ",", "create", "=", "True", ")", "for", "set", "in", "mutations", ...
Returns a MutationListFile instance detailing the mutants in the receiver MutationListFile objects represent files containing a list of mutation codes.
[ "Returns", "a", "MutationListFile", "instance", "detailing", "the", "mutants", "in", "the", "receiver", "MutationListFile", "objects", "represent", "files", "containing", "a", "list", "of", "mutation", "codes", "." ]
[ "'''Returns a MutationListFile instance detailing the mutants in the receiver\n\t\t\n\t\tMutationListFile objects represent files containing a list of mutation codes.\n\t\t\n\t\tParams:\n\t\t\tfilename - The name of the file associated with the list\n\t\t\t\n\t\tNote: This method does not create the file.\n\t\tTo d...
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutantForMutationSet
<not_specific>
def mutantForMutationSet(self, mutationSet): '''Returns a Protool instance for the given mutation''' import Protool filename = self.fileForMutationSet(mutationSet) pdb = Protool.structureIO() pdb.readpdb(filename) return pdb
Returns a Protool instance for the given mutation
Returns a Protool instance for the given mutation
[ "Returns", "a", "Protool", "instance", "for", "the", "given", "mutation" ]
def mutantForMutationSet(self, mutationSet): import Protool filename = self.fileForMutationSet(mutationSet) pdb = Protool.structureIO() pdb.readpdb(filename) return pdb
[ "def", "mutantForMutationSet", "(", "self", ",", "mutationSet", ")", ":", "import", "Protool", "filename", "=", "self", ".", "fileForMutationSet", "(", "mutationSet", ")", "pdb", "=", "Protool", ".", "structureIO", "(", ")", "pdb", ".", "readpdb", "(", "file...
Returns a Protool instance for the given mutation
[ "Returns", "a", "Protool", "instance", "for", "the", "given", "mutation" ]
[ "'''Returns a Protool instance for the given mutation'''" ]
[ { "param": "self", "type": null }, { "param": "mutationSet", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutationSet", "type": null, "docstring": null, "docstring_tok...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
fileForMutationSet
<not_specific>
def fileForMutationSet(self, mutationSet): '''Returns the path to the pdb file for mutationSet. If no pdb corresponding to muationSet exists this method returns None''' try: self.mutationList.index(mutationSet) filename = mutationSet.filename(reduced=self.useReducedNaming, pdb=self.pdb) mutantDire...
Returns the path to the pdb file for mutationSet. If no pdb corresponding to muationSet exists this method returns None
Returns the path to the pdb file for mutationSet. If no pdb corresponding to muationSet exists this method returns None
[ "Returns", "the", "path", "to", "the", "pdb", "file", "for", "mutationSet", ".", "If", "no", "pdb", "corresponding", "to", "muationSet", "exists", "this", "method", "returns", "None" ]
def fileForMutationSet(self, mutationSet): try: self.mutationList.index(mutationSet) filename = mutationSet.filename(reduced=self.useReducedNaming, pdb=self.pdb) mutantDirectory = os.path.join(self.location, 'Mutants') filename = os.path.join(mutantDirectory, filename) except ValueError: filename = N...
[ "def", "fileForMutationSet", "(", "self", ",", "mutationSet", ")", ":", "try", ":", "self", ".", "mutationList", ".", "index", "(", "mutationSet", ")", "filename", "=", "mutationSet", ".", "filename", "(", "reduced", "=", "self", ".", "useReducedNaming", ","...
Returns the path to the pdb file for mutationSet.
[ "Returns", "the", "path", "to", "the", "pdb", "file", "for", "mutationSet", "." ]
[ "'''Returns the path to the pdb file for mutationSet.\n\t\t\n\t\tIf no pdb corresponding to muationSet exists this method returns None'''" ]
[ { "param": "self", "type": null }, { "param": "mutationSet", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutationSet", "type": null, "docstring": null, "docstring_tok...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
rotamerOperationsForMutationSet
<not_specific>
def rotamerOperationsForMutationSet(self, mutationSet): '''Returns the Protool operations related to a mutant Can be used to quickly convert the wild-type Protool instance into a mutant instance. Note: Old MutantCollections stored on disk may not have this information for all mutants. In this case this ...
Returns the Protool operations related to a mutant Can be used to quickly convert the wild-type Protool instance into a mutant instance. Note: Old MutantCollections stored on disk may not have this information for all mutants. In this case this method returns None
Returns the Protool operations related to a mutant Can be used to quickly convert the wild-type Protool instance into a mutant instance. Old MutantCollections stored on disk may not have this information for all mutants. In this case this method returns None
[ "Returns", "the", "Protool", "operations", "related", "to", "a", "mutant", "Can", "be", "used", "to", "quickly", "convert", "the", "wild", "-", "type", "Protool", "instance", "into", "a", "mutant", "instance", ".", "Old", "MutantCollections", "stored", "on", ...
def rotamerOperationsForMutationSet(self, mutationSet): try: operations = self.mutationOperations[mutationSet.codeString(pdb=self.pdb, reduced=False)] except KeyError: operations = None return operations
[ "def", "rotamerOperationsForMutationSet", "(", "self", ",", "mutationSet", ")", ":", "try", ":", "operations", "=", "self", ".", "mutationOperations", "[", "mutationSet", ".", "codeString", "(", "pdb", "=", "self", ".", "pdb", ",", "reduced", "=", "False", "...
Returns the Protool operations related to a mutant Can be used to quickly convert the wild-type Protool instance into a mutant instance.
[ "Returns", "the", "Protool", "operations", "related", "to", "a", "mutant", "Can", "be", "used", "to", "quickly", "convert", "the", "wild", "-", "type", "Protool", "instance", "into", "a", "mutant", "instance", "." ]
[ "'''Returns the Protool operations related to a mutant\n\t\t\n\t\tCan be used to quickly convert the wild-type Protool instance into a mutant instance.\n\t\t\n\t\tNote: Old MutantCollections stored on disk may not have this information for all mutants.\n\t\tIn this case this method returns None'''" ]
[ { "param": "self", "type": null }, { "param": "mutationSet", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutationSet", "type": null, "docstring": null, "docstring_tok...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutationSetFromFilename
<not_specific>
def mutationSetFromFilename(filename): '''Factory function for MutationSet class. Creates a mutation set from filename. Filename should have been created by a call to one of the MutationSet filename methods.''' mutationSet = MutationSet() codes = os.path.splitext(filename)[0] codes = codes.split(MutationSet.mu...
Factory function for MutationSet class. Creates a mutation set from filename. Filename should have been created by a call to one of the MutationSet filename methods.
Factory function for MutationSet class. Creates a mutation set from filename. Filename should have been created by a call to one of the MutationSet filename methods.
[ "Factory", "function", "for", "MutationSet", "class", ".", "Creates", "a", "mutation", "set", "from", "filename", ".", "Filename", "should", "have", "been", "created", "by", "a", "call", "to", "one", "of", "the", "MutationSet", "filename", "methods", "." ]
def mutationSetFromFilename(filename): mutationSet = MutationSet() codes = os.path.splitext(filename)[0] codes = codes.split(MutationSet.mutationSeparator) for code in codes: data = Utilities.ParseResidueCode(code) if len(data) == 4: mutationSet.addMutation(chain=data[0], residueIndex=data[1], mutation=da...
[ "def", "mutationSetFromFilename", "(", "filename", ")", ":", "mutationSet", "=", "MutationSet", "(", ")", "codes", "=", "os", ".", "path", ".", "splitext", "(", "filename", ")", "[", "0", "]", "codes", "=", "codes", ".", "split", "(", "MutationSet", ".",...
Factory function for MutationSet class.
[ "Factory", "function", "for", "MutationSet", "class", "." ]
[ "'''Factory function for MutationSet class. Creates a mutation set from filename.\n\t\n\tFilename should have been created by a call to one of the MutationSet filename methods.'''", "#If the residue code was in " ]
[ { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutationSetFromSequences
<not_specific>
def mutationSetFromSequences(initialSequence, targetSequence, offset=0, chain='A', name=None): '''Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence Parameters: initialSequence - "WildType" targetSequence - "Mutant" offset - The difference between the index...
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence Parameters: initialSequence - "WildType" targetSequence - "Mutant" offset - The difference between the index of the first aa in the initial sequence and 1 e.g. if the first amino-acid in initialSequence st...
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence Parameters: initialSequence - "WildType" targetSequence - "Mutant" offset - The difference between the index of the first aa in the initial sequence and 1 e.g. if the first amino-acid in initialSequence string is actu...
[ "Returns", "a", "MutationSet", "representing", "the", "mutations", "necessary", "to", "change", "initialSequence", "to", "targetSequence", "Parameters", ":", "initialSequence", "-", "\"", "WildType", "\"", "targetSequence", "-", "\"", "Mutant", "\"", "offset", "-", ...
def mutationSetFromSequences(initialSequence, targetSequence, offset=0, chain='A', name=None): if len(initialSequence) != len(targetSequence): raise Exceptions.ProteinDesignToolException, 'Sequences are not the same length' if initialSequence.find('-') != -1: return None elif targetSequence.find('-') != -1: re...
[ "def", "mutationSetFromSequences", "(", "initialSequence", ",", "targetSequence", ",", "offset", "=", "0", ",", "chain", "=", "'A'", ",", "name", "=", "None", ")", ":", "if", "len", "(", "initialSequence", ")", "!=", "len", "(", "targetSequence", ")", ":",...
Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence Parameters: initialSequence - "WildType" targetSequence - "Mutant" offset - The difference between the index of the first aa in the initial sequence and 1 e.g.
[ "Returns", "a", "MutationSet", "representing", "the", "mutations", "necessary", "to", "change", "initialSequence", "to", "targetSequence", "Parameters", ":", "initialSequence", "-", "\"", "WildType", "\"", "targetSequence", "-", "\"", "Mutant", "\"", "offset", "-", ...
[ "'''Returns a MutationSet representing the mutations necessary to change initialSequence to targetSequence\n\t\n\tParameters:\n\t\tinitialSequence - \"WildType\"\n\t\ttargetSequence - \"Mutant\"\n\t\toffset - The difference between the index of the first aa in the initial sequence and 1\n\t\t\te.g. if the first ami...
[ { "param": "initialSequence", "type": null }, { "param": "targetSequence", "type": null }, { "param": "offset", "type": null }, { "param": "chain", "type": null }, { "param": "name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "initialSequence", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "targetSequence", "type": null, "docstring": null, ...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutationSetFromRotamerOperations
<not_specific>
def mutationSetFromRotamerOperations(operations): '''Returns the MutationSet instance corresponding to operations. operations: A list returned by MutantCollection::rotamerOperationsForMutant() Note: operations can't contain any whole residue deletions or insertions''' mutationSet = MutationSet() codes...
Returns the MutationSet instance corresponding to operations. operations: A list returned by MutantCollection::rotamerOperationsForMutant() Note: operations can't contain any whole residue deletions or insertions
Returns the MutationSet instance corresponding to operations. operations can't contain any whole residue deletions or insertions
[ "Returns", "the", "MutationSet", "instance", "corresponding", "to", "operations", ".", "operations", "can", "'", "t", "contain", "any", "whole", "residue", "deletions", "or", "insertions" ]
def mutationSetFromRotamerOperations(operations): mutationSet = MutationSet() codes = set() for operation, atomCode, atomData in operations: if atomData != {} and operation != 'delete': chainId = atomData['CHAINID'] residueIndex = atomData['RESNUM'] mutation = atomData['RESNAME'] residueCode = Utiliti...
[ "def", "mutationSetFromRotamerOperations", "(", "operations", ")", ":", "mutationSet", "=", "MutationSet", "(", ")", "codes", "=", "set", "(", ")", "for", "operation", ",", "atomCode", ",", "atomData", "in", "operations", ":", "if", "atomData", "!=", "{", "}...
Returns the MutationSet instance corresponding to operations.
[ "Returns", "the", "MutationSet", "instance", "corresponding", "to", "operations", "." ]
[ "'''Returns the MutationSet instance corresponding to operations.\n\t\n\toperations: \n\t\tA list returned by MutantCollection::rotamerOperationsForMutant()\n\t\t\n\tNote: operations can't contain any whole residue deletions or insertions'''", "#Skip delete operations as the RESAME will be the original residue na...
[ { "param": "operations", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "operations", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
_extendedMutationCodes
<not_specific>
def _extendedMutationCodes(self, pdb): '''Private method. Returns the mutations in extended format Parameters: pdb - A protool instance representing the pdb that the receiver is a mutant of. Errors: Raises an MutationCodeApplicationError if - the residue index specified by a mutation code is ...
Private method. Returns the mutations in extended format Parameters: pdb - A protool instance representing the pdb that the receiver is a mutant of. Errors: Raises an MutationCodeApplicationError if - the residue index specified by a mutation code is not in the pdb. - the residue chain specifie...
Private method. Returns the mutations in extended format Parameters: pdb - A protool instance representing the pdb that the receiver is a mutant of. Raises an MutationCodeApplicationError if the residue index specified by a mutation code is not in the pdb. the residue chain specified by a mutation code is not in the p...
[ "Private", "method", ".", "Returns", "the", "mutations", "in", "extended", "format", "Parameters", ":", "pdb", "-", "A", "protool", "instance", "representing", "the", "pdb", "that", "the", "receiver", "is", "a", "mutant", "of", ".", "Raises", "an", "Mutation...
def _extendedMutationCodes(self, pdb): mutations = [] for code in self.mutationCodeList: chain, residueIndex, mutation = Utilities.ParseMutationCode(code) residueCode = Utilities.CreateResidueCode(chain, residueIndex) try: extendedResidueCode = Utilities.CreateResidueCode(chain=chain, number=re...
[ "def", "_extendedMutationCodes", "(", "self", ",", "pdb", ")", ":", "mutations", "=", "[", "]", "for", "code", "in", "self", ".", "mutationCodeList", ":", "chain", ",", "residueIndex", ",", "mutation", "=", "Utilities", ".", "ParseMutationCode", "(", "code",...
Private method.
[ "Private", "method", "." ]
[ "'''Private method. Returns the mutations in extended format\n\t\t\n\t\tParameters:\n\t\t\tpdb - A protool instance representing the pdb that the receiver is a mutant of.\n\t\t\t\n\t\tErrors: \n\t\t\tRaises an MutationCodeApplicationError if \n\t\t\t- the residue index specified by a mutation code is not in the pdb...
[ { "param": "self", "type": null }, { "param": "pdb", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdb", "type": null, "docstring": null, "docstring_tokens": []...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
addMutation
null
def addMutation(self, chain, residueIndex, mutation): '''Adds the change of residue at position residueIndex in chain to mutation Errors: Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters''' if len(mutation) == 1: try: mutation = Utilities.InvertedCode...
Adds the change of residue at position residueIndex in chain to mutation Errors: Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters
Adds the change of residue at position residueIndex in chain to mutation Errors: Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters
[ "Adds", "the", "change", "of", "residue", "at", "position", "residueIndex", "in", "chain", "to", "mutation", "Errors", ":", "Raises", "an", "Exceptions", ".", "MutationCodeFormatError", "if", "there", "is", "a", "problem", "with", "any", "of", "the", "paramete...
def addMutation(self, chain, residueIndex, mutation): if len(mutation) == 1: try: mutation = Utilities.InvertedCodeDictionary()[mutation] except KeyError: raise Exceptions.MutationCodeFormatError, "Unknown single letter residue code %s" % mutation if Utilities.allResidues.count(mutation.upper()) is n...
[ "def", "addMutation", "(", "self", ",", "chain", ",", "residueIndex", ",", "mutation", ")", ":", "if", "len", "(", "mutation", ")", "==", "1", ":", "try", ":", "mutation", "=", "Utilities", ".", "InvertedCodeDictionary", "(", ")", "[", "mutation", "]", ...
Adds the change of residue at position residueIndex in chain to mutation Errors: Raises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters
[ "Adds", "the", "change", "of", "residue", "at", "position", "residueIndex", "in", "chain", "to", "mutation", "Errors", ":", "Raises", "an", "Exceptions", ".", "MutationCodeFormatError", "if", "there", "is", "a", "problem", "with", "any", "of", "the", "paramete...
[ "'''Adds the change of residue at position residueIndex in chain to mutation\n\t\t\n\t\tErrors:\n\t\t\tRaises an Exceptions.MutationCodeFormatError if there is a problem with any of the parameters'''" ]
[ { "param": "self", "type": null }, { "param": "chain", "type": null }, { "param": "residueIndex", "type": null }, { "param": "mutation", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "chain", "type": null, "docstring": null, "docstring_tokens": ...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
addMutationCode
null
def addMutationCode(self, mutationCode): '''Adds the mutation represented by mutationCode to the receiver. The mutation can be in any format Errors: Raises an Exceptions.MutationCodeFormatError if there is a problem with the code''' extended = Utilities.IsExtendedMutationFormat(mutationCode) try...
Adds the mutation represented by mutationCode to the receiver. The mutation can be in any format Errors: Raises an Exceptions.MutationCodeFormatError if there is a problem with the code
Adds the mutation represented by mutationCode to the receiver. The mutation can be in any format Raises an Exceptions.MutationCodeFormatError if there is a problem with the code
[ "Adds", "the", "mutation", "represented", "by", "mutationCode", "to", "the", "receiver", ".", "The", "mutation", "can", "be", "in", "any", "format", "Raises", "an", "Exceptions", ".", "MutationCodeFormatError", "if", "there", "is", "a", "problem", "with", "the...
def addMutationCode(self, mutationCode): extended = Utilities.IsExtendedMutationFormat(mutationCode) try: if Utilities.IsReducedCode(mutationCode): mutationCode = Utilities.ConvertMutationCodeFromReducedFormat(mutationCode, extended) data = Utilities.ParseMutationCode(mutationCode) self.addMutation(cha...
[ "def", "addMutationCode", "(", "self", ",", "mutationCode", ")", ":", "extended", "=", "Utilities", ".", "IsExtendedMutationFormat", "(", "mutationCode", ")", "try", ":", "if", "Utilities", ".", "IsReducedCode", "(", "mutationCode", ")", ":", "mutationCode", "="...
Adds the mutation represented by mutationCode to the receiver.
[ "Adds", "the", "mutation", "represented", "by", "mutationCode", "to", "the", "receiver", "." ]
[ "'''Adds the mutation represented by mutationCode to the receiver.\n\t\t\n\t\tThe mutation can be in any format\n\t\t\n\t\tErrors:\n\t\t\tRaises an Exceptions.MutationCodeFormatError if there is a problem with the code'''" ]
[ { "param": "self", "type": null }, { "param": "mutationCode", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutationCode", "type": null, "docstring": null, "docstring_to...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
mutationCodes
<not_specific>
def mutationCodes(self, pdb=None, reduced=True): '''Returns a list of the mutation codes in the receiver in standard format Parameters: pdb - An optional protool instance. If this is provided the mutations are returned in extended format. reduced - If True the codes are returned in reduced format. ...
Returns a list of the mutation codes in the receiver in standard format Parameters: pdb - An optional protool instance. If this is provided the mutations are returned in extended format. reduced - If True the codes are returned in reduced format. Exceptions: Raises an AttributeError if pdb does n...
Returns a list of the mutation codes in the receiver in standard format Parameters: pdb - An optional protool instance. If this is provided the mutations are returned in extended format. reduced - If True the codes are returned in reduced format. Raises an AttributeError if pdb does not respond to resname() and is not...
[ "Returns", "a", "list", "of", "the", "mutation", "codes", "in", "the", "receiver", "in", "standard", "format", "Parameters", ":", "pdb", "-", "An", "optional", "protool", "instance", ".", "If", "this", "is", "provided", "the", "mutations", "are", "returned",...
def mutationCodes(self, pdb=None, reduced=True): extended = False if pdb is not None: extended = True mutationCodes = self._extendedMutationCodes(pdb) else: mutationCodes = copy.deepcopy(self.mutationCodeList) if reduced is True: mutationCodes = [Utilities.ConvertMutationCodeToReducedFormat(code, ex...
[ "def", "mutationCodes", "(", "self", ",", "pdb", "=", "None", ",", "reduced", "=", "True", ")", ":", "extended", "=", "False", "if", "pdb", "is", "not", "None", ":", "extended", "=", "True", "mutationCodes", "=", "self", ".", "_extendedMutationCodes", "(...
Returns a list of the mutation codes in the receiver in standard format Parameters: pdb - An optional protool instance.
[ "Returns", "a", "list", "of", "the", "mutation", "codes", "in", "the", "receiver", "in", "standard", "format", "Parameters", ":", "pdb", "-", "An", "optional", "protool", "instance", "." ]
[ "'''Returns a list of the mutation codes in the receiver in standard format\n\t\t\n\t\tParameters:\n\t\t\tpdb - An optional protool instance.\n\t\t\tIf this is provided the mutations are returned in extended format.\n\t\t\treduced - If True the codes are returned in reduced format.\n\t\t\t\n\t\tExceptions:\n\t\t\tR...
[ { "param": "self", "type": null }, { "param": "pdb", "type": null }, { "param": "reduced", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdb", "type": null, "docstring": null, "docstring_tokens": []...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
residueCodes
<not_specific>
def residueCodes(self, pdb=None, reduced=True): '''Returns the residue codes of all the residues mutated in the receiver in standard format Parameters: pdb - An optional protool instance. If this is provided the filename uses extended residue code format. reduced - If True the codes are returned in re...
Returns the residue codes of all the residues mutated in the receiver in standard format Parameters: pdb - An optional protool instance. If this is provided the filename uses extended residue code format. reduced - If True the codes are returned in reduced format. Exceptions: Raises an Attribute...
Returns the residue codes of all the residues mutated in the receiver in standard format Parameters: pdb - An optional protool instance. If this is provided the filename uses extended residue code format. reduced - If True the codes are returned in reduced format. Raises an AttributeError if pdb does not respond to re...
[ "Returns", "the", "residue", "codes", "of", "all", "the", "residues", "mutated", "in", "the", "receiver", "in", "standard", "format", "Parameters", ":", "pdb", "-", "An", "optional", "protool", "instance", ".", "If", "this", "is", "provided", "the", "filenam...
def residueCodes(self, pdb=None, reduced=True): residueCodes = [] extended = False for mutation in self.mutationCodeList: chain, residueIndex, mutation = Utilities.ParseMutationCode(mutation) residueCode = Utilities.CreateResidueCode(chain, residueIndex) if pdb is not None: extended=True residueC...
[ "def", "residueCodes", "(", "self", ",", "pdb", "=", "None", ",", "reduced", "=", "True", ")", ":", "residueCodes", "=", "[", "]", "extended", "=", "False", "for", "mutation", "in", "self", ".", "mutationCodeList", ":", "chain", ",", "residueIndex", ",",...
Returns the residue codes of all the residues mutated in the receiver in standard format Parameters: pdb - An optional protool instance.
[ "Returns", "the", "residue", "codes", "of", "all", "the", "residues", "mutated", "in", "the", "receiver", "in", "standard", "format", "Parameters", ":", "pdb", "-", "An", "optional", "protool", "instance", "." ]
[ "'''Returns the residue codes of all the residues mutated in the receiver in standard format\n\t\t\n\t\tParameters:\n\t\t\tpdb - An optional protool instance.\n\t\t\tIf this is provided the filename uses extended residue code format.\n\t\t\treduced - If True the codes are returned in reduced format.\n\n\t\t\t\n\t\t...
[ { "param": "self", "type": null }, { "param": "pdb", "type": null }, { "param": "reduced", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdb", "type": null, "docstring": null, "docstring_tokens": []...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
chainCodes
<not_specific>
def chainCodes(self, pdb=None, reduced=False): '''Returns individual code strings describing the mutations in each chain of the receiver''' chains = {} for mutationCode in self.mutationCodeList: chain, residueIndex, mutation = Utilities.ParseMutationCode(mutationCode) if chains.has_key(chain): chains...
Returns individual code strings describing the mutations in each chain of the receiver
Returns individual code strings describing the mutations in each chain of the receiver
[ "Returns", "individual", "code", "strings", "describing", "the", "mutations", "in", "each", "chain", "of", "the", "receiver" ]
def chainCodes(self, pdb=None, reduced=False): chains = {} for mutationCode in self.mutationCodeList: chain, residueIndex, mutation = Utilities.ParseMutationCode(mutationCode) if chains.has_key(chain): chains[chain].addMutationCode(mutationCode) else: chains[chain] = MutationSet(code=mutationCode) ...
[ "def", "chainCodes", "(", "self", ",", "pdb", "=", "None", ",", "reduced", "=", "False", ")", ":", "chains", "=", "{", "}", "for", "mutationCode", "in", "self", ".", "mutationCodeList", ":", "chain", ",", "residueIndex", ",", "mutation", "=", "Utilities"...
Returns individual code strings describing the mutations in each chain of the receiver
[ "Returns", "individual", "code", "strings", "describing", "the", "mutations", "in", "each", "chain", "of", "the", "receiver" ]
[ "'''Returns individual code strings describing the mutations in each chain of the receiver'''" ]
[ { "param": "self", "type": null }, { "param": "pdb", "type": null }, { "param": "reduced", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdb", "type": null, "docstring": null, "docstring_tokens": []...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
reducedMutationCodes
<not_specific>
def reducedMutationCodes(self, pdb=None): '''Returns a list of the mutation codes in the receiver in reduced format Deprecated: Use mutationCodes passing True for reduced Parameters: pdb - An optional protool instance. If this is provided the mutations are returned in extended format. Exception...
Returns a list of the mutation codes in the receiver in reduced format Deprecated: Use mutationCodes passing True for reduced Parameters: pdb - An optional protool instance. If this is provided the mutations are returned in extended format. Exceptions: Raises an AttributeError if pdb does not r...
Returns a list of the mutation codes in the receiver in reduced format Deprecated: Use mutationCodes passing True for reduced An optional protool instance. If this is provided the mutations are returned in extended format. Raises an AttributeError if pdb does not respond to resname() and is not None
[ "Returns", "a", "list", "of", "the", "mutation", "codes", "in", "the", "receiver", "in", "reduced", "format", "Deprecated", ":", "Use", "mutationCodes", "passing", "True", "for", "reduced", "An", "optional", "protool", "instance", ".", "If", "this", "is", "p...
def reducedMutationCodes(self, pdb=None): return self.mutationCodes(pdb=pdb, reduced=True)
[ "def", "reducedMutationCodes", "(", "self", ",", "pdb", "=", "None", ")", ":", "return", "self", ".", "mutationCodes", "(", "pdb", "=", "pdb", ",", "reduced", "=", "True", ")" ]
Returns a list of the mutation codes in the receiver in reduced format Deprecated: Use mutationCodes passing True for reduced
[ "Returns", "a", "list", "of", "the", "mutation", "codes", "in", "the", "receiver", "in", "reduced", "format", "Deprecated", ":", "Use", "mutationCodes", "passing", "True", "for", "reduced" ]
[ "'''Returns a list of the mutation codes in the receiver in reduced format\n\t\t\n\t\tDeprecated: Use mutationCodes passing True for reduced\n\t\t\n\t\tParameters:\n\t\t\tpdb - An optional protool instance.\n\t\t\tIf this is provided the mutations are returned in extended format.\n\t\t\t\n\t\tExceptions:\n\t\t\tRai...
[ { "param": "self", "type": null }, { "param": "pdb", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdb", "type": null, "docstring": null, "docstring_tokens": []...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
codeString
<not_specific>
def codeString(self, pdb, reduced=True): '''Generates a string by concatentate all extended residue code with +. If reduced is true, the reduced format is used, otherwise the default format is used''' mutations = self.mutationCodes(pdb=pdb, reduced=reduced) return "+".join(mutations)
Generates a string by concatentate all extended residue code with +. If reduced is true, the reduced format is used, otherwise the default format is used
Generates a string by concatentate all extended residue code with +. If reduced is true, the reduced format is used, otherwise the default format is used
[ "Generates", "a", "string", "by", "concatentate", "all", "extended", "residue", "code", "with", "+", ".", "If", "reduced", "is", "true", "the", "reduced", "format", "is", "used", "otherwise", "the", "default", "format", "is", "used" ]
def codeString(self, pdb, reduced=True): mutations = self.mutationCodes(pdb=pdb, reduced=reduced) return "+".join(mutations)
[ "def", "codeString", "(", "self", ",", "pdb", ",", "reduced", "=", "True", ")", ":", "mutations", "=", "self", ".", "mutationCodes", "(", "pdb", "=", "pdb", ",", "reduced", "=", "reduced", ")", "return", "\"+\"", ".", "join", "(", "mutations", ")" ]
Generates a string by concatentate all extended residue code with +.
[ "Generates", "a", "string", "by", "concatentate", "all", "extended", "residue", "code", "with", "+", "." ]
[ "'''Generates a string by concatentate all extended residue code with +.\n\t\t\n\t\tIf reduced is true, the reduced format is used, otherwise the default format is used'''" ]
[ { "param": "self", "type": null }, { "param": "pdb", "type": null }, { "param": "reduced", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdb", "type": null, "docstring": null, "docstring_tokens": []...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
filename
<not_specific>
def filename(self, reduced=True, pdb=None): '''Returns a filename for a pdb containin the mutant represented by the receiver This is formed by concatenating all the mutation codes with _ Parameters: pdb - An optional protool instance. If this is provided the filename uses extended residue code form...
Returns a filename for a pdb containin the mutant represented by the receiver This is formed by concatenating all the mutation codes with _ Parameters: pdb - An optional protool instance. If this is provided the filename uses extended residue code format Exceptions: Raises an AttributeError if ...
Returns a filename for a pdb containin the mutant represented by the receiver This is formed by concatenating all the mutation codes with _ An optional protool instance. If this is provided the filename uses extended residue code format Raises an AttributeError if pdb does not respond to resname() and is not None
[ "Returns", "a", "filename", "for", "a", "pdb", "containin", "the", "mutant", "represented", "by", "the", "receiver", "This", "is", "formed", "by", "concatenating", "all", "the", "mutation", "codes", "with", "_", "An", "optional", "protool", "instance", ".", ...
def filename(self, reduced=True, pdb=None): mutations = self.mutationCodes(reduced=reduced, pdb=pdb) return MutationSet.mutationSeparator.join(mutations) + '.pdb'
[ "def", "filename", "(", "self", ",", "reduced", "=", "True", ",", "pdb", "=", "None", ")", ":", "mutations", "=", "self", ".", "mutationCodes", "(", "reduced", "=", "reduced", ",", "pdb", "=", "pdb", ")", "return", "MutationSet", ".", "mutationSeparator"...
Returns a filename for a pdb containin the mutant represented by the receiver This is formed by concatenating all the mutation codes with _
[ "Returns", "a", "filename", "for", "a", "pdb", "containin", "the", "mutant", "represented", "by", "the", "receiver", "This", "is", "formed", "by", "concatenating", "all", "the", "mutation", "codes", "with", "_" ]
[ "'''Returns a filename for a pdb containin the mutant represented by the receiver\n\t\t\n\t\tThis is formed by concatenating all the mutation codes with _\n\t\t\n\t\tParameters:\n\t\t\tpdb - An optional protool instance.\n\t\t\tIf this is provided the filename uses extended residue code format\n\t\t\t\n\t\tExceptio...
[ { "param": "self", "type": null }, { "param": "reduced", "type": null }, { "param": "pdb", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "reduced", "type": null, "docstring": null, "docstring_tokens"...
a9c710c39013bcd80f49743f73dac9702c964539
shambo001/peat
PEATSA/Core/Data.py
[ "MIT" ]
Python
applyToSequence
<not_specific>
def applyToSequence(self, wildTypeSequence, id='A', pdb=None, offset=None): '''Applies the mutations defined by the receiver to wildTypeSequence Note: wildTypeSequence must correspond to a single chain which is specified by id Also sequence are assumed to have a 1 offset. Thus the mutation A1A is applied to...
Applies the mutations defined by the receiver to wildTypeSequence Note: wildTypeSequence must correspond to a single chain which is specified by id Also sequence are assumed to have a 1 offset. Thus the mutation A1A is applied to element 0 of wildTypeSequence Parameters: wildTypeSequence: A string of o...
Applies the mutations defined by the receiver to wildTypeSequence Note: wildTypeSequence must correspond to a single chain which is specified by id Also sequence are assumed to have a 1 offset. Thus the mutation A1A is applied to element 0 of wildTypeSequence A string of one letter amino-acid codes The chain the sequ...
[ "Applies", "the", "mutations", "defined", "by", "the", "receiver", "to", "wildTypeSequence", "Note", ":", "wildTypeSequence", "must", "correspond", "to", "a", "single", "chain", "which", "is", "specified", "by", "id", "Also", "sequence", "are", "assumed", "to", ...
def applyToSequence(self, wildTypeSequence, id='A', pdb=None, offset=None): if pdb is not None and offset is None: res = GetChainResidues(pdb)[id][0] chain, index = Utilities.ParseResidueCode(res) offset = index elif offset is None: offset = -1 seq = list(wildTypeSequence) for code in self.mutation...
[ "def", "applyToSequence", "(", "self", ",", "wildTypeSequence", ",", "id", "=", "'A'", ",", "pdb", "=", "None", ",", "offset", "=", "None", ")", ":", "if", "pdb", "is", "not", "None", "and", "offset", "is", "None", ":", "res", "=", "GetChainResidues", ...
Applies the mutations defined by the receiver to wildTypeSequence Note: wildTypeSequence must correspond to a single chain which is specified by id Also sequence are assumed to have a 1 offset.
[ "Applies", "the", "mutations", "defined", "by", "the", "receiver", "to", "wildTypeSequence", "Note", ":", "wildTypeSequence", "must", "correspond", "to", "a", "single", "chain", "which", "is", "specified", "by", "id", "Also", "sequence", "are", "assumed", "to", ...
[ "'''Applies the mutations defined by the receiver to wildTypeSequence\n\t\t\n\t\tNote: wildTypeSequence must correspond to a single chain which is specified by id\n\t\tAlso sequence are assumed to have a 1 offset.\n\t\tThus the mutation A1A is applied to element 0 of wildTypeSequence\n\t\t\n\t\tParameters:\n\t\t\tw...
[ { "param": "self", "type": null }, { "param": "wildTypeSequence", "type": null }, { "param": "id", "type": null }, { "param": "pdb", "type": null }, { "param": "offset", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "wildTypeSequence", "type": null, "docstring": null, "docstrin...
0661cb4eeea6a7ff3296e7b81aef903407f8926b
shambo001/peat
pKaTool/explore/large_dataset_manager.py
[ "MIT" ]
Python
find_file
<not_specific>
def find_file(self,name,check_it=1): """Give the filename, find it in a dir""" import os newdir=self.get_dir_name(name) filename=os.path.join(newdir,str(name)) if check_it: if os.path.isfile(filename): return filename print 'Could not find'...
Give the filename, find it in a dir
Give the filename, find it in a dir
[ "Give", "the", "filename", "find", "it", "in", "a", "dir" ]
def find_file(self,name,check_it=1): import os newdir=self.get_dir_name(name) filename=os.path.join(newdir,str(name)) if check_it: if os.path.isfile(filename): return filename print 'Could not find',filename raise Exception('Crap routin...
[ "def", "find_file", "(", "self", ",", "name", ",", "check_it", "=", "1", ")", ":", "import", "os", "newdir", "=", "self", ".", "get_dir_name", "(", "name", ")", "filename", "=", "os", ".", "path", ".", "join", "(", "newdir", ",", "str", "(", "name"...
Give the filename, find it in a dir
[ "Give", "the", "filename", "find", "it", "in", "a", "dir" ]
[ "\"\"\"Give the filename, find it in a dir\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "name", "type": null }, { "param": "check_it", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "name", "type": null, "docstring": null, "docstring_tokens": [...
070f0aee3d21e264774ec5b12c3f104a6de7d7e9
shambo001/peat
pKaTool/pKaIO.py
[ "MIT" ]
Python
read_MEADfile
<not_specific>
def read_MEADfile(self,lines,mode='pKa'): """Parse a MEAD pKa calculation file""" # Some residues have different names MEADtranslate={'ASH1':'ASP','GLH1':'GLU'} # count=0 while count<len(lines): line=lines[count] print line.strip() if l...
Parse a MEAD pKa calculation file
Parse a MEAD pKa calculation file
[ "Parse", "a", "MEAD", "pKa", "calculation", "file" ]
def read_MEADfile(self,lines,mode='pKa'): MEADtranslate={'ASH1':'ASP','GLH1':'GLU'} count=0 while count<len(lines): line=lines[count] print line.strip() if line.strip()=='<****CALCULATION RESULTS>' and mode=='pKa': pKas={} while...
[ "def", "read_MEADfile", "(", "self", ",", "lines", ",", "mode", "=", "'pKa'", ")", ":", "MEADtranslate", "=", "{", "'ASH1'", ":", "'ASP'", ",", "'GLH1'", ":", "'GLU'", "}", "count", "=", "0", "while", "count", "<", "len", "(", "lines", ")", ":", "l...
Parse a MEAD pKa calculation file
[ "Parse", "a", "MEAD", "pKa", "calculation", "file" ]
[ "\"\"\"Parse a MEAD pKa calculation file\"\"\"", "# Some residues have different names", "#", "#", "#", "# Code for reading the titration curves", "#", "#print lines[count].strip()", "#stop", "#", "#", "# Code for reading the interaction matrix", "#", "#", "# Get all the titgroups first"...
[ { "param": "self", "type": null }, { "param": "lines", "type": null }, { "param": "mode", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "lines", "type": null, "docstring": null, "docstring_tokens": ...
070f0aee3d21e264774ec5b12c3f104a6de7d7e9
shambo001/peat
pKaTool/pKaIO.py
[ "MIT" ]
Python
write_pka
<not_specific>
def write_pka(self,filename,data=None,format='WHAT IF'): """Write a PKA.DAT file containing all info on the calculations""" # # Get the data # if not data: data=self.pka # # Write the file # fd=open(filename,'w') fd.write('%s pK...
Write a PKA.DAT file containing all info on the calculations
Write a PKA.DAT file containing all info on the calculations
[ "Write", "a", "PKA", ".", "DAT", "file", "containing", "all", "info", "on", "the", "calculations" ]
def write_pka(self,filename,data=None,format='WHAT IF'): Get the data if not data: data=self.pka Write the file fd=open(filename,'w') fd.write('%s pKa File\n' %format) fd.write('Format 1.0\n') fd.write(' Group pKa value Model pK d...
[ "def", "write_pka", "(", "self", ",", "filename", ",", "data", "=", "None", ",", "format", "=", "'WHAT IF'", ")", ":", "if", "not", "data", ":", "data", "=", "self", ".", "pka", "fd", "=", "open", "(", "filename", ",", "'w'", ")", "fd", ".", "wri...
Write a PKA.DAT file containing all info on the calculations
[ "Write", "a", "PKA", ".", "DAT", "file", "containing", "all", "info", "on", "the", "calculations" ]
[ "\"\"\"Write a PKA.DAT file containing all info on the calculations\"\"\"", "#", "# Get the data", "#", "#", "# Write the file", "#", "#", "# ---------", "#" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "data", "type": null }, { "param": "format", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
070f0aee3d21e264774ec5b12c3f104a6de7d7e9
shambo001/peat
pKaTool/pKaIO.py
[ "MIT" ]
Python
read_matrix
<not_specific>
def read_matrix(self,filename=None): """ # This subroutine read a MATRIX file """ if not filename: if self.matrix_file: filename=self.matrix_file else: raise Exception('No matrix filename given') # import os, string ...
# This subroutine read a MATRIX file
This subroutine read a MATRIX file
[ "This", "subroutine", "read", "a", "MATRIX", "file" ]
def read_matrix(self,filename=None): if not filename: if self.matrix_file: filename=self.matrix_file else: raise Exception('No matrix filename given') import os, string if not os.path.isfile(filename): raise Exception("File not ...
[ "def", "read_matrix", "(", "self", ",", "filename", "=", "None", ")", ":", "if", "not", "filename", ":", "if", "self", ".", "matrix_file", ":", "filename", "=", "self", ".", "matrix_file", "else", ":", "raise", "Exception", "(", "'No matrix filename given'",...
This subroutine read a MATRIX file
[ "This", "subroutine", "read", "a", "MATRIX", "file" ]
[ "\"\"\"\n # This subroutine read a MATRIX file\n \"\"\"", "#", "#", "# Initialise dictionary", "#", "#", "# Read title lines", "#", "#", "# Read first line for this partner residue", "#", "#", "# Replace the residue name by the terminal name", "#", "#", "# Get the number ...
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...