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
7a94ed1b30c03a42c15a93c334068177390964aa
shambo001/peat
PEATDB/Ekin/Meta.py
[ "MIT" ]
Python
applyCurrent
<not_specific>
def applyCurrent(self, dataset=None): """Apply current tkinter var data to field""" d=self.data if dataset==None: dataset=self.currdataset glbals = self.glob for g in self.gvars: self.glob[g]['data'] = self.gvars[g].get() for c in self.cvars: ...
Apply current tkinter var data to field
Apply current tkinter var data to field
[ "Apply", "current", "tkinter", "var", "data", "to", "field" ]
def applyCurrent(self, dataset=None): d=self.data if dataset==None: dataset=self.currdataset glbals = self.glob for g in self.gvars: self.glob[g]['data'] = self.gvars[g].get() for c in self.cvars: d[dataset][c]['data'] = self.cvars[c].get() ...
[ "def", "applyCurrent", "(", "self", ",", "dataset", "=", "None", ")", ":", "d", "=", "self", ".", "data", "if", "dataset", "==", "None", ":", "dataset", "=", "self", ".", "currdataset", "glbals", "=", "self", ".", "glob", "for", "g", "in", "self", ...
Apply current tkinter var data to field
[ "Apply", "current", "tkinter", "var", "data", "to", "field" ]
[ "\"\"\"Apply current tkinter var data to field\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "dataset", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dataset", "type": null, "docstring": null, "docstring_tokens"...
7a94ed1b30c03a42c15a93c334068177390964aa
shambo001/peat
PEATDB/Ekin/Meta.py
[ "MIT" ]
Python
convertfromOld
<not_specific>
def convertfromOld(self, E=None): """Convert from old meta data format """ if E == None: E = self.project old = E.__Exp_Meta_Dat__ #print old for f in old['Operator']: self.add(f, old['Operator'][f]) for i in old['Meta_Data']: #print i ...
Convert from old meta data format
Convert from old meta data format
[ "Convert", "from", "old", "meta", "data", "format" ]
def convertfromOld(self, E=None): if E == None: E = self.project old = E.__Exp_Meta_Dat__ for f in old['Operator']: self.add(f, old['Operator'][f]) for i in old['Meta_Data']: f = i['Name'] try: units=i['units'] e...
[ "def", "convertfromOld", "(", "self", ",", "E", "=", "None", ")", ":", "if", "E", "==", "None", ":", "E", "=", "self", ".", "project", "old", "=", "E", ".", "__Exp_Meta_Dat__", "for", "f", "in", "old", "[", "'Operator'", "]", ":", "self", ".", "a...
Convert from old meta data format
[ "Convert", "from", "old", "meta", "data", "format" ]
[ "\"\"\"Convert from old meta data format \"\"\"", "#print old", "#print i", "#print f" ]
[ { "param": "self", "type": null }, { "param": "E", "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": [], ...
7a94ed1b30c03a42c15a93c334068177390964aa
shambo001/peat
PEATDB/Ekin/Meta.py
[ "MIT" ]
Python
autoCreate
<not_specific>
def autoCreate(self, mode): import time """Auto create some meta data specific to the ekin mode""" if mode=='General' or mode=='NMR titration': self.data['glob'] = { 'Buffer': { 'attrib': 'mM', 'data': 'KCl'}, 'Comment': { 'attrib': None, 'data': ''}, ...
Auto create some meta data specific to the ekin mode
Auto create some meta data specific to the ekin mode
[ "Auto", "create", "some", "meta", "data", "specific", "to", "the", "ekin", "mode" ]
def autoCreate(self, mode): import time if mode=='General' or mode=='NMR titration': self.data['glob'] = { 'Buffer': { 'attrib': 'mM', 'data': 'KCl'}, 'Comment': { 'attrib': None, 'data': ''}, 'D2O concentration': { 'attrib': '%', 'data'...
[ "def", "autoCreate", "(", "self", ",", "mode", ")", ":", "import", "time", "if", "mode", "==", "'General'", "or", "mode", "==", "'NMR titration'", ":", "self", ".", "data", "[", "'glob'", "]", "=", "{", "'Buffer'", ":", "{", "'attrib'", ":", "'mM'", ...
Auto create some meta data specific to the ekin mode
[ "Auto", "create", "some", "meta", "data", "specific", "to", "the", "ekin", "mode" ]
[ "\"\"\"Auto create some meta data specific to the ekin mode\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "mode", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mode", "type": null, "docstring": null, "docstring_tokens": [...
f28585fb66e40b0f078df662336aa34c579c8979
shambo001/peat
pKaTool/stab_fit/myfitter.py
[ "MIT" ]
Python
residuals
<not_specific>
def residuals(self, p, args=None): """Evaluate the func residuals given parameters""" r=[] x=self.x; y=self.y fit=[self.func(i,p) for i in x] r = [math.pow(i[0]-i[1],2) for i in zip(fit,y)] return r
Evaluate the func residuals given parameters
Evaluate the func residuals given parameters
[ "Evaluate", "the", "func", "residuals", "given", "parameters" ]
def residuals(self, p, args=None): r=[] x=self.x; y=self.y fit=[self.func(i,p) for i in x] r = [math.pow(i[0]-i[1],2) for i in zip(fit,y)] return r
[ "def", "residuals", "(", "self", ",", "p", ",", "args", "=", "None", ")", ":", "r", "=", "[", "]", "x", "=", "self", ".", "x", ";", "y", "=", "self", ".", "y", "fit", "=", "[", "self", ".", "func", "(", "i", ",", "p", ")", "for", "i", "...
Evaluate the func residuals given parameters
[ "Evaluate", "the", "func", "residuals", "given", "parameters" ]
[ "\"\"\"Evaluate the func residuals given parameters\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "p", "type": null }, { "param": "args", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "p", "type": null, "docstring": null, "docstring_tokens": [], ...
f28585fb66e40b0f078df662336aa34c579c8979
shambo001/peat
pKaTool/stab_fit/myfitter.py
[ "MIT" ]
Python
evaluate
<not_specific>
def evaluate(self, p, args=None): """Evaluate func and get sum sq res for given params""" x=self.x; y=self.y fit=[self.func(i,p) for i in x] r=0 for i in zip(fit,y): r += math.pow(i[0]-i[1],2) return r
Evaluate func and get sum sq res for given params
Evaluate func and get sum sq res for given params
[ "Evaluate", "func", "and", "get", "sum", "sq", "res", "for", "given", "params" ]
def evaluate(self, p, args=None): x=self.x; y=self.y fit=[self.func(i,p) for i in x] r=0 for i in zip(fit,y): r += math.pow(i[0]-i[1],2) return r
[ "def", "evaluate", "(", "self", ",", "p", ",", "args", "=", "None", ")", ":", "x", "=", "self", ".", "x", ";", "y", "=", "self", ".", "y", "fit", "=", "[", "self", ".", "func", "(", "i", ",", "p", ")", "for", "i", "in", "x", "]", "r", "...
Evaluate func and get sum sq res for given params
[ "Evaluate", "func", "and", "get", "sum", "sq", "res", "for", "given", "params" ]
[ "\"\"\"Evaluate func and get sum sq res for given params\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "p", "type": null }, { "param": "args", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "p", "type": null, "docstring": null, "docstring_tokens": [], ...
f28585fb66e40b0f078df662336aa34c579c8979
shambo001/peat
pKaTool/stab_fit/myfitter.py
[ "MIT" ]
Python
fit
<not_specific>
def fit(self, method='simplex'): """Fit by minimizing r-squared using various algorithms""" #downhill simplex algorithm if method == 'simplex': p = scipy.optimize.fmin(self.evaluate, self.params) #using scipy version of levenberg-Marquardt algorithm elif method == '...
Fit by minimizing r-squared using various algorithms
Fit by minimizing r-squared using various algorithms
[ "Fit", "by", "minimizing", "r", "-", "squared", "using", "various", "algorithms" ]
def fit(self, method='simplex'): if method == 'simplex': p = scipy.optimize.fmin(self.evaluate, self.params) elif method == 'lm': p,ier = scipy.optimize.leastsq(self.residuals, self.params) self.params = p fit=[self.func(i,p) for i in self.x] self.fit =...
[ "def", "fit", "(", "self", ",", "method", "=", "'simplex'", ")", ":", "if", "method", "==", "'simplex'", ":", "p", "=", "scipy", ".", "optimize", ".", "fmin", "(", "self", ".", "evaluate", ",", "self", ".", "params", ")", "elif", "method", "==", "'...
Fit by minimizing r-squared using various algorithms
[ "Fit", "by", "minimizing", "r", "-", "squared", "using", "various", "algorithms" ]
[ "\"\"\"Fit by minimizing r-squared using various algorithms\"\"\"", "#downhill simplex algorithm", "#using scipy version of levenberg-Marquardt algorithm " ]
[ { "param": "self", "type": null }, { "param": "method", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "method", "type": null, "docstring": null, "docstring_tokens":...
f28585fb66e40b0f078df662336aa34c579c8979
shambo001/peat
pKaTool/stab_fit/myfitter.py
[ "MIT" ]
Python
estimateUncertainty
<not_specific>
def estimateUncertainty(self,x,y,p,xerr=0.1,yerr=0.1,runs=10): """Generic version of monte carlo parameter uncert, returns st dev for each parameter over repeated runs""" plist=[] for r in range(runs): mutx=[];muty=[] for i in range(len(x)): mut...
Generic version of monte carlo parameter uncert, returns st dev for each parameter over repeated runs
Generic version of monte carlo parameter uncert, returns st dev for each parameter over repeated runs
[ "Generic", "version", "of", "monte", "carlo", "parameter", "uncert", "returns", "st", "dev", "for", "each", "parameter", "over", "repeated", "runs" ]
def estimateUncertainty(self,x,y,p,xerr=0.1,yerr=0.1,runs=10): plist=[] for r in range(runs): mutx=[];muty=[] for i in range(len(x)): mutx.append(x[i] + random.uniform(-xerr, xerr)) muty.append(x[i] + random.uniform(-yerr, yerr)) F=fitt...
[ "def", "estimateUncertainty", "(", "self", ",", "x", ",", "y", ",", "p", ",", "xerr", "=", "0.1", ",", "yerr", "=", "0.1", ",", "runs", "=", "10", ")", ":", "plist", "=", "[", "]", "for", "r", "in", "range", "(", "runs", ")", ":", "mutx", "="...
Generic version of monte carlo parameter uncert, returns st dev for each parameter over repeated runs
[ "Generic", "version", "of", "monte", "carlo", "parameter", "uncert", "returns", "st", "dev", "for", "each", "parameter", "over", "repeated", "runs" ]
[ "\"\"\"Generic version of monte carlo parameter uncert, returns\n st dev for each parameter over repeated runs\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "p", "type": null }, { "param": "xerr", "type": null }, { "param": "yerr", "type": null }, { "param": "runs", "type": null }...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
f28585fb66e40b0f078df662336aa34c579c8979
shambo001/peat
pKaTool/stab_fit/myfitter.py
[ "MIT" ]
Python
test10R
<not_specific>
def test10R(): """pKa fitting from kcats using substr depletion""" path = 'fergal_10R' folders = ['fergal_10R/10RWT','fergal_10R/U33W1'] pkas=[] for path in folders: fig=plt.figure(figsize=(8,8)) i=1 data = [] ax1=None for f in os.listdir(path): ...
pKa fitting from kcats using substr depletion
pKa fitting from kcats using substr depletion
[ "pKa", "fitting", "from", "kcats", "using", "substr", "depletion" ]
def test10R(): path = 'fergal_10R' folders = ['fergal_10R/10RWT','fergal_10R/U33W1'] pkas=[] for path in folders: fig=plt.figure(figsize=(8,8)) i=1 data = [] ax1=None for f in os.listdir(path): if os.path.splitext(f)[1] != '.csv': cont...
[ "def", "test10R", "(", ")", ":", "path", "=", "'fergal_10R'", "folders", "=", "[", "'fergal_10R/10RWT'", ",", "'fergal_10R/U33W1'", "]", "pkas", "=", "[", "]", "for", "path", "in", "folders", ":", "fig", "=", "plt", ".", "figure", "(", "figsize", "=", ...
pKa fitting from kcats using substr depletion
[ "pKa", "fitting", "from", "kcats", "using", "substr", "depletion" ]
[ "\"\"\"pKa fitting from kcats using substr depletion\"\"\"", "#may be several replicates", "#fit", "#fit pKa", "#res = F.estimateUncertainty(x,y,[5,2,0],xerr=0.1,yerr=0.2,runs=10) " ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
f28585fb66e40b0f078df662336aa34c579c8979
shambo001/peat
pKaTool/stab_fit/myfitter.py
[ "MIT" ]
Python
crossValidate
<not_specific>
def crossValidate(x,y, frac=0.2, num=None): """Random sub-sampling removal of points to test effects on fit parameters""" l=len(x) if num==None: num = int(l*(1-frac)) print 'using %s out of %s points..' %(num,l) fig=plt.figure(figsize=(8,8)) c=0 pkas=[] for n in range(20)...
Random sub-sampling removal of points to test effects on fit parameters
Random sub-sampling removal of points to test effects on fit parameters
[ "Random", "sub", "-", "sampling", "removal", "of", "points", "to", "test", "effects", "on", "fit", "parameters" ]
def crossValidate(x,y, frac=0.2, num=None): l=len(x) if num==None: num = int(l*(1-frac)) print 'using %s out of %s points..' %(num,l) fig=plt.figure(figsize=(8,8)) c=0 pkas=[] for n in range(20): n1 = random.sample(range(l), num) x1 = [x[i] for i in range(l) if i in n...
[ "def", "crossValidate", "(", "x", ",", "y", ",", "frac", "=", "0.2", ",", "num", "=", "None", ")", ":", "l", "=", "len", "(", "x", ")", "if", "num", "==", "None", ":", "num", "=", "int", "(", "l", "*", "(", "1", "-", "frac", ")", ")", "pr...
Random sub-sampling removal of points to test effects on fit parameters
[ "Random", "sub", "-", "sampling", "removal", "of", "points", "to", "test", "effects", "on", "fit", "parameters" ]
[ "\"\"\"Random sub-sampling removal of points to test effects on \n fit parameters\"\"\"" ]
[ { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "frac", "type": null }, { "param": "num", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "y", "type": null, "docstring": null, "docstring_tokens": [], ...
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
prepare_matrix
<not_specific>
def prepare_matrix(self): """ # Prepare the matrix # # Precompute full term """ self.intene={} for key in self.matrix.keys(): self.intene[key]={} for key2 in self.matrix[key].keys(): #print key,key2,self.matrix[key][key2] ...
# Prepare the matrix # # Precompute full term
Prepare the matrix Precompute full term
[ "Prepare", "the", "matrix", "Precompute", "full", "term" ]
def prepare_matrix(self): self.intene={} for key in self.matrix.keys(): self.intene[key]={} for key2 in self.matrix[key].keys(): self.intene[key][key2]= self.matrix[key][key2][0] \ -self.matrix[key][key2][1] \ ...
[ "def", "prepare_matrix", "(", "self", ")", ":", "self", ".", "intene", "=", "{", "}", "for", "key", "in", "self", ".", "matrix", ".", "keys", "(", ")", ":", "self", ".", "intene", "[", "key", "]", "=", "{", "}", "for", "key2", "in", "self", "."...
Prepare the matrix Precompute full term
[ "Prepare", "the", "matrix", "Precompute", "full", "term" ]
[ "\"\"\"\n # Prepare the matrix\n #\n # Precompute full term\n \"\"\"", "#print key,key2,self.matrix[key][key2]", "#", "# Make sure that the matrix is symmetrical", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
calc_pKas
<not_specific>
def calc_pKas(self,mcsteps=2000,phstep=0.1,phstart=2.0,phend=14.0,verbose=1,complete_pka=None,exp_pHs=[]): """Calculate pKa values for the system""" # # Init # # Set a few constants # # KBol and Temp are equal to 1.0 everywhere in this derived class! # ...
Calculate pKa values for the system
Calculate pKa values for the system
[ "Calculate", "pKa", "values", "for", "the", "system" ]
def calc_pKas(self,mcsteps=2000,phstep=0.1,phstart=2.0,phend=14.0,verbose=1,complete_pka=None,exp_pHs=[]): Init Set a few constants KBol and Temp are equal to 1.0 everywhere in this derived class! Check that all dictionaries have been filled self.groups=self.desolv.keys() ...
[ "def", "calc_pKas", "(", "self", ",", "mcsteps", "=", "2000", ",", "phstep", "=", "0.1", ",", "phstart", "=", "2.0", ",", "phend", "=", "14.0", ",", "verbose", "=", "1", ",", "complete_pka", "=", "None", ",", "exp_pHs", "=", "[", "]", ")", ":", "...
Calculate pKa values for the system
[ "Calculate", "pKa", "values", "for", "the", "system" ]
[ "\"\"\"Calculate pKa values for the system\"\"\"", "#", "# Init", "#", "# Set a few constants", "#", "# KBol and Temp are equal to 1.0 everywhere in this derived class!", "#", "# Check that all dictionaries have been filled", "#", "#", "#", "# Prepare the matrix", "#", "#", "# Calculat...
[ { "param": "self", "type": null }, { "param": "mcsteps", "type": null }, { "param": "phstep", "type": null }, { "param": "phstart", "type": null }, { "param": "phend", "type": null }, { "param": "verbose", "type": null }, { "param": "comple...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mcsteps", "type": null, "docstring": null, "docstring_tokens"...
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
_calc_pKas
<not_specific>
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[]): """Calculate pKa values from intrinsic pKa values and interaction energies. No checking done""" # # KBol and Temp are equal to 1.0 everywhere # import math self.l...
Calculate pKa values from intrinsic pKa values and interaction energies. No checking done
Calculate pKa values from intrinsic pKa values and interaction energies. No checking done
[ "Calculate", "pKa", "values", "from", "intrinsic", "pKa", "values", "and", "interaction", "energies", ".", "No", "checking", "done" ]
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[]): KBol and Temp are equal to 1.0 everywhere import math self.ln10=math.log(10) Start calculating protonation states self.mcsteps=mcsteps pHs=range(int(phstart*100...
[ "def", "_calc_pKas", "(", "self", ",", "mcsteps", "=", "200000", ",", "phstep", "=", "0.1", ",", "phstart", "=", "1.0", ",", "phend", "=", "20.0", ",", "verbose", "=", "1", ",", "complete_pka", "=", "None", ",", "exp_pHs", "=", "[", "]", ")", ":", ...
Calculate pKa values from intrinsic pKa values and interaction energies.
[ "Calculate", "pKa", "values", "from", "intrinsic", "pKa", "values", "and", "interaction", "energies", "." ]
[ "\"\"\"Calculate pKa values from intrinsic pKa values and interaction energies. No checking done\"\"\"", "#", "# KBol and Temp are equal to 1.0 everywhere", "#", "#", "# Start calculating protonation states", "#", "#", "# Calculate protonation states at each pH value", "#", "#", "# Determine p...
[ { "param": "self", "type": null }, { "param": "mcsteps", "type": null }, { "param": "phstep", "type": null }, { "param": "phstart", "type": null }, { "param": "phend", "type": null }, { "param": "verbose", "type": null }, { "param": "comple...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mcsteps", "type": null, "docstring": null, "docstring_tokens"...
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
determine_pKa_values
<not_specific>
def determine_pKa_values(self): """Determine pKa values as half-points of titration from titration data""" pkavalues={} pHvalues=self.pHvalues pHvalues.sort() for group in self.groups: pka=-99.9 last_crg=self.prot_states_tmp[pHvalues[0]][group] ...
Determine pKa values as half-points of titration from titration data
Determine pKa values as half-points of titration from titration data
[ "Determine", "pKa", "values", "as", "half", "-", "points", "of", "titration", "from", "titration", "data" ]
def determine_pKa_values(self): pkavalues={} pHvalues=self.pHvalues pHvalues.sort() for group in self.groups: pka=-99.9 last_crg=self.prot_states_tmp[pHvalues[0]][group] phstep=float(pHvalues[1]-pHvalues[0]) for ph in pHvalues: ...
[ "def", "determine_pKa_values", "(", "self", ")", ":", "pkavalues", "=", "{", "}", "pHvalues", "=", "self", ".", "pHvalues", "pHvalues", ".", "sort", "(", ")", "for", "group", "in", "self", ".", "groups", ":", "pka", "=", "-", "99.9", "last_crg", "=", ...
Determine pKa values as half-points of titration from titration data
[ "Determine", "pKa", "values", "as", "half", "-", "points", "of", "titration", "from", "titration", "data" ]
[ "\"\"\"Determine pKa values as half-points of titration from titration data\"\"\"", "#", "# ----", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
make_matrix_linear
<not_specific>
def make_matrix_linear(self): """Change the matrix to linear form - this makes it easy to pass it to the C++ code""" linear=[] residues=self.intene.keys() residues.sort() for group1 in residues: for group2 in residues: linear.append(self.intene[group1]...
Change the matrix to linear form - this makes it easy to pass it to the C++ code
Change the matrix to linear form - this makes it easy to pass it to the C++ code
[ "Change", "the", "matrix", "to", "linear", "form", "-", "this", "makes", "it", "easy", "to", "pass", "it", "to", "the", "C", "++", "code" ]
def make_matrix_linear(self): linear=[] residues=self.intene.keys() residues.sort() for group1 in residues: for group2 in residues: linear.append(self.intene[group1][group2]) return linear
[ "def", "make_matrix_linear", "(", "self", ")", ":", "linear", "=", "[", "]", "residues", "=", "self", ".", "intene", ".", "keys", "(", ")", "residues", ".", "sort", "(", ")", "for", "group1", "in", "residues", ":", "for", "group2", "in", "residues", ...
Change the matrix to linear form - this makes it easy to pass it to the C++ code
[ "Change", "the", "matrix", "to", "linear", "form", "-", "this", "makes", "it", "easy", "to", "pass", "it", "to", "the", "C", "++", "code" ]
[ "\"\"\"Change the matrix to linear form - this makes it easy to pass it to the C++ code\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
_calc_pKas
<not_specific>
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[], monitor_groups=None,monitor_states=None): """Do the pKa calculation with the CPP module""" # # Do specific CPP setup # import time starttime=time.time() ...
Do the pKa calculation with the CPP module
Do the pKa calculation with the CPP module
[ "Do", "the", "pKa", "calculation", "with", "the", "CPP", "module" ]
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[], monitor_groups=None,monitor_states=None): Do specific CPP setup import time starttime=time.time() residues=self.intrinsic_pKa.keys() residues.sort() intpk...
[ "def", "_calc_pKas", "(", "self", ",", "mcsteps", "=", "200000", ",", "phstep", "=", "0.1", ",", "phstart", "=", "1.0", ",", "phend", "=", "20.0", ",", "verbose", "=", "1", ",", "complete_pka", "=", "None", ",", "exp_pHs", "=", "[", "]", ",", "moni...
Do the pKa calculation with the CPP module
[ "Do", "the", "pKa", "calculation", "with", "the", "CPP", "module" ]
[ "\"\"\"Do the pKa calculation with the CPP module\"\"\"", "#", "# Do specific CPP setup", "#", "#print residue,self.intrinsic_pKa[residue],self.acid_base(residue)", "# Works ok with mutations since self.acid_base works on the last residue", "#raw_input('ok?')", "#", "# Import the C++ module and run ...
[ { "param": "self", "type": null }, { "param": "mcsteps", "type": null }, { "param": "phstep", "type": null }, { "param": "phstart", "type": null }, { "param": "phend", "type": null }, { "param": "verbose", "type": null }, { "param": "comple...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mcsteps", "type": null, "docstring": null, "docstring_tokens"...
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
_calc_pKas
<not_specific>
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[]): """Do the pKa calculation with the CPP module for Boltzmann stats""" # # Do specific CPP setup # import time starttime=time.time() residues=self.intrinsic...
Do the pKa calculation with the CPP module for Boltzmann stats
Do the pKa calculation with the CPP module for Boltzmann stats
[ "Do", "the", "pKa", "calculation", "with", "the", "CPP", "module", "for", "Boltzmann", "stats" ]
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[]): Do specific CPP setup import time starttime=time.time() residues=self.intrinsic_pKa.keys() residues.sort() intpkas=[] acidbase=[] for residue in ...
[ "def", "_calc_pKas", "(", "self", ",", "mcsteps", "=", "200000", ",", "phstep", "=", "0.1", ",", "phstart", "=", "1.0", ",", "phend", "=", "20.0", ",", "verbose", "=", "1", ",", "complete_pka", "=", "None", ",", "exp_pHs", "=", "[", "]", ")", ":", ...
Do the pKa calculation with the CPP module for Boltzmann stats
[ "Do", "the", "pKa", "calculation", "with", "the", "CPP", "module", "for", "Boltzmann", "stats" ]
[ "\"\"\"Do the pKa calculation with the CPP module for Boltzmann stats\"\"\"", "#", "# Do specific CPP setup", "#", "#print residue,self.intrinsic_pKa[residue],self.acid_base(residue)", "# Works ok with mutations since self.acid_base works on the last residue", "#raw_input('ok?')", "#", "# Import the...
[ { "param": "self", "type": null }, { "param": "mcsteps", "type": null }, { "param": "phstep", "type": null }, { "param": "phstart", "type": null }, { "param": "phend", "type": null }, { "param": "verbose", "type": null }, { "param": "comple...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mcsteps", "type": null, "docstring": null, "docstring_tokens"...
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
make_matrix_linear
<not_specific>
def make_matrix_linear(self): """Change the matrix to linear form - this makes it easy to pass it to the C++ code In the mult form self.intene is called self.intene_mult, and each self.intene_mult[group1][group2] entry consists of a list that defines the interaction energies for each of the poss...
Change the matrix to linear form - this makes it easy to pass it to the C++ code In the mult form self.intene is called self.intene_mult, and each self.intene_mult[group1][group2] entry consists of a list that defines the interaction energies for each of the possible states of group1 and group2 ...
Change the matrix to linear form - this makes it easy to pass it to the C++ code In the mult form self.intene is called self.intene_mult, and each self.intene_mult[group1][group2] entry consists of a list that defines the interaction energies for each of the possible states of group1 and group2 with each other
[ "Change", "the", "matrix", "to", "linear", "form", "-", "this", "makes", "it", "easy", "to", "pass", "it", "to", "the", "C", "++", "code", "In", "the", "mult", "form", "self", ".", "intene", "is", "called", "self", ".", "intene_mult", "and", "each", ...
def make_matrix_linear(self): linear=[] residues=self.intene_mult.keys() residues.sort() for group1 in residues: for group2 in residues: for grp1_state in self.intene_mult[group1][group2]: for intene in grp1_state: l...
[ "def", "make_matrix_linear", "(", "self", ")", ":", "linear", "=", "[", "]", "residues", "=", "self", ".", "intene_mult", ".", "keys", "(", ")", "residues", ".", "sort", "(", ")", "for", "group1", "in", "residues", ":", "for", "group2", "in", "residues...
Change the matrix to linear form - this makes it easy to pass it to the C++ code In the mult form self.intene is called self.intene_mult, and each self.intene_mult[group1][group2] entry consists of a list that defines the interaction energies for each of the possible states of group1 and group2 with each other
[ "Change", "the", "matrix", "to", "linear", "form", "-", "this", "makes", "it", "easy", "to", "pass", "it", "to", "the", "C", "++", "code", "In", "the", "mult", "form", "self", ".", "intene", "is", "called", "self", ".", "intene_mult", "and", "each", ...
[ "\"\"\"Change the matrix to linear form - this makes it easy to pass it to the C++ code\n In the mult form self.intene is called self.intene_mult, and each self.intene_mult[group1][group2] entry\n consists of a list that defines the interaction energies for each of the possible states of\n grou...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5ccb336de97c5fa970fb49d77b751ed0379eb752
shambo001/peat
pKaTool/pKa_calc.py
[ "MIT" ]
Python
_calc_pKas
<not_specific>
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[]): """Do the pKa calculation with the CPP module""" # # Do specific CPP_Mult setup # import time starttime=time.time() # # Get the number of groups ...
Do the pKa calculation with the CPP module
Do the pKa calculation with the CPP module
[ "Do", "the", "pKa", "calculation", "with", "the", "CPP", "module" ]
def _calc_pKas(self,mcsteps=200000,phstep=0.1,phstart=1.0,phend=20.0,verbose=1,complete_pka=None,exp_pHs=[]): Do specific CPP_Mult setup import time starttime=time.time() Get the number of groups residues=self.intrinsic_pKa.keys() residues.sort() num_states hol...
[ "def", "_calc_pKas", "(", "self", ",", "mcsteps", "=", "200000", ",", "phstep", "=", "0.1", ",", "phstart", "=", "1.0", ",", "phend", "=", "20.0", ",", "verbose", "=", "1", ",", "complete_pka", "=", "None", ",", "exp_pHs", "=", "[", "]", ")", ":", ...
Do the pKa calculation with the CPP module
[ "Do", "the", "pKa", "calculation", "with", "the", "CPP", "module" ]
[ "\"\"\"Do the pKa calculation with the CPP module\"\"\"", "#", "# Do specific CPP_Mult setup", "#", "#", "# Get the number of groups", "#", "#", "# num_states holds the number of states for each group", "# charged_state identified whether a state is charged or neutral", "#", "#this_state=[]", ...
[ { "param": "self", "type": null }, { "param": "mcsteps", "type": null }, { "param": "phstep", "type": null }, { "param": "phstart", "type": null }, { "param": "phend", "type": null }, { "param": "verbose", "type": null }, { "param": "comple...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mcsteps", "type": null, "docstring": null, "docstring_tokens"...
8c52d5e699cace2696ec10360594a1b527fb1480
shambo001/peat
PEATDB/Record.py
[ "MIT" ]
Python
hasStructure
<not_specific>
def hasStructure(self): """Determine if this record has a structure""" import types if not hasattr(self,'Structure') or self.Structure == None: return 'not available' if self.has_key('structuretype'): return self.structuretype #we need to get rid of this g...
Determine if this record has a structure
Determine if this record has a structure
[ "Determine", "if", "this", "record", "has", "a", "structure" ]
def hasStructure(self): import types if not hasattr(self,'Structure') or self.Structure == None: return 'not available' if self.has_key('structuretype'): return self.structuretype if type(self.Structure) is types.ListType and len(self.Structure)>25: re...
[ "def", "hasStructure", "(", "self", ")", ":", "import", "types", "if", "not", "hasattr", "(", "self", ",", "'Structure'", ")", "or", "self", ".", "Structure", "==", "None", ":", "return", "'not available'", "if", "self", ".", "has_key", "(", "'structuretyp...
Determine if this record has a structure
[ "Determine", "if", "this", "record", "has", "a", "structure" ]
[ "\"\"\"Determine if this record has a structure\"\"\"", "#we need to get rid of this guessing bit." ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
0fd41629c05eb4133e0ae63b04c34be0b8fd3817
shambo001/peat
DataPipeline/PipelineApp.py
[ "MIT" ]
Python
createMenuBar
<not_specific>
def createMenuBar(self): """Create the menu bar for the application. """ self.menu=Menu(self.main) self.file_menu={'01Open Raw File(s)':{'cmd':self.openRaw}, '02Load Config File':{'cmd':self.loadConfig}, '03Edit Current Config':{'cmd':self.editCo...
Create the menu bar for the application.
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
def createMenuBar(self): self.menu=Menu(self.main) self.file_menu={'01Open Raw File(s)':{'cmd':self.openRaw}, '02Load Config File':{'cmd':self.loadConfig}, '03Edit Current Config':{'cmd':self.editConfig}, '04Create Config':{'cmd'...
[ "def", "createMenuBar", "(", "self", ")", ":", "self", ".", "menu", "=", "Menu", "(", "self", ".", "main", ")", "self", ".", "file_menu", "=", "{", "'01Open Raw File(s)'", ":", "{", "'cmd'", ":", "self", ".", "openRaw", "}", ",", "'02Load Config File'", ...
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
[ "\"\"\"Create the menu bar for the application. \"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
0fd41629c05eb4133e0ae63b04c34be0b8fd3817
shambo001/peat
DataPipeline/PipelineApp.py
[ "MIT" ]
Python
openRaw
<not_specific>
def openRaw(self, filename=None): """Open a raw file, if more than one file we add them to queue""" if filename==None: filename = self.openFilename() if not os.path.exists(filename): return #now we open the first file only lines = self.p.openRaw(filename) self...
Open a raw file, if more than one file we add them to queue
Open a raw file, if more than one file we add them to queue
[ "Open", "a", "raw", "file", "if", "more", "than", "one", "file", "we", "add", "them", "to", "queue" ]
def openRaw(self, filename=None): if filename==None: filename = self.openFilename() if not os.path.exists(filename): return lines = self.p.openRaw(filename) self.updateinfoPane() self.showRawFile(lines) self.showPreview() return
[ "def", "openRaw", "(", "self", ",", "filename", "=", "None", ")", ":", "if", "filename", "==", "None", ":", "filename", "=", "self", ".", "openFilename", "(", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "filename", ")", ":", "return", ...
Open a raw file, if more than one file we add them to queue
[ "Open", "a", "raw", "file", "if", "more", "than", "one", "file", "we", "add", "them", "to", "queue" ]
[ "\"\"\"Open a raw file, if more than one file we add them to queue\"\"\"", "#now we open the first file only" ]
[ { "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...
0fd41629c05eb4133e0ae63b04c34be0b8fd3817
shambo001/peat
DataPipeline/PipelineApp.py
[ "MIT" ]
Python
updateFromQueue
<not_specific>
def updateFromQueue(self): """Check current file open after a queue deletion""" if self.p.filename not in self.p.queue.values(): self.clearCurrentFile() return
Check current file open after a queue deletion
Check current file open after a queue deletion
[ "Check", "current", "file", "open", "after", "a", "queue", "deletion" ]
def updateFromQueue(self): if self.p.filename not in self.p.queue.values(): self.clearCurrentFile() return
[ "def", "updateFromQueue", "(", "self", ")", ":", "if", "self", ".", "p", ".", "filename", "not", "in", "self", ".", "p", ".", "queue", ".", "values", "(", ")", ":", "self", ".", "clearCurrentFile", "(", ")", "return" ]
Check current file open after a queue deletion
[ "Check", "current", "file", "open", "after", "a", "queue", "deletion" ]
[ "\"\"\"Check current file open after a queue deletion\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
0fd41629c05eb4133e0ae63b04c34be0b8fd3817
shambo001/peat
DataPipeline/PipelineApp.py
[ "MIT" ]
Python
update
<not_specific>
def update(self, evt=None): """Reload data dict from main app""" self.p = self.app.p data = self.p.doImport() if data == None: return self.dsindex = 0 self.loadData(data) self.replot() return
Reload data dict from main app
Reload data dict from main app
[ "Reload", "data", "dict", "from", "main", "app" ]
def update(self, evt=None): self.p = self.app.p data = self.p.doImport() if data == None: return self.dsindex = 0 self.loadData(data) self.replot() return
[ "def", "update", "(", "self", ",", "evt", "=", "None", ")", ":", "self", ".", "p", "=", "self", ".", "app", ".", "p", "data", "=", "self", ".", "p", ".", "doImport", "(", ")", "if", "data", "==", "None", ":", "return", "self", ".", "dsindex", ...
Reload data dict from main app
[ "Reload", "data", "dict", "from", "main", "app" ]
[ "\"\"\"Reload data dict from main app\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "evt", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "evt", "type": null, "docstring": null, "docstring_tokens": []...
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testDefautInitialisation
null
def testDefautInitialisation(self): '''Tests that instantiating the matrix with no arguments works''' matrix = Matrix.Matrix()
Tests that instantiating the matrix with no arguments works
Tests that instantiating the matrix with no arguments works
[ "Tests", "that", "instantiating", "the", "matrix", "with", "no", "arguments", "works" ]
def testDefautInitialisation(self): matrix = Matrix.Matrix()
[ "def", "testDefautInitialisation", "(", "self", ")", ":", "matrix", "=", "Matrix", ".", "Matrix", "(", ")" ]
Tests that instantiating the matrix with no arguments works
[ "Tests", "that", "instantiating", "the", "matrix", "with", "no", "arguments", "works" ]
[ "'''Tests that instantiating the matrix with no arguments works'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testSetupInitInitialisation
null
def testSetupInitInitialisation(self): '''Tests that the rows and columns are correctly set''' self.assertEqual(2, self.matrix.numberOfRows()) self.assertEqual(2, self.matrix.numberOfColumns())
Tests that the rows and columns are correctly set
Tests that the rows and columns are correctly set
[ "Tests", "that", "the", "rows", "and", "columns", "are", "correctly", "set" ]
def testSetupInitInitialisation(self): self.assertEqual(2, self.matrix.numberOfRows()) self.assertEqual(2, self.matrix.numberOfColumns())
[ "def", "testSetupInitInitialisation", "(", "self", ")", ":", "self", ".", "assertEqual", "(", "2", ",", "self", ".", "matrix", ".", "numberOfRows", "(", ")", ")", "self", ".", "assertEqual", "(", "2", ",", "self", ".", "matrix", ".", "numberOfColumns", "...
Tests that the rows and columns are correctly set
[ "Tests", "that", "the", "rows", "and", "columns", "are", "correctly", "set" ]
[ "'''Tests that the rows and columns are correctly set'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testInitialisationWithoutHeaders
null
def testInitialisationWithoutHeaders(self): '''Test that the matrix is initialised correctly if no headers are supplied''' matrix = Matrix.Matrix(rows=lists) self.assertEqual(2, matrix.numberOfRows()) self.assertEqual(2, matrix.numberOfColumns()) self.assertEqual(("None", "None"), matrix.columnHeaders())
Test that the matrix is initialised correctly if no headers are supplied
Test that the matrix is initialised correctly if no headers are supplied
[ "Test", "that", "the", "matrix", "is", "initialised", "correctly", "if", "no", "headers", "are", "supplied" ]
def testInitialisationWithoutHeaders(self): matrix = Matrix.Matrix(rows=lists) self.assertEqual(2, matrix.numberOfRows()) self.assertEqual(2, matrix.numberOfColumns()) self.assertEqual(("None", "None"), matrix.columnHeaders())
[ "def", "testInitialisationWithoutHeaders", "(", "self", ")", ":", "matrix", "=", "Matrix", ".", "Matrix", "(", "rows", "=", "lists", ")", "self", ".", "assertEqual", "(", "2", ",", "matrix", ".", "numberOfRows", "(", ")", ")", "self", ".", "assertEqual", ...
Test that the matrix is initialised correctly if no headers are supplied
[ "Test", "that", "the", "matrix", "is", "initialised", "correctly", "if", "no", "headers", "are", "supplied" ]
[ "'''Test that the matrix is initialised correctly if no headers are supplied'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testIncorrectInitialisation
null
def testIncorrectInitialisation(self): '''Test that initialisation fails if the length of headers is incompatible with number of columns provided''' try: Matrix.Matrix(headers=headers) self.fail("No exception raised") except IndexError: self.assert_(True) except: self.fail("Unexpected exceptio...
Test that initialisation fails if the length of headers is incompatible with number of columns provided
Test that initialisation fails if the length of headers is incompatible with number of columns provided
[ "Test", "that", "initialisation", "fails", "if", "the", "length", "of", "headers", "is", "incompatible", "with", "number", "of", "columns", "provided" ]
def testIncorrectInitialisation(self): try: Matrix.Matrix(headers=headers) self.fail("No exception raised") except IndexError: self.assert_(True) except: self.fail("Unexpected exception raised")
[ "def", "testIncorrectInitialisation", "(", "self", ")", ":", "try", ":", "Matrix", ".", "Matrix", "(", "headers", "=", "headers", ")", "self", ".", "fail", "(", "\"No exception raised\"", ")", "except", "IndexError", ":", "self", ".", "assert_", "(", "True",...
Test that initialisation fails if the length of headers is incompatible with number of columns provided
[ "Test", "that", "initialisation", "fails", "if", "the", "length", "of", "headers", "is", "incompatible", "with", "number", "of", "columns", "provided" ]
[ "'''Test that initialisation fails if the length of headers is incompatible with number of columns provided'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testSetName
null
def testSetName(self): '''Tests that setting the matrices name works''' self.matrix.setName("someName") self.assertEqual(self.matrix.name(), "someName")
Tests that setting the matrices name works
Tests that setting the matrices name works
[ "Tests", "that", "setting", "the", "matrices", "name", "works" ]
def testSetName(self): self.matrix.setName("someName") self.assertEqual(self.matrix.name(), "someName")
[ "def", "testSetName", "(", "self", ")", ":", "self", ".", "matrix", ".", "setName", "(", "\"someName\"", ")", "self", ".", "assertEqual", "(", "self", ".", "matrix", ".", "name", "(", ")", ",", "\"someName\"", ")" ]
Tests that setting the matrices name works
[ "Tests", "that", "setting", "the", "matrices", "name", "works" ]
[ "'''Tests that setting the matrices name works'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testSetInvalidName
null
def testSetInvalidName(self): '''Test that the matrix name can only be a string''' self.assertRaises(TypeError, self.matrix.setName, [])
Test that the matrix name can only be a string
Test that the matrix name can only be a string
[ "Test", "that", "the", "matrix", "name", "can", "only", "be", "a", "string" ]
def testSetInvalidName(self): self.assertRaises(TypeError, self.matrix.setName, [])
[ "def", "testSetInvalidName", "(", "self", ")", ":", "self", ".", "assertRaises", "(", "TypeError", ",", "self", ".", "matrix", ".", "setName", ",", "[", "]", ")" ]
Test that the matrix name can only be a string
[ "Test", "that", "the", "matrix", "name", "can", "only", "be", "a", "string" ]
[ "'''Test that the matrix name can only be a string'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testRowAddition
null
def testRowAddition(self): '''Tests adding a new row Tests default addition and addition to a specified index. Tests that the correct error is raised if index is out of bounds.''' #Default add newRow = ["Adding", "Row"] self.matrix.addRow(newRow) row = self.matrix.row(2) self.assertEqual(row, tup...
Tests adding a new row Tests default addition and addition to a specified index. Tests that the correct error is raised if index is out of bounds.
Tests adding a new row Tests default addition and addition to a specified index. Tests that the correct error is raised if index is out of bounds.
[ "Tests", "adding", "a", "new", "row", "Tests", "default", "addition", "and", "addition", "to", "a", "specified", "index", ".", "Tests", "that", "the", "correct", "error", "is", "raised", "if", "index", "is", "out", "of", "bounds", "." ]
def testRowAddition(self): newRow = ["Adding", "Row"] self.matrix.addRow(newRow) row = self.matrix.row(2) self.assertEqual(row, tuple(newRow)) self.assertEqual(3, self.matrix.numberOfRows()) self.matrix.addRow(newRow, index=1) row = self.matrix.row(1) self.assertEqual(row, tuple(newRow)) self.assertRa...
[ "def", "testRowAddition", "(", "self", ")", ":", "newRow", "=", "[", "\"Adding\"", ",", "\"Row\"", "]", "self", ".", "matrix", ".", "addRow", "(", "newRow", ")", "row", "=", "self", ".", "matrix", ".", "row", "(", "2", ")", "self", ".", "assertEqual"...
Tests adding a new row Tests default addition and addition to a specified index.
[ "Tests", "adding", "a", "new", "row", "Tests", "default", "addition", "and", "addition", "to", "a", "specified", "index", "." ]
[ "'''Tests adding a new row\n\t\t\n\t\tTests default addition and addition to a specified index.\n\t\tTests that the correct error is raised if index is out of bounds.'''", "#Default add", "#Specified index add", "#Test raises an error if index is incorrect", "#Test raises an error if number of elements in r...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testColumnAddition
null
def testColumnAddition(self): '''Tests adding a new column Tests default addition and addition to a specified index. Tests that the correct error is raised if index is out of bounds. Tests that the correct headers are set for the new columns''' #Default add newColumn = ["Adding", "Column"] self.mat...
Tests adding a new column Tests default addition and addition to a specified index. Tests that the correct error is raised if index is out of bounds. Tests that the correct headers are set for the new columns
Tests adding a new column Tests default addition and addition to a specified index. Tests that the correct error is raised if index is out of bounds. Tests that the correct headers are set for the new columns
[ "Tests", "adding", "a", "new", "column", "Tests", "default", "addition", "and", "addition", "to", "a", "specified", "index", ".", "Tests", "that", "the", "correct", "error", "is", "raised", "if", "index", "is", "out", "of", "bounds", ".", "Tests", "that", ...
def testColumnAddition(self): newColumn = ["Adding", "Column"] self.matrix.addColumn(newColumn) column = self.matrix.column(2) self.assertEqual(column, tuple(newColumn)) self.assertEqual(3, self.matrix.numberOfColumns()) header = self.matrix.headerForColumn(2) self.assertEqual("None", header) self.matri...
[ "def", "testColumnAddition", "(", "self", ")", ":", "newColumn", "=", "[", "\"Adding\"", ",", "\"Column\"", "]", "self", ".", "matrix", ".", "addColumn", "(", "newColumn", ")", "column", "=", "self", ".", "matrix", ".", "column", "(", "2", ")", "self", ...
Tests adding a new column Tests default addition and addition to a specified index.
[ "Tests", "adding", "a", "new", "column", "Tests", "default", "addition", "and", "addition", "to", "a", "specified", "index", "." ]
[ "'''Tests adding a new column\n\t\t\n\t\tTests default addition and addition to a specified index.\n\t\tTests that the correct error is raised if index is out of bounds.\n\t\tTests that the correct headers are set for the new columns'''", "#Default add", "#Check column header is correct", "#Specified index ad...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testGetRow
null
def testGetRow(self): '''Tests the correct row is returned. Tests that the correct error is raised if the requested index is out of bounds''' #Test getting row row = self.matrix.row(1) self.assertEqual(("michael", 34.66), row) #Check its a tuple self.assertEqual(type(row), type(())) #Test fa...
Tests the correct row is returned. Tests that the correct error is raised if the requested index is out of bounds
Tests the correct row is returned. Tests that the correct error is raised if the requested index is out of bounds
[ "Tests", "the", "correct", "row", "is", "returned", ".", "Tests", "that", "the", "correct", "error", "is", "raised", "if", "the", "requested", "index", "is", "out", "of", "bounds" ]
def testGetRow(self): row = self.matrix.row(1) self.assertEqual(("michael", 34.66), row) self.assertEqual(type(row), type(())) self.assertRaises(IndexError, self.matrix.row, 4)
[ "def", "testGetRow", "(", "self", ")", ":", "row", "=", "self", ".", "matrix", ".", "row", "(", "1", ")", "self", ".", "assertEqual", "(", "(", "\"michael\"", ",", "34.66", ")", ",", "row", ")", "self", ".", "assertEqual", "(", "type", "(", "row", ...
Tests the correct row is returned.
[ "Tests", "the", "correct", "row", "is", "returned", "." ]
[ "'''Tests the correct row is returned.\n\t\tTests that the correct error is raised if the requested index is out of bounds'''", "#Test getting row", "#Check its a tuple", "#Test fail" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testGetColumn
null
def testGetColumn(self): '''Tests the correct column is returned. Tests that the correct error is raised if the requested index is out of bounds''' #Test getting column column = self.matrix.column(1) self.assertEqual( (2, 34.66), column) #Test fail self.assertRaises(IndexError, self.matrix.column,...
Tests the correct column is returned. Tests that the correct error is raised if the requested index is out of bounds
Tests the correct column is returned. Tests that the correct error is raised if the requested index is out of bounds
[ "Tests", "the", "correct", "column", "is", "returned", ".", "Tests", "that", "the", "correct", "error", "is", "raised", "if", "the", "requested", "index", "is", "out", "of", "bounds" ]
def testGetColumn(self): column = self.matrix.column(1) self.assertEqual( (2, 34.66), column) self.assertRaises(IndexError, self.matrix.column, 4) self.assertEqual(type(column), type(()))
[ "def", "testGetColumn", "(", "self", ")", ":", "column", "=", "self", ".", "matrix", ".", "column", "(", "1", ")", "self", ".", "assertEqual", "(", "(", "2", ",", "34.66", ")", ",", "column", ")", "self", ".", "assertRaises", "(", "IndexError", ",", ...
Tests the correct column is returned.
[ "Tests", "the", "correct", "column", "is", "returned", "." ]
[ "'''Tests the correct column is returned.\n\t\tTests that the correct error is raised if the requested index is out of bounds'''", "#Test getting column", "#Test fail", "#Check its a tuple" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testCompare
null
def testCompare(self): '''Test that matrices with identical data compare as equal''' newMatrix = Matrix.Matrix(rows=lists, headers=headers) self.assertEqual(self.matrix, newMatrix) #Not equal test self.assertNotEqual(self.matrix, None)
Test that matrices with identical data compare as equal
Test that matrices with identical data compare as equal
[ "Test", "that", "matrices", "with", "identical", "data", "compare", "as", "equal" ]
def testCompare(self): newMatrix = Matrix.Matrix(rows=lists, headers=headers) self.assertEqual(self.matrix, newMatrix) self.assertNotEqual(self.matrix, None)
[ "def", "testCompare", "(", "self", ")", ":", "newMatrix", "=", "Matrix", ".", "Matrix", "(", "rows", "=", "lists", ",", "headers", "=", "headers", ")", "self", ".", "assertEqual", "(", "self", ".", "matrix", ",", "newMatrix", ")", "self", ".", "assertN...
Test that matrices with identical data compare as equal
[ "Test", "that", "matrices", "with", "identical", "data", "compare", "as", "equal" ]
[ "'''Test that matrices with identical data compare as equal'''", "#Not equal test" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testGetColumnForHeader
null
def testGetColumnForHeader(self): '''Tests correct column is returned for specified header Tests reponse when a non-existant header is supplied''' column = self.matrix.columnWithHeader("Header2") self.assertEqual( (2, 34.66), column) #Test if the header doesn't exist column = self.matrix.columnWithH...
Tests correct column is returned for specified header Tests reponse when a non-existant header is supplied
Tests correct column is returned for specified header Tests reponse when a non-existant header is supplied
[ "Tests", "correct", "column", "is", "returned", "for", "specified", "header", "Tests", "reponse", "when", "a", "non", "-", "existant", "header", "is", "supplied" ]
def testGetColumnForHeader(self): column = self.matrix.columnWithHeader("Header2") self.assertEqual( (2, 34.66), column) column = self.matrix.columnWithHeader("Non-existant header") self.assertEqual(None, column)
[ "def", "testGetColumnForHeader", "(", "self", ")", ":", "column", "=", "self", ".", "matrix", ".", "columnWithHeader", "(", "\"Header2\"", ")", "self", ".", "assertEqual", "(", "(", "2", ",", "34.66", ")", ",", "column", ")", "column", "=", "self", ".", ...
Tests correct column is returned for specified header Tests reponse when a non-existant header is supplied
[ "Tests", "correct", "column", "is", "returned", "for", "specified", "header", "Tests", "reponse", "when", "a", "non", "-", "existant", "header", "is", "supplied" ]
[ "'''Tests correct column is returned for specified header\n\t\tTests reponse when a non-existant header is supplied'''", "#Test if the header doesn't exist" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testSetColumnHeaders
null
def testSetColumnHeaders(self): '''Tests setting new headers for all columns.''' newHeaders = ("Col 1", "Col 2") self.matrix.setColumnHeaders(newHeaders) retval = self.matrix.columnHeaders() self.assertEqual(retval, newHeaders) #Check if fails if the incorrect number of headers are supplied newHead...
Tests setting new headers for all columns.
Tests setting new headers for all columns.
[ "Tests", "setting", "new", "headers", "for", "all", "columns", "." ]
def testSetColumnHeaders(self): newHeaders = ("Col 1", "Col 2") self.matrix.setColumnHeaders(newHeaders) retval = self.matrix.columnHeaders() self.assertEqual(retval, newHeaders) newHeaders = ("Col 1", "Col 2", "Extra") self.assertRaises(IndexError, self.matrix.setColumnHeaders, newHeaders)
[ "def", "testSetColumnHeaders", "(", "self", ")", ":", "newHeaders", "=", "(", "\"Col 1\"", ",", "\"Col 2\"", ")", "self", ".", "matrix", ".", "setColumnHeaders", "(", "newHeaders", ")", "retval", "=", "self", ".", "matrix", ".", "columnHeaders", "(", ")", ...
Tests setting new headers for all columns.
[ "Tests", "setting", "new", "headers", "for", "all", "columns", "." ]
[ "'''Tests setting new headers for all columns.'''", "#Check if fails if the incorrect number of headers are supplied" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testSetColumnHeader
null
def testSetColumnHeader(self): '''Tests setting a column header to a new value''' newHeader = "New Head" self.matrix.setColumnHeader(header=newHeader, index=1) header = self.matrix.headerForColumn(1) self.assertEqual(newHeader, header) #Check fail self.assertRaises(IndexError, self.matrix.setColum...
Tests setting a column header to a new value
Tests setting a column header to a new value
[ "Tests", "setting", "a", "column", "header", "to", "a", "new", "value" ]
def testSetColumnHeader(self): newHeader = "New Head" self.matrix.setColumnHeader(header=newHeader, index=1) header = self.matrix.headerForColumn(1) self.assertEqual(newHeader, header) self.assertRaises(IndexError, self.matrix.setColumnHeader, header=newHeader, index=10)
[ "def", "testSetColumnHeader", "(", "self", ")", ":", "newHeader", "=", "\"New Head\"", "self", ".", "matrix", ".", "setColumnHeader", "(", "header", "=", "newHeader", ",", "index", "=", "1", ")", "header", "=", "self", ".", "matrix", ".", "headerForColumn", ...
Tests setting a column header to a new value
[ "Tests", "setting", "a", "column", "header", "to", "a", "new", "value" ]
[ "'''Tests setting a column header to a new value'''", "#Check fail" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testIndexForColumn
null
def testIndexForColumn(self): '''Tests getting the index of the column associated with a given header''' index = self.matrix.indexOfColumnWithHeader("Header2") self.assertEqual(index, 1) self.assertRaises(ValueError, self.matrix.indexOfColumnWithHeader, "Non existant header")
Tests getting the index of the column associated with a given header
Tests getting the index of the column associated with a given header
[ "Tests", "getting", "the", "index", "of", "the", "column", "associated", "with", "a", "given", "header" ]
def testIndexForColumn(self): index = self.matrix.indexOfColumnWithHeader("Header2") self.assertEqual(index, 1) self.assertRaises(ValueError, self.matrix.indexOfColumnWithHeader, "Non existant header")
[ "def", "testIndexForColumn", "(", "self", ")", ":", "index", "=", "self", ".", "matrix", ".", "indexOfColumnWithHeader", "(", "\"Header2\"", ")", "self", ".", "assertEqual", "(", "index", ",", "1", ")", "self", ".", "assertRaises", "(", "ValueError", ",", ...
Tests getting the index of the column associated with a given header
[ "Tests", "getting", "the", "index", "of", "the", "column", "associated", "with", "a", "given", "header" ]
[ "'''Tests getting the index of the column associated with a given header'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testReadCSV
null
def testReadCSV(self): '''Tests if a matrix can be properly initialised from a csv file''' #Test can read csv files produce by the class itself string = self.matrix.csvRepresentation() file = open('temp', 'w') file.write(string) file.close() matrix = Matrix.matrixFromCSVFile('temp') self.asser...
Tests if a matrix can be properly initialised from a csv file
Tests if a matrix can be properly initialised from a csv file
[ "Tests", "if", "a", "matrix", "can", "be", "properly", "initialised", "from", "a", "csv", "file" ]
def testReadCSV(self): string = self.matrix.csvRepresentation() file = open('temp', 'w') file.write(string) file.close() matrix = Matrix.matrixFromCSVFile('temp') self.assertEqual(matrix, self.matrix) os.remove('temp') file = open('temp', 'w') file.write(testCSVString) file.close() matrix = Matrix...
[ "def", "testReadCSV", "(", "self", ")", ":", "string", "=", "self", ".", "matrix", ".", "csvRepresentation", "(", ")", "file", "=", "open", "(", "'temp'", ",", "'w'", ")", "file", ".", "write", "(", "string", ")", "file", ".", "close", "(", ")", "m...
Tests if a matrix can be properly initialised from a csv file
[ "Tests", "if", "a", "matrix", "can", "be", "properly", "initialised", "from", "a", "csv", "file" ]
[ "'''Tests if a matrix can be properly initialised from a csv file'''", "#Test can read csv files produce by the class itself", "#Test initialisation for a csv file not in the same format", "#as the one created by the Matrix class", "#Test it works when told not to read header", "#Clean up" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testCSVRepresentation
null
def testCSVRepresentation(self): '''Tests the csv representation returned by the object is whats expected''' string = "Header1, Header2\n1, 2\nmichael, 34.66\n" self.assertEqual(string, self.matrix.csvRepresentation())
Tests the csv representation returned by the object is whats expected
Tests the csv representation returned by the object is whats expected
[ "Tests", "the", "csv", "representation", "returned", "by", "the", "object", "is", "whats", "expected" ]
def testCSVRepresentation(self): string = "Header1, Header2\n1, 2\nmichael, 34.66\n" self.assertEqual(string, self.matrix.csvRepresentation())
[ "def", "testCSVRepresentation", "(", "self", ")", ":", "string", "=", "\"Header1, Header2\\n1, 2\\nmichael, 34.66\\n\"", "self", ".", "assertEqual", "(", "string", ",", "self", ".", "matrix", ".", "csvRepresentation", "(", ")", ")" ]
Tests the csv representation returned by the object is whats expected
[ "Tests", "the", "csv", "representation", "returned", "by", "the", "object", "is", "whats", "expected" ]
[ "'''Tests the csv representation returned by the object is whats expected'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testArchiving
null
def testArchiving(self): '''Tests that archiving a matrix and then reading it back produces the same matrix''' filename = 'temp' self.matrix.writeToFile('temp') newMatrix = Matrix.matrixFromFile(filename) os.remove(filename) self.assertEqual(newMatrix, self.matrix)
Tests that archiving a matrix and then reading it back produces the same matrix
Tests that archiving a matrix and then reading it back produces the same matrix
[ "Tests", "that", "archiving", "a", "matrix", "and", "then", "reading", "it", "back", "produces", "the", "same", "matrix" ]
def testArchiving(self): filename = 'temp' self.matrix.writeToFile('temp') newMatrix = Matrix.matrixFromFile(filename) os.remove(filename) self.assertEqual(newMatrix, self.matrix)
[ "def", "testArchiving", "(", "self", ")", ":", "filename", "=", "'temp'", "self", ".", "matrix", ".", "writeToFile", "(", "'temp'", ")", "newMatrix", "=", "Matrix", ".", "matrixFromFile", "(", "filename", ")", "os", ".", "remove", "(", "filename", ")", "...
Tests that archiving a matrix and then reading it back produces the same matrix
[ "Tests", "that", "archiving", "a", "matrix", "and", "then", "reading", "it", "back", "produces", "the", "same", "matrix" ]
[ "'''Tests that archiving a matrix and then reading it back produces the same matrix'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testDescription
null
def testDescription(self): '''Tests the matrix description string is whats expected''' string = "Matrix with 2 rows and 2 columns - 4 elements in total" self.assertEqual(string, self.matrix.description())
Tests the matrix description string is whats expected
Tests the matrix description string is whats expected
[ "Tests", "the", "matrix", "description", "string", "is", "whats", "expected" ]
def testDescription(self): string = "Matrix with 2 rows and 2 columns - 4 elements in total" self.assertEqual(string, self.matrix.description())
[ "def", "testDescription", "(", "self", ")", ":", "string", "=", "\"Matrix with 2 rows and 2 columns - 4 elements in total\"", "self", ".", "assertEqual", "(", "string", ",", "self", ".", "matrix", ".", "description", "(", ")", ")" ]
Tests the matrix description string is whats expected
[ "Tests", "the", "matrix", "description", "string", "is", "whats", "expected" ]
[ "'''Tests the matrix description string is whats expected'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testRowMutability
null
def testRowMutability(self): '''Checks that matrix copies row additions so they can't be changed externally''' myRow = [1,12342] self.matrix.addRow(myRow) myRow.pop() self.assertEqual(self.matrix.row(2), tuple([1,12342]))
Checks that matrix copies row additions so they can't be changed externally
Checks that matrix copies row additions so they can't be changed externally
[ "Checks", "that", "matrix", "copies", "row", "additions", "so", "they", "can", "'", "t", "be", "changed", "externally" ]
def testRowMutability(self): myRow = [1,12342] self.matrix.addRow(myRow) myRow.pop() self.assertEqual(self.matrix.row(2), tuple([1,12342]))
[ "def", "testRowMutability", "(", "self", ")", ":", "myRow", "=", "[", "1", ",", "12342", "]", "self", ".", "matrix", ".", "addRow", "(", "myRow", ")", "myRow", ".", "pop", "(", ")", "self", ".", "assertEqual", "(", "self", ".", "matrix", ".", "row"...
Checks that matrix copies row additions so they can't be changed externally
[ "Checks", "that", "matrix", "copies", "row", "additions", "so", "they", "can", "'", "t", "be", "changed", "externally" ]
[ "'''Checks that matrix copies row additions so they can't be changed externally'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testInitialisationMutability
null
def testInitialisationMutability(self): '''Checks that matrix copies the data passed on initialisation so it can't be changed externally''' #Remove the last row from the list lists.pop() #Check the last row still exists in the matrix and check it has correct data self.assertEqual(self.matrix.row(1),...
Checks that matrix copies the data passed on initialisation so it can't be changed externally
Checks that matrix copies the data passed on initialisation so it can't be changed externally
[ "Checks", "that", "matrix", "copies", "the", "data", "passed", "on", "initialisation", "so", "it", "can", "'", "t", "be", "changed", "externally" ]
def testInitialisationMutability(self): lists.pop() self.assertEqual(self.matrix.row(1), tuple(["michael", 34.66])) lists.append(["michael", 34.66])
[ "def", "testInitialisationMutability", "(", "self", ")", ":", "lists", ".", "pop", "(", ")", "self", ".", "assertEqual", "(", "self", ".", "matrix", ".", "row", "(", "1", ")", ",", "tuple", "(", "[", "\"michael\"", ",", "34.66", "]", ")", ")", "lists...
Checks that matrix copies the data passed on initialisation so it can't be changed externally
[ "Checks", "that", "matrix", "copies", "the", "data", "passed", "on", "initialisation", "so", "it", "can", "'", "t", "be", "changed", "externally" ]
[ "'''Checks that matrix copies the data passed on initialisation so it can't be changed externally'''", "#Remove the last row from the list", "#Check the last row still exists in the matrix and check it has correct data", "#Add it again for other tests", "#NOTE: If the above test fails then so will others si...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
1a16422766987701fc190bf401cd2d9c7f11ed5f
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestMatrix.py
[ "MIT" ]
Python
testColumnAttributeAccess
null
def testColumnAttributeAccess(self): '''Test we can access a column as an attribute using its header''' column = self.matrix.Header1 self.assertEqual(self.matrix.columnWithHeader('Header1'), column)
Test we can access a column as an attribute using its header
Test we can access a column as an attribute using its header
[ "Test", "we", "can", "access", "a", "column", "as", "an", "attribute", "using", "its", "header" ]
def testColumnAttributeAccess(self): column = self.matrix.Header1 self.assertEqual(self.matrix.columnWithHeader('Header1'), column)
[ "def", "testColumnAttributeAccess", "(", "self", ")", ":", "column", "=", "self", ".", "matrix", ".", "Header1", "self", ".", "assertEqual", "(", "self", ".", "matrix", ".", "columnWithHeader", "(", "'Header1'", ")", ",", "column", ")" ]
Test we can access a column as an attribute using its header
[ "Test", "we", "can", "access", "a", "column", "as", "an", "attribute", "using", "its", "header" ]
[ "'''Test we can access a column as an attribute using its header'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
67d7973f3f911359f18c0a5633fdfeb91a9ffb14
shambo001/peat
pKarun/pKa_general.py
[ "MIT" ]
Python
analyse_stability
<not_specific>
def analyse_stability(self,folded,unfolded=0,absolute=False,write_file=True): """ # folded is a dictionary containing the titration # curves for all residues in the protein. (Normally # the self.titdata produced by pKaIO.readtitcurv). # unfolded is a similar dictionary, containin...
# folded is a dictionary containing the titration # curves for all residues in the protein. (Normally # the self.titdata produced by pKaIO.readtitcurv). # unfolded is a similar dictionary, containing the # titration curves for the unfolded form. If no unfolded # dictiona...
folded is a dictionary containing the titration curves for all residues in the protein.
[ "folded", "is", "a", "dictionary", "containing", "the", "titration", "curves", "for", "all", "residues", "in", "the", "protein", "." ]
def analyse_stability(self,folded,unfolded=0,absolute=False,write_file=True): import string, math residues=folded.keys() checkedres=[] for res in residues: if string.strip(string.lower(res))!='pka': checkedres.append(res) residues=checkedres if...
[ "def", "analyse_stability", "(", "self", ",", "folded", ",", "unfolded", "=", "0", ",", "absolute", "=", "False", ",", "write_file", "=", "True", ")", ":", "import", "string", ",", "math", "residues", "=", "folded", ".", "keys", "(", ")", "checkedres", ...
folded is a dictionary containing the titration curves for all residues in the protein.
[ "folded", "is", "a", "dictionary", "containing", "the", "titration", "curves", "for", "all", "residues", "in", "the", "protein", "." ]
[ "\"\"\"\n # folded is a dictionary containing the titration\n # curves for all residues in the protein. (Normally\n # the self.titdata produced by pKaIO.readtitcurv).\n # unfolded is a similar dictionary, containing the\n # titration curves for the unfolded form. If no unfolded\n ...
[ { "param": "self", "type": null }, { "param": "folded", "type": null }, { "param": "unfolded", "type": null }, { "param": "absolute", "type": null }, { "param": "write_file", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "folded", "type": null, "docstring": null, "docstring_tokens":...
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
_getmethods
<not_specific>
def _getmethods(self): """Get a list of all available public methods""" import inspect mems = inspect.getmembers(self, inspect.ismethod) methods = [m for m in mems if not m[0].startswith('_')] return methods
Get a list of all available public methods
Get a list of all available public methods
[ "Get", "a", "list", "of", "all", "available", "public", "methods" ]
def _getmethods(self): import inspect mems = inspect.getmembers(self, inspect.ismethod) methods = [m for m in mems if not m[0].startswith('_')] return methods
[ "def", "_getmethods", "(", "self", ")", ":", "import", "inspect", "mems", "=", "inspect", ".", "getmembers", "(", "self", ",", "inspect", ".", "ismethod", ")", "methods", "=", "[", "m", "for", "m", "in", "mems", "if", "not", "m", "[", "0", "]", "."...
Get a list of all available public methods
[ "Get", "a", "list", "of", "all", "available", "public", "methods" ]
[ "\"\"\"Get a list of all available public methods\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
_createButtons
<not_specific>
def _createButtons(self, methods, fr=None): """Dynamically create buttons for supplied methods, which is a tuple of (method name, label)""" for m in methods: b=Button(fr,text=self.gui_methods[m[0]],command=m[1]) b.pack(side=TOP,fill=BOTH) return
Dynamically create buttons for supplied methods, which is a tuple of (method name, label)
Dynamically create buttons for supplied methods, which is a tuple of (method name, label)
[ "Dynamically", "create", "buttons", "for", "supplied", "methods", "which", "is", "a", "tuple", "of", "(", "method", "name", "label", ")" ]
def _createButtons(self, methods, fr=None): for m in methods: b=Button(fr,text=self.gui_methods[m[0]],command=m[1]) b.pack(side=TOP,fill=BOTH) return
[ "def", "_createButtons", "(", "self", ",", "methods", ",", "fr", "=", "None", ")", ":", "for", "m", "in", "methods", ":", "b", "=", "Button", "(", "fr", ",", "text", "=", "self", ".", "gui_methods", "[", "m", "[", "0", "]", "]", ",", "command", ...
Dynamically create buttons for supplied methods, which is a tuple of (method name, label)
[ "Dynamically", "create", "buttons", "for", "supplied", "methods", "which", "is", "a", "tuple", "of", "(", "method", "name", "label", ")" ]
[ "\"\"\"Dynamically create buttons for supplied methods, which is a tuple\n of (method name, label)\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "methods", "type": null }, { "param": "fr", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "methods", "type": null, "docstring": null, "docstring_tokens"...
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
transformCD
<not_specific>
def transformCD(self,x,y,transwidth=None,ax=None): """Transform raw data into fraction unfolded per temp value, by fitting to a general unfolding equation that extracts baseline/slopes""" #fit baseline slopes and get intercepts d50 = self.guessMidpoint(x,y) print 'fitting to ...
Transform raw data into fraction unfolded per temp value, by fitting to a general unfolding equation that extracts baseline/slopes
Transform raw data into fraction unfolded per temp value, by fitting to a general unfolding equation that extracts baseline/slopes
[ "Transform", "raw", "data", "into", "fraction", "unfolded", "per", "temp", "value", "by", "fitting", "to", "a", "general", "unfolding", "equation", "that", "extracts", "baseline", "/", "slopes" ]
def transformCD(self,x,y,transwidth=None,ax=None): d50 = self.guessMidpoint(x,y) print 'fitting to get baseline slopes and intercepts..' print 'midpoint is %s' %d50 A,X=Fitting.doFit(expdata=zip(x,y),model='Unfolding',noiter=50,silent=True, guess=False,startval...
[ "def", "transformCD", "(", "self", ",", "x", ",", "y", ",", "transwidth", "=", "None", ",", "ax", "=", "None", ")", ":", "d50", "=", "self", ".", "guessMidpoint", "(", "x", ",", "y", ")", "print", "'fitting to get baseline slopes and intercepts..'", "print...
Transform raw data into fraction unfolded per temp value, by fitting to a general unfolding equation that extracts baseline/slopes
[ "Transform", "raw", "data", "into", "fraction", "unfolded", "per", "temp", "value", "by", "fitting", "to", "a", "general", "unfolding", "equation", "that", "extracts", "baseline", "/", "slopes" ]
[ "\"\"\"Transform raw data into fraction unfolded per temp value, by fitting to\n a general unfolding equation that extracts baseline/slopes\"\"\"", "#fit baseline slopes and get intercepts", "#print X.getResult()", "#we then use slopes and intercepts get frac unfolded at each temp", "#slopes", ...
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "transwidth", "type": null }, { "param": "ax", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
fitVantHoff
<not_specific>
def fitVantHoff(self, E=None, d=None, xy=None, transwidth=80, invert=False, show=True, figname=None): """Derive fraction unfolded, get K and fit to Van't Hoff. see http://www.jbc.org/content/277/43/40717.full or http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2144003/ ...
Derive fraction unfolded, get K and fit to Van't Hoff. see http://www.jbc.org/content/277/43/40717.full or http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2144003/
Derive fraction unfolded, get K and fit to Van't Hoff.
[ "Derive", "fraction", "unfolded", "get", "K", "and", "fit", "to", "Van", "'", "t", "Hoff", "." ]
def fitVantHoff(self, E=None, d=None, xy=None, transwidth=80, invert=False, show=True, figname=None): if E != None: if not d in E.datasets: print 'no such dataset, %s' %d print 'available datasets:', E.datasets return ...
[ "def", "fitVantHoff", "(", "self", ",", "E", "=", "None", ",", "d", "=", "None", ",", "xy", "=", "None", ",", "transwidth", "=", "80", ",", "invert", "=", "False", ",", "show", "=", "True", ",", "figname", "=", "None", ")", ":", "if", "E", "!="...
Derive fraction unfolded, get K and fit to Van't Hoff.
[ "Derive", "fraction", "unfolded", "get", "K", "and", "fit", "to", "Van", "'", "t", "Hoff", "." ]
[ "\"\"\"Derive fraction unfolded, get K and fit to Van't Hoff.\n see http://www.jbc.org/content/277/43/40717.full\n or http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2144003/\n \"\"\"", "#derive lnK vs 1/T", "#(r'$1/T ($K^-1)$')", "#fit this van't hoff plot", "#self.drawParams(ax,fd)"...
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "d", "type": null }, { "param": "xy", "type": null }, { "param": "transwidth", "type": null }, { "param": "invert", "type": null }, { "param": "show", "type":...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E", "type": null, "docstring": null, "docstring_tokens": [], ...
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
fitElwellSchellman
<not_specific>
def fitElwellSchellman(self,E=None, d=None, xy=None,transwidth=50, invert=False,show=True,figname=None): """Fit entire raw data simultaneously to the three main thermodynamic parameters using Elwell/Schellman method""" if E !=None: ek = E.getDataset...
Fit entire raw data simultaneously to the three main thermodynamic parameters using Elwell/Schellman method
Fit entire raw data simultaneously to the three main thermodynamic parameters using Elwell/Schellman method
[ "Fit", "entire", "raw", "data", "simultaneously", "to", "the", "three", "main", "thermodynamic", "parameters", "using", "Elwell", "/", "Schellman", "method" ]
def fitElwellSchellman(self,E=None, d=None, xy=None,transwidth=50, invert=False,show=True,figname=None): if E !=None: ek = E.getDataset(d) x,y,a, xerr,yerr = ek.getAll() elif xy!=None: x,y = xy else: return i...
[ "def", "fitElwellSchellman", "(", "self", ",", "E", "=", "None", ",", "d", "=", "None", ",", "xy", "=", "None", ",", "transwidth", "=", "50", ",", "invert", "=", "False", ",", "show", "=", "True", ",", "figname", "=", "None", ")", ":", "if", "E",...
Fit entire raw data simultaneously to the three main thermodynamic parameters using Elwell/Schellman method
[ "Fit", "entire", "raw", "data", "simultaneously", "to", "the", "three", "main", "thermodynamic", "parameters", "using", "Elwell", "/", "Schellman", "method" ]
[ "\"\"\"Fit entire raw data simultaneously to the three main thermodynamic\n parameters using Elwell/Schellman method\"\"\"", "#E.saveProject()" ]
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "d", "type": null }, { "param": "xy", "type": null }, { "param": "transwidth", "type": null }, { "param": "invert", "type": null }, { "param": "show", "type":...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E", "type": null, "docstring": null, "docstring_tokens": [], ...
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
fitDifferentialCurve
<not_specific>
def fitDifferentialCurve(self, E=None, d=None, xy=None,smooth=0, invert=False,show=True,figname=None): """Derive differential denaturation curve and fit to get deltaH We smooth the unfolding curve and then differentiate and finally fit to a 3 parameter equat...
Derive differential denaturation curve and fit to get deltaH We smooth the unfolding curve and then differentiate and finally fit to a 3 parameter equation. See http://www.ncbi.nlm.nih.gov/pubmed/10933511
Derive differential denaturation curve and fit to get deltaH We smooth the unfolding curve and then differentiate and finally fit to a 3 parameter equation.
[ "Derive", "differential", "denaturation", "curve", "and", "fit", "to", "get", "deltaH", "We", "smooth", "the", "unfolding", "curve", "and", "then", "differentiate", "and", "finally", "fit", "to", "a", "3", "parameter", "equation", "." ]
def fitDifferentialCurve(self, E=None, d=None, xy=None,smooth=0, invert=False,show=True,figname=None): if E !=None: ek = E.getDataset(d) x,y,a, xerr,yerr = ek.getAll() elif xy!=None: x,y = xy else: return if ...
[ "def", "fitDifferentialCurve", "(", "self", ",", "E", "=", "None", ",", "d", "=", "None", ",", "xy", "=", "None", ",", "smooth", "=", "0", ",", "invert", "=", "False", ",", "show", "=", "True", ",", "figname", "=", "None", ")", ":", "if", "E", ...
Derive differential denaturation curve and fit to get deltaH We smooth the unfolding curve and then differentiate and finally fit to a 3 parameter equation.
[ "Derive", "differential", "denaturation", "curve", "and", "fit", "to", "get", "deltaH", "We", "smooth", "the", "unfolding", "curve", "and", "then", "differentiate", "and", "finally", "fit", "to", "a", "3", "parameter", "equation", "." ]
[ "\"\"\"Derive differential denaturation curve and fit to get deltaH\n We smooth the unfolding curve and then differentiate and finally\n fit to a 3 parameter equation.\n See http://www.ncbi.nlm.nih.gov/pubmed/10933511\"\"\"", "#smooth", "#differentiate", "#ds = [i/max(ds) for i i...
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "d", "type": null }, { "param": "xy", "type": null }, { "param": "smooth", "type": null }, { "param": "invert", "type": null }, { "param": "show", "type": nul...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "E", "type": null, "docstring": null, "docstring_tokens": [], ...
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
benchmark
<not_specific>
def benchmark(self,E=None,d=None, method=1): """Test methods with varying paramaters, smoothing etc""" if E==None and self.E != None: E = self.E; d=self.dmenu.getcurselection() path='vh_benchmark' if not os.path.exists(path): os.mkdir(path) dHvals=[] ...
Test methods with varying paramaters, smoothing etc
Test methods with varying paramaters, smoothing etc
[ "Test", "methods", "with", "varying", "paramaters", "smoothing", "etc" ]
def benchmark(self,E=None,d=None, method=1): if E==None and self.E != None: E = self.E; d=self.dmenu.getcurselection() path='vh_benchmark' if not os.path.exists(path): os.mkdir(path) dHvals=[] if method == 1: xlabel = 'width (K)' ti...
[ "def", "benchmark", "(", "self", ",", "E", "=", "None", ",", "d", "=", "None", ",", "method", "=", "1", ")", ":", "if", "E", "==", "None", "and", "self", ".", "E", "!=", "None", ":", "E", "=", "self", ".", "E", ";", "d", "=", "self", ".", ...
Test methods with varying paramaters, smoothing etc
[ "Test", "methods", "with", "varying", "paramaters", "smoothing", "etc" ]
[ "\"\"\"Test methods with varying paramaters, smoothing etc\"\"\"", "#take best values from middle", "#dHvals= dHvals[5:16]" ]
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "d", "type": null }, { "param": "method", "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": [], ...
8ed21ed04955dd21f4c3754430435b5092cb9811
shambo001/peat
PEATDB/plugins/VantHoffAnalysis.py
[ "MIT" ]
Python
benchmarkLimitedData
<not_specific>
def benchmarkLimitedData(self, E=None,d=None, method=1): """test any method with varying limited data""" if E==None and self.E != None: E = self.E; d=self.dmenu.getcurselection() path='vh_benchmark' if not os.path.exists(path): os.mkdir(path) dHvals=[] ...
test any method with varying limited data
test any method with varying limited data
[ "test", "any", "method", "with", "varying", "limited", "data" ]
def benchmarkLimitedData(self, E=None,d=None, method=1): if E==None and self.E != None: E = self.E; d=self.dmenu.getcurselection() path='vh_benchmark' if not os.path.exists(path): os.mkdir(path) dHvals=[] vals=[] if method == 1: L=range...
[ "def", "benchmarkLimitedData", "(", "self", ",", "E", "=", "None", ",", "d", "=", "None", ",", "method", "=", "1", ")", ":", "if", "E", "==", "None", "and", "self", ".", "E", "!=", "None", ":", "E", "=", "self", ".", "E", ";", "d", "=", "self...
test any method with varying limited data
[ "test", "any", "method", "with", "varying", "limited", "data" ]
[ "\"\"\"test any method with varying limited data\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "E", "type": null }, { "param": "d", "type": null }, { "param": "method", "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": [], ...
eeda8c48c36fe78083c185cf9a0c5801ba5df9ae
shambo001/peat
PEATDB/plugins/exampleplugin.py
[ "MIT" ]
Python
_createButtons
<not_specific>
def _createButtons(self, methods): """Dynamically create buttons for supplied methods""" for m in methods: b=Button(self.mainwin,text=m[0],command=m[1]) b.pack( side=TOP,fill=BOTH) return
Dynamically create buttons for supplied methods
Dynamically create buttons for supplied methods
[ "Dynamically", "create", "buttons", "for", "supplied", "methods" ]
def _createButtons(self, methods): for m in methods: b=Button(self.mainwin,text=m[0],command=m[1]) b.pack( side=TOP,fill=BOTH) return
[ "def", "_createButtons", "(", "self", ",", "methods", ")", ":", "for", "m", "in", "methods", ":", "b", "=", "Button", "(", "self", ".", "mainwin", ",", "text", "=", "m", "[", "0", "]", ",", "command", "=", "m", "[", "1", "]", ")", "b", ".", "...
Dynamically create buttons for supplied methods
[ "Dynamically", "create", "buttons", "for", "supplied", "methods" ]
[ "\"\"\"Dynamically create buttons for supplied methods\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "methods", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "methods", "type": null, "docstring": null, "docstring_tokens"...
eeda8c48c36fe78083c185cf9a0c5801ba5df9ae
shambo001/peat
PEATDB/plugins/exampleplugin.py
[ "MIT" ]
Python
_createMenuBar
<not_specific>
def _createMenuBar(self): """Create the menu bar for the application. """ self.menu=Menu(self.mainwin) self.file_menu={ '01Quit':{'cmd':self.quit}} self.file_menu=self.create_pulldown(self.menu,self.file_menu) self.menu.add_cascade(label='File',menu=self.file_menu['var']) ...
Create the menu bar for the application.
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
def _createMenuBar(self): self.menu=Menu(self.mainwin) self.file_menu={ '01Quit':{'cmd':self.quit}} self.file_menu=self.create_pulldown(self.menu,self.file_menu) self.menu.add_cascade(label='File',menu=self.file_menu['var']) self.mainwin.config(menu=self.menu) return
[ "def", "_createMenuBar", "(", "self", ")", ":", "self", ".", "menu", "=", "Menu", "(", "self", ".", "mainwin", ")", "self", ".", "file_menu", "=", "{", "'01Quit'", ":", "{", "'cmd'", ":", "self", ".", "quit", "}", "}", "self", ".", "file_menu", "="...
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
[ "\"\"\"Create the menu bar for the application. \"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ee0042dc7fc90b225f87c5a605c78c0050e5b8f9
shambo001/peat
pKaTool/explore/analyze_pHact.py
[ "MIT" ]
Python
fit_curves
<not_specific>
def fit_curves(self,curves): """Fit the titration curves to the HH equation""" error=[] import string, pKarun, pKarun.pKa_general PKana=pKarun.pKa_general.pKanalyse() for group in curves.keys(): solution,sq=PKana.fit_to_henderson(curves[group]) sq=solution...
Fit the titration curves to the HH equation
Fit the titration curves to the HH equation
[ "Fit", "the", "titration", "curves", "to", "the", "HH", "equation" ]
def fit_curves(self,curves): error=[] import string, pKarun, pKarun.pKa_general PKana=pKarun.pKa_general.pKanalyse() for group in curves.keys(): solution,sq=PKana.fit_to_henderson(curves[group]) sq=solution[0] try: sq=float(sq) ...
[ "def", "fit_curves", "(", "self", ",", "curves", ")", ":", "error", "=", "[", "]", "import", "string", ",", "pKarun", ",", "pKarun", ".", "pKa_general", "PKana", "=", "pKarun", ".", "pKa_general", ".", "pKanalyse", "(", ")", "for", "group", "in", "curv...
Fit the titration curves to the HH equation
[ "Fit", "the", "titration", "curves", "to", "the", "HH", "equation" ]
[ "\"\"\"Fit the titration curves to the HH equation\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "curves", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "curves", "type": null, "docstring": null, "docstring_tokens":...
3d34b7dcdeb0a22ac3cea5d9beb423f796ae2882
shambo001/peat
Protool/contact_order.py
[ "MIT" ]
Python
calculate_RCO
<not_specific>
def calculate_RCO(self,ss=False,elec_CO=False): """Calculate the relative contact order for the soup. Setting ss to True will lead to the sequence distance being determine using SS bridges""" cutoff=6.0 contacts={} done={} if hasattr(self,'sep_results'): delattr(self,...
Calculate the relative contact order for the soup. Setting ss to True will lead to the sequence distance being determine using SS bridges
Calculate the relative contact order for the soup. Setting ss to True will lead to the sequence distance being determine using SS bridges
[ "Calculate", "the", "relative", "contact", "order", "for", "the", "soup", ".", "Setting", "ss", "to", "True", "will", "lead", "to", "the", "sequence", "distance", "being", "determine", "using", "SS", "bridges" ]
def calculate_RCO(self,ss=False,elec_CO=False): cutoff=6.0 contacts={} done={} if hasattr(self,'sep_results'): delattr(self,'sep_results') for residue1 in sorted(self.residues.keys()): print residue1, import sys if elec_CO: ...
[ "def", "calculate_RCO", "(", "self", ",", "ss", "=", "False", ",", "elec_CO", "=", "False", ")", ":", "cutoff", "=", "6.0", "contacts", "=", "{", "}", "done", "=", "{", "}", "if", "hasattr", "(", "self", ",", "'sep_results'", ")", ":", "delattr", "...
Calculate the relative contact order for the soup.
[ "Calculate", "the", "relative", "contact", "order", "for", "the", "soup", "." ]
[ "\"\"\"Calculate the relative contact order for the soup. Setting ss to True will lead to the sequence distance being determine using SS bridges\"\"\"", "#", "#", "# Calculate the contact order", "#", "#print contacts", "#/float(len(contacts[res]))" ]
[ { "param": "self", "type": null }, { "param": "ss", "type": null }, { "param": "elec_CO", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ss", "type": null, "docstring": null, "docstring_tokens": [],...
3d34b7dcdeb0a22ac3cea5d9beb423f796ae2882
shambo001/peat
Protool/contact_order.py
[ "MIT" ]
Python
res_separation
<not_specific>
def res_separation(self,ID1,ID2,ss=False): """Get the number of residues between the two IDs""" #print 'Finding shortest route between',ID1,ID2 res1=self.resid(ID1) res2=self.resid(ID2) # # Keep a dictionary of results # if not hasattr(self,'sep_results'):...
Get the number of residues between the two IDs
Get the number of residues between the two IDs
[ "Get", "the", "number", "of", "residues", "between", "the", "two", "IDs" ]
def res_separation(self,ID1,ID2,ss=False): res1=self.resid(ID1) res2=self.resid(ID2) Keep a dictionary of results if not hasattr(self,'sep_results'): self.sep_results={} for r in self.residues.keys(): self.sep_results[r]={} if self.sep_res...
[ "def", "res_separation", "(", "self", ",", "ID1", ",", "ID2", ",", "ss", "=", "False", ")", ":", "res1", "=", "self", ".", "resid", "(", "ID1", ")", "res2", "=", "self", ".", "resid", "(", "ID2", ")", "if", "not", "hasattr", "(", "self", ",", "...
Get the number of residues between the two IDs
[ "Get", "the", "number", "of", "residues", "between", "the", "two", "IDs" ]
[ "\"\"\"Get the number of residues between the two IDs\"\"\"", "#print 'Finding shortest route between',ID1,ID2", "#", "# Keep a dictionary of results", "#", "#", "# Use Dijkstra's algorithm to find the shortest path between the two", "#", "# 1 is the distance between neighbours", "#", "# We have...
[ { "param": "self", "type": null }, { "param": "ID1", "type": null }, { "param": "ID2", "type": null }, { "param": "ss", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ID1", "type": null, "docstring": null, "docstring_tokens": []...
3d34b7dcdeb0a22ac3cea5d9beb423f796ae2882
shambo001/peat
Protool/contact_order.py
[ "MIT" ]
Python
calculate_residue_CO
<not_specific>
def calculate_residue_CO(self,residue1,ss=False): """Calculate the contact order for a single residue""" cutoff=6.0 contacts=[] for residue2 in sorted(self.residues.keys()): if residue1==residue2: continue try: if self.dist('%s:CA' ...
Calculate the contact order for a single residue
Calculate the contact order for a single residue
[ "Calculate", "the", "contact", "order", "for", "a", "single", "residue" ]
def calculate_residue_CO(self,residue1,ss=False): cutoff=6.0 contacts=[] for residue2 in sorted(self.residues.keys()): if residue1==residue2: continue try: if self.dist('%s:CA' %(residue1),'%s:CA' %(residue2))>25.0: cont...
[ "def", "calculate_residue_CO", "(", "self", ",", "residue1", ",", "ss", "=", "False", ")", ":", "cutoff", "=", "6.0", "contacts", "=", "[", "]", "for", "residue2", "in", "sorted", "(", "self", ".", "residues", ".", "keys", "(", ")", ")", ":", "if", ...
Calculate the contact order for a single residue
[ "Calculate", "the", "contact", "order", "for", "a", "single", "residue" ]
[ "\"\"\"Calculate the contact order for a single residue\"\"\"", "#", "# Calculate the contact order", "#", "#print contacts", "#RCO=sum(contacts)/float(len(contacts))", "#print 'RCO for residue: %5.3f' %RCO" ]
[ { "param": "self", "type": null }, { "param": "residue1", "type": null }, { "param": "ss", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "residue1", "type": null, "docstring": null, "docstring_tokens...
d2394c15c392f34fef9f7f44bfefdc67492f4d2c
shambo001/peat
Protool/assign_parameters.py
[ "MIT" ]
Python
clear_all_charges_and_radii
<not_specific>
def clear_all_charges_and_radii(self): """Set all charges to 0.0""" for atom in self.PI.atoms.keys(): self.PI.atoms[atom]['CHARGE']=0.0 self.PI.atoms[atom]['RADIUS']=0.0 return
Set all charges to 0.0
Set all charges to 0.0
[ "Set", "all", "charges", "to", "0", ".", "0" ]
def clear_all_charges_and_radii(self): for atom in self.PI.atoms.keys(): self.PI.atoms[atom]['CHARGE']=0.0 self.PI.atoms[atom]['RADIUS']=0.0 return
[ "def", "clear_all_charges_and_radii", "(", "self", ")", ":", "for", "atom", "in", "self", ".", "PI", ".", "atoms", ".", "keys", "(", ")", ":", "self", ".", "PI", ".", "atoms", "[", "atom", "]", "[", "'CHARGE'", "]", "=", "0.0", "self", ".", "PI", ...
Set all charges to 0.0
[ "Set", "all", "charges", "to", "0", ".", "0" ]
[ "\"\"\"Set all charges to 0.0\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
d2394c15c392f34fef9f7f44bfefdc67492f4d2c
shambo001/peat
Protool/assign_parameters.py
[ "MIT" ]
Python
assign_charge
null
def assign_charge(self,residue,template): """Assign charges to a residue based on the template""" atoms=self.PI.residues[residue] template=self.charges[template] for atom in template.keys(): PIatom='%s:%s' %(residue,atom) if self.PI.atoms.has_key(PIatom): ...
Assign charges to a residue based on the template
Assign charges to a residue based on the template
[ "Assign", "charges", "to", "a", "residue", "based", "on", "the", "template" ]
def assign_charge(self,residue,template): atoms=self.PI.residues[residue] template=self.charges[template] for atom in template.keys(): PIatom='%s:%s' %(residue,atom) if self.PI.atoms.has_key(PIatom): self.PI.atoms[PIatom]['CHARGE']=template[atom] ...
[ "def", "assign_charge", "(", "self", ",", "residue", ",", "template", ")", ":", "atoms", "=", "self", ".", "PI", ".", "residues", "[", "residue", "]", "template", "=", "self", ".", "charges", "[", "template", "]", "for", "atom", "in", "template", ".", ...
Assign charges to a residue based on the template
[ "Assign", "charges", "to", "a", "residue", "based", "on", "the", "template" ]
[ "\"\"\"Assign charges to a residue based on the template\"\"\"", "# We don't care about zero charges" ]
[ { "param": "self", "type": null }, { "param": "residue", "type": null }, { "param": "template", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "residue", "type": null, "docstring": null, "docstring_tokens"...
62c5ccd72d444a3d74d518942af864048647bbcd
shambo001/peat
pKaTool/pKa_system_micro2.py
[ "MIT" ]
Python
toggle_kcat_window
<not_specific>
def toggle_kcat_window(self): """Open or close the kcat window""" if self.kcat_window_visible.get()==0: self.kcat_window.destroy() else: self.init_kcat_array() self.kcat_window=Toplevel() self.kcat_window.title('kcats for microstates') ...
Open or close the kcat window
Open or close the kcat window
[ "Open", "or", "close", "the", "kcat", "window" ]
def toggle_kcat_window(self): if self.kcat_window_visible.get()==0: self.kcat_window.destroy() else: self.init_kcat_array() self.kcat_window=Toplevel() self.kcat_window.title('kcats for microstates') column=0 for label in ['State','...
[ "def", "toggle_kcat_window", "(", "self", ")", ":", "if", "self", ".", "kcat_window_visible", ".", "get", "(", ")", "==", "0", ":", "self", ".", "kcat_window", ".", "destroy", "(", ")", "else", ":", "self", ".", "init_kcat_array", "(", ")", "self", "."...
Open or close the kcat window
[ "Open", "or", "close", "the", "kcat", "window" ]
[ "\"\"\"Open or close the kcat window\"\"\"", "#", "# Button for updating the plot", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
62c5ccd72d444a3d74d518942af864048647bbcd
shambo001/peat
pKaTool/pKa_system_micro2.py
[ "MIT" ]
Python
init_kcat_array
<not_specific>
def init_kcat_array(self): """Initialise or complete the array holding kcat values for microstates""" self.init_states() if not hasattr(self,'kcat_microstates'): self.kcat_microstates={} for state in self.states: if not self.kcat_microstates.has_key(state): ...
Initialise or complete the array holding kcat values for microstates
Initialise or complete the array holding kcat values for microstates
[ "Initialise", "or", "complete", "the", "array", "holding", "kcat", "values", "for", "microstates" ]
def init_kcat_array(self): self.init_states() if not hasattr(self,'kcat_microstates'): self.kcat_microstates={} for state in self.states: if not self.kcat_microstates.has_key(state): self.kcat_microstates[state]=DoubleVar() self.kcat_micros...
[ "def", "init_kcat_array", "(", "self", ")", ":", "self", ".", "init_states", "(", ")", "if", "not", "hasattr", "(", "self", ",", "'kcat_microstates'", ")", ":", "self", ".", "kcat_microstates", "=", "{", "}", "for", "state", "in", "self", ".", "states", ...
Initialise or complete the array holding kcat values for microstates
[ "Initialise", "or", "complete", "the", "array", "holding", "kcat", "values", "for", "microstates" ]
[ "\"\"\"Initialise or complete the array holding kcat values for microstates\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
474c5a2ac2e788337266329c00014d4666dd0049
shambo001/peat
pKa/analyse_pKa_values.py
[ "MIT" ]
Python
scale_colour
<not_specific>
def scale_colour(self,value): """Scale a colour on our ramp""" if value is None: return 'black' import numpy value=min(self.val_max,value) value=max(self.val_min,value) if value<self.val_mid: colour=(value-self.val_min)/(self.val_mid-self.val_min)*...
Scale a colour on our ramp
Scale a colour on our ramp
[ "Scale", "a", "colour", "on", "our", "ramp" ]
def scale_colour(self,value): if value is None: return 'black' import numpy value=min(self.val_max,value) value=max(self.val_min,value) if value<self.val_mid: colour=(value-self.val_min)/(self.val_mid-self.val_min)*(self.col_mid-self.col_min)+self.col_min ...
[ "def", "scale_colour", "(", "self", ",", "value", ")", ":", "if", "value", "is", "None", ":", "return", "'black'", "import", "numpy", "value", "=", "min", "(", "self", ".", "val_max", ",", "value", ")", "value", "=", "max", "(", "self", ".", "val_min...
Scale a colour on our ramp
[ "Scale", "a", "colour", "on", "our", "ramp" ]
[ "\"\"\"Scale a colour on our ramp\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "value", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "value", "type": null, "docstring": null, "docstring_tokens": ...
474c5a2ac2e788337266329c00014d4666dd0049
shambo001/peat
pKa/analyse_pKa_values.py
[ "MIT" ]
Python
colour_2_hex
<not_specific>
def colour_2_hex(self,color): """Converts a color RGB tuple to a hex color""" r=hex(color[0]).replace('L','') g=hex(color[1]).replace('L','') b=hex(color[2]).replace('L','') return '#%s%s%s' %(r.split('x')[1].zfill(2),g.split('x')[1].zfill(2),b.split('x')[1].zfill(2))
Converts a color RGB tuple to a hex color
Converts a color RGB tuple to a hex color
[ "Converts", "a", "color", "RGB", "tuple", "to", "a", "hex", "color" ]
def colour_2_hex(self,color): r=hex(color[0]).replace('L','') g=hex(color[1]).replace('L','') b=hex(color[2]).replace('L','') return '#%s%s%s' %(r.split('x')[1].zfill(2),g.split('x')[1].zfill(2),b.split('x')[1].zfill(2))
[ "def", "colour_2_hex", "(", "self", ",", "color", ")", ":", "r", "=", "hex", "(", "color", "[", "0", "]", ")", ".", "replace", "(", "'L'", ",", "''", ")", "g", "=", "hex", "(", "color", "[", "1", "]", ")", ".", "replace", "(", "'L'", ",", "...
Converts a color RGB tuple to a hex color
[ "Converts", "a", "color", "RGB", "tuple", "to", "a", "hex", "color" ]
[ "\"\"\"Converts a color RGB tuple to a hex color\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "color", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "color", "type": null, "docstring": null, "docstring_tokens": ...
474c5a2ac2e788337266329c00014d4666dd0049
shambo001/peat
pKa/analyse_pKa_values.py
[ "MIT" ]
Python
select_interface
<not_specific>
def select_interface(self): """ # Little interface to select the group(s) we're interested in """ Frame.__init__(self) self.master.title('Analysing pKa value decomposition') rowspan=8 Label(self.master,text='Select groups to see decomposition analysis').grid(row=0...
# Little interface to select the group(s) we're interested in
Little interface to select the group(s) we're interested in
[ "Little", "interface", "to", "select", "the", "group", "(", "s", ")", "we", "'", "re", "interested", "in" ]
def select_interface(self): Frame.__init__(self) self.master.title('Analysing pKa value decomposition') rowspan=8 Label(self.master,text='Select groups to see decomposition analysis').grid(row=0,column=0) row=1 yscrollbar=Scrollbar(self.master,orient='vertical',width=10) ...
[ "def", "select_interface", "(", "self", ")", ":", "Frame", ".", "__init__", "(", "self", ")", "self", ".", "master", ".", "title", "(", "'Analysing pKa value decomposition'", ")", "rowspan", "=", "8", "Label", "(", "self", ".", "master", ",", "text", "=", ...
Little interface to select the group(s) we're interested in
[ "Little", "interface", "to", "select", "the", "group", "(", "s", ")", "we", "'", "re", "interested", "in" ]
[ "\"\"\"\n # Little interface to select the group(s) we're interested in\n \"\"\"", "#", "#", "# Do the two canvases", "#", "#", "# Plot the two first matrices", "#", "#", "# Construct the diff matrix", "#", "#", "# Plot it", "#", "#", "# Write the CSV files", "#", "#"...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
474c5a2ac2e788337266329c00014d4666dd0049
shambo001/peat
pKa/analyse_pKa_values.py
[ "MIT" ]
Python
plot_matrix
<not_specific>
def plot_matrix(self,matrix,canvas,tagname,diffmode=None): """Plot the data in the matrix on the canvas""" groups=matrix.keys() groups.sort() xstep=canvas.get_x_spacing(len(groups)) ystep=canvas.get_y_spacing(len(groups)) # # Set the axis labels # ...
Plot the data in the matrix on the canvas
Plot the data in the matrix on the canvas
[ "Plot", "the", "data", "in", "the", "matrix", "on", "the", "canvas" ]
def plot_matrix(self,matrix,canvas,tagname,diffmode=None): groups=matrix.keys() groups.sort() xstep=canvas.get_x_spacing(len(groups)) ystep=canvas.get_y_spacing(len(groups)) Set the axis labels x_end=len(groups) y_end=x_end canvas.set_x_label('Removed gro...
[ "def", "plot_matrix", "(", "self", ",", "matrix", ",", "canvas", ",", "tagname", ",", "diffmode", "=", "None", ")", ":", "groups", "=", "matrix", ".", "keys", "(", ")", "groups", ".", "sort", "(", ")", "xstep", "=", "canvas", ".", "get_x_spacing", "(...
Plot the data in the matrix on the canvas
[ "Plot", "the", "data", "in", "the", "matrix", "on", "the", "canvas" ]
[ "\"\"\"Plot the data in the matrix on the canvas\"\"\"", "#", "# Set the axis labels", "#" ]
[ { "param": "self", "type": null }, { "param": "matrix", "type": null }, { "param": "canvas", "type": null }, { "param": "tagname", "type": null }, { "param": "diffmode", "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":...
474c5a2ac2e788337266329c00014d4666dd0049
shambo001/peat
pKa/analyse_pKa_values.py
[ "MIT" ]
Python
calculate_insystem_dpKas
<not_specific>
def calculate_insystem_dpKas(self): """Calculate the dpKas for all residues""" import pKarun.pKa_utility_functions as pKa_utility_functions import os groups=self.wt_pKas.keys() groups.sort() self.in_data={} count=1 for group in groups: print 'G...
Calculate the dpKas for all residues
Calculate the dpKas for all residues
[ "Calculate", "the", "dpKas", "for", "all", "residues" ]
def calculate_insystem_dpKas(self): import pKarun.pKa_utility_functions as pKa_utility_functions import os groups=self.wt_pKas.keys() groups.sort() self.in_data={} count=1 for group in groups: print 'Group: %s (%3d of %3d)' %(group,count,len(groups)) ...
[ "def", "calculate_insystem_dpKas", "(", "self", ")", ":", "import", "pKarun", ".", "pKa_utility_functions", "as", "pKa_utility_functions", "import", "os", "groups", "=", "self", ".", "wt_pKas", ".", "keys", "(", ")", "groups", ".", "sort", "(", ")", "self", ...
Calculate the dpKas for all residues
[ "Calculate", "the", "dpKas", "for", "all", "residues" ]
[ "\"\"\"Calculate the dpKas for all residues\"\"\"", "#", "# If we don't have the data calculate it", "#", "#", "# Save the data", "#", "#", "# Integrate differences from wild type titration curve", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
474c5a2ac2e788337266329c00014d4666dd0049
shambo001/peat
pKa/analyse_pKa_values.py
[ "MIT" ]
Python
do_ex_system
<not_specific>
def do_ex_system(self): """ # Calculate the effects of titratable groups "ex_system" """ import os filename=os.path.join(self.topdir,'ex_system.DAT') data=None if os.path.isfile(filename): try: print 'Loading ex_system data' ...
# Calculate the effects of titratable groups "ex_system"
Calculate the effects of titratable groups "ex_system"
[ "Calculate", "the", "effects", "of", "titratable", "groups", "\"", "ex_system", "\"" ]
def do_ex_system(self): import os filename=os.path.join(self.topdir,'ex_system.DAT') data=None if os.path.isfile(filename): try: print 'Loading ex_system data' fd=open(filename) import cPickle data=cPickle.load(f...
[ "def", "do_ex_system", "(", "self", ")", ":", "import", "os", "filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "topdir", ",", "'ex_system.DAT'", ")", "data", "=", "None", "if", "os", ".", "path", ".", "isfile", "(", "filename", ")",...
Calculate the effects of titratable groups "ex_system"
[ "Calculate", "the", "effects", "of", "titratable", "groups", "\"", "ex_system", "\"" ]
[ "\"\"\"\n # Calculate the effects of titratable groups \"ex_system\"\n \"\"\"", "#", "# If we don't have the data calculate it", "#", "#", "# pKa calc found, let;s continue", "#", "#", "# read the WHAT IF pKa files", "#", "#", "# Get all groups", "#", "#sorts titgroups", "#...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
474c5a2ac2e788337266329c00014d4666dd0049
shambo001/peat
pKa/analyse_pKa_values.py
[ "MIT" ]
Python
calculate_exsystem_dpKas
<not_specific>
def calculate_exsystem_dpKas(self): """Read the ex_system file and calculate the dpKas""" # # Calculate the ex_system values # self.ex_tits=self.do_ex_system() # # Load the file # # We have the titration curves, now we just calculate differences to...
Read the ex_system file and calculate the dpKas
Read the ex_system file and calculate the dpKas
[ "Read", "the", "ex_system", "file", "and", "calculate", "the", "dpKas" ]
def calculate_exsystem_dpKas(self): Calculate the ex_system values self.ex_tits=self.do_ex_system() Load the file We have the titration curves, now we just calculate differences to the model pK titration curve data={} groups=self.wt_pKas.keys() groups.sort() ...
[ "def", "calculate_exsystem_dpKas", "(", "self", ")", ":", "self", ".", "ex_tits", "=", "self", ".", "do_ex_system", "(", ")", "data", "=", "{", "}", "groups", "=", "self", ".", "wt_pKas", ".", "keys", "(", ")", "groups", ".", "sort", "(", ")", "for",...
Read the ex_system file and calculate the dpKas
[ "Read", "the", "ex_system", "file", "and", "calculate", "the", "dpKas" ]
[ "\"\"\"Read the ex_system file and calculate the dpKas\"\"\"", "#", "# Calculate the ex_system values", "#", "#", "# Load the file", "#", "# We have the titration curves, now we just calculate differences to the model pK titration curve", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
98b1301eec6647b6610cce34fe8d5d2741306db4
shambo001/peat
Protool/PDBparser.py
[ "MIT" ]
Python
parseline
<not_specific>
def parseline(self,line): """ # This function calls other routines to parse the line """ import string type=string.strip(string.upper(line[:6])) if len(type)==0: return # # There are so many junk headers, so we simplify a bit # ...
# This function calls other routines to parse the line
This function calls other routines to parse the line
[ "This", "function", "calls", "other", "routines", "to", "parse", "the", "line" ]
def parseline(self,line): import string type=string.strip(string.upper(line[:6])) if len(type)==0: return There are so many junk headers, so we simplify a bit if self.junkheaders.has_key(type): type=self.junkheaders[type] Should we ignore this mo...
[ "def", "parseline", "(", "self", ",", "line", ")", ":", "import", "string", "type", "=", "string", ".", "strip", "(", "string", ".", "upper", "(", "line", "[", ":", "6", "]", ")", ")", "if", "len", "(", "type", ")", "==", "0", ":", "return", "i...
This function calls other routines to parse the line
[ "This", "function", "calls", "other", "routines", "to", "parse", "the", "line" ]
[ "\"\"\"\n # This function calls other routines to parse the line\n \"\"\"", "#", "# There are so many junk headers, so we simplify a bit", "#", "#", "# Should we ignore this model?", "#", "#print 'Skipping model no: %d' %self.NMRmodel", "#", "# Now call the appropritate function", ...
[ { "param": "self", "type": null }, { "param": "line", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "line", "type": null, "docstring": null, "docstring_tokens": [...
a1e958232657ea847500cc1f09a8b7f25e1c042c
shambo001/peat
pKa/pKa_MC.py
[ "MIT" ]
Python
remove_interactions_with
<not_specific>
def remove_interactions_with(self,groups=[]): """Remove all interactions with the groups""" for group1 in self.MC.matrix.keys(): for group2 in self.MC.matrix[group1].keys(): if group1 in groups or group2 in groups: self.MC.matrix[group1][group2]=[0.0,0.0,0...
Remove all interactions with the groups
Remove all interactions with the groups
[ "Remove", "all", "interactions", "with", "the", "groups" ]
def remove_interactions_with(self,groups=[]): for group1 in self.MC.matrix.keys(): for group2 in self.MC.matrix[group1].keys(): if group1 in groups or group2 in groups: self.MC.matrix[group1][group2]=[0.0,0.0,0.0,0.0] return
[ "def", "remove_interactions_with", "(", "self", ",", "groups", "=", "[", "]", ")", ":", "for", "group1", "in", "self", ".", "MC", ".", "matrix", ".", "keys", "(", ")", ":", "for", "group2", "in", "self", ".", "MC", ".", "matrix", "[", "group1", "]"...
Remove all interactions with the groups
[ "Remove", "all", "interactions", "with", "the", "groups" ]
[ "\"\"\"Remove all interactions with the groups\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "groups", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "groups", "type": null, "docstring": null, "docstring_tokens":...
a1e958232657ea847500cc1f09a8b7f25e1c042c
shambo001/peat
pKa/pKa_MC.py
[ "MIT" ]
Python
calc_matrix
<not_specific>
def calc_matrix(self,group): """Calculate the charge-charge interaction matrix for a mutation""" # # Find the mutation # import pKD_tools resid=pKD_tools.get_resid_from_res(group) new_resname=pKD_tools.get_restype_from_titgroup(group) pdb_resname=self.pare...
Calculate the charge-charge interaction matrix for a mutation
Calculate the charge-charge interaction matrix for a mutation
[ "Calculate", "the", "charge", "-", "charge", "interaction", "matrix", "for", "a", "mutation" ]
def calc_matrix(self,group): Find the mutation import pKD_tools resid=pKD_tools.get_resid_from_res(group) new_resname=pKD_tools.get_restype_from_titgroup(group) pdb_resname=self.parent.PI.resname(resid) if pdb_resname==new_resname or new_resname in ['CTERM','NTERM',None]...
[ "def", "calc_matrix", "(", "self", ",", "group", ")", ":", "import", "pKD_tools", "resid", "=", "pKD_tools", ".", "get_resid_from_res", "(", "group", ")", "new_resname", "=", "pKD_tools", ".", "get_restype_from_titgroup", "(", "group", ")", "pdb_resname", "=", ...
Calculate the charge-charge interaction matrix for a mutation
[ "Calculate", "the", "charge", "-", "charge", "interaction", "matrix", "for", "a", "mutation" ]
[ "\"\"\"Calculate the charge-charge interaction matrix for a mutation\"\"\"", "#", "# Find the mutation", "#", "#", "# Calculate the matrix", "#", "#", "# Re-calculate", "#" ]
[ { "param": "self", "type": null }, { "param": "group", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "group", "type": null, "docstring": null, "docstring_tokens": ...
c3fe905ca1866fb2b0cdb2c361eff50a34b6ab24
shambo001/peat
PEATDB/DNAtool/DNAtool_IO.py
[ "MIT" ]
Python
dnaseq_read
<not_specific>
def dnaseq_read(self,newprotein=None,fileinput=None,variable='DNAseq',var2='dnaseqfile'): """Read in DNA Sequences and display them above the main sequence""" self.data['newprotein']=newprotein # If a file is provided use that, otherwise open the dialog if fileinput == None: ...
Read in DNA Sequences and display them above the main sequence
Read in DNA Sequences and display them above the main sequence
[ "Read", "in", "DNA", "Sequences", "and", "display", "them", "above", "the", "main", "sequence" ]
def dnaseq_read(self,newprotein=None,fileinput=None,variable='DNAseq',var2='dnaseqfile'): self.data['newprotein']=newprotein if fileinput == None: dnaseqfile = self.open_file() else: dnaseqfile = fileinput self.data[var2]=dnaseqfile if self.data[var2]: ...
[ "def", "dnaseq_read", "(", "self", ",", "newprotein", "=", "None", ",", "fileinput", "=", "None", ",", "variable", "=", "'DNAseq'", ",", "var2", "=", "'dnaseqfile'", ")", ":", "self", ".", "data", "[", "'newprotein'", "]", "=", "newprotein", "if", "filei...
Read in DNA Sequences and display them above the main sequence
[ "Read", "in", "DNA", "Sequences", "and", "display", "them", "above", "the", "main", "sequence" ]
[ "\"\"\"Read in DNA Sequences and display them above the main sequence\"\"\"", "# If a file is provided use that, otherwise open the dialog", "# Load the DNA sequence data", "# - only simple file format supported at the moment", "# Check the DNA sequence", "# Give a warning", "# Activate/Deactivate butt...
[ { "param": "self", "type": null }, { "param": "newprotein", "type": null }, { "param": "fileinput", "type": null }, { "param": "variable", "type": null }, { "param": "var2", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "newprotein", "type": null, "docstring": null, "docstring_toke...
b24df83ffda43d4b85201da4ead3867210dd82bd
shambo001/peat
pKa/pKa_alascan.py
[ "MIT" ]
Python
local_defaults
<not_specific>
def local_defaults(pdbfile,target_residues,recalc_intpka): """ # Set the parameters that are the same for all mutations """ import pKa.Design_pKa as Design_pKa defaults=Design_pKa.get_defaults() # PDB file defaults['pdb'][0]=pdbfile # # pKa calculation parameters # defaults['...
# Set the parameters that are the same for all mutations
Set the parameters that are the same for all mutations
[ "Set", "the", "parameters", "that", "are", "the", "same", "for", "all", "mutations" ]
def local_defaults(pdbfile,target_residues,recalc_intpka): import pKa.Design_pKa as Design_pKa defaults=Design_pKa.get_defaults() defaults['pdb'][0]=pdbfile pKa calculation parameters defaults['pHstart'][0]=0.1 defaults['pHstop'][0]=12.0 defaults['pHstep'][0]=0.25 defaults['pKMCsteps'][...
[ "def", "local_defaults", "(", "pdbfile", ",", "target_residues", ",", "recalc_intpka", ")", ":", "import", "pKa", ".", "Design_pKa", "as", "Design_pKa", "defaults", "=", "Design_pKa", ".", "get_defaults", "(", ")", "defaults", "[", "'pdb'", "]", "[", "0", "]...
Set the parameters that are the same for all mutations
[ "Set", "the", "parameters", "that", "are", "the", "same", "for", "all", "mutations" ]
[ "\"\"\"\n # Set the parameters that are the same for all mutations\n \"\"\"", "# PDB file", "#", "# pKa calculation parameters", "#", "#", "# Design settings", "#", "# Target", "#", "# Dummy pKa value", "#", "# Method", "#", "#", "# Be not-so-noisy", "#", "#", "# Minimum di...
[ { "param": "pdbfile", "type": null }, { "param": "target_residues", "type": null }, { "param": "recalc_intpka", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbfile", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "target_residues", "type": null, "docstring": null, "docstr...
b24df83ffda43d4b85201da4ead3867210dd82bd
shambo001/peat
pKa/pKa_alascan.py
[ "MIT" ]
Python
main
null
def main(): """Load the PDB file, make all Ala mutations and calculate dpKa for the target residues""" try: import sys pdbfile=sys.argv[1] target_residues=sys.argv[2] except: print print 'Usage: pKa_alascan.py <pdbfile> <target residues>' print 'Example: pKa_a...
Load the PDB file, make all Ala mutations and calculate dpKa for the target residues
Load the PDB file, make all Ala mutations and calculate dpKa for the target residues
[ "Load", "the", "PDB", "file", "make", "all", "Ala", "mutations", "and", "calculate", "dpKa", "for", "the", "target", "residues" ]
def main(): try: import sys pdbfile=sys.argv[1] target_residues=sys.argv[2] except: print print 'Usage: pKa_alascan.py <pdbfile> <target residues>' print 'Example: pKa_alascan.py 2lzt.pdb :0035:GLU,:0052:ASP' print 'This command will perform a full Alanine...
[ "def", "main", "(", ")", ":", "try", ":", "import", "sys", "pdbfile", "=", "sys", ".", "argv", "[", "1", "]", "target_residues", "=", "sys", ".", "argv", "[", "2", "]", "except", ":", "print", "print", "'Usage: pKa_alascan.py <pdbfile> <target residues>'", ...
Load the PDB file, make all Ala mutations and calculate dpKa for the target residues
[ "Load", "the", "PDB", "file", "make", "all", "Ala", "mutations", "and", "calculate", "dpKa", "for", "the", "target", "residues" ]
[ "\"\"\"Load the PDB file, make all Ala mutations and calculate dpKa for the target residues\"\"\"", "#", "# Start the work", "#", "#", "# All titgroups?", "#", "#", "# Start looping", "#", "#", "# Define result filename", "#", "#", "# Set the mutations", "#", "#", "# Calculate the ...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
ba39b2c5f2bf022ccc7ae5f93edea4a43b1087eb
shambo001/peat
PEATDB/Dialogs.py
[ "MIT" ]
Python
show_loading_progress
<not_specific>
def show_loading_progress(self, message='Working..'): """Show plain progress window for loading of data""" self.progress_win=Toplevel() # Open a new window self.progress_win.title("Please Wait") self.progress_win.geometry('+%d+%d' %(self.rootx+200,self.rooty+200)) #force on top ...
Show plain progress window for loading of data
Show plain progress window for loading of data
[ "Show", "plain", "progress", "window", "for", "loading", "of", "data" ]
def show_loading_progress(self, message='Working..'): self.progress_win=Toplevel() self.progress_win.title("Please Wait") self.progress_win.geometry('+%d+%d' %(self.rootx+200,self.rooty+200)) self.progress_win.grab_set() self.progress_win.transient(self.main) progrlbl = ...
[ "def", "show_loading_progress", "(", "self", ",", "message", "=", "'Working..'", ")", ":", "self", ".", "progress_win", "=", "Toplevel", "(", ")", "self", ".", "progress_win", ".", "title", "(", "\"Please Wait\"", ")", "self", ".", "progress_win", ".", "geom...
Show plain progress window for loading of data
[ "Show", "plain", "progress", "window", "for", "loading", "of", "data" ]
[ "\"\"\"Show plain progress window for loading of data\"\"\"", "# Open a new window", "#force on top" ]
[ { "param": "self", "type": null }, { "param": "message", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "message", "type": null, "docstring": null, "docstring_tokens"...
ba39b2c5f2bf022ccc7ae5f93edea4a43b1087eb
shambo001/peat
PEATDB/Dialogs.py
[ "MIT" ]
Python
show_progressbar
<not_specific>
def show_progressbar(self,message): """Show progress bar window for loading of data""" self.progress_win=Toplevel() # Open a new window self.progress_win.title("Please Wait") self.progress_win.geometry('+%d+%d' %(self.rootx+200,self.rooty+200)) #force on top try: ...
Show progress bar window for loading of data
Show progress bar window for loading of data
[ "Show", "progress", "bar", "window", "for", "loading", "of", "data" ]
def show_progressbar(self,message): self.progress_win=Toplevel() self.progress_win.title("Please Wait") self.progress_win.geometry('+%d+%d' %(self.rootx+200,self.rooty+200)) try: self.progress_win.grab_set() self.progress_win.transient(self.main) except: ...
[ "def", "show_progressbar", "(", "self", ",", "message", ")", ":", "self", ".", "progress_win", "=", "Toplevel", "(", ")", "self", ".", "progress_win", ".", "title", "(", "\"Please Wait\"", ")", "self", ".", "progress_win", ".", "geometry", "(", "'+%d+%d'", ...
Show progress bar window for loading of data
[ "Show", "progress", "bar", "window", "for", "loading", "of", "data" ]
[ "\"\"\"Show progress bar window for loading of data\"\"\"", "# Open a new window", "#force on top", "#lbl = Label(self.progress_win,text=self.themessage,font='Arial 16')" ]
[ { "param": "self", "type": null }, { "param": "message", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "message", "type": null, "docstring": null, "docstring_tokens"...
ba39b2c5f2bf022ccc7ae5f93edea4a43b1087eb
shambo001/peat
PEATDB/Dialogs.py
[ "MIT" ]
Python
show_busy_bar
<not_specific>
def show_busy_bar(self,message='Please Wait'): """Show busy bar window for indeterminate time""" self.progress_win=Toplevel() # Open a new window self.progress_win.title(message) self.progress_win.geometry('+%d+%d' %(self.rootx+200,self.rooty+200)) #force on top self.prog...
Show busy bar window for indeterminate time
Show busy bar window for indeterminate time
[ "Show", "busy", "bar", "window", "for", "indeterminate", "time" ]
def show_busy_bar(self,message='Please Wait'): self.progress_win=Toplevel() self.progress_win.title(message) self.progress_win.geometry('+%d+%d' %(self.rootx+200,self.rooty+200)) self.progress_win.grab_set() self.progress_win.transient(self.main) import BusyBar l...
[ "def", "show_busy_bar", "(", "self", ",", "message", "=", "'Please Wait'", ")", ":", "self", ".", "progress_win", "=", "Toplevel", "(", ")", "self", ".", "progress_win", ".", "title", "(", "message", ")", "self", ".", "progress_win", ".", "geometry", "(", ...
Show busy bar window for indeterminate time
[ "Show", "busy", "bar", "window", "for", "indeterminate", "time" ]
[ "\"\"\"Show busy bar window for indeterminate time\"\"\"", "# Open a new window", "#force on top" ]
[ { "param": "self", "type": null }, { "param": "message", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "message", "type": null, "docstring": null, "docstring_tokens"...
ba39b2c5f2bf022ccc7ae5f93edea4a43b1087eb
shambo001/peat
PEATDB/Dialogs.py
[ "MIT" ]
Python
update_progress
<not_specific>
def update_progress(self,value): """update the progress bar if correct type""" if hasattr(self,'bar'): self.bar.updateProgress(newValue=value) self.progress_win.update_idletasks() #self.master.update_idletasks() else: return return
update the progress bar if correct type
update the progress bar if correct type
[ "update", "the", "progress", "bar", "if", "correct", "type" ]
def update_progress(self,value): if hasattr(self,'bar'): self.bar.updateProgress(newValue=value) self.progress_win.update_idletasks() else: return return
[ "def", "update_progress", "(", "self", ",", "value", ")", ":", "if", "hasattr", "(", "self", ",", "'bar'", ")", ":", "self", ".", "bar", ".", "updateProgress", "(", "newValue", "=", "value", ")", "self", ".", "progress_win", ".", "update_idletasks", "(",...
update the progress bar if correct type
[ "update", "the", "progress", "bar", "if", "correct", "type" ]
[ "\"\"\"update the progress bar if correct type\"\"\"", "#self.master.update_idletasks()" ]
[ { "param": "self", "type": null }, { "param": "value", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "value", "type": null, "docstring": null, "docstring_tokens": ...
ba39b2c5f2bf022ccc7ae5f93edea4a43b1087eb
shambo001/peat
PEATDB/Dialogs.py
[ "MIT" ]
Python
createBusywin
<not_specific>
def createBusywin(parent, message): """Show busy bar window for indeterminate time""" rootx = parent.winfo_rootx() rooty = parent.winfo_rooty() progress_win=Toplevel() progress_win.title("Please Wait") progress_win.geometry('+%d+%d' %(rootx+200,rooty+200)) progress_win.grab_set() progres...
Show busy bar window for indeterminate time
Show busy bar window for indeterminate time
[ "Show", "busy", "bar", "window", "for", "indeterminate", "time" ]
def createBusywin(parent, message): rootx = parent.winfo_rootx() rooty = parent.winfo_rooty() progress_win=Toplevel() progress_win.title("Please Wait") progress_win.geometry('+%d+%d' %(rootx+200,rooty+200)) progress_win.grab_set() progress_win.transient(parent) import BusyBar l = Lab...
[ "def", "createBusywin", "(", "parent", ",", "message", ")", ":", "rootx", "=", "parent", ".", "winfo_rootx", "(", ")", "rooty", "=", "parent", ".", "winfo_rooty", "(", ")", "progress_win", "=", "Toplevel", "(", ")", "progress_win", ".", "title", "(", "\"...
Show busy bar window for indeterminate time
[ "Show", "busy", "bar", "window", "for", "indeterminate", "time" ]
[ "\"\"\"Show busy bar window for indeterminate time\"\"\"" ]
[ { "param": "parent", "type": null }, { "param": "message", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "parent", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "message", "type": null, "docstring": null, "docstring_token...
e720189596380898fad91de9300c17b803bbd700
shambo001/peat
sandbox/ProteinComplexTool_execute.py
[ "MIT" ]
Python
DeltaStability
<not_specific>
def DeltaStability(inputFile, mutationList, configurationFile, workingDirectory, outputDirectory): '''Calculates the stability difference between a protein and set of mutants Parameters: inputFile: A PDB file of the protein mutationList: A list of Data.M...
Calculates the stability difference between a protein and set of mutants Parameters: inputFile: A PDB file of the protein mutationList: A list of Data.MutationSet instances. Each represents a mutant of the protein. configurationFile: The location ...
Calculates the stability difference between a protein and set of mutants
[ "Calculates", "the", "stability", "difference", "between", "a", "protein", "and", "set", "of", "mutants" ]
def DeltaStability(inputFile, mutationList, configurationFile, workingDirectory, outputDirectory): tool = Core.ProteinDesignTool.ProteinDesignTool(configurationFile, workingDirectory=workingDirectory, pdbFile=inputFile, ou...
[ "def", "DeltaStability", "(", "inputFile", ",", "mutationList", ",", "configurationFile", ",", "workingDirectory", ",", "outputDirectory", ")", ":", "tool", "=", "Core", ".", "ProteinDesignTool", ".", "ProteinDesignTool", "(", "configurationFile", ",", "workingDirecto...
Calculates the stability difference between a protein and set of mutants
[ "Calculates", "the", "stability", "difference", "between", "a", "protein", "and", "set", "of", "mutants" ]
[ "'''Calculates the stability difference between a protein and set of mutants\n\n Parameters:\n inputFile: A PDB file of the protein\n mutationList: A list of Data.MutationSet instances. Each represents a mutant of the protein.\n configurationFile: ...
[ { "param": "inputFile", "type": null }, { "param": "mutationList", "type": null }, { "param": "configurationFile", "type": null }, { "param": "workingDirectory", "type": null }, { "param": "outputDirectory", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inputFile", "type": null, "docstring": "A PDB file of the protein", "docstring_tokens": [ "A", "PDB", "file", "of", "the", "protein" ], "default": null, "is_opt...
87e4576163712b4fc01dfe5d53a760d2d880067e
shambo001/peat
PEATDB/Ekin/Ekin_CD.py
[ "MIT" ]
Python
import_CD_tempscan
<not_specific>
def import_CD_tempscan(self): """Import a temperature scan from a Jasco CD spec""" import tkFileDialog, os filename=tkFileDialog.askopenfilename(defaultextension='.txt',initialdir=os.getcwd(), filetypes=[("Jasco txt","*.txt"), ...
Import a temperature scan from a Jasco CD spec
Import a temperature scan from a Jasco CD spec
[ "Import", "a", "temperature", "scan", "from", "a", "Jasco", "CD", "spec" ]
def import_CD_tempscan(self): import tkFileDialog, os filename=tkFileDialog.askopenfilename(defaultextension='.txt',initialdir=os.getcwd(), filetypes=[("Jasco txt","*.txt"), ("All files","*.*")], ...
[ "def", "import_CD_tempscan", "(", "self", ")", ":", "import", "tkFileDialog", ",", "os", "filename", "=", "tkFileDialog", ".", "askopenfilename", "(", "defaultextension", "=", "'.txt'", ",", "initialdir", "=", "os", ".", "getcwd", "(", ")", ",", "filetypes", ...
Import a temperature scan from a Jasco CD spec
[ "Import", "a", "temperature", "scan", "from", "a", "Jasco", "CD", "spec" ]
[ "\"\"\"Import a temperature scan from a Jasco CD spec\"\"\"", "#", "# If we got a filename then read the stuff", "#", "#", "# Open and read file", "#", "#", "# Parse file", "#", "# Format is:", "# 00 TITLE\t0.6mg/ml hewl sigma", "# 01 DATA TYPE", "# 02 ORIGIN\tJASCO", "# 03 OWNER", "# ...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
87e4576163712b4fc01dfe5d53a760d2d880067e
shambo001/peat
PEATDB/Ekin/Ekin_CD.py
[ "MIT" ]
Python
insert_CD_temp_datatab
<not_specific>
def insert_CD_temp_datatab(self): """Insert datatab for fitting the temperature dependence of CD data""" # # Get the wavelengths # thistab = self.nb.index(self.nb.getcurselection()) wavlens_dps=self.data[thistab][0].keys() wavlens=[] for dp in wavlens_dps:...
Insert datatab for fitting the temperature dependence of CD data
Insert datatab for fitting the temperature dependence of CD data
[ "Insert", "datatab", "for", "fitting", "the", "temperature", "dependence", "of", "CD", "data" ]
def insert_CD_temp_datatab(self): Get the wavelengths thistab = self.nb.index(self.nb.getcurselection()) wavlens_dps=self.data[thistab][0].keys() wavlens=[] for dp in wavlens_dps: if dp!='label' and dp!='label_widget': wavlens.append(self.data[thistab...
[ "def", "insert_CD_temp_datatab", "(", "self", ")", ":", "thistab", "=", "self", ".", "nb", ".", "index", "(", "self", ".", "nb", ".", "getcurselection", "(", ")", ")", "wavlens_dps", "=", "self", ".", "data", "[", "thistab", "]", "[", "0", "]", ".", ...
Insert datatab for fitting the temperature dependence of CD data
[ "Insert", "datatab", "for", "fitting", "the", "temperature", "dependence", "of", "CD", "data" ]
[ "\"\"\"Insert datatab for fitting the temperature dependence of CD data\"\"\"", "#", "# Get the wavelengths", "#", "#", "# Open window for selecting the wavelength", "#", "# first check if there is any imported data - bad hack", "#", "# Set the geometry", "#PEATDB.PEAT_window.set_geometry(self.e...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
87e4576163712b4fc01dfe5d53a760d2d880067e
shambo001/peat
PEATDB/Ekin/Ekin_CD.py
[ "MIT" ]
Python
wav_win_close
<not_specific>
def wav_win_close(self,event=None): """ Scale the CD data between 0 and 1, and destroy wavelength selection window """ # # Get data # chosen_wavelength=self.wavlen.get() # data=[] for tabnum in self.tabnames: if self.tabnames[ta...
Scale the CD data between 0 and 1, and destroy wavelength selection window
Scale the CD data between 0 and 1, and destroy wavelength selection window
[ "Scale", "the", "CD", "data", "between", "0", "and", "1", "and", "destroy", "wavelength", "selection", "window" ]
def wav_win_close(self,event=None): Get data chosen_wavelength=self.wavlen.get() data=[] for tabnum in self.tabnames: if self.tabnames[tabnum][:4]=='CD(T': Grab data from here temp=float(self.tabnames[tabnum][4:-1]) for dp in ...
[ "def", "wav_win_close", "(", "self", ",", "event", "=", "None", ")", ":", "chosen_wavelength", "=", "self", ".", "wavlen", ".", "get", "(", ")", "data", "=", "[", "]", "for", "tabnum", "in", "self", ".", "tabnames", ":", "if", "self", ".", "tabnames"...
Scale the CD data between 0 and 1, and destroy wavelength selection window
[ "Scale", "the", "CD", "data", "between", "0", "and", "1", "and", "destroy", "wavelength", "selection", "window" ]
[ "\"\"\"\n Scale the CD data between 0 and 1, and destroy wavelength selection window\n \"\"\"", "#", "# Get data", "#", "#", "#", "# Grab data from here", "#", "#", "# Normalise", "#", "#", "# Change fitting model", "#", "#", "# Insert normalised data", "#", "#", "#...
[ { "param": "self", "type": null }, { "param": "event", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "event", "type": null, "docstring": null, "docstring_tokens": ...
87e4576163712b4fc01dfe5d53a760d2d880067e
shambo001/peat
PEATDB/Ekin/Ekin_CD.py
[ "MIT" ]
Python
wav_win_cancel
<not_specific>
def wav_win_cancel(self,event=None): """ Destroy wavelength selection window and delete the new tab """ if self.wav_win: self.delete_datatab() self.wav_win.destroy() return
Destroy wavelength selection window and delete the new tab
Destroy wavelength selection window and delete the new tab
[ "Destroy", "wavelength", "selection", "window", "and", "delete", "the", "new", "tab" ]
def wav_win_cancel(self,event=None): if self.wav_win: self.delete_datatab() self.wav_win.destroy() return
[ "def", "wav_win_cancel", "(", "self", ",", "event", "=", "None", ")", ":", "if", "self", ".", "wav_win", ":", "self", ".", "delete_datatab", "(", ")", "self", ".", "wav_win", ".", "destroy", "(", ")", "return" ]
Destroy wavelength selection window and delete the new tab
[ "Destroy", "wavelength", "selection", "window", "and", "delete", "the", "new", "tab" ]
[ "\"\"\"\n Destroy wavelength selection window and delete the new tab\n \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "event", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "event", "type": null, "docstring": null, "docstring_tokens": ...
87e4576163712b4fc01dfe5d53a760d2d880067e
shambo001/peat
PEATDB/Ekin/Ekin_CD.py
[ "MIT" ]
Python
update_CDmin
<not_specific>
def update_CDmin(self,event=None): """Update the min value for CD signal""" self.CD_min='manual' self.insert_wavdata() return
Update the min value for CD signal
Update the min value for CD signal
[ "Update", "the", "min", "value", "for", "CD", "signal" ]
def update_CDmin(self,event=None): self.CD_min='manual' self.insert_wavdata() return
[ "def", "update_CDmin", "(", "self", ",", "event", "=", "None", ")", ":", "self", ".", "CD_min", "=", "'manual'", "self", ".", "insert_wavdata", "(", ")", "return" ]
Update the min value for CD signal
[ "Update", "the", "min", "value", "for", "CD", "signal" ]
[ "\"\"\"Update the min value for CD signal\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "event", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "event", "type": null, "docstring": null, "docstring_tokens": ...
87e4576163712b4fc01dfe5d53a760d2d880067e
shambo001/peat
PEATDB/Ekin/Ekin_CD.py
[ "MIT" ]
Python
update_CDmax
<not_specific>
def update_CDmax(self,event=None): """Update the max value for CD signal""" self.CD_max='manual' self.insert_wavdata() return
Update the max value for CD signal
Update the max value for CD signal
[ "Update", "the", "max", "value", "for", "CD", "signal" ]
def update_CDmax(self,event=None): self.CD_max='manual' self.insert_wavdata() return
[ "def", "update_CDmax", "(", "self", ",", "event", "=", "None", ")", ":", "self", ".", "CD_max", "=", "'manual'", "self", ".", "insert_wavdata", "(", ")", "return" ]
Update the max value for CD signal
[ "Update", "the", "max", "value", "for", "CD", "signal" ]
[ "\"\"\"Update the max value for CD signal\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "event", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "event", "type": null, "docstring": null, "docstring_tokens": ...
87e4576163712b4fc01dfe5d53a760d2d880067e
shambo001/peat
PEATDB/Ekin/Ekin_CD.py
[ "MIT" ]
Python
insert_wavdata
<not_specific>
def insert_wavdata(self,junk=None): """Get the data for the wavelength that was selected and insert it in the sheet""" # # Loop over all datatabs and get the ones that are CD(T) data # chosen_wavelength=self.wavlen.get() # data=[] for tabnum in self.tabnam...
Get the data for the wavelength that was selected and insert it in the sheet
Get the data for the wavelength that was selected and insert it in the sheet
[ "Get", "the", "data", "for", "the", "wavelength", "that", "was", "selected", "and", "insert", "it", "in", "the", "sheet" ]
def insert_wavdata(self,junk=None): Loop over all datatabs and get the ones that are CD(T) data chosen_wavelength=self.wavlen.get() data=[] for tabnum in self.tabnames: if self.tabnames[tabnum][:4]=='CD(T': Grab data from here temp=float(self...
[ "def", "insert_wavdata", "(", "self", ",", "junk", "=", "None", ")", ":", "chosen_wavelength", "=", "self", ".", "wavlen", ".", "get", "(", ")", "data", "=", "[", "]", "for", "tabnum", "in", "self", ".", "tabnames", ":", "if", "self", ".", "tabnames"...
Get the data for the wavelength that was selected and insert it in the sheet
[ "Get", "the", "data", "for", "the", "wavelength", "that", "was", "selected", "and", "insert", "it", "in", "the", "sheet" ]
[ "\"\"\"Get the data for the wavelength that was selected and insert it in the sheet\"\"\"", "#", "# Loop over all datatabs and get the ones that are CD(T) data", "#", "#", "#", "# Grab data from here", "#", "#", "# find min and max of CD signal", "#", "#", "# Did the user specify one value o...
[ { "param": "self", "type": null }, { "param": "junk", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "junk", "type": null, "docstring": null, "docstring_tokens": [...
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
calculate_shift
null
def calculate_shift(self): '''This function predicts chemical shifts of all residues according to pKa values of all titratable groups''' delta_CS={} for residue in self.residues: delta_CS[residue]={} diel=self.diel_low while diel <= self.diel_high: delta_CS[residue][diel]={} for ph in range(le...
This function predicts chemical shifts of all residues according to pKa values of all titratable groups
This function predicts chemical shifts of all residues according to pKa values of all titratable groups
[ "This", "function", "predicts", "chemical", "shifts", "of", "all", "residues", "according", "to", "pKa", "values", "of", "all", "titratable", "groups" ]
def calculate_shift(self): delta_CS={} for residue in self.residues: delta_CS[residue]={} diel=self.diel_low while diel <= self.diel_high: delta_CS[residue][diel]={} for ph in range(len(self.ph_values)): delta=0.00 for titgroup in self.titgroups: if self.dict_CS[diel][residue][titgr...
[ "def", "calculate_shift", "(", "self", ")", ":", "delta_CS", "=", "{", "}", "for", "residue", "in", "self", ".", "residues", ":", "delta_CS", "[", "residue", "]", "=", "{", "}", "diel", "=", "self", ".", "diel_low", "while", "diel", "<=", "self", "."...
This function predicts chemical shifts of all residues according to pKa values of all titratable groups
[ "This", "function", "predicts", "chemical", "shifts", "of", "all", "residues", "according", "to", "pKa", "values", "of", "all", "titratable", "groups" ]
[ "'''This function predicts chemical shifts of all residues according to pKa values of all titratable groups'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
preprocess
<not_specific>
def preprocess(self,dict): '''Finds the minimum of the curve and translate the curve downward for that value''' minimum=min(dict.values()) for ph in range(len(self.ph_values)): dict[ph]-=minimum return dict.values()
Finds the minimum of the curve and translate the curve downward for that value
Finds the minimum of the curve and translate the curve downward for that value
[ "Finds", "the", "minimum", "of", "the", "curve", "and", "translate", "the", "curve", "downward", "for", "that", "value" ]
def preprocess(self,dict): minimum=min(dict.values()) for ph in range(len(self.ph_values)): dict[ph]-=minimum return dict.values()
[ "def", "preprocess", "(", "self", ",", "dict", ")", ":", "minimum", "=", "min", "(", "dict", ".", "values", "(", ")", ")", "for", "ph", "in", "range", "(", "len", "(", "self", ".", "ph_values", ")", ")", ":", "dict", "[", "ph", "]", "-=", "mini...
Finds the minimum of the curve and translate the curve downward for that value
[ "Finds", "the", "minimum", "of", "the", "curve", "and", "translate", "the", "curve", "downward", "for", "that", "value" ]
[ "'''Finds the minimum of the curve and translate the curve downward for that value'''" ]
[ { "param": "self", "type": null }, { "param": "dict", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dict", "type": null, "docstring": null, "docstring_tokens": [...
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
plot_curves
null
def plot_curves(self,exper_CS): '''This function plots for every residue both experimental CS curves and all calculated CS curves one for every dielectric constant Only the curves for residues which NMR data exist are plotted''' print "Ploting ghost titration curves in figures/" if exper_CS != None: residues...
This function plots for every residue both experimental CS curves and all calculated CS curves one for every dielectric constant Only the curves for residues which NMR data exist are plotted
This function plots for every residue both experimental CS curves and all calculated CS curves one for every dielectric constant Only the curves for residues which NMR data exist are plotted
[ "This", "function", "plots", "for", "every", "residue", "both", "experimental", "CS", "curves", "and", "all", "calculated", "CS", "curves", "one", "for", "every", "dielectric", "constant", "Only", "the", "curves", "for", "residues", "which", "NMR", "data", "ex...
def plot_curves(self,exper_CS): print "Ploting ghost titration curves in figures/" if exper_CS != None: residues=exper_CS.keys() else: residues=self.residues residues.sort() for residue in residues: clf() figure(num=1,dpi=400,figsize=(10,5),frameon=False) grid(True) hold=(True) if exper_C...
[ "def", "plot_curves", "(", "self", ",", "exper_CS", ")", ":", "print", "\"Ploting ghost titration curves in figures/\"", "if", "exper_CS", "!=", "None", ":", "residues", "=", "exper_CS", ".", "keys", "(", ")", "else", ":", "residues", "=", "self", ".", "residu...
This function plots for every residue both experimental CS curves and all calculated CS curves one for every dielectric constant Only the curves for residues which NMR data exist are plotted
[ "This", "function", "plots", "for", "every", "residue", "both", "experimental", "CS", "curves", "and", "all", "calculated", "CS", "curves", "one", "for", "every", "dielectric", "constant", "Only", "the", "curves", "for", "residues", "which", "NMR", "data", "ex...
[ "'''This function plots for every residue both experimental CS curves and all calculated CS curves one for every dielectric constant\n\t\tOnly the curves for residues which NMR data exist are plotted'''", "#axis([2, 8, 0, 2.5])" ]
[ { "param": "self", "type": null }, { "param": "exper_CS", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "exper_CS", "type": null, "docstring": null, "docstring_tokens...
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
distance
null
def distance(self,exper_CS): '''This function finds the NRMSD between calculated and experimental curves''' distance={} ultimate_distance={} ultimate_diel={} residues=exper_CS.keys() residues.sort() for residue in residues: exper=self.preprocess(exper_CS[residue]) maximum=max(exper) distanc...
This function finds the NRMSD between calculated and experimental curves
This function finds the NRMSD between calculated and experimental curves
[ "This", "function", "finds", "the", "NRMSD", "between", "calculated", "and", "experimental", "curves" ]
def distance(self,exper_CS): distance={} ultimate_distance={} ultimate_diel={} residues=exper_CS.keys() residues.sort() for residue in residues: exper=self.preprocess(exper_CS[residue]) maximum=max(exper) distance[residue]={} diel=self.diel_low while diel <= self.diel_high: delta=self.pre...
[ "def", "distance", "(", "self", ",", "exper_CS", ")", ":", "distance", "=", "{", "}", "ultimate_distance", "=", "{", "}", "ultimate_diel", "=", "{", "}", "residues", "=", "exper_CS", ".", "keys", "(", ")", "residues", ".", "sort", "(", ")", "for", "r...
This function finds the NRMSD between calculated and experimental curves
[ "This", "function", "finds", "the", "NRMSD", "between", "calculated", "and", "experimental", "curves" ]
[ "'''This function finds the NRMSD between calculated and experimental curves'''", "#for diel in range(self.diel_low, self.diel_high+self.diel_increment, self.diel_increment):#" ]
[ { "param": "self", "type": null }, { "param": "exper_CS", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "exper_CS", "type": null, "docstring": null, "docstring_tokens...
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
zero_Bfactor
null
def zero_Bfactor(self): '''function that zeros the value of Bfactor coloumn in pdb file''' if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') dir_name=os.path.join(os.getcwd(),'figures/') if os.path.isfile(self.pdb): fd=open(self.pdb) lines=fd.readlines() fd...
function that zeros the value of Bfactor coloumn in pdb file
function that zeros the value of Bfactor coloumn in pdb file
[ "function", "that", "zeros", "the", "value", "of", "Bfactor", "coloumn", "in", "pdb", "file" ]
def zero_Bfactor(self): if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') dir_name=os.path.join(os.getcwd(),'figures/') if os.path.isfile(self.pdb): fd=open(self.pdb) lines=fd.readlines() fd.close() else: raise FileNotFoundError, self.pdb file_name=dir_name+...
[ "def", "zero_Bfactor", "(", "self", ")", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "os", ".", "path", ".", "join", "(", "os", ".", "getcwd", "(", ")", ",", "'figures/'", ")", ")", ":", "os", ".", "system", "(", "'mkdir figures'", ")...
function that zeros the value of Bfactor coloumn in pdb file
[ "function", "that", "zeros", "the", "value", "of", "Bfactor", "coloumn", "in", "pdb", "file" ]
[ "'''function that zeros the value of Bfactor coloumn in pdb file'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
accessibility
null
def accessibility(self): '''Calls whatif and save the accessibility of residues in a file''' if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') dir_name=os.path.join(os.getcwd(),'figures/') source='%swhatif_%s.txt'%(dir_name,self.pdb) fd=open(source,'w') fd.write...
Calls whatif and save the accessibility of residues in a file
Calls whatif and save the accessibility of residues in a file
[ "Calls", "whatif", "and", "save", "the", "accessibility", "of", "residues", "in", "a", "file" ]
def accessibility(self): if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') dir_name=os.path.join(os.getcwd(),'figures/') source='%swhatif_%s.txt'%(dir_name,self.pdb) fd=open(source,'w') fd.writelines(['/local/predrag/bin/whatif/DO_WHATIF.COM <<EOF\n', 'GETMOL %s\n'%s...
[ "def", "accessibility", "(", "self", ")", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "os", ".", "path", ".", "join", "(", "os", ".", "getcwd", "(", ")", ",", "'figures/'", ")", ")", ":", "os", ".", "system", "(", "'mkdir figures'", "...
Calls whatif and save the accessibility of residues in a file
[ "Calls", "whatif", "and", "save", "the", "accessibility", "of", "residues", "in", "a", "file" ]
[ "'''Calls whatif and save the accessibility of residues in a file'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
print_accessibility
null
def print_accessibility(self,threshold=0.15,access='total'): '''Plot the influence of the accessibility on dielectric constant It does it only for residues which nrmsd is below the threshold''' if access=='total': colomn=-3 elif access=='backbone': colomn=-2 elif access=='side chain': colomn=-1 els...
Plot the influence of the accessibility on dielectric constant It does it only for residues which nrmsd is below the threshold
Plot the influence of the accessibility on dielectric constant It does it only for residues which nrmsd is below the threshold
[ "Plot", "the", "influence", "of", "the", "accessibility", "on", "dielectric", "constant", "It", "does", "it", "only", "for", "residues", "which", "nrmsd", "is", "below", "the", "threshold" ]
def print_accessibility(self,threshold=0.15,access='total'): if access=='total': colomn=-3 elif access=='backbone': colomn=-2 elif access=='side chain': colomn=-1 else: print print 'Usage: accessibility could take only following values:' print 'total' print 'background' print 'side chain...
[ "def", "print_accessibility", "(", "self", ",", "threshold", "=", "0.15", ",", "access", "=", "'total'", ")", ":", "if", "access", "==", "'total'", ":", "colomn", "=", "-", "3", "elif", "access", "==", "'backbone'", ":", "colomn", "=", "-", "2", "elif"...
Plot the influence of the accessibility on dielectric constant It does it only for residues which nrmsd is below the threshold
[ "Plot", "the", "influence", "of", "the", "accessibility", "on", "dielectric", "constant", "It", "does", "it", "only", "for", "residues", "which", "nrmsd", "is", "below", "the", "threshold" ]
[ "'''Plot the influence of the accessibility on dielectric constant\n\t\tIt does it only for residues which nrmsd is below the threshold'''", "#3D plot" ]
[ { "param": "self", "type": null }, { "param": "threshold", "type": null }, { "param": "access", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "threshold", "type": null, "docstring": null, "docstring_token...
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
plot_individual_shift
null
def plot_individual_shift(self): '''Plot chemical shifts due to a full charge on each titratable group individually Also plots the unexpected curve shapes - curves that do not decline while increasing the pH value''' if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') di...
Plot chemical shifts due to a full charge on each titratable group individually Also plots the unexpected curve shapes - curves that do not decline while increasing the pH value
Plot chemical shifts due to a full charge on each titratable group individually Also plots the unexpected curve shapes - curves that do not decline while increasing the pH value
[ "Plot", "chemical", "shifts", "due", "to", "a", "full", "charge", "on", "each", "titratable", "group", "individually", "Also", "plots", "the", "unexpected", "curve", "shapes", "-", "curves", "that", "do", "not", "decline", "while", "increasing", "the", "pH", ...
def plot_individual_shift(self): if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') dir_name=os.path.join(os.getcwd(),'figures/') for residue in self.residues: clf() figure(num=1,dpi=400,figsize=(10,5),frameon=False) grid(True) hold(True) xlabel('effective die...
[ "def", "plot_individual_shift", "(", "self", ")", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "os", ".", "path", ".", "join", "(", "os", ".", "getcwd", "(", ")", ",", "'figures/'", ")", ")", ":", "os", ".", "system", "(", "'mkdir figure...
Plot chemical shifts due to a full charge on each titratable group individually Also plots the unexpected curve shapes - curves that do not decline while increasing the pH value
[ "Plot", "chemical", "shifts", "due", "to", "a", "full", "charge", "on", "each", "titratable", "group", "individually", "Also", "plots", "the", "unexpected", "curve", "shapes", "-", "curves", "that", "do", "not", "decline", "while", "increasing", "the", "pH", ...
[ "'''Plot chemical shifts due to a full charge on each titratable group individually\n\t\tAlso plots the unexpected curve shapes - curves that do not decline while increasing the pH value'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ab70e8579530761682682e1bb37703919c2672d3
shambo001/peat
Ghost/Chemical_shift.py
[ "MIT" ]
Python
important_titgroup
null
def important_titgroup(self,level=0.5): '''For all nuclei finds the most influential titratable groups on a given pH value''' if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') dir_name=os.path.join(os.getcwd(),'figures/') CS={} file_name=dir_name+'important_titgro...
For all nuclei finds the most influential titratable groups on a given pH value
For all nuclei finds the most influential titratable groups on a given pH value
[ "For", "all", "nuclei", "finds", "the", "most", "influential", "titratable", "groups", "on", "a", "given", "pH", "value" ]
def important_titgroup(self,level=0.5): if not os.path.isdir(os.path.join(os.getcwd(),'figures/')): os.system('mkdir figures') dir_name=os.path.join(os.getcwd(),'figures/') CS={} file_name=dir_name+'important_titgroup_%9s.txt'%(self.pdb) fd=open(file_name,'w') for residue in self.residues_below: print...
[ "def", "important_titgroup", "(", "self", ",", "level", "=", "0.5", ")", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "os", ".", "path", ".", "join", "(", "os", ".", "getcwd", "(", ")", ",", "'figures/'", ")", ")", ":", "os", ".", "s...
For all nuclei finds the most influential titratable groups on a given pH value
[ "For", "all", "nuclei", "finds", "the", "most", "influential", "titratable", "groups", "on", "a", "given", "pH", "value" ]
[ "'''For all nuclei finds the most influential titratable groups on a given pH value'''" ]
[ { "param": "self", "type": null }, { "param": "level", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "level", "type": null, "docstring": null, "docstring_tokens": ...
c70d51379de40ce7cfa14a3beee789d8cfd1078f
shambo001/peat
PEATDB/DNAtool/primer_alignment.py
[ "MIT" ]
Python
draw_primer
<not_specific>
def draw_primer(self,this_primer,colour='blue',thetag='primer',seqname=None,lvl=0): """This draws a primer OR any comparison sequence above the main sequence""" # Draw the primer font = self.parent.getCurrentFont() objs={} mismatches=0 rev_compl=None position=thi...
This draws a primer OR any comparison sequence above the main sequence
This draws a primer OR any comparison sequence above the main sequence
[ "This", "draws", "a", "primer", "OR", "any", "comparison", "sequence", "above", "the", "main", "sequence" ]
def draw_primer(self,this_primer,colour='blue',thetag='primer',seqname=None,lvl=0): font = self.parent.getCurrentFont() objs={} mismatches=0 rev_compl=None position=this_primer['startpos'] primer_sequence=this_primer['sequence'] if not primer_sequence or primer_se...
[ "def", "draw_primer", "(", "self", ",", "this_primer", ",", "colour", "=", "'blue'", ",", "thetag", "=", "'primer'", ",", "seqname", "=", "None", ",", "lvl", "=", "0", ")", ":", "font", "=", "self", ".", "parent", ".", "getCurrentFont", "(", ")", "ob...
This draws a primer OR any comparison sequence above the main sequence
[ "This", "draws", "a", "primer", "OR", "any", "comparison", "sequence", "above", "the", "main", "sequence" ]
[ "\"\"\"This draws a primer OR any comparison sequence above the main sequence\"\"\"", "# Draw the primer", "# Reverse", "# Write the 5' or 3'", "# First find the y value, corrected for scale and no. of sequences etc.", "# This needs to be only done once, so use the dummy ytmp value when doing", "# get_b...
[ { "param": "self", "type": null }, { "param": "this_primer", "type": null }, { "param": "colour", "type": null }, { "param": "thetag", "type": null }, { "param": "seqname", "type": null }, { "param": "lvl", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "this_primer", "type": null, "docstring": null, "docstring_tok...