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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d3de52188b709d87e6095aa1cab22b320620b3e2 | shambo001/peat | PEATDB/web.py | [
"MIT"
] | Python | showHeader | <not_specific> | def showHeader(self,title=None,menu=None):
"""show headings and column names for DB"""
imgdir = self.imgdir
html_header = 'Content-Type: text/html; charset=utf-8\n'
html_header += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n'
pri... | show headings and column names for DB | show headings and column names for DB | [
"show",
"headings",
"and",
"column",
"names",
"for",
"DB"
] | def showHeader(self,title=None,menu=None):
imgdir = self.imgdir
html_header = 'Content-Type: text/html; charset=utf-8\n'
html_header += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\n'
print html_header
print '<html>'
print '... | [
"def",
"showHeader",
"(",
"self",
",",
"title",
"=",
"None",
",",
"menu",
"=",
"None",
")",
":",
"imgdir",
"=",
"self",
".",
"imgdir",
"html_header",
"=",
"'Content-Type: text/html; charset=utf-8\\n'",
"html_header",
"+=",
"'<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.... | show headings and column names for DB | [
"show",
"headings",
"and",
"column",
"names",
"for",
"DB"
] | [
"\"\"\"show headings and column names for DB\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "title",
"type": null
},
{
"param": "menu",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "title",
"type": null,
"docstring": null,
"docstring_tokens": ... |
d3de52188b709d87e6095aa1cab22b320620b3e2 | shambo001/peat | PEATDB/web.py | [
"MIT"
] | Python | show_all | <not_specific> | def show_all(self):
'''Show all records in DB
From the locally saved project if present, otherwise checkout'''
self.DB = self.connect()
self.showHeader(menu=1)
sys.stdout.flush()
self.show_DB()
return | Show all records in DB
From the locally saved project if present, otherwise checkout | Show all records in DB
From the locally saved project if present, otherwise checkout | [
"Show",
"all",
"records",
"in",
"DB",
"From",
"the",
"locally",
"saved",
"project",
"if",
"present",
"otherwise",
"checkout"
] | def show_all(self):
self.DB = self.connect()
self.showHeader(menu=1)
sys.stdout.flush()
self.show_DB()
return | [
"def",
"show_all",
"(",
"self",
")",
":",
"self",
".",
"DB",
"=",
"self",
".",
"connect",
"(",
")",
"self",
".",
"showHeader",
"(",
"menu",
"=",
"1",
")",
"sys",
".",
"stdout",
".",
"flush",
"(",
")",
"self",
".",
"show_DB",
"(",
")",
"return"
] | Show all records in DB
From the locally saved project if present, otherwise checkout | [
"Show",
"all",
"records",
"in",
"DB",
"From",
"the",
"locally",
"saved",
"project",
"if",
"present",
"otherwise",
"checkout"
] | [
"'''Show all records in DB\n From the locally saved project if present, otherwise checkout'''"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d3de52188b709d87e6095aa1cab22b320620b3e2 | shambo001/peat | PEATDB/web.py | [
"MIT"
] | Python | show_specific | <not_specific> | def show_specific(self):
"""Show datasets for an individual cell, depends on fieldtype"""
protein = self.form.getfirst('protein')
rectype = self.form.getfirst('rectype')
col = self.form.getfirst('column')
sys.stdout.flush()
DB = self.DB = self.connect()
ptmodel ... | Show datasets for an individual cell, depends on fieldtype | Show datasets for an individual cell, depends on fieldtype | [
"Show",
"datasets",
"for",
"an",
"individual",
"cell",
"depends",
"on",
"fieldtype"
] | def show_specific(self):
protein = self.form.getfirst('protein')
rectype = self.form.getfirst('rectype')
col = self.form.getfirst('column')
sys.stdout.flush()
DB = self.DB = self.connect()
ptmodel = PEATTableModel(DB)
ekincols = ptmodel.ekintypes
fieldtype... | [
"def",
"show_specific",
"(",
"self",
")",
":",
"protein",
"=",
"self",
".",
"form",
".",
"getfirst",
"(",
"'protein'",
")",
"rectype",
"=",
"self",
".",
"form",
".",
"getfirst",
"(",
"'rectype'",
")",
"col",
"=",
"self",
".",
"form",
".",
"getfirst",
... | Show datasets for an individual cell, depends on fieldtype | [
"Show",
"datasets",
"for",
"an",
"individual",
"cell",
"depends",
"on",
"fieldtype"
] | [
"\"\"\"Show datasets for an individual cell, depends on fieldtype\"\"\"",
"#plot ekin data curves, if fieldtype is ekindata",
"#save the pdb structure to a file and provide url link to it"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
d3de52188b709d87e6095aa1cab22b320620b3e2 | shambo001/peat | PEATDB/web.py | [
"MIT"
] | Python | show_datasets | <not_specific> | def show_datasets(self):
"""Show single or multiple dataset plot from search results"""
plotoption = self.form.getfirst('plotoption')
norm = bool(self.form.getfirst('normalise'))
logx = bool(self.form.getfirst('logx'))
logy = bool(self.form.getfirst('logy'))
legend = bool... | Show single or multiple dataset plot from search results | Show single or multiple dataset plot from search results | [
"Show",
"single",
"or",
"multiple",
"dataset",
"plot",
"from",
"search",
"results"
] | def show_datasets(self):
plotoption = self.form.getfirst('plotoption')
norm = bool(self.form.getfirst('normalise'))
logx = bool(self.form.getfirst('logx'))
logy = bool(self.form.getfirst('logy'))
legend = bool(self.form.getfirst('legend'))
DB = self.DB = self.connect()
... | [
"def",
"show_datasets",
"(",
"self",
")",
":",
"plotoption",
"=",
"self",
".",
"form",
".",
"getfirst",
"(",
"'plotoption'",
")",
"norm",
"=",
"bool",
"(",
"self",
".",
"form",
".",
"getfirst",
"(",
"'normalise'",
")",
")",
"logx",
"=",
"bool",
"(",
... | Show single or multiple dataset plot from search results | [
"Show",
"single",
"or",
"multiple",
"dataset",
"plot",
"from",
"search",
"results"
] | [
"\"\"\"Show single or multiple dataset plot from search results\"\"\"",
"#get dataset name(s) from form",
"#prepare data, if more than one dataset from seperate proteins,",
"#extracting seperate datasets and put them in ekindata"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | yasaraplot | <not_specific> | def yasaraplot():
"""Make a plot of all ghosts on the structure"""
ghosts=getdata()
#
rescolor={}
tgcount=0
tgcolstep=360.0/len(ghosts.keys())
print 'tgcolstep: %5.2f' %tgcolstep
#
colors=[240,0,60,120,180,300,1030,1150]
del ghosts[':0048:ASP']
del ghosts[':0066:ASP']
for... | Make a plot of all ghosts on the structure | Make a plot of all ghosts on the structure | [
"Make",
"a",
"plot",
"of",
"all",
"ghosts",
"on",
"the",
"structure"
] | def yasaraplot():
ghosts=getdata()
rescolor={}
tgcount=0
tgcolstep=360.0/len(ghosts.keys())
print 'tgcolstep: %5.2f' %tgcolstep
colors=[240,0,60,120,180,300,1030,1150]
del ghosts[':0048:ASP']
del ghosts[':0066:ASP']
for tg in sorted(ghosts.keys()):
for residue in ghosts[tg].k... | [
"def",
"yasaraplot",
"(",
")",
":",
"ghosts",
"=",
"getdata",
"(",
")",
"rescolor",
"=",
"{",
"}",
"tgcount",
"=",
"0",
"tgcolstep",
"=",
"360.0",
"/",
"len",
"(",
"ghosts",
".",
"keys",
"(",
")",
")",
"print",
"'tgcolstep: %5.2f'",
"%",
"tgcolstep",
... | Make a plot of all ghosts on the structure | [
"Make",
"a",
"plot",
"of",
"all",
"ghosts",
"on",
"the",
"structure"
] | [
"\"\"\"Make a plot of all ghosts on the structure\"\"\"",
"#",
"#",
"#",
"#if len(rescolor[residue][plot])==1:",
"#else: ",
"# color=1270"
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | interpret_ranges | <not_specific> | def interpret_ranges(self,exp_value,atom):
"""Given a number of a range, get the true value + and error"""
exp_error=errors[atom]
if type(exp_value) is type('jkfjd'):
if len(exp_value.split(';'))==2:
s=[]
for val in str(exp_value).split(';'):
... | Given a number of a range, get the true value + and error | Given a number of a range, get the true value + and error | [
"Given",
"a",
"number",
"of",
"a",
"range",
"get",
"the",
"true",
"value",
"+",
"and",
"error"
] | def interpret_ranges(self,exp_value,atom):
exp_error=errors[atom]
if type(exp_value) is type('jkfjd'):
if len(exp_value.split(';'))==2:
s=[]
for val in str(exp_value).split(';'):
if val[0] in ['<','>']:
val=val[1:]
... | [
"def",
"interpret_ranges",
"(",
"self",
",",
"exp_value",
",",
"atom",
")",
":",
"exp_error",
"=",
"errors",
"[",
"atom",
"]",
"if",
"type",
"(",
"exp_value",
")",
"is",
"type",
"(",
"'jkfjd'",
")",
":",
"if",
"len",
"(",
"exp_value",
".",
"split",
"... | Given a number of a range, get the true value + and error | [
"Given",
"a",
"number",
"of",
"a",
"range",
"get",
"the",
"true",
"value",
"+",
"and",
"error"
] | [
"\"\"\"Given a number of a range, get the true value + and error\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "exp_value",
"type": null
},
{
"param": "atom",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "exp_value",
"type": null,
"docstring": null,
"docstring_token... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | _calc_Efield | <not_specific> | def _calc_Efield(self,dCS,angle,atom,charge):
#
# Maybe we want to do the sexy comparison with changes in activities?
#
"""Given a change in chemical shift and an angle, calculate the electric field change"""
cos_angle=math.cos(math.radians(angle))
val=dCS/(NSP[atom]*e*pp... | Given a change in chemical shift and an angle, calculate the electric field change | Given a change in chemical shift and an angle, calculate the electric field change | [
"Given",
"a",
"change",
"in",
"chemical",
"shift",
"and",
"an",
"angle",
"calculate",
"the",
"electric",
"field",
"change"
] | def _calc_Efield(self,dCS,angle,atom,charge):
Maybe we want to do the sexy comparison with changes in activities?
cos_angle=math.cos(math.radians(angle))
val=dCS/(NSP[atom]*e*ppm_au*cos_angle*1E6*-1)
return val
------ | [
"def",
"_calc_Efield",
"(",
"self",
",",
"dCS",
",",
"angle",
",",
"atom",
",",
"charge",
")",
":",
"cos_angle",
"=",
"math",
".",
"cos",
"(",
"math",
".",
"radians",
"(",
"angle",
")",
")",
"val",
"=",
"dCS",
"/",
"(",
"NSP",
"[",
"atom",
"]",
... | Given a change in chemical shift and an angle, calculate the electric field change | [
"Given",
"a",
"change",
"in",
"chemical",
"shift",
"and",
"an",
"angle",
"calculate",
"the",
"electric",
"field",
"change"
] | [
"#",
"# Maybe we want to do the sexy comparison with changes in activities?",
"#",
"\"\"\"Given a change in chemical shift and an angle, calculate the electric field change\"\"\"",
"#",
"# ------",
"#"
] | [
{
"param": "self",
"type": null
},
{
"param": "dCS",
"type": null
},
{
"param": "angle",
"type": null
},
{
"param": "atom",
"type": null
},
{
"param": "charge",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "dCS",
"type": null,
"docstring": null,
"docstring_tokens": []... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | read_confchange | <not_specific> | def read_confchange(self,tgs):
"""Read the files with information on the conformational change"""
import os
self.conf_change={}
for tg in tgs:
self.conf_change[tg]={}
for atom in ['N','H']:
sp=tg.split(':')
filename='%3s%d%1s_confch... | Read the files with information on the conformational change | Read the files with information on the conformational change | [
"Read",
"the",
"files",
"with",
"information",
"on",
"the",
"conformational",
"change"
] | def read_confchange(self,tgs):
import os
self.conf_change={}
for tg in tgs:
self.conf_change[tg]={}
for atom in ['N','H']:
sp=tg.split(':')
filename='%3s%d%1s_confchange.csv' %(sp[2],int(sp[1]),atom)
filename=os.path.join('a... | [
"def",
"read_confchange",
"(",
"self",
",",
"tgs",
")",
":",
"import",
"os",
"self",
".",
"conf_change",
"=",
"{",
"}",
"for",
"tg",
"in",
"tgs",
":",
"self",
".",
"conf_change",
"[",
"tg",
"]",
"=",
"{",
"}",
"for",
"atom",
"in",
"[",
"'N'",
","... | Read the files with information on the conformational change | [
"Read",
"the",
"files",
"with",
"information",
"on",
"the",
"conformational",
"change"
] | [
"\"\"\"Read the files with information on the conformational change\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "tgs",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "tgs",
"type": null,
"docstring": null,
"docstring_tokens": []... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | find_excludes | <not_specific> | def find_excludes(self,options=None,exp_ghosts=None):
"""find residues to exclude based on an analysis of the structure"""
excludes={':0007:GLU':[':0004:',':0005',':0006:'],
':0015:HIS':[':0011',':0012',':0013',':0014',':0016',':0088',':0090',':0089',':0092'],
':0018:ASP':[':0019',':0025... | find residues to exclude based on an analysis of the structure | find residues to exclude based on an analysis of the structure | [
"find",
"residues",
"to",
"exclude",
"based",
"on",
"an",
"analysis",
"of",
"the",
"structure"
] | def find_excludes(self,options=None,exp_ghosts=None):
excludes={':0007:GLU':[':0004:',':0005',':0006:'],
':0015:HIS':[':0011',':0012',':0013',':0014',':0016',':0088',':0090',':0089',':0092'],
':0018:ASP':[':0019',':0025',':0026',':0027',':0017',':0021',':0022',':0023',':0024'],
':0035:GL... | [
"def",
"find_excludes",
"(",
"self",
",",
"options",
"=",
"None",
",",
"exp_ghosts",
"=",
"None",
")",
":",
"excludes",
"=",
"{",
"':0007:GLU'",
":",
"[",
"':0004:'",
",",
"':0005'",
",",
"':0006:'",
"]",
",",
"':0015:HIS'",
":",
"[",
"':0011'",
",",
"... | find residues to exclude based on an analysis of the structure | [
"find",
"residues",
"to",
"exclude",
"based",
"on",
"an",
"analysis",
"of",
"the",
"structure"
] | [
"\"\"\"find residues to exclude based on an analysis of the structure\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "options",
"type": null
},
{
"param": "exp_ghosts",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "options",
"type": null,
"docstring": null,
"docstring_tokens"... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | find_excludes_from_structure | <not_specific> | def find_excludes_from_structure(self):
"""This is an old function for selecting residues to exclude. Does not work that great"""
excludes={}
#
# Get the PDB file
#
import Protool
X=Protool.structureIO()
X.readpdb(options.pdbfile)
#
# Find ... | This is an old function for selecting residues to exclude. Does not work that great | This is an old function for selecting residues to exclude. Does not work that great | [
"This",
"is",
"an",
"old",
"function",
"for",
"selecting",
"residues",
"to",
"exclude",
".",
"Does",
"not",
"work",
"that",
"great"
] | def find_excludes_from_structure(self):
excludes={}
Get the PDB file
import Protool
X=Protool.structureIO()
X.readpdb(options.pdbfile)
Find all residues next to tg and next to Hbond-tg + residues with bb in VDW distance of sidechain
for tg in sorted(exp_ghosts.k... | [
"def",
"find_excludes_from_structure",
"(",
"self",
")",
":",
"excludes",
"=",
"{",
"}",
"import",
"Protool",
"X",
"=",
"Protool",
".",
"structureIO",
"(",
")",
"X",
".",
"readpdb",
"(",
"options",
".",
"pdbfile",
")",
"for",
"tg",
"in",
"sorted",
"(",
... | This is an old function for selecting residues to exclude. | [
"This",
"is",
"an",
"old",
"function",
"for",
"selecting",
"residues",
"to",
"exclude",
"."
] | [
"\"\"\"This is an old function for selecting residues to exclude. Does not work that great\"\"\"",
"#",
"# Get the PDB file",
"#",
"#",
"# Find all residues next to tg and next to Hbond-tg + residues with bb in VDW distance of sidechain",
"#",
"# Before - After",
"#",
"# Find Hbonding and VdW part... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | calculate_average | <not_specific> | def calculate_average(self,data):
"""Calculate the average ghost observed and the standard deviation"""
for datatype in data.keys():
for diel in data[datatype].keys():
for TG in data[datatype][diel].keys():
for residue in data[datatype][diel][TG].keys():
... | Calculate the average ghost observed and the standard deviation | Calculate the average ghost observed and the standard deviation | [
"Calculate",
"the",
"average",
"ghost",
"observed",
"and",
"the",
"standard",
"deviation"
] | def calculate_average(self,data):
for datatype in data.keys():
for diel in data[datatype].keys():
for TG in data[datatype][diel].keys():
for residue in data[datatype][diel][TG].keys():
for nucleus in data[datatype][diel][TG][residue].keys()... | [
"def",
"calculate_average",
"(",
"self",
",",
"data",
")",
":",
"for",
"datatype",
"in",
"data",
".",
"keys",
"(",
")",
":",
"for",
"diel",
"in",
"data",
"[",
"datatype",
"]",
".",
"keys",
"(",
")",
":",
"for",
"TG",
"in",
"data",
"[",
"datatype",
... | Calculate the average ghost observed and the standard deviation | [
"Calculate",
"the",
"average",
"ghost",
"observed",
"and",
"the",
"standard",
"deviation"
] | [
"\"\"\"Calculate the average ghost observed and the standard deviation\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "data",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "data",
"type": null,
"docstring": null,
"docstring_tokens": [... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | load_all_calculated | <not_specific> | def load_all_calculated(self,exp_ghosts):
"""Load all current predictions of ghosts"""
predictions=[['Xray_avg.pickle','Xray'],['MD_calcghosts_nowat.pickle','MD_nowat'],['average_calcghosts_predrag_all.pickle','MD'],['Xrays/all_ghosts_2LZT_H.pdb.pickle','2LZT']] # ['average_calcghosts_predragGB.pickle',... | Load all current predictions of ghosts | Load all current predictions of ghosts | [
"Load",
"all",
"current",
"predictions",
"of",
"ghosts"
] | def load_all_calculated(self,exp_ghosts):
predictions=[['Xray_avg.pickle','Xray'],['MD_calcghosts_nowat.pickle','MD_nowat'],['average_calcghosts_predrag_all.pickle','MD'],['Xrays/all_ghosts_2LZT_H.pdb.pickle','2LZT']]
alldata={}
for filename,ensemble_name in predictions:
import os
... | [
"def",
"load_all_calculated",
"(",
"self",
",",
"exp_ghosts",
")",
":",
"predictions",
"=",
"[",
"[",
"'Xray_avg.pickle'",
",",
"'Xray'",
"]",
",",
"[",
"'MD_calcghosts_nowat.pickle'",
",",
"'MD_nowat'",
"]",
",",
"[",
"'average_calcghosts_predrag_all.pickle'",
",",... | Load all current predictions of ghosts | [
"Load",
"all",
"current",
"predictions",
"of",
"ghosts"
] | [
"\"\"\"Load all current predictions of ghosts\"\"\"",
"# ['average_calcghosts_predragGB.pickle','GB'],",
"#",
"# Do the full plot",
"#",
"#",
"# Find the best eps",
"#",
"#",
"# Finish the plot",
"#"
] | [
{
"param": "self",
"type": null
},
{
"param": "exp_ghosts",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "exp_ghosts",
"type": null,
"docstring": null,
"docstring_toke... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | load_calcghosts | <not_specific> | def load_calcghosts(self,options,loadfile=None):
"""Load the calculated ghosts from a single file or a directory"""
if options.loaddir:
# Load all files in the directory specified
import os
if os.path.isdir(options.loaddir):
files=os.listdir(options.l... | Load the calculated ghosts from a single file or a directory | Load the calculated ghosts from a single file or a directory | [
"Load",
"the",
"calculated",
"ghosts",
"from",
"a",
"single",
"file",
"or",
"a",
"directory"
] | def load_calcghosts(self,options,loadfile=None):
if options.loaddir:
import os
if os.path.isdir(options.loaddir):
files=os.listdir(options.loaddir)
okfiles=[]
for fn in files:
txt='_H.pdb.pickle'
siz... | [
"def",
"load_calcghosts",
"(",
"self",
",",
"options",
",",
"loadfile",
"=",
"None",
")",
":",
"if",
"options",
".",
"loaddir",
":",
"import",
"os",
"if",
"os",
".",
"path",
".",
"isdir",
"(",
"options",
".",
"loaddir",
")",
":",
"files",
"=",
"os",
... | Load the calculated ghosts from a single file or a directory | [
"Load",
"the",
"calculated",
"ghosts",
"from",
"a",
"single",
"file",
"or",
"a",
"directory"
] | [
"\"\"\"Load the calculated ghosts from a single file or a directory\"\"\"",
"# Load all files in the directory specified",
"#",
"#",
"#",
"# Get the averages and standard deviations ",
"#",
"# ",
"# Load just a single file",
"#"
] | [
{
"param": "self",
"type": null
},
{
"param": "options",
"type": null
},
{
"param": "loadfile",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "options",
"type": null,
"docstring": null,
"docstring_tokens"... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | stats_forpaper | <not_specific> | def stats_forpaper(self,exp_ghosts):
"""Get the stats for the paper"""
# Get the excludes
excludes=self.find_excludes(options,exp_ghosts)
# Loop over all ghosts
for atom in ['N','H','HA']:
values=[]
absent=[]
for tg in sorted(exp_ghosts.keys())... | Get the stats for the paper | Get the stats for the paper | [
"Get",
"the",
"stats",
"for",
"the",
"paper"
] | def stats_forpaper(self,exp_ghosts):
excludes=self.find_excludes(options,exp_ghosts)
for atom in ['N','H','HA']:
values=[]
absent=[]
for tg in sorted(exp_ghosts.keys()):
for residue in sorted(exp_ghosts[tg].keys()):
if excludes.has_... | [
"def",
"stats_forpaper",
"(",
"self",
",",
"exp_ghosts",
")",
":",
"excludes",
"=",
"self",
".",
"find_excludes",
"(",
"options",
",",
"exp_ghosts",
")",
"for",
"atom",
"in",
"[",
"'N'",
",",
"'H'",
",",
"'HA'",
"]",
":",
"values",
"=",
"[",
"]",
"ab... | Get the stats for the paper | [
"Get",
"the",
"stats",
"for",
"the",
"paper"
] | [
"\"\"\"Get the stats for the paper\"\"\"",
"# Get the excludes",
"# Loop over all ghosts",
"#",
"# Get the value",
"#",
"# ",
"# Deal with ranges",
"#",
"# ",
"# Deal with ranges - we need to do this better",
"#",
"#",
"# Calculate average",
"#"
] | [
{
"param": "self",
"type": null
},
{
"param": "exp_ghosts",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "exp_ghosts",
"type": null,
"docstring": null,
"docstring_toke... |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | structure_size_error | <not_specific> | def structure_size_error(self):
"""Plot the size of the erors on the structure"""
#
# Let Yasara show the structure and color it according to the size of the error
#
raise Exception('function not completed')
import Yasara
Y=Yasara.yasara_handler()
obj=Y.lo... | Plot the size of the erors on the structure | Plot the size of the erors on the structure | [
"Plot",
"the",
"size",
"of",
"the",
"erors",
"on",
"the",
"structure"
] | def structure_size_error(self):
Let Yasara show the structure and color it according to the size of the error
raise Exception('function not completed')
import Yasara
Y=Yasara.yasara_handler()
obj=Y.load_mol('2LZT.pdb')
Y.yasara.run('HideAtom Sidechain')
tgnum=int... | [
"def",
"structure_size_error",
"(",
"self",
")",
":",
"raise",
"Exception",
"(",
"'function not completed'",
")",
"import",
"Yasara",
"Y",
"=",
"Yasara",
".",
"yasara_handler",
"(",
")",
"obj",
"=",
"Y",
".",
"load_mol",
"(",
"'2LZT.pdb'",
")",
"Y",
".",
"... | Plot the size of the erors on the structure | [
"Plot",
"the",
"size",
"of",
"the",
"erors",
"on",
"the",
"structure"
] | [
"\"\"\"Plot the size of the erors on the structure\"\"\"",
"#",
"# Let Yasara show the structure and color it according to the size of the error",
"#"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
e9ee2389ea6a2f3e39536c856d857a934eec5ff9 | shambo001/peat | Ghost/make_figs.py | [
"MIT"
] | Python | restraint_plot | <not_specific> | def restraint_plot(self,big_satisfied):
"""
Make a plot of restraints satisfied vs. eps for each method
"""
import pylab
plotdata=[]
for method in big_satisfied.keys():
xs=[]
present=[]
absent=[]
tgs=big_satisfied[method].ke... |
Make a plot of restraints satisfied vs. eps for each method
| Make a plot of restraints satisfied vs. eps for each method | [
"Make",
"a",
"plot",
"of",
"restraints",
"satisfied",
"vs",
".",
"eps",
"for",
"each",
"method"
] | def restraint_plot(self,big_satisfied):
import pylab
plotdata=[]
for method in big_satisfied.keys():
xs=[]
present=[]
absent=[]
tgs=big_satisfied[method].keys()
for eps in sorted(big_satisfied[method][tgs[0]].keys()):
sa... | [
"def",
"restraint_plot",
"(",
"self",
",",
"big_satisfied",
")",
":",
"import",
"pylab",
"plotdata",
"=",
"[",
"]",
"for",
"method",
"in",
"big_satisfied",
".",
"keys",
"(",
")",
":",
"xs",
"=",
"[",
"]",
"present",
"=",
"[",
"]",
"absent",
"=",
"[",... | Make a plot of restraints satisfied vs. eps for each method | [
"Make",
"a",
"plot",
"of",
"restraints",
"satisfied",
"vs",
".",
"eps",
"for",
"each",
"method"
] | [
"\"\"\"\n Make a plot of restraints satisfied vs. eps for each method\n \"\"\"",
"#",
"#pylab.show()"
] | [
{
"param": "self",
"type": null
},
{
"param": "big_satisfied",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "big_satisfied",
"type": null,
"docstring": null,
"docstring_t... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | createEmptyModel | <not_specific> | def createEmptyModel(self):
"""Create the basic empty model dict"""
self.data = {}
# Define the starting column names and locations in the table.
self.columnNames = []
self.columntypes = {}
self.columnOrder = None
#record column labels for use in a table header
... | Create the basic empty model dict | Create the basic empty model dict | [
"Create",
"the",
"basic",
"empty",
"model",
"dict"
] | def createEmptyModel(self):
self.data = {}
self.columnNames = []
self.columntypes = {}
self.columnOrder = None
self.columnlabels={}
for colname in self.columnNames:
self.columnlabels[colname]=colname
self.reclist = self.data.keys()
return | [
"def",
"createEmptyModel",
"(",
"self",
")",
":",
"self",
".",
"data",
"=",
"{",
"}",
"self",
".",
"columnNames",
"=",
"[",
"]",
"self",
".",
"columntypes",
"=",
"{",
"}",
"self",
".",
"columnOrder",
"=",
"None",
"self",
".",
"columnlabels",
"=",
"{"... | Create the basic empty model dict | [
"Create",
"the",
"basic",
"empty",
"model",
"dict"
] | [
"\"\"\"Create the basic empty model dict\"\"\"",
"# Define the starting column names and locations in the table.",
"#record column labels for use in a table header"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | importDict | <not_specific> | def importDict(self, newdata, namefield=None):
"""Try to create a table model from some arbitrary dict"""
import types
if namefield == None:
namefield = 'name'
#get cols from sub data keys
colnames = []
colnames.append(namefield)
for k in newd... | Try to create a table model from some arbitrary dict | Try to create a table model from some arbitrary dict | [
"Try",
"to",
"create",
"a",
"table",
"model",
"from",
"some",
"arbitrary",
"dict"
] | def importDict(self, newdata, namefield=None):
import types
if namefield == None:
namefield = 'name'
colnames = []
colnames.append(namefield)
for k in newdata:
fields = newdata[k].keys()
for f in fields:
if not f in colnames:
... | [
"def",
"importDict",
"(",
"self",
",",
"newdata",
",",
"namefield",
"=",
"None",
")",
":",
"import",
"types",
"if",
"namefield",
"==",
"None",
":",
"namefield",
"=",
"'name'",
"colnames",
"=",
"[",
"]",
"colnames",
".",
"append",
"(",
"namefield",
")",
... | Try to create a table model from some arbitrary dict | [
"Try",
"to",
"create",
"a",
"table",
"model",
"from",
"some",
"arbitrary",
"dict"
] | [
"\"\"\"Try to create a table model from some arbitrary dict\"\"\"",
"#get cols from sub data keys",
"#add the data",
"#print colnames"
] | [
{
"param": "self",
"type": null
},
{
"param": "newdata",
"type": null
},
{
"param": "namefield",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "newdata",
"type": null,
"docstring": null,
"docstring_tokens"... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | deleteCellRecord | <not_specific> | def deleteCellRecord(self, rowIndex, columnIndex):
"""Remove the cell data at this row/column"""
colname = self.getColumnName(columnIndex)
coltype = self.columntypes[colname]
name = self.getRecName(rowIndex)
if self.data[name].has_key(colname):
del self.data[name][col... | Remove the cell data at this row/column | Remove the cell data at this row/column | [
"Remove",
"the",
"cell",
"data",
"at",
"this",
"row",
"/",
"column"
] | def deleteCellRecord(self, rowIndex, columnIndex):
colname = self.getColumnName(columnIndex)
coltype = self.columntypes[colname]
name = self.getRecName(rowIndex)
if self.data[name].has_key(colname):
del self.data[name][colname]
return | [
"def",
"deleteCellRecord",
"(",
"self",
",",
"rowIndex",
",",
"columnIndex",
")",
":",
"colname",
"=",
"self",
".",
"getColumnName",
"(",
"columnIndex",
")",
"coltype",
"=",
"self",
".",
"columntypes",
"[",
"colname",
"]",
"name",
"=",
"self",
".",
"getRec... | Remove the cell data at this row/column | [
"Remove",
"the",
"cell",
"data",
"at",
"this",
"row",
"/",
"column"
] | [
"\"\"\"Remove the cell data at this row/column\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "rowIndex",
"type": null
},
{
"param": "columnIndex",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "rowIndex",
"type": null,
"docstring": null,
"docstring_tokens... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | createSortMap | <not_specific> | def createSortMap(self, names, sortkey, reverse=0):
"""Create a sort mapping for given list"""
import operator
recdata = []
for rec in names:
recdata.append(self.getRecordAttributeAtColumn(recName=rec, columnName=sortkey))
#try create list of floats if col... | Create a sort mapping for given list | Create a sort mapping for given list | [
"Create",
"a",
"sort",
"mapping",
"for",
"given",
"list"
] | def createSortMap(self, names, sortkey, reverse=0):
import operator
recdata = []
for rec in names:
recdata.append(self.getRecordAttributeAtColumn(recName=rec, columnName=sortkey))
try:
recdata = self.toFloats(recdata)
except:
... | [
"def",
"createSortMap",
"(",
"self",
",",
"names",
",",
"sortkey",
",",
"reverse",
"=",
"0",
")",
":",
"import",
"operator",
"recdata",
"=",
"[",
"]",
"for",
"rec",
"in",
"names",
":",
"recdata",
".",
"append",
"(",
"self",
".",
"getRecordAttributeAtColu... | Create a sort mapping for given list | [
"Create",
"a",
"sort",
"mapping",
"for",
"given",
"list"
] | [
"\"\"\"Create a sort mapping for given list\"\"\"",
"#try create list of floats if col has numbers only",
"#sort the mapping by the second key",
"#now sort the main reclist by the mapping order"
] | [
{
"param": "self",
"type": null
},
{
"param": "names",
"type": null
},
{
"param": "sortkey",
"type": null
},
{
"param": "reverse",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "names",
"type": null,
"docstring": null,
"docstring_tokens": ... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | deleteMultipleColumns | <not_specific> | def deleteMultipleColumns(self, cols=None):
"""Remove all cols or list provided"""
while self.getColumnCount() > 0:
self.deleteColumn(0)
return | Remove all cols or list provided | Remove all cols or list provided | [
"Remove",
"all",
"cols",
"or",
"list",
"provided"
] | def deleteMultipleColumns(self, cols=None):
while self.getColumnCount() > 0:
self.deleteColumn(0)
return | [
"def",
"deleteMultipleColumns",
"(",
"self",
",",
"cols",
"=",
"None",
")",
":",
"while",
"self",
".",
"getColumnCount",
"(",
")",
">",
"0",
":",
"self",
".",
"deleteColumn",
"(",
"0",
")",
"return"
] | Remove all cols or list provided | [
"Remove",
"all",
"cols",
"or",
"list",
"provided"
] | [
"\"\"\"Remove all cols or list provided\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "cols",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "cols",
"type": null,
"docstring": null,
"docstring_tokens": [... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | auto_AddRows | <not_specific> | def auto_AddRows(self, numrows=None):
"""Automatically add x number of records"""
import string
alphabet = string.lowercase[:26]
rows = self.getRowCount()
if rows <= 25:
i=rows
j=0
else:
i=int(rows%25)
j=int(round(rows/25,1... | Automatically add x number of records | Automatically add x number of records | [
"Automatically",
"add",
"x",
"number",
"of",
"records"
] | def auto_AddRows(self, numrows=None):
import string
alphabet = string.lowercase[:26]
rows = self.getRowCount()
if rows <= 25:
i=rows
j=0
else:
i=int(rows%25)
j=int(round(rows/25,1))
for x in range(numrows):
if i ... | [
"def",
"auto_AddRows",
"(",
"self",
",",
"numrows",
"=",
"None",
")",
":",
"import",
"string",
"alphabet",
"=",
"string",
".",
"lowercase",
"[",
":",
"26",
"]",
"rows",
"=",
"self",
".",
"getRowCount",
"(",
")",
"if",
"rows",
"<=",
"25",
":",
"i",
... | Automatically add x number of records | [
"Automatically",
"add",
"x",
"number",
"of",
"records"
] | [
"\"\"\"Automatically add x number of records\"\"\"",
"#print i, j",
"#print self.reclist"
] | [
{
"param": "self",
"type": null
},
{
"param": "numrows",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "numrows",
"type": null,
"docstring": null,
"docstring_tokens"... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | auto_AddColumns | <not_specific> | def auto_AddColumns(self, numcols=None):
"""Automatically add x number of cols"""
import string
alphabet = string.lowercase[:26]
currcols=self.getColumnCount()
#find where to start
start = currcols + 1
end = currcols + numcols + 1
new = []
for n in... | Automatically add x number of cols | Automatically add x number of cols | [
"Automatically",
"add",
"x",
"number",
"of",
"cols"
] | def auto_AddColumns(self, numcols=None):
import string
alphabet = string.lowercase[:26]
currcols=self.getColumnCount()
start = currcols + 1
end = currcols + numcols + 1
new = []
for n in range(start, end):
new.append(str(n))
common = set(new) &... | [
"def",
"auto_AddColumns",
"(",
"self",
",",
"numcols",
"=",
"None",
")",
":",
"import",
"string",
"alphabet",
"=",
"string",
".",
"lowercase",
"[",
":",
"26",
"]",
"currcols",
"=",
"self",
".",
"getColumnCount",
"(",
")",
"start",
"=",
"currcols",
"+",
... | Automatically add x number of cols | [
"Automatically",
"add",
"x",
"number",
"of",
"cols"
] | [
"\"\"\"Automatically add x number of cols\"\"\"",
"#find where to start",
"#check if any of these colnames present"
] | [
{
"param": "self",
"type": null
},
{
"param": "numcols",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "numcols",
"type": null,
"docstring": null,
"docstring_tokens"... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | filterBy | <not_specific> | def filterBy(self, filtercol, value, op='contains', userecnames=False,
progresscallback=None):
"""Filter recs according to one column"""
from Filtering import Operators
funcs = {'contains':Operators.contains,'=':Operators.equals,
'>':Opera... | Filter recs according to one column | Filter recs according to one column | [
"Filter",
"recs",
"according",
"to",
"one",
"column"
] | def filterBy(self, filtercol, value, op='contains', userecnames=False,
progresscallback=None):
from Filtering import Operators
funcs = {'contains':Operators.contains,'=':Operators.equals,
'>':Operators.greaterthan,'<':Operators.lessthan,
... | [
"def",
"filterBy",
"(",
"self",
",",
"filtercol",
",",
"value",
",",
"op",
"=",
"'contains'",
",",
"userecnames",
"=",
"False",
",",
"progresscallback",
"=",
"None",
")",
":",
"from",
"Filtering",
"import",
"Operators",
"funcs",
"=",
"{",
"'contains'",
":"... | Filter recs according to one column | [
"Filter",
"recs",
"according",
"to",
"one",
"column"
] | [
"\"\"\"Filter recs according to one column\"\"\"",
"#coltype = self.columntypes[filtercol]",
"#try to do float comparisons if required"
] | [
{
"param": "self",
"type": null
},
{
"param": "filtercol",
"type": null
},
{
"param": "value",
"type": null
},
{
"param": "op",
"type": null
},
{
"param": "userecnames",
"type": null
},
{
"param": "progresscallback",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "filtercol",
"type": null,
"docstring": null,
"docstring_token... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | copyFormula | <not_specific> | def copyFormula(self, cellval, row, col, offset=1, dim='y'):
"""Copy a formula down or across, using the provided offset"""
import re
frmla = Formula.getFormula(cellval)
#print 'formula', frmla
newcells=[]
cells, ops = Formula.readExpression(frmla)
for c in cell... | Copy a formula down or across, using the provided offset | Copy a formula down or across, using the provided offset | [
"Copy",
"a",
"formula",
"down",
"or",
"across",
"using",
"the",
"provided",
"offset"
] | def copyFormula(self, cellval, row, col, offset=1, dim='y'):
import re
frmla = Formula.getFormula(cellval)
newcells=[]
cells, ops = Formula.readExpression(frmla)
for c in cells:
print c
if type(c) is not ListType:
nc = c
else:
... | [
"def",
"copyFormula",
"(",
"self",
",",
"cellval",
",",
"row",
",",
"col",
",",
"offset",
"=",
"1",
",",
"dim",
"=",
"'y'",
")",
":",
"import",
"re",
"frmla",
"=",
"Formula",
".",
"getFormula",
"(",
"cellval",
")",
"newcells",
"=",
"[",
"]",
"cells... | Copy a formula down or across, using the provided offset | [
"Copy",
"a",
"formula",
"down",
"or",
"across",
"using",
"the",
"provided",
"offset"
] | [
"\"\"\"Copy a formula down or across, using the provided offset\"\"\"",
"#print 'formula', frmla"
] | [
{
"param": "self",
"type": null
},
{
"param": "cellval",
"type": null
},
{
"param": "row",
"type": null
},
{
"param": "col",
"type": null
},
{
"param": "offset",
"type": null
},
{
"param": "dim",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "cellval",
"type": null,
"docstring": null,
"docstring_tokens"... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | merge | <not_specific> | def merge(self, model, key='name', fields=None):
"""Merge another table model with this one based on a key field,
we only add nrecords from the new model where the key is present
in both models"""
if fields == None: fields = model.columnNames
for rec in self.reclist:
... | Merge another table model with this one based on a key field,
we only add nrecords from the new model where the key is present
in both models | Merge another table model with this one based on a key field,
we only add nrecords from the new model where the key is present
in both models | [
"Merge",
"another",
"table",
"model",
"with",
"this",
"one",
"based",
"on",
"a",
"key",
"field",
"we",
"only",
"add",
"nrecords",
"from",
"the",
"new",
"model",
"where",
"the",
"key",
"is",
"present",
"in",
"both",
"models"
] | def merge(self, model, key='name', fields=None):
if fields == None: fields = model.columnNames
for rec in self.reclist:
if not self.data[rec].has_key(key):
continue
for new in model.reclist:
if not model.data[new].has_key(key):
... | [
"def",
"merge",
"(",
"self",
",",
"model",
",",
"key",
"=",
"'name'",
",",
"fields",
"=",
"None",
")",
":",
"if",
"fields",
"==",
"None",
":",
"fields",
"=",
"model",
".",
"columnNames",
"for",
"rec",
"in",
"self",
".",
"reclist",
":",
"if",
"not",... | Merge another table model with this one based on a key field,
we only add nrecords from the new model where the key is present
in both models | [
"Merge",
"another",
"table",
"model",
"with",
"this",
"one",
"based",
"on",
"a",
"key",
"field",
"we",
"only",
"add",
"nrecords",
"from",
"the",
"new",
"model",
"where",
"the",
"key",
"is",
"present",
"in",
"both",
"models"
] | [
"\"\"\"Merge another table model with this one based on a key field, \n we only add nrecords from the new model where the key is present\n in both models\"\"\"",
"#if new == rec: "
] | [
{
"param": "self",
"type": null
},
{
"param": "model",
"type": null
},
{
"param": "key",
"type": null
},
{
"param": "fields",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "model",
"type": null,
"docstring": null,
"docstring_tokens": ... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | addRecord | <not_specific> | def addRecord(self, name, **kwargs):
"""Add new rec with all fields in kwargs dict"""
#name = kwargs[kwargs.keys()[0]]
self.addRow(name)
self.addColumn('name')
self.data[name]['name'] = name
for k in kwargs:
if not k in self.columnNames:... | Add new rec with all fields in kwargs dict | Add new rec with all fields in kwargs dict | [
"Add",
"new",
"rec",
"with",
"all",
"fields",
"in",
"kwargs",
"dict"
] | def addRecord(self, name, **kwargs):
self.addRow(name)
self.addColumn('name')
self.data[name]['name'] = name
for k in kwargs:
if not k in self.columnNames:
self.addColumn(k)
self.data[name][k] = str(kwargs[k])
return | [
"def",
"addRecord",
"(",
"self",
",",
"name",
",",
"**",
"kwargs",
")",
":",
"self",
".",
"addRow",
"(",
"name",
")",
"self",
".",
"addColumn",
"(",
"'name'",
")",
"self",
".",
"data",
"[",
"name",
"]",
"[",
"'name'",
"]",
"=",
"name",
"for",
"k"... | Add new rec with all fields in kwargs dict | [
"Add",
"new",
"rec",
"with",
"all",
"fields",
"in",
"kwargs",
"dict"
] | [
"\"\"\"Add new rec with all fields in kwargs dict\"\"\"",
"#name = kwargs[kwargs.keys()[0]]"
] | [
{
"param": "self",
"type": null
},
{
"param": "name",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "name",
"type": null,
"docstring": null,
"docstring_tokens": [... |
b6f2f3c5e0c61cc593f5e7cae40b0461e903d653 | shambo001/peat | PEATDB/TableModels.py | [
"MIT"
] | Python | copy | <not_specific> | def copy(self):
"""Return a copy of this model"""
M=TableModel()
data = self.getData()
M.setupModel(data)
return M | Return a copy of this model | Return a copy of this model | [
"Return",
"a",
"copy",
"of",
"this",
"model"
] | def copy(self):
M=TableModel()
data = self.getData()
M.setupModel(data)
return M | [
"def",
"copy",
"(",
"self",
")",
":",
"M",
"=",
"TableModel",
"(",
")",
"data",
"=",
"self",
".",
"getData",
"(",
")",
"M",
".",
"setupModel",
"(",
"data",
")",
"return",
"M"
] | Return a copy of this model | [
"Return",
"a",
"copy",
"of",
"this",
"model"
] | [
"\"\"\"Return a copy of this model\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
df951c6ea8a7703c722a9b056703861ac51da48c | shambo001/peat | Ghost/Epsmap_class.py | [
"MIT"
] | Python | writemap | <not_specific> | def writemap(self,map,filename='tester.dx'):
"""Write this map in dx format"""
mydata=[]
#count=0
for k in range(map.nz):
for j in range(map.ny):
for i in range(map.nx):
#index = map.get_index(i,j,k)
#print index,count,i... | Write this map in dx format | Write this map in dx format | [
"Write",
"this",
"map",
"in",
"dx",
"format"
] | def writemap(self,map,filename='tester.dx'):
mydata=[]
for k in range(map.nz):
for j in range(map.ny):
for i in range(map.nx):
mydata.append(map.get_value(i,j,k))
Create the grid
print mydata
mygrid = Vgrid_ctor(map.nx, map.ny, map... | [
"def",
"writemap",
"(",
"self",
",",
"map",
",",
"filename",
"=",
"'tester.dx'",
")",
":",
"mydata",
"=",
"[",
"]",
"for",
"k",
"in",
"range",
"(",
"map",
".",
"nz",
")",
":",
"for",
"j",
"in",
"range",
"(",
"map",
".",
"ny",
")",
":",
"for",
... | Write this map in dx format | [
"Write",
"this",
"map",
"in",
"dx",
"format"
] | [
"\"\"\"Write this map in dx format\"\"\"",
"#count=0",
"#index = map.get_index(i,j,k)",
"#print index,count,i,j,k",
"#if index!=count:",
"# raise Exception('Error in reformatting map')",
"#count=count+1",
"#",
"# Create the grid",
"#",
"#print mydata",
"#print 'Writemap wrote %s' %filename"... | [
{
"param": "self",
"type": null
},
{
"param": "map",
"type": null
},
{
"param": "filename",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "map",
"type": null,
"docstring": null,
"docstring_tokens": []... |
df951c6ea8a7703c722a9b056703861ac51da48c | shambo001/peat | Ghost/Epsmap_class.py | [
"MIT"
] | Python | clearmap | <not_specific> | def clearmap(self,value):
"""Fill the map with this value"""
numvals=len(self.data)
self.data=[value]*numvals
return | Fill the map with this value | Fill the map with this value | [
"Fill",
"the",
"map",
"with",
"this",
"value"
] | def clearmap(self,value):
numvals=len(self.data)
self.data=[value]*numvals
return | [
"def",
"clearmap",
"(",
"self",
",",
"value",
")",
":",
"numvals",
"=",
"len",
"(",
"self",
".",
"data",
")",
"self",
".",
"data",
"=",
"[",
"value",
"]",
"*",
"numvals",
"return"
] | Fill the map with this value | [
"Fill",
"the",
"map",
"with",
"this",
"value"
] | [
"\"\"\"Fill the map with this value\"\"\""
] | [
{
"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": ... |
df951c6ea8a7703c722a9b056703861ac51da48c | shambo001/peat | Ghost/Epsmap_class.py | [
"MIT"
] | Python | dist | <not_specific> | def dist(self,coord1,coord2):
"""Get the distance between two coordinates"""
vector=coord1-coord2
s=0.0
for element in vector:
s=s+element*element
import math
return math.sqrt(s) | Get the distance between two coordinates | Get the distance between two coordinates | [
"Get",
"the",
"distance",
"between",
"two",
"coordinates"
] | def dist(self,coord1,coord2):
vector=coord1-coord2
s=0.0
for element in vector:
s=s+element*element
import math
return math.sqrt(s) | [
"def",
"dist",
"(",
"self",
",",
"coord1",
",",
"coord2",
")",
":",
"vector",
"=",
"coord1",
"-",
"coord2",
"s",
"=",
"0.0",
"for",
"element",
"in",
"vector",
":",
"s",
"=",
"s",
"+",
"element",
"*",
"element",
"import",
"math",
"return",
"math",
"... | Get the distance between two coordinates | [
"Get",
"the",
"distance",
"between",
"two",
"coordinates"
] | [
"\"\"\"Get the distance between two coordinates\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "coord1",
"type": null
},
{
"param": "coord2",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "coord1",
"type": null,
"docstring": null,
"docstring_tokens":... |
cb4acbb5893c09b3c642b8b02a721c8179cbe953 | shambo001/peat | PEATSA/Core/Goodvibes/Utilities.py | [
"MIT"
] | Python | eigenv_calccomb | <not_specific> | def eigenv_calccomb(matrix_hessian, jobid, verbose, l_rem = []):
'''Calculates eigenvectors and eigenvalues of a matrix.'''
if verbose == True:
print 'calculating eigenvalues and eigenvectors of the '+str(len(matrix_hessian))+'x'+str(len(matrix_hessian))+' Hessian matrix'
import math
## import ... | Calculates eigenvectors and eigenvalues of a matrix. | Calculates eigenvectors and eigenvalues of a matrix. | [
"Calculates",
"eigenvectors",
"and",
"eigenvalues",
"of",
"a",
"matrix",
"."
] | def eigenv_calccomb(matrix_hessian, jobid, verbose, l_rem = []):
if verbose == True:
print 'calculating eigenvalues and eigenvectors of the '+str(len(matrix_hessian))+'x'+str(len(matrix_hessian))+' Hessian matrix'
import math
import numpy
t1 = time.clock()
eigen_tuple = numpy.linalg.eig(matr... | [
"def",
"eigenv_calccomb",
"(",
"matrix_hessian",
",",
"jobid",
",",
"verbose",
",",
"l_rem",
"=",
"[",
"]",
")",
":",
"if",
"verbose",
"==",
"True",
":",
"print",
"'calculating eigenvalues and eigenvectors of the '",
"+",
"str",
"(",
"len",
"(",
"matrix_hessian"... | Calculates eigenvectors and eigenvalues of a matrix. | [
"Calculates",
"eigenvectors",
"and",
"eigenvalues",
"of",
"a",
"matrix",
"."
] | [
"'''Calculates eigenvectors and eigenvalues of a matrix.'''",
"## import time",
"##",
"## import numpy",
"## ",
"## t1 = time.clock()",
"## eigen_tuple = numpy.linalg.eig(matrix_hessian)",
"## t2 = time.clock()",
"## print t2-t1",
"## eigenvalues = list(eigen_tuple[0])",
... | [
{
"param": "matrix_hessian",
"type": null
},
{
"param": "jobid",
"type": null
},
{
"param": "verbose",
"type": null
},
{
"param": "l_rem",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "matrix_hessian",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "jobid",
"type": null,
"docstring": null,
"docstring... |
1df57b2de6f7dcd1349f7ce5076736449c28841a | shambo001/peat | Ghost/Create_epsmap.py | [
"MIT"
] | Python | slave_wait | <not_specific> | def slave_wait(self):
"""Wait for messages from the master"""
while True:
import pypar
source=0
command=pypar.receive(source)
self.cube_eps=command[0].copy()
cube=command[1]
if cube<0:
print 'Slave %d exiting' %self.... | Wait for messages from the master | Wait for messages from the master | [
"Wait",
"for",
"messages",
"from",
"the",
"master"
] | def slave_wait(self):
while True:
import pypar
source=0
command=pypar.receive(source)
self.cube_eps=command[0].copy()
cube=command[1]
if cube<0:
print 'Slave %d exiting' %self.myid
import sys
... | [
"def",
"slave_wait",
"(",
"self",
")",
":",
"while",
"True",
":",
"import",
"pypar",
"source",
"=",
"0",
"command",
"=",
"pypar",
".",
"receive",
"(",
"source",
")",
"self",
".",
"cube_eps",
"=",
"command",
"[",
"0",
"]",
".",
"copy",
"(",
")",
"cu... | Wait for messages from the master | [
"Wait",
"for",
"messages",
"from",
"the",
"master"
] | [
"\"\"\"Wait for messages from the master\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
1df57b2de6f7dcd1349f7ce5076736449c28841a | shambo001/peat | Ghost/Create_epsmap.py | [
"MIT"
] | Python | calc_cube | <not_specific> | def calc_cube(self,centercube,master=False):
"""Calculate the score when performing a permutation on this cube"""
#
# First init the epsmap
#
if not master:
cubes=self.epsmap.get_cubes(sidelength=self.options.sidelength,eps=80.0)
for cube in self.cube_eps.keys... | Calculate the score when performing a permutation on this cube | Calculate the score when performing a permutation on this cube | [
"Calculate",
"the",
"score",
"when",
"performing",
"a",
"permutation",
"on",
"this",
"cube"
] | def calc_cube(self,centercube,master=False):
First init the epsmap
if not master:
cubes=self.epsmap.get_cubes(sidelength=self.options.sidelength,eps=80.0)
for cube in self.cube_eps.keys():
self.epsmap.set_cubeeps(cube,self.cube_eps[cube])
Do the permutation and ... | [
"def",
"calc_cube",
"(",
"self",
",",
"centercube",
",",
"master",
"=",
"False",
")",
":",
"if",
"not",
"master",
":",
"cubes",
"=",
"self",
".",
"epsmap",
".",
"get_cubes",
"(",
"sidelength",
"=",
"self",
".",
"options",
".",
"sidelength",
",",
"eps",... | Calculate the score when performing a permutation on this cube | [
"Calculate",
"the",
"score",
"when",
"performing",
"a",
"permutation",
"on",
"this",
"cube"
] | [
"\"\"\"Calculate the score when performing a permutation on this cube\"\"\"",
"#",
"# First init the epsmap",
"#",
"#",
"# Do the permutation and calculate",
"#"
] | [
{
"param": "self",
"type": null
},
{
"param": "centercube",
"type": null
},
{
"param": "master",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "centercube",
"type": null,
"docstring": null,
"docstring_toke... |
1df57b2de6f7dcd1349f7ce5076736449c28841a | shambo001/peat | Ghost/Create_epsmap.py | [
"MIT"
] | Python | cube_scan | <not_specific> | def cube_scan(self):
"""Calculate the score for all cubes"""
#
# Define the epsmap
#
cubes=self.epsmap.get_cubes(sidelength=self.options.sidelength,eps=80.0,clearmaps=False)
print 'Creating map with %d cubes' %(len(cubes))
self.cube_eps={}
self.cube_grad={... | Calculate the score for all cubes | Calculate the score for all cubes | [
"Calculate",
"the",
"score",
"for",
"all",
"cubes"
] | def cube_scan(self):
Define the epsmap
cubes=self.epsmap.get_cubes(sidelength=self.options.sidelength,eps=80.0,clearmaps=False)
print 'Creating map with %d cubes' %(len(cubes))
self.cube_eps={}
self.cube_grad={}
for cube in cubes:
self.cube_eps[cube]=80.0
... | [
"def",
"cube_scan",
"(",
"self",
")",
":",
"cubes",
"=",
"self",
".",
"epsmap",
".",
"get_cubes",
"(",
"sidelength",
"=",
"self",
".",
"options",
".",
"sidelength",
",",
"eps",
"=",
"80.0",
",",
"clearmaps",
"=",
"False",
")",
"print",
"'Creating map wit... | Calculate the score for all cubes | [
"Calculate",
"the",
"score",
"for",
"all",
"cubes"
] | [
"\"\"\"Calculate the score for all cubes\"\"\"",
"#",
"# Define the epsmap",
"#",
"#",
"# If starteps is defined, then load the starting epsmap",
"#",
"#",
"# ---",
"#",
"#",
"# Tell all children to die",
"#"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
1df57b2de6f7dcd1349f7ce5076736449c28841a | shambo001/peat | Ghost/Create_epsmap.py | [
"MIT"
] | Python | run_APBS | <not_specific> | def run_APBS(self,titgroup=None,charge=None,epsmap=None,focus=None,APBSauto=True,deletedir=True):
"""Run APBS in mg-auto mode to get a map focussed on the protein"""
#
# Potname
#
import tempfile
thisdir=tempfile.mkdtemp(dir='/tmp')
import os
potname=os.pa... | Run APBS in mg-auto mode to get a map focussed on the protein | Run APBS in mg-auto mode to get a map focussed on the protein | [
"Run",
"APBS",
"in",
"mg",
"-",
"auto",
"mode",
"to",
"get",
"a",
"map",
"focussed",
"on",
"the",
"protein"
] | def run_APBS(self,titgroup=None,charge=None,epsmap=None,focus=None,APBSauto=True,deletedir=True):
Potname
import tempfile
thisdir=tempfile.mkdtemp(dir='/tmp')
import os
potname=os.path.join(thisdir,'%s_potential' %(titgroup))
Get charge
import pKa.pKD_tools
... | [
"def",
"run_APBS",
"(",
"self",
",",
"titgroup",
"=",
"None",
",",
"charge",
"=",
"None",
",",
"epsmap",
"=",
"None",
",",
"focus",
"=",
"None",
",",
"APBSauto",
"=",
"True",
",",
"deletedir",
"=",
"True",
")",
":",
"import",
"tempfile",
"thisdir",
"... | Run APBS in mg-auto mode to get a map focussed on the protein | [
"Run",
"APBS",
"in",
"mg",
"-",
"auto",
"mode",
"to",
"get",
"a",
"map",
"focussed",
"on",
"the",
"protein"
] | [
"\"\"\"Run APBS in mg-auto mode to get a map focussed on the protein\"\"\"",
"#",
"# Potname",
"#",
"#",
"# Get charge",
"#",
"#",
"# Get the PQR file",
"#",
"#",
"# Get the coarse and fine centers",
"#",
"#",
"# Run APBS",
"#",
"#",
"#",
"#",
"#text += \" kappa dx kappa%d.d... | [
{
"param": "self",
"type": null
},
{
"param": "titgroup",
"type": null
},
{
"param": "charge",
"type": null
},
{
"param": "epsmap",
"type": null
},
{
"param": "focus",
"type": null
},
{
"param": "APBSauto",
"type": null
},
{
"param": "delet... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "titgroup",
"type": null,
"docstring": null,
"docstring_tokens... |
1df57b2de6f7dcd1349f7ce5076736449c28841a | shambo001/peat | Ghost/Create_epsmap.py | [
"MIT"
] | Python | dielscan | <not_specific> | def dielscan(options,args):
"""Do a scan of the dielectric constant"""
indi_errors={}
results={}
all_ghosts={}
for method in ['coulomb','PBE']:
all_ghosts[method]={}
txt='Method: %s' %method
print method,
import sys
sys.stdout.flush()
for absent in ['u... | Do a scan of the dielectric constant | Do a scan of the dielectric constant | [
"Do",
"a",
"scan",
"of",
"the",
"dielectric",
"constant"
] | def dielscan(options,args):
indi_errors={}
results={}
all_ghosts={}
for method in ['coulomb','PBE']:
all_ghosts[method]={}
txt='Method: %s' %method
print method,
import sys
sys.stdout.flush()
for absent in ['use']:
options.smoothe=False
... | [
"def",
"dielscan",
"(",
"options",
",",
"args",
")",
":",
"indi_errors",
"=",
"{",
"}",
"results",
"=",
"{",
"}",
"all_ghosts",
"=",
"{",
"}",
"for",
"method",
"in",
"[",
"'coulomb'",
",",
"'PBE'",
"]",
":",
"all_ghosts",
"[",
"method",
"]",
"=",
"... | Do a scan of the dielectric constant | [
"Do",
"a",
"scan",
"of",
"the",
"dielectric",
"constant"
] | [
"\"\"\"Do a scan of the dielectric constant\"\"\"",
"#,'dontuse']:",
"#",
"# Store all the calculated ghosts",
"#",
"#",
"# Save ghosts",
"#",
"#",
"# -----",
"#"
] | [
{
"param": "options",
"type": null
},
{
"param": "args",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "options",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "args",
"type": null,
"docstring": null,
"docstring_tokens"... |
258f9b3e3ccc0854c202ad7b4c5a691dc34e66c4 | shambo001/peat | pKarun/submit_calculations.py | [
"MIT"
] | Python | callWhatif | <not_specific> | def callWhatif(pdb):
'''
Runs Whatif and cleans the pdb file
'''
dir_name = os.getcwd()
source = '%s/whatif.txt'%dir_name
fd = open(source, 'w')
fd.writelines(['/home/predrag/whatif/DO_WHATIF.COM <<EOF\n',
'GETMOL %s\n'%pdb,
'\n',
'%DELWAT\n',
'%DELLIG\n',
'%CORALL\n',
'N\n',
'%MAKMOL\n',
'\n',
... |
Runs Whatif and cleans the pdb file
| Runs Whatif and cleans the pdb file | [
"Runs",
"Whatif",
"and",
"cleans",
"the",
"pdb",
"file"
] | def callWhatif(pdb):
dir_name = os.getcwd()
source = '%s/whatif.txt'%dir_name
fd = open(source, 'w')
fd.writelines(['/home/predrag/whatif/DO_WHATIF.COM <<EOF\n',
'GETMOL %s\n'%pdb,
'\n',
'%DELWAT\n',
'%DELLIG\n',
'%CORALL\n',
'N\n',
'%MAKMOL\n',
'\n',
'pka.%s\n'%pdb,
'TOT 0\n',
'\n',
'STOP\n... | [
"def",
"callWhatif",
"(",
"pdb",
")",
":",
"dir_name",
"=",
"os",
".",
"getcwd",
"(",
")",
"source",
"=",
"'%s/whatif.txt'",
"%",
"dir_name",
"fd",
"=",
"open",
"(",
"source",
",",
"'w'",
")",
"fd",
".",
"writelines",
"(",
"[",
"'/home/predrag/whatif/DO_... | Runs Whatif and cleans the pdb file | [
"Runs",
"Whatif",
"and",
"cleans",
"the",
"pdb",
"file"
] | [
"'''\n\tRuns Whatif and cleans the pdb file\n\t'''"
] | [
{
"param": "pdb",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "pdb",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | deactivate_callbacks | <not_specific> | def deactivate_callbacks(self):
"""Deactivate all callbacks from the scale widgets"""
for group in self.groups:
self.groups[group].intpka.configure(command=self.dummy)
self.groups[group].active_btn.configure(command=self.dummy)
self.groups[group].ab_button.configure(c... | Deactivate all callbacks from the scale widgets | Deactivate all callbacks from the scale widgets | [
"Deactivate",
"all",
"callbacks",
"from",
"the",
"scale",
"widgets"
] | def deactivate_callbacks(self):
for group in self.groups:
self.groups[group].intpka.configure(command=self.dummy)
self.groups[group].active_btn.configure(command=self.dummy)
self.groups[group].ab_button.configure(command=self.dummy)
self.groups[group].style_button... | [
"def",
"deactivate_callbacks",
"(",
"self",
")",
":",
"for",
"group",
"in",
"self",
".",
"groups",
":",
"self",
".",
"groups",
"[",
"group",
"]",
".",
"intpka",
".",
"configure",
"(",
"command",
"=",
"self",
".",
"dummy",
")",
"self",
".",
"groups",
... | Deactivate all callbacks from the scale widgets | [
"Deactivate",
"all",
"callbacks",
"from",
"the",
"scale",
"widgets"
] | [
"\"\"\"Deactivate all callbacks from the scale widgets\"\"\"",
"#",
"# Unfolded form",
"#"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | activate_callbacks | <not_specific> | def activate_callbacks(self):
"""Deactivate all callbacks from the scale widgets"""
for group in self.groups:
self.groups[group].intpka_scale.configure(command=self.update_scales)
self.groups[group].active_btn.configure(command=self.update_pkasystem_curves)
self.group... | Deactivate all callbacks from the scale widgets | Deactivate all callbacks from the scale widgets | [
"Deactivate",
"all",
"callbacks",
"from",
"the",
"scale",
"widgets"
] | def activate_callbacks(self):
for group in self.groups:
self.groups[group].intpka_scale.configure(command=self.update_scales)
self.groups[group].active_btn.configure(command=self.update_pkasystem_curves)
self.groups[group].ab_button.configure(command=self.update_pkasystem_cur... | [
"def",
"activate_callbacks",
"(",
"self",
")",
":",
"for",
"group",
"in",
"self",
".",
"groups",
":",
"self",
".",
"groups",
"[",
"group",
"]",
".",
"intpka_scale",
".",
"configure",
"(",
"command",
"=",
"self",
".",
"update_scales",
")",
"self",
".",
... | Deactivate all callbacks from the scale widgets | [
"Deactivate",
"all",
"callbacks",
"from",
"the",
"scale",
"widgets"
] | [
"\"\"\"Deactivate all callbacks from the scale widgets\"\"\"",
"#",
"# Unfolded form",
"#"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | change_dielectric | <not_specific> | def change_dielectric(self):
"""Change the dielectric constant - i.e. scale all energies"""
self.eps=Toplevel()
self.eps.title('Change dielectric constant')
self.eps.geometry('+200+200')
Label(self.eps,text='Change dielectric constant by a factor').grid(row=0,column=0)
se... | Change the dielectric constant - i.e. scale all energies | Change the dielectric constant - i.e. scale all energies | [
"Change",
"the",
"dielectric",
"constant",
"-",
"i",
".",
"e",
".",
"scale",
"all",
"energies"
] | def change_dielectric(self):
self.eps=Toplevel()
self.eps.title('Change dielectric constant')
self.eps.geometry('+200+200')
Label(self.eps,text='Change dielectric constant by a factor').grid(row=0,column=0)
self.eps_var=DoubleVar()
self.eps_var.set(0.5)
Entry(self... | [
"def",
"change_dielectric",
"(",
"self",
")",
":",
"self",
".",
"eps",
"=",
"Toplevel",
"(",
")",
"self",
".",
"eps",
".",
"title",
"(",
"'Change dielectric constant'",
")",
"self",
".",
"eps",
".",
"geometry",
"(",
"'+200+200'",
")",
"Label",
"(",
"self... | Change the dielectric constant - i.e. | [
"Change",
"the",
"dielectric",
"constant",
"-",
"i",
".",
"e",
"."
] | [
"\"\"\"Change the dielectric constant - i.e. scale all energies\"\"\"",
"#",
"# Check if we have model pKa values",
"#",
"#",
"# Submit button",
"#"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | measure_change | <not_specific> | def measure_change(self,reference=None,absolut=False):
"""Measure the difference in the titration curve as compared to the wt situration"""
X=self.update_pkasystem_curves(doit=1)
#
# Should we update the display?
#
if self.draw:
self.titwin.update()
el... | Measure the difference in the titration curve as compared to the wt situration | Measure the difference in the titration curve as compared to the wt situration | [
"Measure",
"the",
"difference",
"in",
"the",
"titration",
"curve",
"as",
"compared",
"to",
"the",
"wt",
"situration"
] | def measure_change(self,reference=None,absolut=False):
X=self.update_pkasystem_curves(doit=1)
Should we update the display?
if self.draw:
self.titwin.update()
else:
if self.counter%10==0:
self.titwin.update()
Get the reference
if ... | [
"def",
"measure_change",
"(",
"self",
",",
"reference",
"=",
"None",
",",
"absolut",
"=",
"False",
")",
":",
"X",
"=",
"self",
".",
"update_pkasystem_curves",
"(",
"doit",
"=",
"1",
")",
"if",
"self",
".",
"draw",
":",
"self",
".",
"titwin",
".",
"up... | Measure the difference in the titration curve as compared to the wt situration | [
"Measure",
"the",
"difference",
"in",
"the",
"titration",
"curve",
"as",
"compared",
"to",
"the",
"wt",
"situration"
] | [
"\"\"\"Measure the difference in the titration curve as compared to the wt situration\"\"\"",
"#",
"# Should we update the display?",
"#",
"#",
"# Get the reference",
"#",
"#",
"#",
"# Measure the change",
"#",
"#",
"# Store this difference",
"#",
"#",
"# Sort by largest difference",
... | [
{
"param": "self",
"type": null
},
{
"param": "reference",
"type": null
},
{
"param": "absolut",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "reference",
"type": null,
"docstring": null,
"docstring_token... |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | single_parameter_analysis | <not_specific> | def single_parameter_analysis(self):
"""Vary every single parameter and record changes in the protonation states"""
#
# Store a copy of the wild type state
#
self.WT=self.update_pkasystem_curves()
self.wt_state=self.pack_configuration()
#
# Start looping f... | Vary every single parameter and record changes in the protonation states | Vary every single parameter and record changes in the protonation states | [
"Vary",
"every",
"single",
"parameter",
"and",
"record",
"changes",
"in",
"the",
"protonation",
"states"
] | def single_parameter_analysis(self):
Store a copy of the wild type state
self.WT=self.update_pkasystem_curves()
self.wt_state=self.pack_configuration()
Start looping for all intrinsic pKa values
num_groups=len(self.groups.keys())
self.tot_perms=2*num_groups+num_groups*(... | [
"def",
"single_parameter_analysis",
"(",
"self",
")",
":",
"self",
".",
"WT",
"=",
"self",
".",
"update_pkasystem_curves",
"(",
")",
"self",
".",
"wt_state",
"=",
"self",
".",
"pack_configuration",
"(",
")",
"num_groups",
"=",
"len",
"(",
"self",
".",
"gro... | Vary every single parameter and record changes in the protonation states | [
"Vary",
"every",
"single",
"parameter",
"and",
"record",
"changes",
"in",
"the",
"protonation",
"states"
] | [
"\"\"\"Vary every single parameter and record changes in the protonation states\"\"\"",
"#",
"# Store a copy of the wild type state",
"#",
"#",
"# Start looping for all intrinsic pKa values",
"#",
"#",
"#",
"# Explore the difference in the intrinsic pKa",
"#",
"#",
"# Vary as fraction of des... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | pack_configuration | <not_specific> | def pack_configuration(self):
"""Pack the present configuration of the system into a string"""
groups=self.groups.keys()
groups.sort()
s=''
#
# Intrinsic pKa values
#
for group in groups:
s=s+'_%.2f' %(self.groups[group].intpka.get())
... | Pack the present configuration of the system into a string | Pack the present configuration of the system into a string | [
"Pack",
"the",
"present",
"configuration",
"of",
"the",
"system",
"into",
"a",
"string"
] | def pack_configuration(self):
groups=self.groups.keys()
groups.sort()
s=''
Intrinsic pKa values
for group in groups:
s=s+'_%.2f' %(self.groups[group].intpka.get())
Interaction energies
groups2=self.groups[group].intenes.keys()
gro... | [
"def",
"pack_configuration",
"(",
"self",
")",
":",
"groups",
"=",
"self",
".",
"groups",
".",
"keys",
"(",
")",
"groups",
".",
"sort",
"(",
")",
"s",
"=",
"''",
"for",
"group",
"in",
"groups",
":",
"s",
"=",
"s",
"+",
"'_%.2f'",
"%",
"(",
"self"... | Pack the present configuration of the system into a string | [
"Pack",
"the",
"present",
"configuration",
"of",
"the",
"system",
"into",
"a",
"string"
] | [
"\"\"\"Pack the present configuration of the system into a string\"\"\"",
"#",
"# Intrinsic pKa values",
"#",
"#",
"# Interaction energies",
"#",
"#",
"# Done",
"#"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | unpack_configuration | <not_specific> | def unpack_configuration(self,s):
"""Given a state of the system in a string, set that state"""
groups=self.groups.keys()
groups.sort()
s=s.split('_')
s=s[1:]
count=0
#
# Intrinsic pKa values
#
for group in groups:
self.groups[g... | Given a state of the system in a string, set that state | Given a state of the system in a string, set that state | [
"Given",
"a",
"state",
"of",
"the",
"system",
"in",
"a",
"string",
"set",
"that",
"state"
] | def unpack_configuration(self,s):
groups=self.groups.keys()
groups.sort()
s=s.split('_')
s=s[1:]
count=0
Intrinsic pKa values
for group in groups:
self.groups[group].intpka.set(float(s[count]))
count=count+1
Interaction energi... | [
"def",
"unpack_configuration",
"(",
"self",
",",
"s",
")",
":",
"groups",
"=",
"self",
".",
"groups",
".",
"keys",
"(",
")",
"groups",
".",
"sort",
"(",
")",
"s",
"=",
"s",
".",
"split",
"(",
"'_'",
")",
"s",
"=",
"s",
"[",
"1",
":",
"]",
"co... | Given a state of the system in a string, set that state | [
"Given",
"a",
"state",
"of",
"the",
"system",
"in",
"a",
"string",
"set",
"that",
"state"
] | [
"\"\"\"Given a state of the system in a string, set that state\"\"\"",
"#",
"# Intrinsic pKa values",
"#",
"#",
"# Interaction energies",
"#"
] | [
{
"param": "self",
"type": null
},
{
"param": "s",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "s",
"type": null,
"docstring": null,
"docstring_tokens": [],
... |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | display_state | <not_specific> | def display_state(self,junk=None):
"""Display a particular state of the system"""
for state in self.listbox.curselection():
state_num=int(state)
self.titwin.title('Titration curves [state: %d]' %state_num)
state=self.curv_diffs[state_num][0]
self.unpack_co... | Display a particular state of the system | Display a particular state of the system | [
"Display",
"a",
"particular",
"state",
"of",
"the",
"system"
] | def display_state(self,junk=None):
for state in self.listbox.curselection():
state_num=int(state)
self.titwin.title('Titration curves [state: %d]' %state_num)
state=self.curv_diffs[state_num][0]
self.unpack_configuration(state)
self.update_pkasystem_curves... | [
"def",
"display_state",
"(",
"self",
",",
"junk",
"=",
"None",
")",
":",
"for",
"state",
"in",
"self",
".",
"listbox",
".",
"curselection",
"(",
")",
":",
"state_num",
"=",
"int",
"(",
"state",
")",
"self",
".",
"titwin",
".",
"title",
"(",
"'Titrati... | Display a particular state of the system | [
"Display",
"a",
"particular",
"state",
"of",
"the",
"system"
] | [
"\"\"\"Display a particular state of the system\"\"\""
] | [
{
"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": [... |
80e41f4a425bc29b0e4cd50acdccb1c410d4bb9d | shambo001/peat | pKaTool/pKa_system_help.py | [
"MIT"
] | Python | calc_decomposition | <not_specific> | def calc_decomposition(self):
"""Run the insystem and exsystem decomposition energies"""
#
# Store a copy of the wild type state
#
self.WT=self.update_pkasystem_curves()
self.wt_state=self.pack_configuration()
#
# Start looping over all groups
#
... | Run the insystem and exsystem decomposition energies | Run the insystem and exsystem decomposition energies | [
"Run",
"the",
"insystem",
"and",
"exsystem",
"decomposition",
"energies"
] | def calc_decomposition(self):
Store a copy of the wild type state
self.WT=self.update_pkasystem_curves()
self.wt_state=self.pack_configuration()
Start looping over all groups
num_groups=len(self.groups.keys())
self.tot_perms=2*num_groups+num_groups*(num_groups-1)
... | [
"def",
"calc_decomposition",
"(",
"self",
")",
":",
"self",
".",
"WT",
"=",
"self",
".",
"update_pkasystem_curves",
"(",
")",
"self",
".",
"wt_state",
"=",
"self",
".",
"pack_configuration",
"(",
")",
"num_groups",
"=",
"len",
"(",
"self",
".",
"groups",
... | Run the insystem and exsystem decomposition energies | [
"Run",
"the",
"insystem",
"and",
"exsystem",
"decomposition",
"energies"
] | [
"\"\"\"Run the insystem and exsystem decomposition energies\"\"\"",
"#",
"# Store a copy of the wild type state",
"#",
"#",
"# Start looping over all groups",
"#",
"#",
"#",
"# Make sure we get the correct titration curve difference",
"#",
"#",
"# Swith off all other groups",
"#",
"# Res... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | do_bindings | <not_specific> | def do_bindings(self):
"""Bind keys and mouse clicks - overriden"""
self.bind("<Button-1>",self.handle_left_click)
self.bind("<Double-Button-1>",self.handle_double_click)
self.bind("<Control-Button-1>", self.handle_left_ctrl_click)
self.bind("<Shift-Button-1>", self.handle_left_s... | Bind keys and mouse clicks - overriden | Bind keys and mouse clicks - overriden | [
"Bind",
"keys",
"and",
"mouse",
"clicks",
"-",
"overriden"
] | def do_bindings(self):
self.bind("<Button-1>",self.handle_left_click)
self.bind("<Double-Button-1>",self.handle_double_click)
self.bind("<Control-Button-1>", self.handle_left_ctrl_click)
self.bind("<Shift-Button-1>", self.handle_left_shift_click)
self.bind("<ButtonRelease-1>", se... | [
"def",
"do_bindings",
"(",
"self",
")",
":",
"self",
".",
"bind",
"(",
"\"<Button-1>\"",
",",
"self",
".",
"handle_left_click",
")",
"self",
".",
"bind",
"(",
"\"<Double-Button-1>\"",
",",
"self",
".",
"handle_double_click",
")",
"self",
".",
"bind",
"(",
... | Bind keys and mouse clicks - overriden | [
"Bind",
"keys",
"and",
"mouse",
"clicks",
"-",
"overriden"
] | [
"\"\"\"Bind keys and mouse clicks - overriden\"\"\"",
"#For mac we bind Shift, left-click to right click",
"#bind to parentapp instead of parentframe for PEAT"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | add_Row | <not_specific> | def add_Row(self, recname=None):
"""Add a new rec in PEAT, need special dialog"""
def checkrow_name(rowname):
if rowname == '':
tkMessageBox.showwarning("Whoops", "Name should not be blank.")
if self.getModel().data.has_key(rowname):
tkMessageBox.s... | Add a new rec in PEAT, need special dialog | Add a new rec in PEAT, need special dialog | [
"Add",
"a",
"new",
"rec",
"in",
"PEAT",
"need",
"special",
"dialog"
] | def add_Row(self, recname=None):
def checkrow_name(rowname):
if rowname == '':
tkMessageBox.showwarning("Whoops", "Name should not be blank.")
if self.getModel().data.has_key(rowname):
tkMessageBox.showwarning("Name exists", "Record already exists!")
... | [
"def",
"add_Row",
"(",
"self",
",",
"recname",
"=",
"None",
")",
":",
"def",
"checkrow_name",
"(",
"rowname",
")",
":",
"if",
"rowname",
"==",
"''",
":",
"tkMessageBox",
".",
"showwarning",
"(",
"\"Whoops\"",
",",
"\"Name should not be blank.\"",
")",
"if",
... | Add a new rec in PEAT, need special dialog | [
"Add",
"a",
"new",
"rec",
"in",
"PEAT",
"need",
"special",
"dialog"
] | [
"\"\"\"Add a new rec in PEAT, need special dialog\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "recname",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "recname",
"type": null,
"docstring": null,
"docstring_tokens"... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | handle_double_click | <not_specific> | def handle_double_click(self, event):
"""Do double click stuff. Selected row/cols will already have
been set with single click binding"""
row = self.get_row_clicked(event)
col = self.get_col_clicked(event)
absrow = self.get_AbsoluteRow(row)
if col == None:
... | Do double click stuff. Selected row/cols will already have
been set with single click binding | Do double click stuff. Selected row/cols will already have
been set with single click binding | [
"Do",
"double",
"click",
"stuff",
".",
"Selected",
"row",
"/",
"cols",
"will",
"already",
"have",
"been",
"set",
"with",
"single",
"click",
"binding"
] | def handle_double_click(self, event):
row = self.get_row_clicked(event)
col = self.get_col_clicked(event)
absrow = self.get_AbsoluteRow(row)
if col == None:
return
model = self.getModel()
cellvalue = model.getCellRecord(absrow, col)
coltype = model.get... | [
"def",
"handle_double_click",
"(",
"self",
",",
"event",
")",
":",
"row",
"=",
"self",
".",
"get_row_clicked",
"(",
"event",
")",
"col",
"=",
"self",
".",
"get_col_clicked",
"(",
"event",
")",
"absrow",
"=",
"self",
".",
"get_AbsoluteRow",
"(",
"row",
")... | Do double click stuff. | [
"Do",
"double",
"click",
"stuff",
"."
] | [
"\"\"\"Do double click stuff. Selected row/cols will already have\n been set with single click binding\"\"\""
] | [
{
"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": ... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | popupMenu | <not_specific> | def popupMenu(self, event, rows=None, cols=None, outside=None):
"""Add right click behaviour for canvas"""
if outside == None:
row = self.get_row_clicked(event)
col = self.get_col_clicked(event)
coltype = self.model.getColumnType(col)
popupmenu = Menu(self, te... | Add right click behaviour for canvas | Add right click behaviour for canvas | [
"Add",
"right",
"click",
"behaviour",
"for",
"canvas"
] | def popupMenu(self, event, rows=None, cols=None, outside=None):
if outside == None:
row = self.get_row_clicked(event)
col = self.get_col_clicked(event)
coltype = self.model.getColumnType(col)
popupmenu = Menu(self, tearoff = 0)
def popupFocusOut(event):
... | [
"def",
"popupMenu",
"(",
"self",
",",
"event",
",",
"rows",
"=",
"None",
",",
"cols",
"=",
"None",
",",
"outside",
"=",
"None",
")",
":",
"if",
"outside",
"==",
"None",
":",
"row",
"=",
"self",
".",
"get_row_clicked",
"(",
"event",
")",
"col",
"=",... | Add right click behaviour for canvas | [
"Add",
"right",
"click",
"behaviour",
"for",
"canvas"
] | [
"\"\"\"Add right click behaviour for canvas\"\"\"",
"\"\"\"Adds all commands per column type based on self.peatactions\"\"\"",
"\"\"\"Add from columnactions if present\"\"\"",
"\"\"\"now add general actions for all cells\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "event",
"type": null
},
{
"param": "rows",
"type": null
},
{
"param": "cols",
"type": null
},
{
"param": "outside",
"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": ... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | add_peatcommand | <not_specific> | def add_peatcommand(fieldtype):
"""Adds all commands per column type based on self.peatactions"""
model = self.getModel()
colname = model.getColumnName(col)
protein = model.getRecName(row)
functions = self.peatactions[fieldtype]
... | Adds all commands per column type based on self.peatactions | Adds all commands per column type based on self.peatactions | [
"Adds",
"all",
"commands",
"per",
"column",
"type",
"based",
"on",
"self",
".",
"peatactions"
] | def add_peatcommand(fieldtype):
model = self.getModel()
colname = model.getColumnName(col)
protein = model.getRecName(row)
functions = self.peatactions[fieldtype]
for f in functions.keys():
func = getattr(self.parentapp,... | [
"def",
"add_peatcommand",
"(",
"fieldtype",
")",
":",
"model",
"=",
"self",
".",
"getModel",
"(",
")",
"colname",
"=",
"model",
".",
"getColumnName",
"(",
"col",
")",
"protein",
"=",
"model",
".",
"getRecName",
"(",
"row",
")",
"functions",
"=",
"self",
... | Adds all commands per column type based on self.peatactions | [
"Adds",
"all",
"commands",
"per",
"column",
"type",
"based",
"on",
"self",
".",
"peatactions"
] | [
"\"\"\"Adds all commands per column type based on self.peatactions\"\"\""
] | [
{
"param": "fieldtype",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "fieldtype",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | add_defaultcommands | <not_specific> | def add_defaultcommands():
"""now add general actions for all cells"""
order = [ "Set Fill Color","Set Text Color","Edit","Copy","Paste","Fill Down","Fill Right", "Clear Data",
"View Record", "Select All",
"Plot Selected","Plot Options"]
... | now add general actions for all cells | now add general actions for all cells | [
"now",
"add",
"general",
"actions",
"for",
"all",
"cells"
] | def add_defaultcommands():
order = [ "Set Fill Color","Set Text Color","Edit","Copy","Paste","Fill Down","Fill Right", "Clear Data",
"View Record", "Select All",
"Plot Selected","Plot Options"]
defaultactions={"Edit" : lambda: self.draw_c... | [
"def",
"add_defaultcommands",
"(",
")",
":",
"order",
"=",
"[",
"\"Set Fill Color\"",
",",
"\"Set Text Color\"",
",",
"\"Edit\"",
",",
"\"Copy\"",
",",
"\"Paste\"",
",",
"\"Fill Down\"",
",",
"\"Fill Right\"",
",",
"\"Clear Data\"",
",",
"\"View Record\"",
",",
"\... | now add general actions for all cells | [
"now",
"add",
"general",
"actions",
"for",
"all",
"cells"
] | [
"\"\"\"now add general actions for all cells\"\"\""
] | [] | {
"returns": [],
"raises": [],
"params": [],
"outlier_params": [],
"others": []
} |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | draw_file_tooltip | <not_specific> | def draw_file_tooltip(self, row, col):
"""Draw a tooltip for image and file previews"""
import os
h=self.height
x1,y1,x2,y2 = self.getCellCoords(row,col)
w=x2-x1
absrow = self.get_AbsoluteRow(row)
text = self.model.getValueAt(absrow,col)
if te... | Draw a tooltip for image and file previews | Draw a tooltip for image and file previews | [
"Draw",
"a",
"tooltip",
"for",
"image",
"and",
"file",
"previews"
] | def draw_file_tooltip(self, row, col):
import os
h=self.height
x1,y1,x2,y2 = self.getCellCoords(row,col)
w=x2-x1
absrow = self.get_AbsoluteRow(row)
text = self.model.getValueAt(absrow,col)
if text == '' or text == None:
return
fopen = Non... | [
"def",
"draw_file_tooltip",
"(",
"self",
",",
"row",
",",
"col",
")",
":",
"import",
"os",
"h",
"=",
"self",
".",
"height",
"x1",
",",
"y1",
",",
"x2",
",",
"y2",
"=",
"self",
".",
"getCellCoords",
"(",
"row",
",",
"col",
")",
"w",
"=",
"x2",
"... | Draw a tooltip for image and file previews | [
"Draw",
"a",
"tooltip",
"for",
"image",
"and",
"file",
"previews"
] | [
"\"\"\"Draw a tooltip for image and file previews\"\"\"",
"#Check if its an image and try to make thumbnail.. needs PIL",
"#if can't get thumb, just create icon for the file type",
"#now draw text"
] | [
{
"param": "self",
"type": null
},
{
"param": "row",
"type": null
},
{
"param": "col",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "row",
"type": null,
"docstring": null,
"docstring_tokens": []... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | update_reclist | <not_specific> | def update_reclist(self, keys, sortcol=None):
"""Update the reclist when DB has been changed externally,
ie. not from the model directly"""
self.reclist = self.data.keys()
if sortcol!=None:
self.setSortOrder(sortcol)
return | Update the reclist when DB has been changed externally,
ie. not from the model directly | Update the reclist when DB has been changed externally,
ie. not from the model directly | [
"Update",
"the",
"reclist",
"when",
"DB",
"has",
"been",
"changed",
"externally",
"ie",
".",
"not",
"from",
"the",
"model",
"directly"
] | def update_reclist(self, keys, sortcol=None):
self.reclist = self.data.keys()
if sortcol!=None:
self.setSortOrder(sortcol)
return | [
"def",
"update_reclist",
"(",
"self",
",",
"keys",
",",
"sortcol",
"=",
"None",
")",
":",
"self",
".",
"reclist",
"=",
"self",
".",
"data",
".",
"keys",
"(",
")",
"if",
"sortcol",
"!=",
"None",
":",
"self",
".",
"setSortOrder",
"(",
"sortcol",
")",
... | Update the reclist when DB has been changed externally,
ie. | [
"Update",
"the",
"reclist",
"when",
"DB",
"has",
"been",
"changed",
"externally",
"ie",
"."
] | [
"\"\"\"Update the reclist when DB has been changed externally,\n ie. not from the model directly\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "keys",
"type": null
},
{
"param": "sortcol",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "keys",
"type": null,
"docstring": null,
"docstring_tokens": [... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | update_columnNames | <not_specific> | def update_columnNames(self):
"""Update the columns from userfields when data has been changed
externally"""
self.userfields = self.meta.userfields
currentkeys = self.userfields.keys()
currentkeys.extend(self.meta.staticfields.keys())
#add any keys not present in new u... | Update the columns from userfields when data has been changed
externally | Update the columns from userfields when data has been changed
externally | [
"Update",
"the",
"columns",
"from",
"userfields",
"when",
"data",
"has",
"been",
"changed",
"externally"
] | def update_columnNames(self):
self.userfields = self.meta.userfields
currentkeys = self.userfields.keys()
currentkeys.extend(self.meta.staticfields.keys())
for key in self.userfields:
if not key in self.columnNames:
self.columnNames.append(key)
... | [
"def",
"update_columnNames",
"(",
"self",
")",
":",
"self",
".",
"userfields",
"=",
"self",
".",
"meta",
".",
"userfields",
"currentkeys",
"=",
"self",
".",
"userfields",
".",
"keys",
"(",
")",
"currentkeys",
".",
"extend",
"(",
"self",
".",
"meta",
".",... | Update the columns from userfields when data has been changed
externally | [
"Update",
"the",
"columns",
"from",
"userfields",
"when",
"data",
"has",
"been",
"changed",
"externally"
] | [
"\"\"\"Update the columns from userfields when data has been changed\n externally\"\"\"",
"#add any keys not present in new userfields",
"#remove keys if not in userfields anymore"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | update_colors | <not_specific> | def update_colors(self):
"""Update from table from DB metadata"""
if self.meta.has_key('table') and self.meta['table'].has_key('colors'):
self.colors = self.meta['table']['colors']
self.columnlabels = self.meta['table']['columnlabels']
if self.meta['table'].has_key('... | Update from table from DB metadata | Update from table from DB metadata | [
"Update",
"from",
"table",
"from",
"DB",
"metadata"
] | def update_colors(self):
if self.meta.has_key('table') and self.meta['table'].has_key('colors'):
self.colors = self.meta['table']['colors']
self.columnlabels = self.meta['table']['columnlabels']
if self.meta['table'].has_key('columnorder'):
self.columnOrder = ... | [
"def",
"update_colors",
"(",
"self",
")",
":",
"if",
"self",
".",
"meta",
".",
"has_key",
"(",
"'table'",
")",
"and",
"self",
".",
"meta",
"[",
"'table'",
"]",
".",
"has_key",
"(",
"'colors'",
")",
":",
"self",
".",
"colors",
"=",
"self",
".",
"met... | Update from table from DB metadata | [
"Update",
"from",
"table",
"from",
"DB",
"metadata"
] | [
"\"\"\"Update from table from DB metadata\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | deleteCellRecord | <not_specific> | def deleteCellRecord(self, rowIndex, columnIndex):
"""Remove the cell data at this row/column"""
colname = self.getColumnName(columnIndex)
coltype = self.columntypes[colname]
name = self.reclist[rowIndex]
if self.data[name].has_key(colname):
self.dat... | Remove the cell data at this row/column | Remove the cell data at this row/column | [
"Remove",
"the",
"cell",
"data",
"at",
"this",
"row",
"/",
"column"
] | def deleteCellRecord(self, rowIndex, columnIndex):
colname = self.getColumnName(columnIndex)
coltype = self.columntypes[colname]
name = self.reclist[rowIndex]
if self.data[name].has_key(colname):
self.data[name].delete(colname)
return | [
"def",
"deleteCellRecord",
"(",
"self",
",",
"rowIndex",
",",
"columnIndex",
")",
":",
"colname",
"=",
"self",
".",
"getColumnName",
"(",
"columnIndex",
")",
"coltype",
"=",
"self",
".",
"columntypes",
"[",
"colname",
"]",
"name",
"=",
"self",
".",
"reclis... | Remove the cell data at this row/column | [
"Remove",
"the",
"cell",
"data",
"at",
"this",
"row",
"/",
"column"
] | [
"\"\"\"Remove the cell data at this row/column\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "rowIndex",
"type": null
},
{
"param": "columnIndex",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "rowIndex",
"type": null,
"docstring": null,
"docstring_tokens... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | ekin_show_length | <not_specific> | def ekin_show_length(self, data):
"""Show only the number of data points/records, taken from DB_actions"""
dkeys=data.keys()
count=0
for key in dkeys:
if len(key)>2:
if key[:2]!='__':
count=count+1
else:
count=co... | Show only the number of data points/records, taken from DB_actions | Show only the number of data points/records, taken from DB_actions | [
"Show",
"only",
"the",
"number",
"of",
"data",
"points",
"/",
"records",
"taken",
"from",
"DB_actions"
] | def ekin_show_length(self, data):
dkeys=data.keys()
count=0
for key in dkeys:
if len(key)>2:
if key[:2]!='__':
count=count+1
else:
count=count+1
dkeys.sort()
dkeys_txt=''
for key in dkeys:
... | [
"def",
"ekin_show_length",
"(",
"self",
",",
"data",
")",
":",
"dkeys",
"=",
"data",
".",
"keys",
"(",
")",
"count",
"=",
"0",
"for",
"key",
"in",
"dkeys",
":",
"if",
"len",
"(",
"key",
")",
">",
"2",
":",
"if",
"key",
"[",
":",
"2",
"]",
"!=... | Show only the number of data points/records, taken from DB_actions | [
"Show",
"only",
"the",
"number",
"of",
"data",
"points",
"/",
"records",
"taken",
"from",
"DB_actions"
] | [
"\"\"\"Show only the number of data points/records, taken from DB_actions\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "data",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "data",
"type": null,
"docstring": null,
"docstring_tokens": [... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | display_mutations | <not_specific> | def display_mutations(self,protein):
"""Display the mutations for this record as compared to the referece protein"""
if self.parentapp == None:
return 'NA'
refprot=self.parentapp.refprotein.get()
if refprot is None or not self.data.has_key(refprot):
return 'NA'
... | Display the mutations for this record as compared to the referece protein | Display the mutations for this record as compared to the referece protein | [
"Display",
"the",
"mutations",
"for",
"this",
"record",
"as",
"compared",
"to",
"the",
"referece",
"protein"
] | def display_mutations(self,protein):
if self.parentapp == None:
return 'NA'
refprot=self.parentapp.refprotein.get()
if refprot is None or not self.data.has_key(refprot):
return 'NA'
DBi=self.parentapp.data['DBinstance']
is_parent,operations=DBi.isparent(pr... | [
"def",
"display_mutations",
"(",
"self",
",",
"protein",
")",
":",
"if",
"self",
".",
"parentapp",
"==",
"None",
":",
"return",
"'NA'",
"refprot",
"=",
"self",
".",
"parentapp",
".",
"refprotein",
".",
"get",
"(",
")",
"if",
"refprot",
"is",
"None",
"o... | Display the mutations for this record as compared to the referece protein | [
"Display",
"the",
"mutations",
"for",
"this",
"record",
"as",
"compared",
"to",
"the",
"referece",
"protein"
] | [
"\"\"\"Display the mutations for this record as compared to the referece protein\"\"\"",
"# Get the mutations"
] | [
{
"param": "self",
"type": null
},
{
"param": "protein",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "protein",
"type": null,
"docstring": null,
"docstring_tokens"... |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | resetcolors | <not_specific> | def resetcolors(self):
"""Remove all color formatting - overriden """
self.colors={}
self.colors['fg']={}
self.colors['bg']={}
self.meta['table']['colors'] = self.colors
self.meta._p_changed = 1
return | Remove all color formatting - overriden | Remove all color formatting - overriden | [
"Remove",
"all",
"color",
"formatting",
"-",
"overriden"
] | def resetcolors(self):
self.colors={}
self.colors['fg']={}
self.colors['bg']={}
self.meta['table']['colors'] = self.colors
self.meta._p_changed = 1
return | [
"def",
"resetcolors",
"(",
"self",
")",
":",
"self",
".",
"colors",
"=",
"{",
"}",
"self",
".",
"colors",
"[",
"'fg'",
"]",
"=",
"{",
"}",
"self",
".",
"colors",
"[",
"'bg'",
"]",
"=",
"{",
"}",
"self",
".",
"meta",
"[",
"'table'",
"]",
"[",
... | Remove all color formatting - overriden | [
"Remove",
"all",
"color",
"formatting",
"-",
"overriden"
] | [
"\"\"\"Remove all color formatting - overriden \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
80ed4425fe8f3394c97b86b5d32b40deb6deec0d | shambo001/peat | PEATDB/PEATTables.py | [
"MIT"
] | Python | simpleCopy | <not_specific> | def simpleCopy(self, include=None):
"""Return a simple copy of the PEAT table model, with only
text and int fields and not using the OOBTree structure"""
M=TableModel()
fields = self.DB.getSimpleFields()
if include!=None:
fields.extend(include)
for rec in s... | Return a simple copy of the PEAT table model, with only
text and int fields and not using the OOBTree structure | Return a simple copy of the PEAT table model, with only
text and int fields and not using the OOBTree structure | [
"Return",
"a",
"simple",
"copy",
"of",
"the",
"PEAT",
"table",
"model",
"with",
"only",
"text",
"and",
"int",
"fields",
"and",
"not",
"using",
"the",
"OOBTree",
"structure"
] | def simpleCopy(self, include=None):
M=TableModel()
fields = self.DB.getSimpleFields()
if include!=None:
fields.extend(include)
for rec in self.reclist:
data={}
for f in fields:
if self.data[rec].has_key(f):
data[f] = ... | [
"def",
"simpleCopy",
"(",
"self",
",",
"include",
"=",
"None",
")",
":",
"M",
"=",
"TableModel",
"(",
")",
"fields",
"=",
"self",
".",
"DB",
".",
"getSimpleFields",
"(",
")",
"if",
"include",
"!=",
"None",
":",
"fields",
".",
"extend",
"(",
"include"... | Return a simple copy of the PEAT table model, with only
text and int fields and not using the OOBTree structure | [
"Return",
"a",
"simple",
"copy",
"of",
"the",
"PEAT",
"table",
"model",
"with",
"only",
"text",
"and",
"int",
"fields",
"and",
"not",
"using",
"the",
"OOBTree",
"structure"
] | [
"\"\"\"Return a simple copy of the PEAT table model, with only\n text and int fields and not using the OOBTree structure\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "include",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "include",
"type": null,
"docstring": null,
"docstring_tokens"... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | _createButtons | <not_specific> | def _createButtons(self, methods):
"""Dynamically create buttons for supplied methods, which is a tuple
of (method name, label)"""
mbutton=Menubutton(self.mainwin, text='Options', width=12,
borderwidth=2, relief=RIDGE,
... | 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):
mbutton=Menubutton(self.mainwin, text='Options', width=12,
borderwidth=2, relief=RIDGE,
activeforeground='red')
menu=Menu(mbutton,tearoff=0)
mbutton['menu']=menu
mbutton.p... | [
"def",
"_createButtons",
"(",
"self",
",",
"methods",
")",
":",
"mbutton",
"=",
"Menubutton",
"(",
"self",
".",
"mainwin",
",",
"text",
"=",
"'Options'",
",",
"width",
"=",
"12",
",",
"borderwidth",
"=",
"2",
",",
"relief",
"=",
"RIDGE",
",",
"activefo... | 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
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "methods",
"type": null,
"docstring": null,
"docstring_tokens"... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | updateJobsTable | <not_specific> | def updateJobsTable(self):
"""Show table for current jobs list"""
self.checkJobsDict()
jobdict = self.DB.meta.peatsa_jobs
M = TableModel()
#open job log from file
f=open('jobstates.log','r')
jl = pickle.load(f)
for j in jobdict:
... | Show table for current jobs list | Show table for current jobs list | [
"Show",
"table",
"for",
"current",
"jobs",
"list"
] | def updateJobsTable(self):
self.checkJobsDict()
jobdict = self.DB.meta.peatsa_jobs
M = TableModel()
f=open('jobstates.log','r')
jl = pickle.load(f)
for j in jobdict:
jobid = jobdict[j]
try:
M.addRecord(... | [
"def",
"updateJobsTable",
"(",
"self",
")",
":",
"self",
".",
"checkJobsDict",
"(",
")",
"jobdict",
"=",
"self",
".",
"DB",
".",
"meta",
".",
"peatsa_jobs",
"M",
"=",
"TableModel",
"(",
")",
"f",
"=",
"open",
"(",
"'jobstates.log'",
",",
"'r'",
")",
... | Show table for current jobs list | [
"Show",
"table",
"for",
"current",
"jobs",
"list"
] | [
"\"\"\"Show table for current jobs list\"\"\"",
"#open job log from file"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | fetchJob | <not_specific> | def fetchJob(self):
"""Get job from it's db ID and add to list"""
mpDlg = MultipleValDialog(title='Get Job',
initialvalues=('','my job1'),
labels=('ID','Your label',),
types=('string','st... | Get job from it's db ID and add to list | Get job from it's db ID and add to list | [
"Get",
"job",
"from",
"it",
"'",
"s",
"db",
"ID",
"and",
"add",
"to",
"list"
] | def fetchJob(self):
mpDlg = MultipleValDialog(title='Get Job',
initialvalues=('','my job1'),
labels=('ID','Your label',),
types=('string','string'),
parent=self.mainwin... | [
"def",
"fetchJob",
"(",
"self",
")",
":",
"mpDlg",
"=",
"MultipleValDialog",
"(",
"title",
"=",
"'Get Job'",
",",
"initialvalues",
"=",
"(",
"''",
",",
"'my job1'",
")",
",",
"labels",
"=",
"(",
"'ID'",
",",
"'Your label'",
",",
")",
",",
"types",
"=",... | Get job from it's db ID and add to list | [
"Get",
"job",
"from",
"it",
"'",
"s",
"db",
"ID",
"and",
"add",
"to",
"list"
] | [
"\"\"\"Get job from it's db ID and add to list\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | createJobDialog | <not_specific> | def createJobDialog(self):
"""Get details from user using dialog
required: structure, mutations, type of calc and a tag (optional)"""
def validatename(text):
if not hasattr(self.DB.meta,'peatsa_jobs'):
return 1
if text in self.DB.meta.peatsa_jobs:
... | Get details from user using dialog
required: structure, mutations, type of calc and a tag (optional) | Get details from user using dialog
required: structure, mutations, type of calc and a tag (optional) | [
"Get",
"details",
"from",
"user",
"using",
"dialog",
"required",
":",
"structure",
"mutations",
"type",
"of",
"calc",
"and",
"a",
"tag",
"(",
"optional",
")"
] | def createJobDialog(self):
def validatename(text):
if not hasattr(self.DB.meta,'peatsa_jobs'):
return 1
if text in self.DB.meta.peatsa_jobs:
return -1
else:
return 1
def close():
jobdlg.destroy()
def load... | [
"def",
"createJobDialog",
"(",
"self",
")",
":",
"def",
"validatename",
"(",
"text",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
".",
"DB",
".",
"meta",
",",
"'peatsa_jobs'",
")",
":",
"return",
"1",
"if",
"text",
"in",
"self",
".",
"DB",
".",
"... | Get details from user using dialog
required: structure, mutations, type of calc and a tag (optional) | [
"Get",
"details",
"from",
"user",
"using",
"dialog",
"required",
":",
"structure",
"mutations",
"type",
"of",
"calc",
"and",
"a",
"tag",
"(",
"optional",
")"
] | [
"\"\"\"Get details from user using dialog\n required: structure, mutations, type of calc and a tag (optional)\"\"\"",
"#if calcmenu.getcurselection() == 'both':",
"# calcs = ['stability','binding']",
"#if self.useref.get() == 1:",
"#we use ref pdb by default now"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | resubmitJob | <not_specific> | def resubmitJob(self):
"""Resend a job based on new mutations in DB that are not in job already"""
job, name = self.getJob()
if job == None:
return
DB=self.DB
self.matrices = job.data.allMatrices()
for m in matrices:
matrix=matrices[m]
... | Resend a job based on new mutations in DB that are not in job already | Resend a job based on new mutations in DB that are not in job already | [
"Resend",
"a",
"job",
"based",
"on",
"new",
"mutations",
"in",
"DB",
"that",
"are",
"not",
"in",
"job",
"already"
] | def resubmitJob(self):
job, name = self.getJob()
if job == None:
return
DB=self.DB
self.matrices = job.data.allMatrices()
for m in matrices:
matrix=matrices[m]
if matrix==None: return
muts = matrix.mutationCodes()
... | [
"def",
"resubmitJob",
"(",
"self",
")",
":",
"job",
",",
"name",
"=",
"self",
".",
"getJob",
"(",
")",
"if",
"job",
"==",
"None",
":",
"return",
"DB",
"=",
"self",
".",
"DB",
"self",
".",
"matrices",
"=",
"job",
".",
"data",
".",
"allMatrices",
"... | Resend a job based on new mutations in DB that are not in job already | [
"Resend",
"a",
"job",
"based",
"on",
"new",
"mutations",
"in",
"DB",
"that",
"are",
"not",
"in",
"job",
"already"
] | [
"\"\"\"Resend a job based on new mutations in DB that are not in job already\"\"\"",
"'''self.submitJob(name=name,\n pdb=pdb, pdbfile=pdbfile,\n ligandfile=self.ligandfile,\n mutations=newmuts,\n calcs=calcs, meta={'ex... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | removeJob | <not_specific> | def removeJob(self):
"""Remove a job from the db"""
job, name = self.getJob()
answer = tkMessageBox.askyesno("Warning",'Remove this job?')
if answer == False:
return
try:
self.jobManager.deleteJob(job)
except:
... | Remove a job from the db | Remove a job from the db | [
"Remove",
"a",
"job",
"from",
"the",
"db"
] | def removeJob(self):
job, name = self.getJob()
answer = tkMessageBox.askyesno("Warning",'Remove this job?')
if answer == False:
return
try:
self.jobManager.deleteJob(job)
except:
print 'job not in database, removing ... | [
"def",
"removeJob",
"(",
"self",
")",
":",
"job",
",",
"name",
"=",
"self",
".",
"getJob",
"(",
")",
"answer",
"=",
"tkMessageBox",
".",
"askyesno",
"(",
"\"Warning\"",
",",
"'Remove this job?'",
")",
"if",
"answer",
"==",
"False",
":",
"return",
"try",
... | Remove a job from the db | [
"Remove",
"a",
"job",
"from",
"the",
"db"
] | [
"\"\"\"Remove a job from the db\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | addColoredText | <not_specific> | def addColoredText(self, st, tag, word, fg='black', bg='white'):
"""add a space to the end of the word"""
word = word + " "
st.insert('end', word)
end_index = st.index('end')
begin_index = "%s-%sc" % (end_index, len(word) + 1)
st.tag_add(tag, begin_index, end_index)
... | add a space to the end of the word | add a space to the end of the word | [
"add",
"a",
"space",
"to",
"the",
"end",
"of",
"the",
"word"
] | def addColoredText(self, st, tag, word, fg='black', bg='white'):
word = word + " "
st.insert('end', word)
end_index = st.index('end')
begin_index = "%s-%sc" % (end_index, len(word) + 1)
st.tag_add(tag, begin_index, end_index)
st.tag_config(tag, foreground=fg, background=b... | [
"def",
"addColoredText",
"(",
"self",
",",
"st",
",",
"tag",
",",
"word",
",",
"fg",
"=",
"'black'",
",",
"bg",
"=",
"'white'",
")",
":",
"word",
"=",
"word",
"+",
"\" \"",
"st",
".",
"insert",
"(",
"'end'",
",",
"word",
")",
"end_index",
"=",
"s... | add a space to the end of the word | [
"add",
"a",
"space",
"to",
"the",
"end",
"of",
"the",
"word"
] | [
"\"\"\"add a space to the end of the word\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "st",
"type": null
},
{
"param": "tag",
"type": null
},
{
"param": "word",
"type": null
},
{
"param": "fg",
"type": null
},
{
"param": "bg",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "st",
"type": null,
"docstring": null,
"docstring_tokens": [],... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | mergeResults | <not_specific> | def mergeResults(self, job, colname, tablemodel):
"""Merge given job results to tablemodel"""
if job==None:
return
matrices = job.data.allMatrices()
if not colname:
return
nf={'Total':colname}
for m in matrices:
matrix = ma... | Merge given job results to tablemodel | Merge given job results to tablemodel | [
"Merge",
"given",
"job",
"results",
"to",
"tablemodel"
] | def mergeResults(self, job, colname, tablemodel):
if job==None:
return
matrices = job.data.allMatrices()
if not colname:
return
nf={'Total':colname}
for m in matrices:
matrix = matrices[m]
if matrix == None: continue
... | [
"def",
"mergeResults",
"(",
"self",
",",
"job",
",",
"colname",
",",
"tablemodel",
")",
":",
"if",
"job",
"==",
"None",
":",
"return",
"matrices",
"=",
"job",
".",
"data",
".",
"allMatrices",
"(",
")",
"if",
"not",
"colname",
":",
"return",
"nf",
"="... | Merge given job results to tablemodel | [
"Merge",
"given",
"job",
"results",
"to",
"tablemodel"
] | [
"\"\"\"Merge given job results to tablemodel\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "job",
"type": null
},
{
"param": "colname",
"type": null
},
{
"param": "tablemodel",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "job",
"type": null,
"docstring": null,
"docstring_tokens": []... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | mergeCurrent | <not_specific> | def mergeCurrent(self):
"""Auto merge selected job results to main table
called from GUI """
job, name = self.getJob()
if job==None:
return
#get field name to use
colname = tkSimpleDialog.askstring("Column name?",
... | Auto merge selected job results to main table
called from GUI | Auto merge selected job results to main table
called from GUI | [
"Auto",
"merge",
"selected",
"job",
"results",
"to",
"main",
"table",
"called",
"from",
"GUI"
] | def mergeCurrent(self):
job, name = self.getJob()
if job==None:
return
colname = tkSimpleDialog.askstring("Column name?",
"Name for column:",
initialvalue=name+'_Predictions',
... | [
"def",
"mergeCurrent",
"(",
"self",
")",
":",
"job",
",",
"name",
"=",
"self",
".",
"getJob",
"(",
")",
"if",
"job",
"==",
"None",
":",
"return",
"colname",
"=",
"tkSimpleDialog",
".",
"askstring",
"(",
"\"Column name?\"",
",",
"\"Name for column:\"",
",",... | Auto merge selected job results to main table
called from GUI | [
"Auto",
"merge",
"selected",
"job",
"results",
"to",
"main",
"table",
"called",
"from",
"GUI"
] | [
"\"\"\"Auto merge selected job results to main table\n called from GUI \"\"\"",
"#get field name to use",
"#also send some meta data to peatsa_meta?",
"'''from Correlation import CorrelationAnalyser \n C = CorrelationAnalyser() \n cc,rmse = C.getStats(pre,exp) \n dat... | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | manageResults | <not_specific> | def manageResults(self, name=None):
"""Get the results back - we can send the matrix to the main peat
table or put results into a labbook sheet.
Also allow user to merge with an existing table"""
job, name = self.getJob(name)
if job.error() != None:
print 'job h... | Get the results back - we can send the matrix to the main peat
table or put results into a labbook sheet.
Also allow user to merge with an existing table | Get the results back - we can send the matrix to the main peat
table or put results into a labbook sheet.
Also allow user to merge with an existing table | [
"Get",
"the",
"results",
"back",
"-",
"we",
"can",
"send",
"the",
"matrix",
"to",
"the",
"main",
"peat",
"table",
"or",
"put",
"results",
"into",
"a",
"labbook",
"sheet",
".",
"Also",
"allow",
"user",
"to",
"merge",
"with",
"an",
"existing",
"table"
] | def manageResults(self, name=None):
job, name = self.getJob(name)
if job.error() != None:
print 'job had an error, use view details'
elif job.state() == 'Finished':
self.showPEATSAResultsDialog(job, name)
else:
print 'Job is not finished yet.'
... | [
"def",
"manageResults",
"(",
"self",
",",
"name",
"=",
"None",
")",
":",
"job",
",",
"name",
"=",
"self",
".",
"getJob",
"(",
"name",
")",
"if",
"job",
".",
"error",
"(",
")",
"!=",
"None",
":",
"print",
"'job had an error, use view details'",
"elif",
... | Get the results back - we can send the matrix to the main peat
table or put results into a labbook sheet. | [
"Get",
"the",
"results",
"back",
"-",
"we",
"can",
"send",
"the",
"matrix",
"to",
"the",
"main",
"peat",
"table",
"or",
"put",
"results",
"into",
"a",
"labbook",
"sheet",
"."
] | [
"\"\"\"Get the results back - we can send the matrix to the main peat\n table or put results into a labbook sheet.\n Also allow user to merge with an existing table\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "name",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "name",
"type": null,
"docstring": null,
"docstring_tokens": [... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | mergeTable | <not_specific> | def mergeTable(self, main=False):
"""Send a matrix to the peat main table or labbook sheet
by merging matching mutations.
Requires that one field in the table stores compatible
mutant format supported by PEATSA"""
if main == False:
try:
name... | Send a matrix to the peat main table or labbook sheet
by merging matching mutations.
Requires that one field in the table stores compatible
mutant format supported by PEATSA | Send a matrix to the peat main table or labbook sheet
by merging matching mutations.
Requires that one field in the table stores compatible
mutant format supported by PEATSA | [
"Send",
"a",
"matrix",
"to",
"the",
"peat",
"main",
"table",
"or",
"labbook",
"sheet",
"by",
"merging",
"matching",
"mutations",
".",
"Requires",
"that",
"one",
"field",
"in",
"the",
"table",
"stores",
"compatible",
"mutant",
"format",
"supported",
"by",
"PE... | def mergeTable(self, main=False):
if main == False:
try:
name = self.labboklist.getcurselection()[0]
except:
print 'no name selected'
return
if main == True:
for m in self.matrices:
matrix = s... | [
"def",
"mergeTable",
"(",
"self",
",",
"main",
"=",
"False",
")",
":",
"if",
"main",
"==",
"False",
":",
"try",
":",
"name",
"=",
"self",
".",
"labboklist",
".",
"getcurselection",
"(",
")",
"[",
"0",
"]",
"except",
":",
"print",
"'no name selected'",
... | Send a matrix to the peat main table or labbook sheet
by merging matching mutations. | [
"Send",
"a",
"matrix",
"to",
"the",
"peat",
"main",
"table",
"or",
"labbook",
"sheet",
"by",
"merging",
"matching",
"mutations",
"."
] | [
"\"\"\"Send a matrix to the peat main table or labbook sheet \n by merging matching mutations.\n Requires that one field in the table stores compatible \n mutant format supported by PEATSA\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "main",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "main",
"type": null,
"docstring": null,
"docstring_tokens": [... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | matrix2Table | <not_specific> | def matrix2Table(self, matrix):
"""Creates a table model from a peatsa matrix"""
M = TableModel()
M.addColumn('Mutations')
fields = matrix.columnHeaders()
for f in fields:
M.addColumn(f)
i = matrix.indexOfColumnWithHeader('Mutations')
for row... | Creates a table model from a peatsa matrix | Creates a table model from a peatsa matrix | [
"Creates",
"a",
"table",
"model",
"from",
"a",
"peatsa",
"matrix"
] | def matrix2Table(self, matrix):
M = TableModel()
M.addColumn('Mutations')
fields = matrix.columnHeaders()
for f in fields:
M.addColumn(f)
i = matrix.indexOfColumnWithHeader('Mutations')
for row in matrix:
mutationSet = Core.Data.MutationSet(row[i])... | [
"def",
"matrix2Table",
"(",
"self",
",",
"matrix",
")",
":",
"M",
"=",
"TableModel",
"(",
")",
"M",
".",
"addColumn",
"(",
"'Mutations'",
")",
"fields",
"=",
"matrix",
".",
"columnHeaders",
"(",
")",
"for",
"f",
"in",
"fields",
":",
"M",
".",
"addCol... | Creates a table model from a peatsa matrix | [
"Creates",
"a",
"table",
"model",
"from",
"a",
"peatsa",
"matrix"
] | [
"\"\"\"Creates a table model from a peatsa matrix\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "matrix",
"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":... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | mergeMatrix | <not_specific> | def mergeMatrix(self, matrix, model, fields=None, newfields=None):
"""Merge a peatsa matrix with a table, returns merged tablemodel
tablemodel: input tablemodel
fields: which fields from matrix should be included in merge, default all
newfields: a dict that can map matrix names to... | Merge a peatsa matrix with a table, returns merged tablemodel
tablemodel: input tablemodel
fields: which fields from matrix should be included in merge, default all
newfields: a dict that can map matrix names to new col names
| Merge a peatsa matrix with a table, returns merged tablemodel
tablemodel: input tablemodel
fields: which fields from matrix should be included in merge, default all
newfields: a dict that can map matrix names to new col names | [
"Merge",
"a",
"peatsa",
"matrix",
"with",
"a",
"table",
"returns",
"merged",
"tablemodel",
"tablemodel",
":",
"input",
"tablemodel",
"fields",
":",
"which",
"fields",
"from",
"matrix",
"should",
"be",
"included",
"in",
"merge",
"default",
"all",
"newfields",
"... | def mergeMatrix(self, matrix, model, fields=None, newfields=None):
M = self.matrix2Table(matrix)
if fields==None:
fields = M.columnNames
key = 'Mutations'
if not key in model.columnNames:
print 'this table has no mutations column, we cannot merge'
... | [
"def",
"mergeMatrix",
"(",
"self",
",",
"matrix",
",",
"model",
",",
"fields",
"=",
"None",
",",
"newfields",
"=",
"None",
")",
":",
"M",
"=",
"self",
".",
"matrix2Table",
"(",
"matrix",
")",
"if",
"fields",
"==",
"None",
":",
"fields",
"=",
"M",
"... | Merge a peatsa matrix with a table, returns merged tablemodel
tablemodel: input tablemodel
fields: which fields from matrix should be included in merge, default all
newfields: a dict that can map matrix names to new col names | [
"Merge",
"a",
"peatsa",
"matrix",
"with",
"a",
"table",
"returns",
"merged",
"tablemodel",
"tablemodel",
":",
"input",
"tablemodel",
"fields",
":",
"which",
"fields",
"from",
"matrix",
"should",
"be",
"included",
"in",
"merge",
"default",
"all",
"newfields",
"... | [
"\"\"\"Merge a peatsa matrix with a table, returns merged tablemodel\n tablemodel: input tablemodel \n fields: which fields from matrix should be included in merge, default all\n newfields: a dict that can map matrix names to new col names\n \"\"\"",
"#add this data to table"
] | [
{
"param": "self",
"type": null
},
{
"param": "matrix",
"type": null
},
{
"param": "model",
"type": null
},
{
"param": "fields",
"type": null
},
{
"param": "newfields",
"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":... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | showAllResults | <not_specific> | def showAllResults(self):
"""Show results for single or multiple jobs together"""
names = self.jobstable.get_selectedRecordNames()
if len(names)==1:
ax,mh,x,y=self.showResults()
else:
tx=[]; ty=[]
import pylab as plt
f=plt.figure(... | Show results for single or multiple jobs together | Show results for single or multiple jobs together | [
"Show",
"results",
"for",
"single",
"or",
"multiple",
"jobs",
"together"
] | def showAllResults(self):
names = self.jobstable.get_selectedRecordNames()
if len(names)==1:
ax,mh,x,y=self.showResults()
else:
tx=[]; ty=[]
import pylab as plt
f=plt.figure(figsize=(8,8))
ax=f.add_subplot(111)
for n in name... | [
"def",
"showAllResults",
"(",
"self",
")",
":",
"names",
"=",
"self",
".",
"jobstable",
".",
"get_selectedRecordNames",
"(",
")",
"if",
"len",
"(",
"names",
")",
"==",
"1",
":",
"ax",
",",
"mh",
",",
"x",
",",
"y",
"=",
"self",
".",
"showResults",
... | Show results for single or multiple jobs together | [
"Show",
"results",
"for",
"single",
"or",
"multiple",
"jobs",
"together"
] | [
"\"\"\"Show results for single or multiple jobs together\"\"\"",
"#add stats for summary"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | showResults | <not_specific> | def showResults(self, name=None, showtable=True, ax=None, stats=True):
"""Show results with correlation plot from selected job"""
job, name = self.getJob(name)
if job == None:
print 'job not in DB'
return
if job.state() != 'Finished':
print 'j... | Show results with correlation plot from selected job | Show results with correlation plot from selected job | [
"Show",
"results",
"with",
"correlation",
"plot",
"from",
"selected",
"job"
] | def showResults(self, name=None, showtable=True, ax=None, stats=True):
job, name = self.getJob(name)
if job == None:
print 'job not in DB'
return
if job.state() != 'Finished':
print 'job not finished'
return
self.matrices = job.data.allMatr... | [
"def",
"showResults",
"(",
"self",
",",
"name",
"=",
"None",
",",
"showtable",
"=",
"True",
",",
"ax",
"=",
"None",
",",
"stats",
"=",
"True",
")",
":",
"job",
",",
"name",
"=",
"self",
".",
"getJob",
"(",
"name",
")",
"if",
"job",
"==",
"None",
... | Show results with correlation plot from selected job | [
"Show",
"results",
"with",
"correlation",
"plot",
"from",
"selected",
"job"
] | [
"\"\"\"Show results with correlation plot from selected job\"\"\"",
"#print self.matrices['ModellingResults'].csvRepresentation()",
"#print jobmeta",
"#we may have stored the exp data in another project",
"#if exp column not known then ask user ",
"#need to add this for mousehandler to work..... | [
{
"param": "self",
"type": null
},
{
"param": "name",
"type": null
},
{
"param": "showtable",
"type": null
},
{
"param": "ax",
"type": null
},
{
"param": "stats",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "name",
"type": null,
"docstring": null,
"docstring_tokens": [... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | plotMerged | <not_specific> | def plotMerged(self, matrix, expcol, expdata=None,
title='', showtable=True, ax=None, name=None,
stats=True):
"""Merge a set of exp vals with predictions and plot"""
if expdata==None:
expdata = self.parent.tablemodel.simpleCopy(include=['Mutations'])
... | Merge a set of exp vals with predictions and plot | Merge a set of exp vals with predictions and plot | [
"Merge",
"a",
"set",
"of",
"exp",
"vals",
"with",
"predictions",
"and",
"plot"
] | def plotMerged(self, matrix, expcol, expdata=None,
title='', showtable=True, ax=None, name=None,
stats=True):
if expdata==None:
expdata = self.parent.tablemodel.simpleCopy(include=['Mutations'])
merged = self.mergeMatrix(matrix, expdata)
x,y,na... | [
"def",
"plotMerged",
"(",
"self",
",",
"matrix",
",",
"expcol",
",",
"expdata",
"=",
"None",
",",
"title",
"=",
"''",
",",
"showtable",
"=",
"True",
",",
"ax",
"=",
"None",
",",
"name",
"=",
"None",
",",
"stats",
"=",
"True",
")",
":",
"if",
"exp... | Merge a set of exp vals with predictions and plot | [
"Merge",
"a",
"set",
"of",
"exp",
"vals",
"with",
"predictions",
"and",
"plot"
] | [
"\"\"\"Merge a set of exp vals with predictions and plot\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "matrix",
"type": null
},
{
"param": "expcol",
"type": null
},
{
"param": "expdata",
"type": null
},
{
"param": "title",
"type": null
},
{
"param": "showtable",
"type": null
},
{
"param": "ax",
... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "matrix",
"type": null,
"docstring": null,
"docstring_tokens":... |
f4b4821fd3a9361ae67b7f70c2513dd73bf3ba1b | shambo001/peat | PEATDB/plugins/PEATSAplugin.py | [
"MIT"
] | Python | displayNoDBWarning | <not_specific> | def displayNoDBWarning(self):
"""Warn user that no DB is present"""
tkMessageBox.showwarning("Cannot launch plugin",
'No Database is currently open. '
'You should first open a project.')
return | Warn user that no DB is present | Warn user that no DB is present | [
"Warn",
"user",
"that",
"no",
"DB",
"is",
"present"
] | def displayNoDBWarning(self):
tkMessageBox.showwarning("Cannot launch plugin",
'No Database is currently open. '
'You should first open a project.')
return | [
"def",
"displayNoDBWarning",
"(",
"self",
")",
":",
"tkMessageBox",
".",
"showwarning",
"(",
"\"Cannot launch plugin\"",
",",
"'No Database is currently open. '",
"'You should first open a project.'",
")",
"return"
] | Warn user that no DB is present | [
"Warn",
"user",
"that",
"no",
"DB",
"is",
"present"
] | [
"\"\"\"Warn user that no DB is present\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
8c8dcb1c78708453a927854a89a94112f9f5c744 | shambo001/peat | Protool/ligand.py | [
"MIT"
] | Python | parse_mol2lines | <not_specific> | def parse_mol2lines(self,lines):
"""This parses a single ligand and inserts it as a new chain in Protool"""
#
# Find the chain ID
#
fail=True
for cid in ['L','I','J','K','L','M','O','P','Q','R','S','T','U','V','W','X','Y','Z']:
if not self.PI.chains.has_key(ci... | This parses a single ligand and inserts it as a new chain in Protool | This parses a single ligand and inserts it as a new chain in Protool | [
"This",
"parses",
"a",
"single",
"ligand",
"and",
"inserts",
"it",
"as",
"a",
"new",
"chain",
"in",
"Protool"
] | def parse_mol2lines(self,lines):
Find the chain ID
fail=True
for cid in ['L','I','J','K','L','M','O','P','Q','R','S','T','U','V','W','X','Y','Z']:
if not self.PI.chains.has_key(cid):
chainid=cid
fail=False
break
if fail:
... | [
"def",
"parse_mol2lines",
"(",
"self",
",",
"lines",
")",
":",
"fail",
"=",
"True",
"for",
"cid",
"in",
"[",
"'L'",
",",
"'I'",
",",
"'J'",
",",
"'K'",
",",
"'L'",
",",
"'M'",
",",
"'O'",
",",
"'P'",
",",
"'Q'",
",",
"'R'",
",",
"'S'",
",",
"... | This parses a single ligand and inserts it as a new chain in Protool | [
"This",
"parses",
"a",
"single",
"ligand",
"and",
"inserts",
"it",
"as",
"a",
"new",
"chain",
"in",
"Protool"
] | [
"\"\"\"This parses a single ligand and inserts it as a new chain in Protool\"\"\"",
"#",
"# Find the chain ID",
"#",
"#",
"# We got the chain ID",
"# Residue number is 1",
"#"
] | [
{
"param": "self",
"type": null
},
{
"param": "lines",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "lines",
"type": null,
"docstring": null,
"docstring_tokens": ... |
8c8dcb1c78708453a927854a89a94112f9f5c744 | shambo001/peat | Protool/ligand.py | [
"MIT"
] | Python | createlBondedAtoms | <not_specific> | def createlBondedAtoms(self):
"""
Creates for each atom a list of the bonded Atoms
This becomes one attribute of MOL2ATOM!
"""
for bond in self.lBonds:
self.lAtoms[bond.frm-1].lBondedAtoms.append(
self.lAtoms[bond.to-1])
self.lAto... |
Creates for each atom a list of the bonded Atoms
This becomes one attribute of MOL2ATOM!
| Creates for each atom a list of the bonded Atoms
This becomes one attribute of MOL2ATOM! | [
"Creates",
"for",
"each",
"atom",
"a",
"list",
"of",
"the",
"bonded",
"Atoms",
"This",
"becomes",
"one",
"attribute",
"of",
"MOL2ATOM!"
] | def createlBondedAtoms(self):
for bond in self.lBonds:
self.lAtoms[bond.frm-1].lBondedAtoms.append(
self.lAtoms[bond.to-1])
self.lAtoms[bond.to-1].lBondedAtoms.append(
self.lAtoms[bond.frm-1])
atbond = copy.deepcopy(bond)
atbond.oth... | [
"def",
"createlBondedAtoms",
"(",
"self",
")",
":",
"for",
"bond",
"in",
"self",
".",
"lBonds",
":",
"self",
".",
"lAtoms",
"[",
"bond",
".",
"frm",
"-",
"1",
"]",
".",
"lBondedAtoms",
".",
"append",
"(",
"self",
".",
"lAtoms",
"[",
"bond",
".",
"t... | Creates for each atom a list of the bonded Atoms
This becomes one attribute of MOL2ATOM! | [
"Creates",
"for",
"each",
"atom",
"a",
"list",
"of",
"the",
"bonded",
"Atoms",
"This",
"becomes",
"one",
"attribute",
"of",
"MOL2ATOM!"
] | [
"\"\"\"\n Creates for each atom a list of the bonded Atoms\n \n This becomes one attribute of MOL2ATOM!\n \"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
94ed5c3111accb8daab242d0a87725077ba32b9a | shambo001/peat | Protool/utilities.py | [
"MIT"
] | Python | placeOxygen | <not_specific> | def placeOxygen(CA, C, N):
"""
Place an oxygen according to the planar atoms CA, C, and N using
a trans-peptide geometry. Allows for a more accurate method of
adding oxygen atoms.
Parameters
CA: The coordinates of the CA atom (list)
C: The coo... |
Place an oxygen according to the planar atoms CA, C, and N using
a trans-peptide geometry. Allows for a more accurate method of
adding oxygen atoms.
Parameters
CA: The coordinates of the CA atom (list)
C: The coordinates of the C atom (list)
... | Place an oxygen according to the planar atoms CA, C, and N using
a trans-peptide geometry. Allows for a more accurate method of
adding oxygen atoms.
Parameters
CA: The coordinates of the CA atom (list)
C: The coordinates of the C atom (list)
N: The coordinates of the peptide bonded N atom from ... | [
"Place",
"an",
"oxygen",
"according",
"to",
"the",
"planar",
"atoms",
"CA",
"C",
"and",
"N",
"using",
"a",
"trans",
"-",
"peptide",
"geometry",
".",
"Allows",
"for",
"a",
"more",
"accurate",
"method",
"of",
"adding",
"oxygen",
"atoms",
".",
"Parameters",
... | def placeOxygen(CA, C, N):
vec1 = subtract(CA,C)
vec2 = subtract(N,C)
planeeq = cross(vec1, vec2)
sum = planeeq[0]*C[0] + planeeq[1]*C[1] + planeeq[2]*C[2]
A . B = |A||B| cos(angle)
num1 = math.sqrt(pow(vec1[0],2) + pow(vec1[1],2) + pow(vec1[2],2))
num2 = math.sqrt(pow(vec2[0],2) +... | [
"def",
"placeOxygen",
"(",
"CA",
",",
"C",
",",
"N",
")",
":",
"vec1",
"=",
"subtract",
"(",
"CA",
",",
"C",
")",
"vec2",
"=",
"subtract",
"(",
"N",
",",
"C",
")",
"planeeq",
"=",
"cross",
"(",
"vec1",
",",
"vec2",
")",
"sum",
"=",
"planeeq",
... | Place an oxygen according to the planar atoms CA, C, and N using
a trans-peptide geometry. | [
"Place",
"an",
"oxygen",
"according",
"to",
"the",
"planar",
"atoms",
"CA",
"C",
"and",
"N",
"using",
"a",
"trans",
"-",
"peptide",
"geometry",
"."
] | [
"\"\"\"\n Place an oxygen according to the planar atoms CA, C, and N using\n a trans-peptide geometry. Allows for a more accurate method of\n adding oxygen atoms.\n\n Parameters\n CA: The coordinates of the CA atom (list)\n C: The coordinates of the ... | [
{
"param": "CA",
"type": null
},
{
"param": "C",
"type": null
},
{
"param": "N",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "CA",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "C",
"type": null,
"docstring": null,
"docstring_tokens": [],
... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | loadData | <not_specific> | def loadData(self, data=None):
"""Load the data into self.data and update selector etc"""
# Did we get data or should we just add an empty data window?
if data == None or type(data) is types.StringType:
self.data={}
self.datasets=[]
self.__datatabs_fits__= {}... | Load the data into self.data and update selector etc | Load the data into self.data and update selector etc | [
"Load",
"the",
"data",
"into",
"self",
".",
"data",
"and",
"update",
"selector",
"etc"
] | def loadData(self, data=None):
if data == None or type(data) is types.StringType:
self.data={}
self.datasets=[]
self.__datatabs_fits__= {}
M = MetaData()
self.__meta_data__ = M.data
else:
self.data = copy.deepcopy(data)
... | [
"def",
"loadData",
"(",
"self",
",",
"data",
"=",
"None",
")",
":",
"if",
"data",
"==",
"None",
"or",
"type",
"(",
"data",
")",
"is",
"types",
".",
"StringType",
":",
"self",
".",
"data",
"=",
"{",
"}",
"self",
".",
"datasets",
"=",
"[",
"]",
"... | Load the data into self.data and update selector etc | [
"Load",
"the",
"data",
"into",
"self",
".",
"data",
"and",
"update",
"selector",
"etc"
] | [
"\"\"\"Load the data into self.data and update selector etc\"\"\"",
"# Did we get data or should we just add an empty data window?",
"# Set mode if present",
"#we now load the special dicts directly, so same names",
"#populate list of datasets"
] | [
{
"param": "self",
"type": null
},
{
"param": "data",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "data",
"type": null,
"docstring": null,
"docstring_tokens": [... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | checkMeta | <not_specific> | def checkMeta(self):
"""Load old style meta data if present and then remove"""
if not hasattr(self,'__meta_data__'):
M=MetaData(project=self)
if hasattr(self, '__Exp_Meta_Dat__'):
print 'old meta data - converting'
M.convertfromOld()
... | Load old style meta data if present and then remove | Load old style meta data if present and then remove | [
"Load",
"old",
"style",
"meta",
"data",
"if",
"present",
"and",
"then",
"remove"
] | def checkMeta(self):
if not hasattr(self,'__meta_data__'):
M=MetaData(project=self)
if hasattr(self, '__Exp_Meta_Dat__'):
print 'old meta data - converting'
M.convertfromOld()
del self.__Exp_Meta_Dat__
self.setMetaData(M.data)
... | [
"def",
"checkMeta",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'__meta_data__'",
")",
":",
"M",
"=",
"MetaData",
"(",
"project",
"=",
"self",
")",
"if",
"hasattr",
"(",
"self",
",",
"'__Exp_Meta_Dat__'",
")",
":",
"print",
"'old ... | Load old style meta data if present and then remove | [
"Load",
"old",
"style",
"meta",
"data",
"if",
"present",
"and",
"then",
"remove"
] | [
"\"\"\"Load old style meta data if present and then remove\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | insertDataset | <not_specific> | def insertDataset(self, newdata=None, newname='data', xydata=None, fit=None,
replace=False, update=1):
"""Insert pre-existing data as a dataset"""
#print newdata
if newdata == None:
ek = EkinDataset(xy=xydata)
else:
#check for old or ... | Insert pre-existing data as a dataset | Insert pre-existing data as a dataset | [
"Insert",
"pre",
"-",
"existing",
"data",
"as",
"a",
"dataset"
] | def insertDataset(self, newdata=None, newname='data', xydata=None, fit=None,
replace=False, update=1):
if newdata == None:
ek = EkinDataset(xy=xydata)
else:
ek = self.checkDataset(newdata)
if ek == False:
return
if... | [
"def",
"insertDataset",
"(",
"self",
",",
"newdata",
"=",
"None",
",",
"newname",
"=",
"'data'",
",",
"xydata",
"=",
"None",
",",
"fit",
"=",
"None",
",",
"replace",
"=",
"False",
",",
"update",
"=",
"1",
")",
":",
"if",
"newdata",
"==",
"None",
":... | Insert pre-existing data as a dataset | [
"Insert",
"pre",
"-",
"existing",
"data",
"as",
"a",
"dataset"
] | [
"\"\"\"Insert pre-existing data as a dataset\"\"\"",
"#print newdata",
"#check for old or bad data"
] | [
{
"param": "self",
"type": null
},
{
"param": "newdata",
"type": null
},
{
"param": "newname",
"type": null
},
{
"param": "xydata",
"type": null
},
{
"param": "fit",
"type": null
},
{
"param": "replace",
"type": null
},
{
"param": "update",... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "newdata",
"type": null,
"docstring": null,
"docstring_tokens"... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | batchRename | <not_specific> | def batchRename(self, pattern='', replacement=''):
"""Rename all datasets by replacing a pattern"""
if pattern == replacement:
return
count=0
for name in self.datasets[:]:
newname = re.sub(pattern, replacement, name)
if newname != name:
... | Rename all datasets by replacing a pattern | Rename all datasets by replacing a pattern | [
"Rename",
"all",
"datasets",
"by",
"replacing",
"a",
"pattern"
] | def batchRename(self, pattern='', replacement=''):
if pattern == replacement:
return
count=0
for name in self.datasets[:]:
newname = re.sub(pattern, replacement, name)
if newname != name:
self.renameDataset(name, newname)
count+... | [
"def",
"batchRename",
"(",
"self",
",",
"pattern",
"=",
"''",
",",
"replacement",
"=",
"''",
")",
":",
"if",
"pattern",
"==",
"replacement",
":",
"return",
"count",
"=",
"0",
"for",
"name",
"in",
"self",
".",
"datasets",
"[",
":",
"]",
":",
"newname"... | Rename all datasets by replacing a pattern | [
"Rename",
"all",
"datasets",
"by",
"replacing",
"a",
"pattern"
] | [
"\"\"\"Rename all datasets by replacing a pattern\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "pattern",
"type": null
},
{
"param": "replacement",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "pattern",
"type": null,
"docstring": null,
"docstring_tokens"... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | saveDataset | <not_specific> | def saveDataset(self, name, filename=None):
"""Save single dataset to a file"""
import tkFileDialog, os
if filename == None:
filename = name + '.ekindat'
ek = self.data[name]
fitdata = self.getFitData(name)
ek.addFit(fitdata)
fd=open(filename,'w')
... | Save single dataset to a file | Save single dataset to a file | [
"Save",
"single",
"dataset",
"to",
"a",
"file"
] | def saveDataset(self, name, filename=None):
import tkFileDialog, os
if filename == None:
filename = name + '.ekindat'
ek = self.data[name]
fitdata = self.getFitData(name)
ek.addFit(fitdata)
fd=open(filename,'w')
import pickle
pickle.dump(ek,fd)... | [
"def",
"saveDataset",
"(",
"self",
",",
"name",
",",
"filename",
"=",
"None",
")",
":",
"import",
"tkFileDialog",
",",
"os",
"if",
"filename",
"==",
"None",
":",
"filename",
"=",
"name",
"+",
"'.ekindat'",
"ek",
"=",
"self",
".",
"data",
"[",
"name",
... | Save single dataset to a file | [
"Save",
"single",
"dataset",
"to",
"a",
"file"
] | [
"\"\"\"Save single dataset to a file\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "name",
"type": null
},
{
"param": "filename",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "name",
"type": null,
"docstring": null,
"docstring_tokens": [... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | checkDict | <not_specific> | def checkDict(self, dataset, name):
"""Check for arbitrary fields stored in the old format dataset
we move these to metadata"""
if not type(dataset) is types.DictType:
return None
for k in dataset.keys():
if not k in [0,1,2]:
self.addMeta(name, ... | Check for arbitrary fields stored in the old format dataset
we move these to metadata | Check for arbitrary fields stored in the old format dataset
we move these to metadata | [
"Check",
"for",
"arbitrary",
"fields",
"stored",
"in",
"the",
"old",
"format",
"dataset",
"we",
"move",
"these",
"to",
"metadata"
] | def checkDict(self, dataset, name):
if not type(dataset) is types.DictType:
return None
for k in dataset.keys():
if not k in [0,1,2]:
self.addMeta(name, k, dataset[k])
return | [
"def",
"checkDict",
"(",
"self",
",",
"dataset",
",",
"name",
")",
":",
"if",
"not",
"type",
"(",
"dataset",
")",
"is",
"types",
".",
"DictType",
":",
"return",
"None",
"for",
"k",
"in",
"dataset",
".",
"keys",
"(",
")",
":",
"if",
"not",
"k",
"i... | Check for arbitrary fields stored in the old format dataset
we move these to metadata | [
"Check",
"for",
"arbitrary",
"fields",
"stored",
"in",
"the",
"old",
"format",
"dataset",
"we",
"move",
"these",
"to",
"metadata"
] | [
"\"\"\"Check for arbitrary fields stored in the old format dataset\n we move these to metadata\"\"\"",
"#print self.getMetaData(name)"
] | [
{
"param": "self",
"type": null
},
{
"param": "dataset",
"type": null
},
{
"param": "name",
"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"... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | checkDataset | <not_specific> | def checkDataset(self, data):
"""Check for old format or bad dataset"""
if type(data) is types.DictType: #old format
x,y,a,xerr,yerr = EkinConvert.ekin2xy(data, getall=1, geterrors=True)
return EkinDataset(x=x,y=y,active=a,xerrs=xerr,yerrs=yerr)
elif not type(data) is Ek... | Check for old format or bad dataset | Check for old format or bad dataset | [
"Check",
"for",
"old",
"format",
"or",
"bad",
"dataset"
] | def checkDataset(self, data):
if type(data) is types.DictType:
x,y,a,xerr,yerr = EkinConvert.ekin2xy(data, getall=1, geterrors=True)
return EkinDataset(x=x,y=y,active=a,xerrs=xerr,yerrs=yerr)
elif not type(data) is EkinDataset:
return None
else:
r... | [
"def",
"checkDataset",
"(",
"self",
",",
"data",
")",
":",
"if",
"type",
"(",
"data",
")",
"is",
"types",
".",
"DictType",
":",
"x",
",",
"y",
",",
"a",
",",
"xerr",
",",
"yerr",
"=",
"EkinConvert",
".",
"ekin2xy",
"(",
"data",
",",
"getall",
"="... | Check for old format or bad dataset | [
"Check",
"for",
"old",
"format",
"or",
"bad",
"dataset"
] | [
"\"\"\"Check for old format or bad dataset\"\"\"",
"#old format"
] | [
{
"param": "self",
"type": null
},
{
"param": "data",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "data",
"type": null,
"docstring": null,
"docstring_tokens": [... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | importCSV | <not_specific> | def importCSV(self, filename=None, text=None, format=1, sep=',',
mode=None, truncate='end'):
"""
Import csv file(s) to ekin data.
This method should work without user intervention as much as possible.
There are three options:
1. Single file, curves per row, ... |
Import csv file(s) to ekin data.
This method should work without user intervention as much as possible.
There are three options:
1. Single file, curves per row, with ph values at the top
2. Single file, curves per column, with ph values in
the first column an... | Import csv file(s) to ekin data.
This method should work without user intervention as much as possible.
There are three options:
1. Single file, curves per row, with ph values at the top
2. Single file, curves per column, with ph values in
the first column and curve names in first row
3. Each curve in its own file, wit... | [
"Import",
"csv",
"file",
"(",
"s",
")",
"to",
"ekin",
"data",
".",
"This",
"method",
"should",
"work",
"without",
"user",
"intervention",
"as",
"much",
"as",
"possible",
".",
"There",
"are",
"three",
"options",
":",
"1",
".",
"Single",
"file",
"curves",
... | def importCSV(self, filename=None, text=None, format=1, sep=',',
mode=None, truncate='end'):
import csv
if filename != None:
csvfile = open(filename)
reader = csv.reader(csvfile, delimiter=sep)
elif text != None:
reader = csv.reader(text.spli... | [
"def",
"importCSV",
"(",
"self",
",",
"filename",
"=",
"None",
",",
"text",
"=",
"None",
",",
"format",
"=",
"1",
",",
"sep",
"=",
"','",
",",
"mode",
"=",
"None",
",",
"truncate",
"=",
"'end'",
")",
":",
"import",
"csv",
"if",
"filename",
"!=",
... | Import csv file(s) to ekin data. | [
"Import",
"csv",
"file",
"(",
"s",
")",
"to",
"ekin",
"data",
"."
] | [
"\"\"\"\n Import csv file(s) to ekin data.\n This method should work without user intervention as much as possible.\n There are three options:\n 1. Single file, curves per row, with ph values at the top\n 2. Single file, curves per column, with ph values in\n th... | [
{
"param": "self",
"type": null
},
{
"param": "filename",
"type": null
},
{
"param": "text",
"type": null
},
{
"param": "format",
"type": null
},
{
"param": "sep",
"type": null
},
{
"param": "mode",
"type": null
},
{
"param": "truncate",
... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "filename",
"type": null,
"docstring": null,
"docstring_tokens... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | saveProject | <not_specific> | def saveProject(self, filename=None):
"""Save data to an ekin project file"""
if filename == None:
if not hasattr(self, 'filename') or self.filename==None:
print 'no filename'
return
else:
filename=self.filename
self.filenam... | Save data to an ekin project file | Save data to an ekin project file | [
"Save",
"data",
"to",
"an",
"ekin",
"project",
"file"
] | def saveProject(self, filename=None):
if filename == None:
if not hasattr(self, 'filename') or self.filename==None:
print 'no filename'
return
else:
filename=self.filename
self.filename = filename
if os.path.splitext(filenam... | [
"def",
"saveProject",
"(",
"self",
",",
"filename",
"=",
"None",
")",
":",
"if",
"filename",
"==",
"None",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'filename'",
")",
"or",
"self",
".",
"filename",
"==",
"None",
":",
"print",
"'no filename'",
"re... | Save data to an ekin project file | [
"Save",
"data",
"to",
"an",
"ekin",
"project",
"file"
] | [
"\"\"\"Save data to an ekin project file\"\"\""
] | [
{
"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... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | prepare_data | <not_specific> | def prepare_data(self):
"""Prepare data for saving or return to another app ie. PEAT"""
data = copy.deepcopy(self.data)
data = self.data
#print self.__meta_data__
for name in self.ekinfields:
if hasattr(self, name):
data[name] = copy.deepcopy(self.__d... | Prepare data for saving or return to another app ie. PEAT | Prepare data for saving or return to another app ie. PEAT | [
"Prepare",
"data",
"for",
"saving",
"or",
"return",
"to",
"another",
"app",
"ie",
".",
"PEAT"
] | def prepare_data(self):
data = copy.deepcopy(self.data)
data = self.data
for name in self.ekinfields:
if hasattr(self, name):
data[name] = copy.deepcopy(self.__dict__[name])
data['mode'] = self.currentmode
return data | [
"def",
"prepare_data",
"(",
"self",
")",
":",
"data",
"=",
"copy",
".",
"deepcopy",
"(",
"self",
".",
"data",
")",
"data",
"=",
"self",
".",
"data",
"for",
"name",
"in",
"self",
".",
"ekinfields",
":",
"if",
"hasattr",
"(",
"self",
",",
"name",
")"... | Prepare data for saving or return to another app ie. | [
"Prepare",
"data",
"for",
"saving",
"or",
"return",
"to",
"another",
"app",
"ie",
"."
] | [
"\"\"\"Prepare data for saving or return to another app ie. PEAT\"\"\"",
"#print self.__meta_data__"
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | printData | null | def printData(self):
"""Print out a summary of all the datasets"""
for name in self.datasets:
fitdata = self.__datatabs_fits__[name]
if fitdata.has_key('model'):
fit=fitdata['model']
else:
fit='Not fitted'
axes = self.getAxe... | Print out a summary of all the datasets | Print out a summary of all the datasets | [
"Print",
"out",
"a",
"summary",
"of",
"all",
"the",
"datasets"
] | def printData(self):
for name in self.datasets:
fitdata = self.__datatabs_fits__[name]
if fitdata.has_key('model'):
fit=fitdata['model']
else:
fit='Not fitted'
axes = self.getAxesLabels(name)
print '%s: %s pts, fit: %s, ... | [
"def",
"printData",
"(",
"self",
")",
":",
"for",
"name",
"in",
"self",
".",
"datasets",
":",
"fitdata",
"=",
"self",
".",
"__datatabs_fits__",
"[",
"name",
"]",
"if",
"fitdata",
".",
"has_key",
"(",
"'model'",
")",
":",
"fit",
"=",
"fitdata",
"[",
"... | Print out a summary of all the datasets | [
"Print",
"out",
"a",
"summary",
"of",
"all",
"the",
"datasets"
] | [
"\"\"\"Print out a summary of all the datasets\"\"\""
] | [
{
"param": "self",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
}
],
"outlier_params": [],
"others": []
} |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | addMeta | <not_specific> | def addMeta(self, dataset, fieldname, data):
"""Set a field for this dataset in the meta data dict"""
if not hasattr(self, '__meta_data__'):
self.__meta_data__ = {}
self.__meta_data__[dataset] = {}
if not self.__meta_data__.has_key(dataset):
self.__meta_data_... | Set a field for this dataset in the meta data dict | Set a field for this dataset in the meta data dict | [
"Set",
"a",
"field",
"for",
"this",
"dataset",
"in",
"the",
"meta",
"data",
"dict"
] | def addMeta(self, dataset, fieldname, data):
if not hasattr(self, '__meta_data__'):
self.__meta_data__ = {}
self.__meta_data__[dataset] = {}
if not self.__meta_data__.has_key(dataset):
self.__meta_data__[dataset] = {}
self.__meta_data__[dataset][fieldname] = ... | [
"def",
"addMeta",
"(",
"self",
",",
"dataset",
",",
"fieldname",
",",
"data",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'__meta_data__'",
")",
":",
"self",
".",
"__meta_data__",
"=",
"{",
"}",
"self",
".",
"__meta_data__",
"[",
"dataset",
"]... | Set a field for this dataset in the meta data dict | [
"Set",
"a",
"field",
"for",
"this",
"dataset",
"in",
"the",
"meta",
"data",
"dict"
] | [
"\"\"\"Set a field for this dataset in the meta data dict\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "dataset",
"type": null
},
{
"param": "fieldname",
"type": null
},
{
"param": "data",
"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"... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | fitDataset | <not_specific> | def fitDataset(self, dataset, model=None, update=True,
noiter=300, conv=None, grad=None, damper=1.0,
silent=False, guess=True, startvalues=None, changevars=None,
callback=None):
"""Calculate the fit for this current dataset, if a model
is gi... | Calculate the fit for this current dataset, if a model
is given we use that instead of the current one.
update=True means that the dataset fit info will be overwritten | Calculate the fit for this current dataset, if a model
is given we use that instead of the current one.
update=True means that the dataset fit info will be overwritten | [
"Calculate",
"the",
"fit",
"for",
"this",
"current",
"dataset",
"if",
"a",
"model",
"is",
"given",
"we",
"use",
"that",
"instead",
"of",
"the",
"current",
"one",
".",
"update",
"=",
"True",
"means",
"that",
"the",
"dataset",
"fit",
"info",
"will",
"be",
... | def fitDataset(self, dataset, model=None, update=True,
noiter=300, conv=None, grad=None, damper=1.0,
silent=False, guess=True, startvalues=None, changevars=None,
callback=None):
for m in Fitting.fitterClasses:
if model == m or model == m.lo... | [
"def",
"fitDataset",
"(",
"self",
",",
"dataset",
",",
"model",
"=",
"None",
",",
"update",
"=",
"True",
",",
"noiter",
"=",
"300",
",",
"conv",
"=",
"None",
",",
"grad",
"=",
"None",
",",
"damper",
"=",
"1.0",
",",
"silent",
"=",
"False",
",",
"... | Calculate the fit for this current dataset, if a model
is given we use that instead of the current one. | [
"Calculate",
"the",
"fit",
"for",
"this",
"current",
"dataset",
"if",
"a",
"model",
"is",
"given",
"we",
"use",
"that",
"instead",
"of",
"the",
"current",
"one",
"."
] | [
"\"\"\"Calculate the fit for this current dataset, if a model\n is given we use that instead of the current one.\n update=True means that the dataset fit info will be overwritten\"\"\"",
"#check case of model, as our names are stupidly kept case sensitive"
] | [
{
"param": "self",
"type": null
},
{
"param": "dataset",
"type": null
},
{
"param": "model",
"type": null
},
{
"param": "update",
"type": null
},
{
"param": "noiter",
"type": null
},
{
"param": "conv",
"type": null
},
{
"param": "grad",
... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "dataset",
"type": null,
"docstring": null,
"docstring_tokens"... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | fitDatasets | <not_specific> | def fitDatasets(self, datasets='ALL', update=True, findbest=False, models=None,
noiter=300, conv=1e-6, grad=1e-6, silent=False, callback=None):
"""Fit multiple datasets in this project, if no datasets are given, we
fit all of them.
If findbest=True, finds the best f... | Fit multiple datasets in this project, if no datasets are given, we
fit all of them.
If findbest=True, finds the best fit model using f-testing for the given
dataset.
models is optional and provides a list of models to try for best fitting
| Fit multiple datasets in this project, if no datasets are given, we
fit all of them.
If findbest=True, finds the best fit model using f-testing for the given
dataset.
models is optional and provides a list of models to try for best fitting | [
"Fit",
"multiple",
"datasets",
"in",
"this",
"project",
"if",
"no",
"datasets",
"are",
"given",
"we",
"fit",
"all",
"of",
"them",
".",
"If",
"findbest",
"=",
"True",
"finds",
"the",
"best",
"fit",
"model",
"using",
"f",
"-",
"testing",
"for",
"the",
"g... | def fitDatasets(self, datasets='ALL', update=True, findbest=False, models=None,
noiter=300, conv=1e-6, grad=1e-6, silent=False, callback=None):
datasets = self.checkDatasetParam(datasets)
print 'fitting %s datasets..' %len(datasets)
if findbest == True:
for na... | [
"def",
"fitDatasets",
"(",
"self",
",",
"datasets",
"=",
"'ALL'",
",",
"update",
"=",
"True",
",",
"findbest",
"=",
"False",
",",
"models",
"=",
"None",
",",
"noiter",
"=",
"300",
",",
"conv",
"=",
"1e-6",
",",
"grad",
"=",
"1e-6",
",",
"silent",
"... | Fit multiple datasets in this project, if no datasets are given, we
fit all of them. | [
"Fit",
"multiple",
"datasets",
"in",
"this",
"project",
"if",
"no",
"datasets",
"are",
"given",
"we",
"fit",
"all",
"of",
"them",
"."
] | [
"\"\"\"Fit multiple datasets in this project, if no datasets are given, we\n fit all of them.\n If findbest=True, finds the best fit model using f-testing for the given\n dataset.\n models is optional and provides a list of models to try for best fitting\n \"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "datasets",
"type": null
},
{
"param": "update",
"type": null
},
{
"param": "findbest",
"type": null
},
{
"param": "models",
"type": null
},
{
"param": "noiter",
"type": null
},
{
"param": "conv... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "datasets",
"type": null,
"docstring": null,
"docstring_tokens... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | findBestModel | <not_specific> | def findBestModel(self, dataset, update=True, models=None, mode=None,
checkfunc=None, conv=None, grad=None, alpha=0.01,
silent=False):
"""Finds the best fit model using f-testing"""
thisdata = self.data[dataset]
#print 'models', models
... | Finds the best fit model using f-testing | Finds the best fit model using f-testing | [
"Finds",
"the",
"best",
"fit",
"model",
"using",
"f",
"-",
"testing"
] | def findBestModel(self, dataset, update=True, models=None, mode=None,
checkfunc=None, conv=None, grad=None, alpha=0.01,
silent=False):
thisdata = self.data[dataset]
if models == None:
models = copy.deepcopy(self.mode_definition[self.cur... | [
"def",
"findBestModel",
"(",
"self",
",",
"dataset",
",",
"update",
"=",
"True",
",",
"models",
"=",
"None",
",",
"mode",
"=",
"None",
",",
"checkfunc",
"=",
"None",
",",
"conv",
"=",
"None",
",",
"grad",
"=",
"None",
",",
"alpha",
"=",
"0.01",
","... | Finds the best fit model using f-testing | [
"Finds",
"the",
"best",
"fit",
"model",
"using",
"f",
"-",
"testing"
] | [
"\"\"\"Finds the best fit model using f-testing\"\"\"",
"#print 'models', models"
] | [
{
"param": "self",
"type": null
},
{
"param": "dataset",
"type": null
},
{
"param": "update",
"type": null
},
{
"param": "models",
"type": null
},
{
"param": "mode",
"type": null
},
{
"param": "checkfunc",
"type": null
},
{
"param": "conv",... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "dataset",
"type": null,
"docstring": null,
"docstring_tokens"... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | estimateExpUncertainty | <not_specific> | def estimateExpUncertainty(self, dataset, xuncert=0.01, yuncert=0.01,
runs=10, doplots=False, conv=1e-6, grad=1e-6,
guess=True):
"""Chresten's method for estimating the error on each parameter due
to the effect of the exp uncertainty, wh... | Chresten's method for estimating the error on each parameter due
to the effect of the exp uncertainty, which is user provided | Chresten's method for estimating the error on each parameter due
to the effect of the exp uncertainty, which is user provided | [
"Chresten",
"'",
"s",
"method",
"for",
"estimating",
"the",
"error",
"on",
"each",
"parameter",
"due",
"to",
"the",
"effect",
"of",
"the",
"exp",
"uncertainty",
"which",
"is",
"user",
"provided"
] | def estimateExpUncertainty(self, dataset, xuncert=0.01, yuncert=0.01,
runs=10, doplots=False, conv=1e-6, grad=1e-6,
guess=True):
data = self.data[dataset]
fitdata = self.__datatabs_fits__[dataset]
fitstats = Fitting.estimateExpUncer... | [
"def",
"estimateExpUncertainty",
"(",
"self",
",",
"dataset",
",",
"xuncert",
"=",
"0.01",
",",
"yuncert",
"=",
"0.01",
",",
"runs",
"=",
"10",
",",
"doplots",
"=",
"False",
",",
"conv",
"=",
"1e-6",
",",
"grad",
"=",
"1e-6",
",",
"guess",
"=",
"True... | Chresten's method for estimating the error on each parameter due
to the effect of the exp uncertainty, which is user provided | [
"Chresten",
"'",
"s",
"method",
"for",
"estimating",
"the",
"error",
"on",
"each",
"parameter",
"due",
"to",
"the",
"effect",
"of",
"the",
"exp",
"uncertainty",
"which",
"is",
"user",
"provided"
] | [
"\"\"\"Chresten's method for estimating the error on each parameter due\n to the effect of the exp uncertainty, which is user provided \"\"\"",
"#print 'estimating exp uncertainty for %s' %dataset"
] | [
{
"param": "self",
"type": null
},
{
"param": "dataset",
"type": null
},
{
"param": "xuncert",
"type": null
},
{
"param": "yuncert",
"type": null
},
{
"param": "runs",
"type": null
},
{
"param": "doplots",
"type": null
},
{
"param": "conv",... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "dataset",
"type": null,
"docstring": null,
"docstring_tokens"... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | doPlot | <not_specific> | def doPlot(self, ek, fitdata, options):
"""Need a bare bones plotter that can plot any given ekin data
Should then call this one in plotDatasets below and simplify"""
x,y,a, xerr,yerr = ek.getAll()
line = ax.scatter(x, y, marker='o')
#plotting fit should also be seperate?
... | Need a bare bones plotter that can plot any given ekin data
Should then call this one in plotDatasets below and simplify | Need a bare bones plotter that can plot any given ekin data
Should then call this one in plotDatasets below and simplify | [
"Need",
"a",
"bare",
"bones",
"plotter",
"that",
"can",
"plot",
"any",
"given",
"ekin",
"data",
"Should",
"then",
"call",
"this",
"one",
"in",
"plotDatasets",
"below",
"and",
"simplify"
] | def doPlot(self, ek, fitdata, options):
x,y,a, xerr,yerr = ek.getAll()
line = ax.scatter(x, y, marker='o')
f = fitdata
d=[]
X = Fitting.makeFitter(f, zip(x,y))
if X==None: return
fitclr = lineclr
if plotoption != 3:
fitclr='r'
xx, fity ... | [
"def",
"doPlot",
"(",
"self",
",",
"ek",
",",
"fitdata",
",",
"options",
")",
":",
"x",
",",
"y",
",",
"a",
",",
"xerr",
",",
"yerr",
"=",
"ek",
".",
"getAll",
"(",
")",
"line",
"=",
"ax",
".",
"scatter",
"(",
"x",
",",
"y",
",",
"marker",
... | Need a bare bones plotter that can plot any given ekin data
Should then call this one in plotDatasets below and simplify | [
"Need",
"a",
"bare",
"bones",
"plotter",
"that",
"can",
"plot",
"any",
"given",
"ekin",
"data",
"Should",
"then",
"call",
"this",
"one",
"in",
"plotDatasets",
"below",
"and",
"simplify"
] | [
"\"\"\"Need a bare bones plotter that can plot any given ekin data\n Should then call this one in plotDatasets below and simplify\"\"\"",
"#plotting fit should also be seperate?",
"#we now use this model to draw the fit line"
] | [
{
"param": "self",
"type": null
},
{
"param": "ek",
"type": null
},
{
"param": "fitdata",
"type": null
},
{
"param": "options",
"type": null
}
] | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "ek",
"type": null,
"docstring": null,
"docstring_tokens": [],... |
6a8c35082cc2a132e84b5340e4eba0be3260bf79 | shambo001/peat | PEATDB/Ekin/Base.py | [
"MIT"
] | Python | updateFit | <not_specific> | def updateFit(self, X, ax=None, xdata=None, clr=None,
normalise=None, plotoption=1, showfitvars=False):
"""Get the fit data line for given fitter object and redraw"""
if xdata == None:
xdata = self.currxdata
if ax == None:
ax = self.ax
if c... | Get the fit data line for given fitter object and redraw | Get the fit data line for given fitter object and redraw | [
"Get",
"the",
"fit",
"data",
"line",
"for",
"given",
"fitter",
"object",
"and",
"redraw"
] | def updateFit(self, X, ax=None, xdata=None, clr=None,
normalise=None, plotoption=1, showfitvars=False):
if xdata == None:
xdata = self.currxdata
if ax == None:
ax = self.ax
if clr == None:
clr='r'
e=[]
for i in xdata: e.... | [
"def",
"updateFit",
"(",
"self",
",",
"X",
",",
"ax",
"=",
"None",
",",
"xdata",
"=",
"None",
",",
"clr",
"=",
"None",
",",
"normalise",
"=",
"None",
",",
"plotoption",
"=",
"1",
",",
"showfitvars",
"=",
"False",
")",
":",
"if",
"xdata",
"==",
"N... | Get the fit data line for given fitter object and redraw | [
"Get",
"the",
"fit",
"data",
"line",
"for",
"given",
"fitter",
"object",
"and",
"redraw"
] | [
"\"\"\"Get the fit data line for given fitter object and redraw\"\"\""
] | [
{
"param": "self",
"type": null
},
{
"param": "X",
"type": null
},
{
"param": "ax",
"type": null
},
{
"param": "xdata",
"type": null
},
{
"param": "clr",
"type": null
},
{
"param": "normalise",
"type": null
},
{
"param": "plotoption",
"... | {
"returns": [],
"raises": [],
"params": [
{
"identifier": "self",
"type": null,
"docstring": null,
"docstring_tokens": [],
"default": null,
"is_optional": null
},
{
"identifier": "X",
"type": null,
"docstring": null,
"docstring_tokens": [],
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.