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
c70d51379de40ce7cfa14a3beee789d8cfd1078f
shambo001/peat
PEATDB/DNAtool/primer_alignment.py
[ "MIT" ]
Python
find_primer_binding_sites
<not_specific>
def find_primer_binding_sites(self,primer_seq,DNA_seq): '''Find all possible binding sites for the primer in the DNA_seq - also probe the reverse strand''' binding_sites=self.find_primer_binding_sites_1(primer_seq,DNA_seq) # Reverse complement strand rev_compl = mutation.get_r...
Find all possible binding sites for the primer in the DNA_seq - also probe the reverse strand
Find all possible binding sites for the primer in the DNA_seq also probe the reverse strand
[ "Find", "all", "possible", "binding", "sites", "for", "the", "primer", "in", "the", "DNA_seq", "also", "probe", "the", "reverse", "strand" ]
def find_primer_binding_sites(self,primer_seq,DNA_seq): binding_sites=self.find_primer_binding_sites_1(primer_seq,DNA_seq) rev_compl = mutation.get_reverse_complementary(DNA_seq) rev_binding_sites = self.find_primer_binding_sites_1(primer_seq,rev_compl,1) return binding_sites+rev_binding...
[ "def", "find_primer_binding_sites", "(", "self", ",", "primer_seq", ",", "DNA_seq", ")", ":", "binding_sites", "=", "self", ".", "find_primer_binding_sites_1", "(", "primer_seq", ",", "DNA_seq", ")", "rev_compl", "=", "mutation", ".", "get_reverse_complementary", "(...
Find all possible binding sites for the primer in the DNA_seq also probe the reverse strand
[ "Find", "all", "possible", "binding", "sites", "for", "the", "primer", "in", "the", "DNA_seq", "also", "probe", "the", "reverse", "strand" ]
[ "'''Find all possible binding sites for the primer in the DNA_seq\n - also probe the reverse strand'''", "# Reverse complement strand" ]
[ { "param": "self", "type": null }, { "param": "primer_seq", "type": null }, { "param": "DNA_seq", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "primer_seq", "type": null, "docstring": null, "docstring_toke...
c70d51379de40ce7cfa14a3beee789d8cfd1078f
shambo001/peat
PEATDB/DNAtool/primer_alignment.py
[ "MIT" ]
Python
find_primer_binding_sites_1
<not_specific>
def find_primer_binding_sites_1(self,primer_seq,DNA_seq,rev=None): """Find all possible binding sites for the primer in the DNA_seq. This function should be changed so we use the scan_primer class in mutation.py""" # scores=[] primer_len=len(primer_seq) for pos in range(...
Find all possible binding sites for the primer in the DNA_seq. This function should be changed so we use the scan_primer class in mutation.py
Find all possible binding sites for the primer in the DNA_seq. This function should be changed so we use the scan_primer class in mutation.py
[ "Find", "all", "possible", "binding", "sites", "for", "the", "primer", "in", "the", "DNA_seq", ".", "This", "function", "should", "be", "changed", "so", "we", "use", "the", "scan_primer", "class", "in", "mutation", ".", "py" ]
def find_primer_binding_sites_1(self,primer_seq,DNA_seq,rev=None): scores=[] primer_len=len(primer_seq) for pos in range(0,len(DNA_seq)): DNA_stretch=DNA_seq[pos:min(pos+primer_len,len(DNA_seq))] score=0 for comp_pos in xrange(min(len(primer_seq),len(DNA_stret...
[ "def", "find_primer_binding_sites_1", "(", "self", ",", "primer_seq", ",", "DNA_seq", ",", "rev", "=", "None", ")", ":", "scores", "=", "[", "]", "primer_len", "=", "len", "(", "primer_seq", ")", "for", "pos", "in", "range", "(", "0", ",", "len", "(", ...
Find all possible binding sites for the primer in the DNA_seq.
[ "Find", "all", "possible", "binding", "sites", "for", "the", "primer", "in", "the", "DNA_seq", "." ]
[ "\"\"\"Find all possible binding sites for the primer in the DNA_seq.\n This function should be changed so we use the scan_primer class in mutation.py\"\"\"", "#", "#", "# Find the ten best binding sites", "#" ]
[ { "param": "self", "type": null }, { "param": "primer_seq", "type": null }, { "param": "DNA_seq", "type": null }, { "param": "rev", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "primer_seq", "type": null, "docstring": null, "docstring_toke...
2d0a1befafec11c0defb6ef4920063dd62cc94b7
shambo001/peat
DNATool2/SeqIO.py
[ "MIT" ]
Python
insertAlignmentText
<not_specific>
def insertAlignmentText(self, alignments, text): """Show formatted alignment info in text widget""" text.tag_config('a', foreground="blue") text.tag_config('r', foreground="red") text.tag_config('b', background="lightyellow") text.tag_config('c', background="lightgreen") ...
Show formatted alignment info in text widget
Show formatted alignment info in text widget
[ "Show", "formatted", "alignment", "info", "in", "text", "widget" ]
def insertAlignmentText(self, alignments, text): text.tag_config('a', foreground="blue") text.tag_config('r', foreground="red") text.tag_config('b', background="lightyellow") text.tag_config('c', background="lightgreen") n=100 for align in alignments: for hsp i...
[ "def", "insertAlignmentText", "(", "self", ",", "alignments", ",", "text", ")", ":", "text", ".", "tag_config", "(", "'a'", ",", "foreground", "=", "\"blue\"", ")", "text", ".", "tag_config", "(", "'r'", ",", "foreground", "=", "\"red\"", ")", "text", "....
Show formatted alignment info in text widget
[ "Show", "formatted", "alignment", "info", "in", "text", "widget" ]
[ "\"\"\"Show formatted alignment info in text widget\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "alignments", "type": null }, { "param": "text", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "alignments", "type": null, "docstring": null, "docstring_toke...
5210eda4c23f3cb8c43ae3512df74caee60e27d8
shambo001/peat
PEATSA/Core/Classify.py
[ "MIT" ]
Python
createDataSet
<not_specific>
def createDataSet(self, matrix, features, recordRetriever, responseVariable): '''Creates a mvpva.dataset.Dataset instance from the provided data Parameters: matrix - A matrix where each row corresponds to a mutant. The mutant is identified by the column labeled 'Mut...
Creates a mvpva.dataset.Dataset instance from the provided data Parameters: matrix - A matrix where each row corresponds to a mutant. The mutant is identified by the column labeled 'Mutations' One of the other columns of the matrix must contain the data on the re...
Creates a mvpva.dataset.Dataset instance from the provided data Parameters: matrix - A matrix where each row corresponds to a mutant. The mutant is identified by the column labeled 'Mutations' One of the other columns of the matrix must contain the data on the response variable to be examined features A list containing...
[ "Creates", "a", "mvpva", ".", "dataset", ".", "Dataset", "instance", "from", "the", "provided", "data", "Parameters", ":", "matrix", "-", "A", "matrix", "where", "each", "row", "corresponds", "to", "a", "mutant", ".", "The", "mutant", "is", "identified", "...
def createDataSet(self, matrix, features, recordRetriever, responseVariable): rows = [] mutations = list(matrix.mutations) for i in range(len(mutations)): rows.append(len(features)*[0]) mutationColumnIndex = matrix.indexOfColumnWithHeader('Mutations') for i in range(l...
[ "def", "createDataSet", "(", "self", ",", "matrix", ",", "features", ",", "recordRetriever", ",", "responseVariable", ")", ":", "rows", "=", "[", "]", "mutations", "=", "list", "(", "matrix", ".", "mutations", ")", "for", "i", "in", "range", "(", "len", ...
Creates a mvpva.dataset.Dataset instance from the provided data Parameters: matrix - A matrix where each row corresponds to a mutant.
[ "Creates", "a", "mvpva", ".", "dataset", ".", "Dataset", "instance", "from", "the", "provided", "data", "Parameters", ":", "matrix", "-", "A", "matrix", "where", "each", "row", "corresponds", "to", "a", "mutant", "." ]
[ "'''Creates a mvpva.dataset.Dataset instance from the provided data\n \n Parameters:\n matrix - A matrix where each row corresponds to a mutant.\n The mutant is identified by the column labeled 'Mutations'\n One of the other columns of the matrix must contain the d...
[ { "param": "self", "type": null }, { "param": "matrix", "type": null }, { "param": "features", "type": null }, { "param": "recordRetriever", "type": null }, { "param": "responseVariable", "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":...
5210eda4c23f3cb8c43ae3512df74caee60e27d8
shambo001/peat
PEATSA/Core/Classify.py
[ "MIT" ]
Python
runAnalysis
<not_specific>
def runAnalysis(self, data, features): '''Runs the LARS algorithm on data and returns features strongly associated with the response variable Parameters data - A mvpa.datasets.Dataset instance. features - A list of features being used for the classification process. ...
Runs the LARS algorithm on data and returns features strongly associated with the response variable Parameters data - A mvpa.datasets.Dataset instance. features - A list of features being used for the classification process. This is not necessary for the classificati...
Runs the LARS algorithm on data and returns features strongly associated with the response variable Parameters data - A mvpa.datasets.Dataset instance. features - A list of features being used for the classification process. This is not necessary for the classification process since data already contains the informatio...
[ "Runs", "the", "LARS", "algorithm", "on", "data", "and", "returns", "features", "strongly", "associated", "with", "the", "response", "variable", "Parameters", "data", "-", "A", "mvpa", ".", "datasets", ".", "Dataset", "instance", ".", "features", "-", "A", "...
def runAnalysis(self, data, features): classifier = mvpa.clfs.lars.LARS(model_type='lar', trace=False) classifier.train(data) sen = classifier.getSensitivityAnalyzer(force_training=True) perturber = mvpa.measures.noiseperturbation.NoisePerturbationSensitivity(sen) self.perturberR...
[ "def", "runAnalysis", "(", "self", ",", "data", ",", "features", ")", ":", "classifier", "=", "mvpa", ".", "clfs", ".", "lars", ".", "LARS", "(", "model_type", "=", "'lar'", ",", "trace", "=", "False", ")", "classifier", ".", "train", "(", "data", ")...
Runs the LARS algorithm on data and returns features strongly associated with the response variable Parameters data - A mvpa.datasets.Dataset instance.
[ "Runs", "the", "LARS", "algorithm", "on", "data", "and", "returns", "features", "strongly", "associated", "with", "the", "response", "variable", "Parameters", "data", "-", "A", "mvpa", ".", "datasets", ".", "Dataset", "instance", "." ]
[ "'''Runs the LARS algorithm on data and returns features strongly associated with the response variable\n \n Parameters\n data - A mvpa.datasets.Dataset instance.\n features - A list of features being used for the classification process.\n This is not necessary for the...
[ { "param": "self", "type": null }, { "param": "data", "type": null }, { "param": "features", "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": [...
5210eda4c23f3cb8c43ae3512df74caee60e27d8
shambo001/peat
PEATSA/Core/Classify.py
[ "MIT" ]
Python
intraGroupDependance
<not_specific>
def intraGroupDependance(self, matrix, group, featureFinder, allFeatures, responseVariable): '''Compares the error of entries in matrix that have features in groups Params: matrix - The samples - Each sample is a mutation with a value for the responseVariabe group -...
Compares the error of entries in matrix that have features in groups Params: matrix - The samples - Each sample is a mutation with a value for the responseVariabe group - A list of features e.g. residue positions, substitutions. This is a subset of allFeatures featur...
Compares the error of entries in matrix that have features in groups Params: matrix - The samples - Each sample is a mutation with a value for the responseVariabe group - A list of features e.g. residue positions, substitutions. This is a subset of allFeatures featureFinder - A method that when past a feature will retu...
[ "Compares", "the", "error", "of", "entries", "in", "matrix", "that", "have", "features", "in", "groups", "Params", ":", "matrix", "-", "The", "samples", "-", "Each", "sample", "is", "a", "mutation", "with", "a", "value", "for", "the", "responseVariabe", "g...
def intraGroupDependance(self, matrix, group, featureFinder, allFeatures, responseVariable): features = group[0] print 'Group - %s' % features if len(features) == 0: print 'Only one feature in group - cannot perform intra-group dependence' return print '%10s\t%10s...
[ "def", "intraGroupDependance", "(", "self", ",", "matrix", ",", "group", ",", "featureFinder", ",", "allFeatures", ",", "responseVariable", ")", ":", "features", "=", "group", "[", "0", "]", "print", "'Group - %s'", "%", "features", "if", "len", "(", "featur...
Compares the error of entries in matrix that have features in groups Params: matrix - The samples - Each sample is a mutation with a value for the responseVariabe group - A list of features e.g.
[ "Compares", "the", "error", "of", "entries", "in", "matrix", "that", "have", "features", "in", "groups", "Params", ":", "matrix", "-", "The", "samples", "-", "Each", "sample", "is", "a", "mutation", "with", "a", "value", "for", "the", "responseVariabe", "g...
[ "'''Compares the error of entries in matrix that have features in groups\n \n Params:\n matrix - The samples - Each sample is a mutation with a value for the responseVariabe\n group - A list of features e.g. residue positions, substitutions. This is a subset of allFeatures\n ...
[ { "param": "self", "type": null }, { "param": "matrix", "type": null }, { "param": "group", "type": null }, { "param": "featureFinder", "type": null }, { "param": "allFeatures", "type": null }, { "param": "responseVariable", "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":...
5210eda4c23f3cb8c43ae3512df74caee60e27d8
shambo001/peat
PEATSA/Core/Classify.py
[ "MIT" ]
Python
doRun
<not_specific>
def doRun(self, matrix, responseVariable): """Run standard features - position, mutations, substitutions""" print matrix.columnHeaders() errorIndex = matrix.indexOfColumnWithHeader(responseVariable) print 'Positions \n' features = matrix.mutatedResidues() data = s...
Run standard features - position, mutations, substitutions
Run standard features - position, mutations, substitutions
[ "Run", "standard", "features", "-", "position", "mutations", "substitutions" ]
def doRun(self, matrix, responseVariable): print matrix.columnHeaders() errorIndex = matrix.indexOfColumnWithHeader(responseVariable) print 'Positions \n' features = matrix.mutatedResidues() data = self.createDataSet(matrix, features, matrix.entriesWithMutatedResidues, responseVa...
[ "def", "doRun", "(", "self", ",", "matrix", ",", "responseVariable", ")", ":", "print", "matrix", ".", "columnHeaders", "(", ")", "errorIndex", "=", "matrix", ".", "indexOfColumnWithHeader", "(", "responseVariable", ")", "print", "'Positions \\n'", "features", "...
Run standard features - position, mutations, substitutions
[ "Run", "standard", "features", "-", "position", "mutations", "substitutions" ]
[ "\"\"\"Run standard features - position, mutations, substitutions\"\"\"", "'''print '\\nSubstitutions\\n'\n features = matrix.substitutions()\n data = self.createDataSet(matrix, features, matrix.entriesWithSubstitutions, responseVariable)\n systematicSubstitution, outliersSubstitution = self....
[ { "param": "self", "type": null }, { "param": "matrix", "type": null }, { "param": "responseVariable", "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":...
fc626e2011c1231a88dd24c6c5b9e4c5b076759d
shambo001/peat
Protool/phipsi.py
[ "MIT" ]
Python
angle
<not_specific>
def angle(vector1,vector2,refvector): """This function returns the angle between vector1 and vector2 By using refvector, the rotation is determined to be positive (counter-clockwise) # or negative (clockwise)""" dot=Numeric.dot(vector1,vector2) dot=dot/(length(vector1)*length(vector2)) vectorpr...
This function returns the angle between vector1 and vector2 By using refvector, the rotation is determined to be positive (counter-clockwise) # or negative (clockwise)
This function returns the angle between vector1 and vector2 By using refvector, the rotation is determined to be positive (counter-clockwise) or negative (clockwise)
[ "This", "function", "returns", "the", "angle", "between", "vector1", "and", "vector2", "By", "using", "refvector", "the", "rotation", "is", "determined", "to", "be", "positive", "(", "counter", "-", "clockwise", ")", "or", "negative", "(", "clockwise", ")" ]
def angle(vector1,vector2,refvector): dot=Numeric.dot(vector1,vector2) dot=dot/(length(vector1)*length(vector2)) vectorprod=length(cross(vector1,vector2))/(length(vector1)*length(vector2)) ang=dr*angleFromSineAndCosine(vectorprod,dot) if Numeric.dot(cross(vector1,vector2),refvector)<0.0: ang...
[ "def", "angle", "(", "vector1", ",", "vector2", ",", "refvector", ")", ":", "dot", "=", "Numeric", ".", "dot", "(", "vector1", ",", "vector2", ")", "dot", "=", "dot", "/", "(", "length", "(", "vector1", ")", "*", "length", "(", "vector2", ")", ")",...
This function returns the angle between vector1 and vector2 By using refvector, the rotation is determined to be positive (counter-clockwise) or negative (clockwise)
[ "This", "function", "returns", "the", "angle", "between", "vector1", "and", "vector2", "By", "using", "refvector", "the", "rotation", "is", "determined", "to", "be", "positive", "(", "counter", "-", "clockwise", ")", "or", "negative", "(", "clockwise", ")" ]
[ "\"\"\"This function returns the angle between vector1 and vector2\n By using refvector, the rotation is determined to be positive (counter-clockwise)\n # or negative (clockwise)\"\"\"" ]
[ { "param": "vector1", "type": null }, { "param": "vector2", "type": null }, { "param": "refvector", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "vector1", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "vector2", "type": null, "docstring": null, "docstring_toke...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
showDatasetsTable
<not_specific>
def showDatasetsTable(self): """Show a list of all datasets in a table""" if hasattr(self, 'datasetsframe'): self.m.forget(self.datasetsframe) if self.showdatasetstable.get() == 1: from PEATDB.Ekin.Tables import EkinProjModel, EkinProjTable def plotselected()...
Show a list of all datasets in a table
Show a list of all datasets in a table
[ "Show", "a", "list", "of", "all", "datasets", "in", "a", "table" ]
def showDatasetsTable(self): if hasattr(self, 'datasetsframe'): self.m.forget(self.datasetsframe) if self.showdatasetstable.get() == 1: from PEATDB.Ekin.Tables import EkinProjModel, EkinProjTable def plotselected(): datasets = self.datasetstable.get_se...
[ "def", "showDatasetsTable", "(", "self", ")", ":", "if", "hasattr", "(", "self", ",", "'datasetsframe'", ")", ":", "self", ".", "m", ".", "forget", "(", "self", ".", "datasetsframe", ")", "if", "self", ".", "showdatasetstable", ".", "get", "(", ")", "=...
Show a list of all datasets in a table
[ "Show", "a", "list", "of", "all", "datasets", "in", "a", "table" ]
[ "\"\"\"Show a list of all datasets in a table\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
createMenuBar
<not_specific>
def createMenuBar(self): """Create the menu bar for the application. """ self.menu=Menu(self.ekin_win) self.file_menu={ '01New':{'cmd':self.newProject}, '02Open':{'cmd':self.openProject}, '03Close':{'cmd':self.closeProject}, ...
Create the menu bar for the application.
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
def createMenuBar(self): self.menu=Menu(self.ekin_win) self.file_menu={ '01New':{'cmd':self.newProject}, '02Open':{'cmd':self.openProject}, '03Close':{'cmd':self.closeProject}, '04Save':{'cmd':self.saveProject}, ...
[ "def", "createMenuBar", "(", "self", ")", ":", "self", ".", "menu", "=", "Menu", "(", "self", ".", "ekin_win", ")", "self", ".", "file_menu", "=", "{", "'01New'", ":", "{", "'cmd'", ":", "self", ".", "newProject", "}", ",", "'02Open'", ":", "{", "'...
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
[ "\"\"\"Create the menu bar for the application. \"\"\"", "#set up mode menu", "# Annotate/Map menu", "#", "#'02View all meta data':{'cmd':self.viewMetaData},", "# Plot menu", "# Fit menu", "# Help menu" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
do_mode_specific_frame
<not_specific>
def do_mode_specific_frame(self, parent): """Create mode specific things in a frame""" l=Label(parent,text=' ') l.grid(row=0,column=0, sticky='news') return
Create mode specific things in a frame
Create mode specific things in a frame
[ "Create", "mode", "specific", "things", "in", "a", "frame" ]
def do_mode_specific_frame(self, parent): l=Label(parent,text=' ') l.grid(row=0,column=0, sticky='news') return
[ "def", "do_mode_specific_frame", "(", "self", ",", "parent", ")", ":", "l", "=", "Label", "(", "parent", ",", "text", "=", "' '", ")", "l", ".", "grid", "(", "row", "=", "0", ",", "column", "=", "0", ",", "sticky", "=", "'news'", ")", "return"...
Create mode specific things in a frame
[ "Create", "mode", "specific", "things", "in", "a", "frame" ]
[ "\"\"\"Create mode specific things in a frame\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "parent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parent", "type": null, "docstring": null, "docstring_tokens":...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
createDatasetMenu
<not_specific>
def createDatasetMenu(self): """Do menu for selecting the dataset and dataset operations""" row=0 self.dataset_menu=Frame(self.ekin_win, height=30, width=300, borderwidth=2) #self.dataset_menu.grid(ro...
Do menu for selecting the dataset and dataset operations
Do menu for selecting the dataset and dataset operations
[ "Do", "menu", "for", "selecting", "the", "dataset", "and", "dataset", "operations" ]
def createDatasetMenu(self): row=0 self.dataset_menu=Frame(self.ekin_win, height=30, width=300, borderwidth=2) self.dataset_menu.pack(fill=X ) self.dataset_select_button=None prev = Ekin_images...
[ "def", "createDatasetMenu", "(", "self", ")", ":", "row", "=", "0", "self", ".", "dataset_menu", "=", "Frame", "(", "self", ".", "ekin_win", ",", "height", "=", "30", ",", "width", "=", "300", ",", "borderwidth", "=", "2", ")", "self", ".", "dataset_...
Do menu for selecting the dataset and dataset operations
[ "Do", "menu", "for", "selecting", "the", "dataset", "and", "dataset", "operations" ]
[ "\"\"\"Do menu for selecting the dataset and dataset operations\"\"\"", "#self.dataset_menu.grid(row=row,column=0, columnspan=2, rowspan=1, sticky='w')", "#compound='left',", "#width=11,", "#width=11,", "#width=11," ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
updateMode
<not_specific>
def updateMode(self, setmode=1): """Update the mode, change the selection of fitters available""" current = self.currentdataset.get() # Usually only update currentmode when menu changed if setmode == 1 or not self.E.currentmode: self.E.currentmode = self.modes[self.mode_var.g...
Update the mode, change the selection of fitters available
Update the mode, change the selection of fitters available
[ "Update", "the", "mode", "change", "the", "selection", "of", "fitters", "available" ]
def updateMode(self, setmode=1): current = self.currentdataset.get() if setmode == 1 or not self.E.currentmode: self.E.currentmode = self.modes[self.mode_var.get()] self.fitframe.setMode(self.E.currentmode) if current == None: return self.clear_modespe...
[ "def", "updateMode", "(", "self", ",", "setmode", "=", "1", ")", ":", "current", "=", "self", ".", "currentdataset", ".", "get", "(", ")", "if", "setmode", "==", "1", "or", "not", "self", ".", "E", ".", "currentmode", ":", "self", ".", "E", ".", ...
Update the mode, change the selection of fitters available
[ "Update", "the", "mode", "change", "the", "selection", "of", "fitters", "available" ]
[ "\"\"\"Update the mode, change the selection of fitters available\"\"\"", "# Usually only update currentmode when menu changed" ]
[ { "param": "self", "type": null }, { "param": "setmode", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "setmode", "type": null, "docstring": null, "docstring_tokens"...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
updateAll
<not_specific>
def updateAll(self, d=None): """Update all elements to reflect current dataset""" if len(self.E.datasets) == 0: return if d!=None: self.currentdataset.set(d) self.update_dataset() self.fitframe.setData(self.E, self.currentdataset.get()) self.fitframe.update() ...
Update all elements to reflect current dataset
Update all elements to reflect current dataset
[ "Update", "all", "elements", "to", "reflect", "current", "dataset" ]
def updateAll(self, d=None): if len(self.E.datasets) == 0: return if d!=None: self.currentdataset.set(d) self.update_dataset() self.fitframe.setData(self.E, self.currentdataset.get()) self.fitframe.update() self.compare_multiple.set(0) self.display_all...
[ "def", "updateAll", "(", "self", ",", "d", "=", "None", ")", ":", "if", "len", "(", "self", ".", "E", ".", "datasets", ")", "==", "0", ":", "return", "if", "d", "!=", "None", ":", "self", ".", "currentdataset", ".", "set", "(", "d", ")", "self"...
Update all elements to reflect current dataset
[ "Update", "all", "elements", "to", "reflect", "current", "dataset" ]
[ "\"\"\"Update all elements to reflect current dataset\"\"\"", "#reset the multiple display options when someone selects a dataset" ]
[ { "param": "self", "type": null }, { "param": "d", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "d", "type": null, "docstring": null, "docstring_tokens": [], ...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
update_dataset
<not_specific>
def update_dataset(self): """Update data table to reflect current dataset""" if len(self.E.datasets) == 0: return curr = self.currentdataset.get() if curr not in self.E.datasets: curr = self.E.datasets[0] self.currentdataset.set(curr) ekindata ...
Update data table to reflect current dataset
Update data table to reflect current dataset
[ "Update", "data", "table", "to", "reflect", "current", "dataset" ]
def update_dataset(self): if len(self.E.datasets) == 0: return curr = self.currentdataset.get() if curr not in self.E.datasets: curr = self.E.datasets[0] self.currentdataset.set(curr) ekindata = self.data[curr] model = self.fitframe.model_type....
[ "def", "update_dataset", "(", "self", ")", ":", "if", "len", "(", "self", ".", "E", ".", "datasets", ")", "==", "0", ":", "return", "curr", "=", "self", ".", "currentdataset", ".", "get", "(", ")", "if", "curr", "not", "in", "self", ".", "E", "."...
Update data table to reflect current dataset
[ "Update", "data", "table", "to", "reflect", "current", "dataset" ]
[ "\"\"\"Update data table to reflect current dataset\"\"\"", "#callback for table entry", "#self.tableframe.setCallback(self.redrawGraph)" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
update_labels
<not_specific>
def update_labels(self): """Reset dataset labels to reflect the new mode""" for dataset in self.E.datasets: self.data[dataset][0]['label']=self.FIT.data_labels[0] self.data[dataset][1]['label']=self.FIT.data_labels[1] return
Reset dataset labels to reflect the new mode
Reset dataset labels to reflect the new mode
[ "Reset", "dataset", "labels", "to", "reflect", "the", "new", "mode" ]
def update_labels(self): for dataset in self.E.datasets: self.data[dataset][0]['label']=self.FIT.data_labels[0] self.data[dataset][1]['label']=self.FIT.data_labels[1] return
[ "def", "update_labels", "(", "self", ")", ":", "for", "dataset", "in", "self", ".", "E", ".", "datasets", ":", "self", ".", "data", "[", "dataset", "]", "[", "0", "]", "[", "'label'", "]", "=", "self", ".", "FIT", ".", "data_labels", "[", "0", "]...
Reset dataset labels to reflect the new mode
[ "Reset", "dataset", "labels", "to", "reflect", "the", "new", "mode" ]
[ "\"\"\"Reset dataset labels to reflect the new mode\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
updateFittedData
<not_specific>
def updateFittedData(self, fitdata): """Transfer the fitted values to the fit arrays for the present tab""" dataset = self.currentdataset.get() self.E.setFitData(dataset, fitdata) return
Transfer the fitted values to the fit arrays for the present tab
Transfer the fitted values to the fit arrays for the present tab
[ "Transfer", "the", "fitted", "values", "to", "the", "fit", "arrays", "for", "the", "present", "tab" ]
def updateFittedData(self, fitdata): dataset = self.currentdataset.get() self.E.setFitData(dataset, fitdata) return
[ "def", "updateFittedData", "(", "self", ",", "fitdata", ")", ":", "dataset", "=", "self", ".", "currentdataset", ".", "get", "(", ")", "self", ".", "E", ".", "setFitData", "(", "dataset", ",", "fitdata", ")", "return" ]
Transfer the fitted values to the fit arrays for the present tab
[ "Transfer", "the", "fitted", "values", "to", "the", "fit", "arrays", "for", "the", "present", "tab" ]
[ "\"\"\"Transfer the fitted values to the fit arrays for the present tab\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "fitdata", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fitdata", "type": null, "docstring": null, "docstring_tokens"...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
updateDatasetSelector
<not_specific>
def updateDatasetSelector(self,parent=None): """Updates the dataset selector to reflect current datasets""" if not hasattr(self, 'E'): return if parent == None: parent = self.dataset_menu if self.dataset_select_button: self.dataset_select_button.destro...
Updates the dataset selector to reflect current datasets
Updates the dataset selector to reflect current datasets
[ "Updates", "the", "dataset", "selector", "to", "reflect", "current", "datasets" ]
def updateDatasetSelector(self,parent=None): if not hasattr(self, 'E'): return if parent == None: parent = self.dataset_menu if self.dataset_select_button: self.dataset_select_button.destroy() if len(self.E.datasets) == 0: self.currentdatas...
[ "def", "updateDatasetSelector", "(", "self", ",", "parent", "=", "None", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'E'", ")", ":", "return", "if", "parent", "==", "None", ":", "parent", "=", "self", ".", "dataset_menu", "if", "self", ".", ...
Updates the dataset selector to reflect current datasets
[ "Updates", "the", "dataset", "selector", "to", "reflect", "current", "datasets" ]
[ "\"\"\"Updates the dataset selector to reflect current datasets\"\"\"", "# Add the names of all datasets", "# Add protein name and current mode in top bar", "#get columnlabel" ]
[ { "param": "self", "type": null }, { "param": "parent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parent", "type": null, "docstring": null, "docstring_tokens":...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
sort_by_Num
<not_specific>
def sort_by_Num(self, p): """Sort text keys by contained numbers""" splitkeys={} import re r=re.compile('\D') for k in p: value=None for splitval in r.split(k): try: value=int(splitval) except ValueError:...
Sort text keys by contained numbers
Sort text keys by contained numbers
[ "Sort", "text", "keys", "by", "contained", "numbers" ]
def sort_by_Num(self, p): splitkeys={} import re r=re.compile('\D') for k in p: value=None for splitval in r.split(k): try: value=int(splitval) except ValueError: pass if not value...
[ "def", "sort_by_Num", "(", "self", ",", "p", ")", ":", "splitkeys", "=", "{", "}", "import", "re", "r", "=", "re", ".", "compile", "(", "'\\D'", ")", "for", "k", "in", "p", ":", "value", "=", "None", "for", "splitval", "in", "r", ".", "split", ...
Sort text keys by contained numbers
[ "Sort", "text", "keys", "by", "contained", "numbers" ]
[ "\"\"\"Sort text keys by contained numbers\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "p", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "p", "type": null, "docstring": null, "docstring_tokens": [], ...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
insertDataset
<not_specific>
def insertDataset(self, newdata, newname, fit=None, update=1): """Insert pre-existing data as a dataset""" name = newname if newname in self.E.datasets: if tkMessageBox.askyesno('Overwrite Dataset?',name+' is already present.\n' 'Do you want to ...
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, newname, fit=None, update=1): name = newname if newname in self.E.datasets: if tkMessageBox.askyesno('Overwrite Dataset?',name+' is already present.\n' 'Do you want to overwrite it?', ...
[ "def", "insertDataset", "(", "self", ",", "newdata", ",", "newname", ",", "fit", "=", "None", ",", "update", "=", "1", ")", ":", "name", "=", "newname", "if", "newname", "in", "self", ".", "E", ".", "datasets", ":", "if", "tkMessageBox", ".", "askyes...
Insert pre-existing data as a dataset
[ "Insert", "pre", "-", "existing", "data", "as", "a", "dataset" ]
[ "\"\"\"Insert pre-existing data as a dataset\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "newdata", "type": null }, { "param": "newname", "type": null }, { "param": "fit", "type": null }, { "param": "update", "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"...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
insertMultipleDatasets
<not_specific>
def insertMultipleDatasets(self, newdata, overwrite=None): """Adds multiple datasets at once from a dict of ekin datasets""" if newdata != None: for name in newdata.keys(): if name in self.E.datasets: if overwrite == 1: self.deleteD...
Adds multiple datasets at once from a dict of ekin datasets
Adds multiple datasets at once from a dict of ekin datasets
[ "Adds", "multiple", "datasets", "at", "once", "from", "a", "dict", "of", "ekin", "datasets" ]
def insertMultipleDatasets(self, newdata, overwrite=None): if newdata != None: for name in newdata.keys(): if name in self.E.datasets: if overwrite == 1: self.deleteDataset(name, confirm=None, update=False) self.inse...
[ "def", "insertMultipleDatasets", "(", "self", ",", "newdata", ",", "overwrite", "=", "None", ")", ":", "if", "newdata", "!=", "None", ":", "for", "name", "in", "newdata", ".", "keys", "(", ")", ":", "if", "name", "in", "self", ".", "E", ".", "dataset...
Adds multiple datasets at once from a dict of ekin datasets
[ "Adds", "multiple", "datasets", "at", "once", "from", "a", "dict", "of", "ekin", "datasets" ]
[ "\"\"\"Adds multiple datasets at once from a dict of ekin datasets\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "newdata", "type": null }, { "param": "overwrite", "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"...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
compareAllDialog
<not_specific>
def compareAllDialog(self): """Choose which datasets to plot together""" self.display_multiple.set(0) self.display_all.set(0) if self.compare_multiple.get() == 0: self.redrawGraph() return if hasattr(self, 'compall_dialog') and self.compall_dialog != None:...
Choose which datasets to plot together
Choose which datasets to plot together
[ "Choose", "which", "datasets", "to", "plot", "together" ]
def compareAllDialog(self): self.display_multiple.set(0) self.display_all.set(0) if self.compare_multiple.get() == 0: self.redrawGraph() return if hasattr(self, 'compall_dialog') and self.compall_dialog != None: self.compall_dialog.deiconify() ...
[ "def", "compareAllDialog", "(", "self", ")", ":", "self", ".", "display_multiple", ".", "set", "(", "0", ")", "self", ".", "display_all", ".", "set", "(", "0", ")", "if", "self", ".", "compare_multiple", ".", "get", "(", ")", "==", "0", ":", "self", ...
Choose which datasets to plot together
[ "Choose", "which", "datasets", "to", "plot", "together" ]
[ "\"\"\"Choose which datasets to plot together\"\"\"", "#self.createSidePane(200)", "#self.compall_dialog = Frame(self.sidepane, width=300, height=500)", "#self.compall_dialog.pack(side=LEFT,fill=BOTH, expand=1, padx=4,pady=4)", "#self.resetSidePane()" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
updateModeSpecificData
<not_specific>
def updateModeSpecificData(self): """Set specific mode data widgets when dataset changed""" d = self.currentdataset.get() meta = self.E.getMetaData(d) if self.E.currentmode=='Simple enzyme kinetic' or self.E.currentmode == 'Enzyme pH-activity': if meta.has_key('enzyme_conc'):...
Set specific mode data widgets when dataset changed
Set specific mode data widgets when dataset changed
[ "Set", "specific", "mode", "data", "widgets", "when", "dataset", "changed" ]
def updateModeSpecificData(self): d = self.currentdataset.get() meta = self.E.getMetaData(d) if self.E.currentmode=='Simple enzyme kinetic' or self.E.currentmode == 'Enzyme pH-activity': if meta.has_key('enzyme_conc'): self.enzyme_conc.set(meta['enzyme_conc']) ...
[ "def", "updateModeSpecificData", "(", "self", ")", ":", "d", "=", "self", ".", "currentdataset", ".", "get", "(", ")", "meta", "=", "self", ".", "E", ".", "getMetaData", "(", "d", ")", "if", "self", ".", "E", ".", "currentmode", "==", "'Simple enzyme k...
Set specific mode data widgets when dataset changed
[ "Set", "specific", "mode", "data", "widgets", "when", "dataset", "changed" ]
[ "\"\"\"Set specific mode data widgets when dataset changed\"\"\"", "#print 'nmr'" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
do_titration_stuff
<not_specific>
def do_titration_stuff(self): """Add residue info for titration mode""" self.mode_widgets=[] self.chain_id_entry = Entry(self.modespecific_frame, background = 'yellow', width=2,relief=GROOVE, textvariable=self.chain_i...
Add residue info for titration mode
Add residue info for titration mode
[ "Add", "residue", "info", "for", "titration", "mode" ]
def do_titration_stuff(self): self.mode_widgets=[] self.chain_id_entry = Entry(self.modespecific_frame, background = 'yellow', width=2,relief=GROOVE, textvariable=self.chain_id) self.chain_id_entry.bind('<KeyRelease>',...
[ "def", "do_titration_stuff", "(", "self", ")", ":", "self", ".", "mode_widgets", "=", "[", "]", "self", ".", "chain_id_entry", "=", "Entry", "(", "self", ".", "modespecific_frame", ",", "background", "=", "'yellow'", ",", "width", "=", "2", ",", "relief", ...
Add residue info for titration mode
[ "Add", "residue", "info", "for", "titration", "mode" ]
[ "\"\"\"Add residue info for titration mode\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
addedit_comments
<not_specific>
def addedit_comments(self,event=None): """Show window with specific comments for this dataset""" self.commentframe=Toplevel() self.commentframe.title('Add Comments') self.commentframe.geometry("300x300") self.set_geometry(self.ekin_win,self.commentframe) row=0 co...
Show window with specific comments for this dataset
Show window with specific comments for this dataset
[ "Show", "window", "with", "specific", "comments", "for", "this", "dataset" ]
def addedit_comments(self,event=None): self.commentframe=Toplevel() self.commentframe.title('Add Comments') self.commentframe.geometry("300x300") self.set_geometry(self.ekin_win,self.commentframe) row=0 column=0 import tkFont thefont = tkFont.Font ( family...
[ "def", "addedit_comments", "(", "self", ",", "event", "=", "None", ")", ":", "self", ".", "commentframe", "=", "Toplevel", "(", ")", "self", ".", "commentframe", ".", "title", "(", "'Add Comments'", ")", "self", ".", "commentframe", ".", "geometry", "(", ...
Show window with specific comments for this dataset
[ "Show", "window", "with", "specific", "comments", "for", "this", "dataset" ]
[ "\"\"\"Show window with specific comments for this dataset\"\"\"" ]
[ { "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": ...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
editMetaData
<not_specific>
def editMetaData(self): """Edit the metadata using the MetaData class""" self.M = MetaData(data=self.E.__meta_data__, project=self.E) if len(self.M.glob) == 0: self.M.autoCreate(mode = self.E.mode) d=self.currentdataset.get() self.mwin = self.M.createDialog(dataset=d,...
Edit the metadata using the MetaData class
Edit the metadata using the MetaData class
[ "Edit", "the", "metadata", "using", "the", "MetaData", "class" ]
def editMetaData(self): self.M = MetaData(data=self.E.__meta_data__, project=self.E) if len(self.M.glob) == 0: self.M.autoCreate(mode = self.E.mode) d=self.currentdataset.get() self.mwin = self.M.createDialog(dataset=d, parent=self.ekin_win) self.ekin_win.wait_window(...
[ "def", "editMetaData", "(", "self", ")", ":", "self", ".", "M", "=", "MetaData", "(", "data", "=", "self", ".", "E", ".", "__meta_data__", ",", "project", "=", "self", ".", "E", ")", "if", "len", "(", "self", ".", "M", ".", "glob", ")", "==", "...
Edit the metadata using the MetaData class
[ "Edit", "the", "metadata", "using", "the", "MetaData", "class" ]
[ "\"\"\"Edit the metadata using the MetaData class\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
viewMetaData
<not_specific>
def viewMetaData(self): """View summary of all meta data""" M = MetaData(data=self.E.__meta_data__,project=self.E) M.viewAll() return
View summary of all meta data
View summary of all meta data
[ "View", "summary", "of", "all", "meta", "data" ]
def viewMetaData(self): M = MetaData(data=self.E.__meta_data__,project=self.E) M.viewAll() return
[ "def", "viewMetaData", "(", "self", ")", ":", "M", "=", "MetaData", "(", "data", "=", "self", ".", "E", ".", "__meta_data__", ",", "project", "=", "self", ".", "E", ")", "M", ".", "viewAll", "(", ")", "return" ]
View summary of all meta data
[ "View", "summary", "of", "all", "meta", "data" ]
[ "\"\"\"View summary of all 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": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
disableSelected
<not_specific>
def disableSelected(self, status=0): """Disable/Enable selected points in current plot""" bounds = self.plotframe.selection name = self.currentdataset.get() ek = self.E.getDataset(name) ek.setActiveBounded(bounds,status) self.update_dataset() self.redrawGraph() ...
Disable/Enable selected points in current plot
Disable/Enable selected points in current plot
[ "Disable", "/", "Enable", "selected", "points", "in", "current", "plot" ]
def disableSelected(self, status=0): bounds = self.plotframe.selection name = self.currentdataset.get() ek = self.E.getDataset(name) ek.setActiveBounded(bounds,status) self.update_dataset() self.redrawGraph() return
[ "def", "disableSelected", "(", "self", ",", "status", "=", "0", ")", ":", "bounds", "=", "self", ".", "plotframe", ".", "selection", "name", "=", "self", ".", "currentdataset", ".", "get", "(", ")", "ek", "=", "self", ".", "E", ".", "getDataset", "("...
Disable/Enable selected points in current plot
[ "Disable", "/", "Enable", "selected", "points", "in", "current", "plot" ]
[ "\"\"\"Disable/Enable selected points in current plot\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "status", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "status", "type": null, "docstring": null, "docstring_tokens":...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
import_csv
<not_specific>
def import_csv(self, event=None): """Will allow import of multiple or single text files""" self.importer.path = self.path newdatasets = self.importer.import_multiple() self.insertMultipleDatasets(newdatasets) return
Will allow import of multiple or single text files
Will allow import of multiple or single text files
[ "Will", "allow", "import", "of", "multiple", "or", "single", "text", "files" ]
def import_csv(self, event=None): self.importer.path = self.path newdatasets = self.importer.import_multiple() self.insertMultipleDatasets(newdatasets) return
[ "def", "import_csv", "(", "self", ",", "event", "=", "None", ")", ":", "self", ".", "importer", ".", "path", "=", "self", ".", "path", "newdatasets", "=", "self", ".", "importer", ".", "import_multiple", "(", ")", "self", ".", "insertMultipleDatasets", "...
Will allow import of multiple or single text files
[ "Will", "allow", "import", "of", "multiple", "or", "single", "text", "files" ]
[ "\"\"\"Will allow import of multiple or single text files\"\"\"" ]
[ { "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": ...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
exportDataset
<not_specific>
def exportDataset(self, event=None): """Will allow export of multiple or single csv files""" name = self.currentdataset.get() self.exporter.export_csv(self.data[name], self.E.__datatabs_fits__[name]) return
Will allow export of multiple or single csv files
Will allow export of multiple or single csv files
[ "Will", "allow", "export", "of", "multiple", "or", "single", "csv", "files" ]
def exportDataset(self, event=None): name = self.currentdataset.get() self.exporter.export_csv(self.data[name], self.E.__datatabs_fits__[name]) return
[ "def", "exportDataset", "(", "self", ",", "event", "=", "None", ")", ":", "name", "=", "self", ".", "currentdataset", ".", "get", "(", ")", "self", ".", "exporter", ".", "export_csv", "(", "self", ".", "data", "[", "name", "]", ",", "self", ".", "E...
Will allow export of multiple or single csv files
[ "Will", "allow", "export", "of", "multiple", "or", "single", "csv", "files" ]
[ "\"\"\"Will allow export of multiple or single csv files\"\"\"" ]
[ { "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": ...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
loadProject
<not_specific>
def loadProject(self, project=None, data=None, mode=None): """Load ekin project and update GUI""" if mode == None: self.mode = mode ='General' if project != None and os.path.exists(project): self.E = EkinProject() self.E.openProject(project) self....
Load ekin project and update GUI
Load ekin project and update GUI
[ "Load", "ekin", "project", "and", "update", "GUI" ]
def loadProject(self, project=None, data=None, mode=None): if mode == None: self.mode = mode ='General' if project != None and os.path.exists(project): self.E = EkinProject() self.E.openProject(project) self.E.checkDatasets() self.filename = pr...
[ "def", "loadProject", "(", "self", ",", "project", "=", "None", ",", "data", "=", "None", ",", "mode", "=", "None", ")", ":", "if", "mode", "==", "None", ":", "self", ".", "mode", "=", "mode", "=", "'General'", "if", "project", "!=", "None", "and",...
Load ekin project and update GUI
[ "Load", "ekin", "project", "and", "update", "GUI" ]
[ "\"\"\"Load ekin project and update GUI\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "project", "type": null }, { "param": "data", "type": null }, { "param": "mode", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "project", "type": null, "docstring": null, "docstring_tokens"...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
appendProject
<not_specific>
def appendProject(self): """Append another project to this one""" filename=tkFileDialog.askopenfilename(defaultextension='.ekinprj', initialdir=os.getcwd(), filetypes=[("Ekin project","*.ekinprj"), ...
Append another project to this one
Append another project to this one
[ "Append", "another", "project", "to", "this", "one" ]
def appendProject(self): filename=tkFileDialog.askopenfilename(defaultextension='.ekinprj', initialdir=os.getcwd(), filetypes=[("Ekin project","*.ekinprj"), ("All ...
[ "def", "appendProject", "(", "self", ")", ":", "filename", "=", "tkFileDialog", ".", "askopenfilename", "(", "defaultextension", "=", "'.ekinprj'", ",", "initialdir", "=", "os", ".", "getcwd", "(", ")", ",", "filetypes", "=", "[", "(", "\"Ekin project\"", ",...
Append another project to this one
[ "Append", "another", "project", "to", "this", "one" ]
[ "\"\"\"Append another project to this one\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
return_data
<not_specific>
def return_data(self): """Return to PEAT or some parent app""" if self.protein and self.field: self.E._PEATinfo = {'record':self.protein,'column':self.field} #remove attribs that cannot not be saved tempflds = ['fitline', 'ax'] for f in tempflds: del self...
Return to PEAT or some parent app
Return to PEAT or some parent app
[ "Return", "to", "PEAT", "or", "some", "parent", "app" ]
def return_data(self): if self.protein and self.field: self.E._PEATinfo = {'record':self.protein,'column':self.field} tempflds = ['fitline', 'ax'] for f in tempflds: del self.E.__dict__[f] if hasattr(self.plotframe,'Opts') and self.plotframe.Opts != None: ...
[ "def", "return_data", "(", "self", ")", ":", "if", "self", ".", "protein", "and", "self", ".", "field", ":", "self", ".", "E", ".", "_PEATinfo", "=", "{", "'record'", ":", "self", ".", "protein", ",", "'column'", ":", "self", ".", "field", "}", "te...
Return to PEAT or some parent app
[ "Return", "to", "PEAT", "or", "some", "parent", "app" ]
[ "\"\"\"Return to PEAT or some parent app\"\"\"", "#remove attribs that cannot not be saved" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
createTkVars
<not_specific>
def createTkVars(self): """Create Tk vars for the fit panel""" self.model_type=StringVar() self.model_type.set('Linear') self.no_iter=IntVar() self.no_iter.set(100) self.converg_diff=DoubleVar() self.converg_diff.set(1e-6) self.guess_converg_diff=IntVar() ...
Create Tk vars for the fit panel
Create Tk vars for the fit panel
[ "Create", "Tk", "vars", "for", "the", "fit", "panel" ]
def createTkVars(self): self.model_type=StringVar() self.model_type.set('Linear') self.no_iter=IntVar() self.no_iter.set(100) self.converg_diff=DoubleVar() self.converg_diff.set(1e-6) self.guess_converg_diff=IntVar() self.guess_converg_diff.set(0) ...
[ "def", "createTkVars", "(", "self", ")", ":", "self", ".", "model_type", "=", "StringVar", "(", ")", "self", ".", "model_type", ".", "set", "(", "'Linear'", ")", "self", ".", "no_iter", "=", "IntVar", "(", ")", "self", ".", "no_iter", ".", "set", "("...
Create Tk vars for the fit panel
[ "Create", "Tk", "vars", "for", "the", "fit", "panel" ]
[ "\"\"\"Create Tk vars for the fit panel\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
doFrame
<not_specific>
def doFrame(self): """Create GUI elements for fitting frame""" self.model_button_width=40 self.model_button=Menubutton(self,textvariable=self.model_type,relief=RAISED, width=self.model_button_width) self.model_menu=Menu(self.model_button,tearoff=0) ...
Create GUI elements for fitting frame
Create GUI elements for fitting frame
[ "Create", "GUI", "elements", "for", "fitting", "frame" ]
def doFrame(self): self.model_button_width=40 self.model_button=Menubutton(self,textvariable=self.model_type,relief=RAISED, width=self.model_button_width) self.model_menu=Menu(self.model_button,tearoff=0) self.model_button['menu']=self.model_menu ...
[ "def", "doFrame", "(", "self", ")", ":", "self", ".", "model_button_width", "=", "40", "self", ".", "model_button", "=", "Menubutton", "(", "self", ",", "textvariable", "=", "self", ".", "model_type", ",", "relief", "=", "RAISED", ",", "width", "=", "sel...
Create GUI elements for fitting frame
[ "Create", "GUI", "elements", "for", "fitting", "frame" ]
[ "\"\"\"Create GUI elements for fitting frame\"\"\"", "# Make space for parameters", "\"\"\"Set the starting value to the fitted value\"\"\"", "# Button for calculating fit", "# Button for just updating the fit", "# Button for estimation of experimental uncertainty", "# Radio button to select fitting met...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
transferVal
<not_specific>
def transferVal(var=i): """Set the starting value to the fitted value""" if self.fvars[var][3].get() != '-': self.fvars[var][2].set(self.fvars[var][3].get()) return
Set the starting value to the fitted value
Set the starting value to the fitted value
[ "Set", "the", "starting", "value", "to", "the", "fitted", "value" ]
def transferVal(var=i): if self.fvars[var][3].get() != '-': self.fvars[var][2].set(self.fvars[var][3].get()) return
[ "def", "transferVal", "(", "var", "=", "i", ")", ":", "if", "self", ".", "fvars", "[", "var", "]", "[", "3", "]", ".", "get", "(", ")", "!=", "'-'", ":", "self", ".", "fvars", "[", "var", "]", "[", "2", "]", ".", "set", "(", "self", ".", ...
Set the starting value to the fitted value
[ "Set", "the", "starting", "value", "to", "the", "fitted", "value" ]
[ "\"\"\"Set the starting value to the fitted value\"\"\"" ]
[ { "param": "var", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "var", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
showStopFitFrame
<not_specific>
def showStopFitFrame(self, parentframe): """Show the fit status frame while fitting""" if parentframe == None: self.count_win=Frame() self.count_win.pack() else: self.count_win=Frame(parentframe) self.count_win.grid(row=3,column=1,columnspan=2,stic...
Show the fit status frame while fitting
Show the fit status frame while fitting
[ "Show", "the", "fit", "status", "frame", "while", "fitting" ]
def showStopFitFrame(self, parentframe): if parentframe == None: self.count_win=Frame() self.count_win.pack() else: self.count_win=Frame(parentframe) self.count_win.grid(row=3,column=1,columnspan=2,sticky='news') Label(self.count_win,text='Iteratio...
[ "def", "showStopFitFrame", "(", "self", ",", "parentframe", ")", ":", "if", "parentframe", "==", "None", ":", "self", ".", "count_win", "=", "Frame", "(", ")", "self", ".", "count_win", ".", "pack", "(", ")", "else", ":", "self", ".", "count_win", "=",...
Show the fit status frame while fitting
[ "Show", "the", "fit", "status", "frame", "while", "fitting" ]
[ "\"\"\"Show the fit status frame while fitting\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "parentframe", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parentframe", "type": null, "docstring": null, "docstring_tok...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
doFit
<not_specific>
def doFit(self): """Fit the currently loaded dataset and update plotter""" self.stopfit=False currfitdata = self.fitdata model = self.model_type.get() if self.guess_converg_diff.get() == 1: conv = None else: conv = self.converg_diff.get() g...
Fit the currently loaded dataset and update plotter
Fit the currently loaded dataset and update plotter
[ "Fit", "the", "currently", "loaded", "dataset", "and", "update", "plotter" ]
def doFit(self): self.stopfit=False currfitdata = self.fitdata model = self.model_type.get() if self.guess_converg_diff.get() == 1: conv = None else: conv = self.converg_diff.get() grad = self.grad_crit.get() noiter = self.no_iter.get() ...
[ "def", "doFit", "(", "self", ")", ":", "self", ".", "stopfit", "=", "False", "currfitdata", "=", "self", ".", "fitdata", "model", "=", "self", ".", "model_type", ".", "get", "(", ")", "if", "self", ".", "guess_converg_diff", ".", "get", "(", ")", "==...
Fit the currently loaded dataset and update plotter
[ "Fit", "the", "currently", "loaded", "dataset", "and", "update", "plotter" ]
[ "\"\"\"Fit the currently loaded dataset and update plotter\"\"\"", "\"\"\"callback for fit update\"\"\"", "#get ekin fitdata from vars", "#update plot first, just in case", "#send new fit to current ekin dataset", "#update fitting frame when finished fit?" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
findBestModel
<not_specific>
def findBestModel(self, doall=False, callback=None): """Use fitting class to determine best fit model using f-testing""" models=[] E = self.parentapp.E for m in self.tempmodelvars: if self.tempmodelvars[m].get() == 1: models.append(m) if len(models)==0...
Use fitting class to determine best fit model using f-testing
Use fitting class to determine best fit model using f-testing
[ "Use", "fitting", "class", "to", "determine", "best", "fit", "model", "using", "f", "-", "testing" ]
def findBestModel(self, doall=False, callback=None): models=[] E = self.parentapp.E for m in self.tempmodelvars: if self.tempmodelvars[m].get() == 1: models.append(m) if len(models)==0: return None if doall == False: d = self.pa...
[ "def", "findBestModel", "(", "self", ",", "doall", "=", "False", ",", "callback", "=", "None", ")", ":", "models", "=", "[", "]", "E", "=", "self", ".", "parentapp", ".", "E", "for", "m", "in", "self", ".", "tempmodelvars", ":", "if", "self", ".", ...
Use fitting class to determine best fit model using f-testing
[ "Use", "fitting", "class", "to", "determine", "best", "fit", "model", "using", "f", "-", "testing" ]
[ "\"\"\"Use fitting class to determine best fit model using f-testing\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "doall", "type": null }, { "param": "callback", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "doall", "type": null, "docstring": null, "docstring_tokens": ...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
showBestModelDialog
<not_specific>
def showBestModelDialog(self): """Find the best model using f-test criteria""" self.stopvar=IntVar(); self.stopvar.set(0) models = EkinProject.mode_definition[self.mode] self.fbm_win = Toplevel(self.parent.master) self.parentapp.set_geometry(self.parentapp.ekin_win, self.fbm_win...
Find the best model using f-test criteria
Find the best model using f-test criteria
[ "Find", "the", "best", "model", "using", "f", "-", "test", "criteria" ]
def showBestModelDialog(self): self.stopvar=IntVar(); self.stopvar.set(0) models = EkinProject.mode_definition[self.mode] self.fbm_win = Toplevel(self.parent.master) self.parentapp.set_geometry(self.parentapp.ekin_win, self.fbm_win) self.fbm_win.title('Find best model') f...
[ "def", "showBestModelDialog", "(", "self", ")", ":", "self", ".", "stopvar", "=", "IntVar", "(", ")", ";", "self", ".", "stopvar", ".", "set", "(", "0", ")", "models", "=", "EkinProject", ".", "mode_definition", "[", "self", ".", "mode", "]", "self", ...
Find the best model using f-test criteria
[ "Find", "the", "best", "model", "using", "f", "-", "test", "criteria" ]
[ "\"\"\"Find the best model using f-test criteria\"\"\"", "# buttons", "#we dont update atm because of memory leak", "#self.parentapp.updateAll(d)" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
update
<not_specific>
def update(self, reset=False, fitdata=None, data=None, startvars=True, X=None): """Reset the current model and/or set new data, if provided. reset=True resets all vars, ie. a new model has been selected""" if reset == True: model = self.model_type.get() ...
Reset the current model and/or set new data, if provided. reset=True resets all vars, ie. a new model has been selected
Reset the current model and/or set new data, if provided. reset=True resets all vars, ie. a new model has been selected
[ "Reset", "the", "current", "model", "and", "/", "or", "set", "new", "data", "if", "provided", ".", "reset", "=", "True", "resets", "all", "vars", "ie", ".", "a", "new", "model", "has", "been", "selected" ]
def update(self, reset=False, fitdata=None, data=None, startvars=True, X=None): if reset == True: model = self.model_type.get() self.fitdata = Fitting.makeFitData(model=model) if fitdata != None: self.fitdata = fitdata if data != None: ...
[ "def", "update", "(", "self", ",", "reset", "=", "False", ",", "fitdata", "=", "None", ",", "data", "=", "None", ",", "startvars", "=", "True", ",", "X", "=", "None", ")", ":", "if", "reset", "==", "True", ":", "model", "=", "self", ".", "model_t...
Reset the current model and/or set new data, if provided.
[ "Reset", "the", "current", "model", "and", "/", "or", "set", "new", "data", "if", "provided", "." ]
[ "\"\"\"Reset the current model and/or set new data, if provided.\n reset=True resets all vars, ie. a new model has been selected\"\"\"", "#resets current fitdata to generic start values for that model" ]
[ { "param": "self", "type": null }, { "param": "reset", "type": null }, { "param": "fitdata", "type": null }, { "param": "data", "type": null }, { "param": "startvars", "type": null }, { "param": "X", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "reset", "type": null, "docstring": null, "docstring_tokens": ...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
updateVars
<not_specific>
def updateVars(self, fitdata, reset=True, X=None): """Update with current fitdata, only done when we load the dataset""" if fitdata != None and fitdata.has_key('model'): model = fitdata['model'] self.model_type.set(model) if X==None: X = Fitting.getFitter(model=model)...
Update with current fitdata, only done when we load the dataset
Update with current fitdata, only done when we load the dataset
[ "Update", "with", "current", "fitdata", "only", "done", "when", "we", "load", "the", "dataset" ]
def updateVars(self, fitdata, reset=True, X=None): if fitdata != None and fitdata.has_key('model'): model = fitdata['model'] self.model_type.set(model) if X==None: X = Fitting.getFitter(model=model) if fitdata.has_key('error'): self.sqdiff.set('%9....
[ "def", "updateVars", "(", "self", ",", "fitdata", ",", "reset", "=", "True", ",", "X", "=", "None", ")", ":", "if", "fitdata", "!=", "None", "and", "fitdata", ".", "has_key", "(", "'model'", ")", ":", "model", "=", "fitdata", "[", "'model'", "]", "...
Update with current fitdata, only done when we load the dataset
[ "Update", "with", "current", "fitdata", "only", "done", "when", "we", "load", "the", "dataset" ]
[ "\"\"\"Update with current fitdata, only done when we load the dataset\"\"\"", "#in case fit param is stored as string", "#param labels", "#no fit data passed, so we set to default vals" ]
[ { "param": "self", "type": null }, { "param": "fitdata", "type": null }, { "param": "reset", "type": null }, { "param": "X", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fitdata", "type": null, "docstring": null, "docstring_tokens"...
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
showExpUncertaintyDialog
<not_specific>
def showExpUncertaintyDialog(self): """Show dialog for doing Exp Uncertainty""" if self.fitdata == {}: return data = self.data; fitdata = self.fitdata model = fitdata['model'] X = Fitting.getFitter(model) vrs = X.variables names = X.getVarNames() self.eeu_...
Show dialog for doing Exp Uncertainty
Show dialog for doing Exp Uncertainty
[ "Show", "dialog", "for", "doing", "Exp", "Uncertainty" ]
def showExpUncertaintyDialog(self): if self.fitdata == {}: return data = self.data; fitdata = self.fitdata model = fitdata['model'] X = Fitting.getFitter(model) vrs = X.variables names = X.getVarNames() self.eeu_win = Toplevel(self.parent.master) self.pare...
[ "def", "showExpUncertaintyDialog", "(", "self", ")", ":", "if", "self", ".", "fitdata", "==", "{", "}", ":", "return", "data", "=", "self", ".", "data", ";", "fitdata", "=", "self", ".", "fitdata", "model", "=", "fitdata", "[", "'model'", "]", "X", "...
Show dialog for doing Exp Uncertainty
[ "Show", "dialog", "for", "doing", "Exp", "Uncertainty" ]
[ "\"\"\"Show dialog for doing Exp Uncertainty\"\"\"", "#fill in average and standard deviations for each var in model", "# Errors and standard deviations", "# stop and quit buttons" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
previewFit
<not_specific>
def previewFit(self): """Just update fit curve to reflect current paramenters in start vars""" vrs = self.getStartVars() model = self.model_type.get() x,y = self.data.getxy() X=Fitting.getFitter(model, vrs=vrs, expdata=zip(x,y)) self.plotter.updateFit(X) return
Just update fit curve to reflect current paramenters in start vars
Just update fit curve to reflect current paramenters in start vars
[ "Just", "update", "fit", "curve", "to", "reflect", "current", "paramenters", "in", "start", "vars" ]
def previewFit(self): vrs = self.getStartVars() model = self.model_type.get() x,y = self.data.getxy() X=Fitting.getFitter(model, vrs=vrs, expdata=zip(x,y)) self.plotter.updateFit(X) return
[ "def", "previewFit", "(", "self", ")", ":", "vrs", "=", "self", ".", "getStartVars", "(", ")", "model", "=", "self", ".", "model_type", ".", "get", "(", ")", "x", ",", "y", "=", "self", ".", "data", ".", "getxy", "(", ")", "X", "=", "Fitting", ...
Just update fit curve to reflect current paramenters in start vars
[ "Just", "update", "fit", "curve", "to", "reflect", "current", "paramenters", "in", "start", "vars" ]
[ "\"\"\"Just update fit curve to reflect current paramenters in start vars\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7d82cc1b0d457a2b13550dc3aa1b8c8a7ef4f871
shambo001/peat
PEATDB/Ekin/Ekin_main.py
[ "MIT" ]
Python
draw_Table
<not_specific>
def draw_Table(self, ekindata=None, fitmodel=None): """Draw a table for ekin datapoints""" self.currenttable = None self.fitmodel = fitmodel self.ekindata = ekindata self.currentmodel = EkinDataModel(ekindata) self.currenttable = EkinDataTable(self.main, model=self.curre...
Draw a table for ekin datapoints
Draw a table for ekin datapoints
[ "Draw", "a", "table", "for", "ekin", "datapoints" ]
def draw_Table(self, ekindata=None, fitmodel=None): self.currenttable = None self.fitmodel = fitmodel self.ekindata = ekindata self.currentmodel = EkinDataModel(ekindata) self.currenttable = EkinDataTable(self.main, model=self.currentmodel, ...
[ "def", "draw_Table", "(", "self", ",", "ekindata", "=", "None", ",", "fitmodel", "=", "None", ")", ":", "self", ".", "currenttable", "=", "None", "self", ".", "fitmodel", "=", "fitmodel", "self", ".", "ekindata", "=", "ekindata", "self", ".", "currentmod...
Draw a table for ekin datapoints
[ "Draw", "a", "table", "for", "ekin", "datapoints" ]
[ "\"\"\"Draw a table for ekin datapoints\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "ekindata", "type": null }, { "param": "fitmodel", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindata", "type": null, "docstring": null, "docstring_tokens...
7db18e1a3dddd2574d74d1d97f280fd2ec5a7b02
shambo001/peat
PEATDB/Mutate.py
[ "MIT" ]
Python
enter_mut_data
<not_specific>
def enter_mut_data(self,event=None): """Process the data from the 'Add mutant' dialog and enter it into the Database""" orgres=None aa_number=self.DT.resnum.get() # Get the residue number seq=self.DB[self.parent.get()].aaseq if seq: for res in seq: nu...
Process the data from the 'Add mutant' dialog and enter it into the Database
Process the data from the 'Add mutant' dialog and enter it into the Database
[ "Process", "the", "data", "from", "the", "'", "Add", "mutant", "'", "dialog", "and", "enter", "it", "into", "the", "Database" ]
def enter_mut_data(self,event=None): orgres=None aa_number=self.DT.resnum.get() seq=self.DB[self.parent.get()].aaseq if seq: for res in seq: num=int(res[0].split(':')[1]) if num==aa_number: orgres=res[1] else: ...
[ "def", "enter_mut_data", "(", "self", ",", "event", "=", "None", ")", ":", "orgres", "=", "None", "aa_number", "=", "self", ".", "DT", ".", "resnum", ".", "get", "(", ")", "seq", "=", "self", ".", "DB", "[", "self", ".", "parent", ".", "get", "("...
Process the data from the 'Add mutant' dialog and enter it into the Database
[ "Process", "the", "data", "from", "the", "'", "Add", "mutant", "'", "dialog", "and", "enter", "it", "into", "the", "Database" ]
[ "\"\"\"Process the data from the 'Add mutant' dialog and enter it into the Database\"\"\"", "# Get the residue number", "# Check the name ", "# Enter the data " ]
[ { "param": "self", "type": null }, { "param": "event", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "event", "type": null, "docstring": null, "docstring_tokens": ...
7db18e1a3dddd2574d74d1d97f280fd2ec5a7b02
shambo001/peat
PEATDB/Mutate.py
[ "MIT" ]
Python
suggest_name
<not_specific>
def suggest_name(self,parent,aa_number,newresidue,org_res,ChainID): """Suggest a name for new mutation""" if not parent: return '?+?#?' if not newresidue: newresidue='?' if not org_res: org_res='X' else: i...
Suggest a name for new mutation
Suggest a name for new mutation
[ "Suggest", "a", "name", "for", "new", "mutation" ]
def suggest_name(self,parent,aa_number,newresidue,org_res,ChainID): if not parent: return '?+?#?' if not newresidue: newresidue='?' if not org_res: org_res='X' else: import DNAtool.mutation if DNAtool.mutation.three_to_one.has_k...
[ "def", "suggest_name", "(", "self", ",", "parent", ",", "aa_number", ",", "newresidue", ",", "org_res", ",", "ChainID", ")", ":", "if", "not", "parent", ":", "return", "'?+?#?'", "if", "not", "newresidue", ":", "newresidue", "=", "'?'", "if", "not", "org...
Suggest a name for new mutation
[ "Suggest", "a", "name", "for", "new", "mutation" ]
[ "\"\"\"Suggest a name for new mutation\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "parent", "type": null }, { "param": "aa_number", "type": null }, { "param": "newresidue", "type": null }, { "param": "org_res", "type": null }, { "param": "ChainID", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parent", "type": null, "docstring": null, "docstring_tokens":...
7db18e1a3dddd2574d74d1d97f280fd2ec5a7b02
shambo001/peat
PEATDB/Mutate.py
[ "MIT" ]
Python
update_mut_selection
<not_specific>
def update_mut_selection(self, event=None): """Update the data for the rest of the application""" if not hasattr(self,'structure_displayed'): self.structure_displayed=False newparent = self.parent.get() if newparent=='Select parent': newp...
Update the data for the rest of the application
Update the data for the rest of the application
[ "Update", "the", "data", "for", "the", "rest", "of", "the", "application" ]
def update_mut_selection(self, event=None): if not hasattr(self,'structure_displayed'): self.structure_displayed=False newparent = self.parent.get() if newparent=='Select parent': newparent=None if newparent: aaseq=self.DB.get_protein_sequence(...
[ "def", "update_mut_selection", "(", "self", ",", "event", "=", "None", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'structure_displayed'", ")", ":", "self", ".", "structure_displayed", "=", "False", "newparent", "=", "self", ".", "parent", ".", "g...
Update the data for the rest of the application
[ "Update", "the", "data", "for", "the", "rest", "of", "the", "application" ]
[ "\"\"\"Update the data for the rest of the application\"\"\"", "# Here we should change to allow for multiple chains ", "# If Yasara is started then delete the objects present ", "# Should we show the structure", "#if int(self.show_struct.get())>0: # and self.yasara", "''...
[ { "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": ...
7db18e1a3dddd2574d74d1d97f280fd2ec5a7b02
shambo001/peat
PEATDB/Mutate.py
[ "MIT" ]
Python
update_mut_restext
<not_specific>
def update_mut_restext(self,event=None): """When adding a mutant: Update the text in the orgres field""" # Find the original residue in the sequence if not self.parent.get(): return CID=self.DT.chainID.get() # Update the to and from boun...
When adding a mutant: Update the text in the orgres field
When adding a mutant: Update the text in the orgres field
[ "When", "adding", "a", "mutant", ":", "Update", "the", "text", "in", "the", "orgres", "field" ]
def update_mut_restext(self,event=None): if not self.parent.get(): return CID=self.DT.chainID.get() seq=self.DB[self.parent.get()] thischain=[] for resnum,aa in seq: if resnum.split(':')[0]==CID: thischain.append([resnum,aa]) ...
[ "def", "update_mut_restext", "(", "self", ",", "event", "=", "None", ")", ":", "if", "not", "self", ".", "parent", ".", "get", "(", ")", ":", "return", "CID", "=", "self", ".", "DT", ".", "chainID", ".", "get", "(", ")", "seq", "=", "self", ".", ...
When adding a mutant: Update the text in the orgres field
[ "When", "adding", "a", "mutant", ":", "Update", "the", "text", "in", "the", "orgres", "field" ]
[ "\"\"\"When adding a mutant: Update the text in the orgres field\"\"\"", "# Find the original residue in the sequence ", "# Update the to and from bounds for the scale ", "#", "#", "# Get the residue number" ]
[ { "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": ...
a34587ee77fc50df6f0f1c319be2d976e73297f7
shambo001/peat
pKaTool/pI.py
[ "MIT" ]
Python
calc_pI
<not_specific>
def calc_pI(self): """Calculate the pI for the calculation currently loaded""" calc=self.current_selected_calc # # Get the pH values # groups=self.calcs[calc]['titcurv'].keys() pHs=self.calcs[calc]['titcurv'][groups[0]].keys() pHs.sort() # ...
Calculate the pI for the calculation currently loaded
Calculate the pI for the calculation currently loaded
[ "Calculate", "the", "pI", "for", "the", "calculation", "currently", "loaded" ]
def calc_pI(self): calc=self.current_selected_calc Get the pH values groups=self.calcs[calc]['titcurv'].keys() pHs=self.calcs[calc]['titcurv'][groups[0]].keys() pHs.sort() Add all titration curves intpkas=[] sub_pka={} for pH in pHs: ...
[ "def", "calc_pI", "(", "self", ")", ":", "calc", "=", "self", ".", "current_selected_calc", "groups", "=", "self", ".", "calcs", "[", "calc", "]", "[", "'titcurv'", "]", ".", "keys", "(", ")", "pHs", "=", "self", ".", "calcs", "[", "calc", "]", "["...
Calculate the pI for the calculation currently loaded
[ "Calculate", "the", "pI", "for", "the", "calculation", "currently", "loaded" ]
[ "\"\"\"Calculate the pI for the calculation currently loaded\"\"\"", "#", "# Get the pH values", "#", "#", "# Add all titration curves", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
40cb1a0b98ca25831092033f5e35e82efb2a0c8a
shambo001/peat
PEATDB/PILView.py
[ "MIT" ]
Python
createMenuBar
<not_specific>
def createMenuBar(self): """Create the menu bar for the application. """ self.menu=Menu(self.pilwin) self.file_menu={ '01Quit':{'cmd':self.quit}} self.file_menu = {'01Open Image':{'cmd':self.openFile}, '02Sa...
Create the menu bar for the application.
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
def createMenuBar(self): self.menu=Menu(self.pilwin) self.file_menu={ '01Quit':{'cmd':self.quit}} self.file_menu = {'01Open Image':{'cmd':self.openFile}, '02Save As':{'cmd':self.saveFile}} self.file_menu=self.create_...
[ "def", "createMenuBar", "(", "self", ")", ":", "self", ".", "menu", "=", "Menu", "(", "self", ".", "pilwin", ")", "self", ".", "file_menu", "=", "{", "'01Quit'", ":", "{", "'cmd'", ":", "self", ".", "quit", "}", "}", "self", ".", "file_menu", "=", ...
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
[ "\"\"\"Create the menu bar for the application. \"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
40cb1a0b98ca25831092033f5e35e82efb2a0c8a
shambo001/peat
PEATDB/PILView.py
[ "MIT" ]
Python
displayFile
<not_specific>
def displayFile(self, img, width=None, height=None): """Show the image file on the canvas""" self.imgcanvas.delete('img') top=0;left=0 if width != None: fw=int(width) fh=int(height) img, top, left = self.doImageRescale(img, fw, fh) ...
Show the image file on the canvas
Show the image file on the canvas
[ "Show", "the", "image", "file", "on", "the", "canvas" ]
def displayFile(self, img, width=None, height=None): self.imgcanvas.delete('img') top=0;left=0 if width != None: fw=int(width) fh=int(height) img, top, left = self.doImageRescale(img, fw, fh) self.tkimg = ImageTk.PhotoImage(img) img...
[ "def", "displayFile", "(", "self", ",", "img", ",", "width", "=", "None", ",", "height", "=", "None", ")", ":", "self", ".", "imgcanvas", ".", "delete", "(", "'img'", ")", "top", "=", "0", ";", "left", "=", "0", "if", "width", "!=", "None", ":", ...
Show the image file on the canvas
[ "Show", "the", "image", "file", "on", "the", "canvas" ]
[ "\"\"\"Show the image file on the canvas\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "img", "type": null }, { "param": "width", "type": null }, { "param": "height", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "img", "type": null, "docstring": null, "docstring_tokens": []...
40cb1a0b98ca25831092033f5e35e82efb2a0c8a
shambo001/peat
PEATDB/PILView.py
[ "MIT" ]
Python
updateCanvas
<not_specific>
def updateCanvas(self, event=None): """We want the image to fit to the window""" if event != None: w = event.width h = event.height else: w=None;h=None if self.currentimage != None: self.displayFile(self.currentimage, width=w, height...
We want the image to fit to the window
We want the image to fit to the window
[ "We", "want", "the", "image", "to", "fit", "to", "the", "window" ]
def updateCanvas(self, event=None): if event != None: w = event.width h = event.height else: w=None;h=None if self.currentimage != None: self.displayFile(self.currentimage, width=w, height=h) return
[ "def", "updateCanvas", "(", "self", ",", "event", "=", "None", ")", ":", "if", "event", "!=", "None", ":", "w", "=", "event", ".", "width", "h", "=", "event", ".", "height", "else", ":", "w", "=", "None", ";", "h", "=", "None", "if", "self", "....
We want the image to fit to the window
[ "We", "want", "the", "image", "to", "fit", "to", "the", "window" ]
[ "\"\"\"We want the image to fit to the window\"\"\"" ]
[ { "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": ...
40cb1a0b98ca25831092033f5e35e82efb2a0c8a
shambo001/peat
PEATDB/PILView.py
[ "MIT" ]
Python
doImageRescale
<not_specific>
def doImageRescale(self, img, framew, frameh): """ensures that the image is displayed with the correct ratio as the frame is resized """ imgw, imgh = img.size imageratio = float(imgw)/float(imgh) print imageratio if (imageratio >= 1): w = framew...
ensures that the image is displayed with the correct ratio as the frame is resized
ensures that the image is displayed with the correct ratio as the frame is resized
[ "ensures", "that", "the", "image", "is", "displayed", "with", "the", "correct", "ratio", "as", "the", "frame", "is", "resized" ]
def doImageRescale(self, img, framew, frameh): imgw, imgh = img.size imageratio = float(imgw)/float(imgh) print imageratio if (imageratio >= 1): w = framew h = int(w / imageratio) left=0 top = frameh/2 - h/2 if (h > ...
[ "def", "doImageRescale", "(", "self", ",", "img", ",", "framew", ",", "frameh", ")", ":", "imgw", ",", "imgh", "=", "img", ".", "size", "imageratio", "=", "float", "(", "imgw", ")", "/", "float", "(", "imgh", ")", "print", "imageratio", "if", "(", ...
ensures that the image is displayed with the correct ratio as the frame is resized
[ "ensures", "that", "the", "image", "is", "displayed", "with", "the", "correct", "ratio", "as", "the", "frame", "is", "resized" ]
[ "\"\"\"ensures that the image is displayed with the\n correct ratio as the frame is resized \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "img", "type": null }, { "param": "framew", "type": null }, { "param": "frameh", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "img", "type": null, "docstring": null, "docstring_tokens": []...
06d7433e1afd0454e24dc5897dd3e237477e6f62
shambo001/peat
Ghost/calc_dCS.py
[ "MIT" ]
Python
main
<not_specific>
def main(options,args): """Calculate the change in chemical shift due to a full charge on each titratable group""" import get_dEF method=options.method X=get_dEF.map_struct(args[0]) X.build_Hs() residues=X.PI.residues.keys() residues.sort() # # Get the titratable groups # ti...
Calculate the change in chemical shift due to a full charge on each titratable group
Calculate the change in chemical shift due to a full charge on each titratable group
[ "Calculate", "the", "change", "in", "chemical", "shift", "due", "to", "a", "full", "charge", "on", "each", "titratable", "group" ]
def main(options,args): import get_dEF method=options.method X=get_dEF.map_struct(args[0]) X.build_Hs() residues=X.PI.residues.keys() residues.sort() Get the titratable groups titgroups=X.PI.get_titratable_groups() titgroups.sort() import pKa.pKD_tools if options.group_by_t...
[ "def", "main", "(", "options", ",", "args", ")", ":", "import", "get_dEF", "method", "=", "options", ".", "method", "X", "=", "get_dEF", ".", "map_struct", "(", "args", "[", "0", "]", ")", "X", ".", "build_Hs", "(", ")", "residues", "=", "X", ".", ...
Calculate the change in chemical shift due to a full charge on each titratable group
[ "Calculate", "the", "change", "in", "chemical", "shift", "due", "to", "a", "full", "charge", "on", "each", "titratable", "group" ]
[ "\"\"\"Calculate the change in chemical shift due to a full charge on each titratable group\"\"\"", "#", "# Get the titratable groups", "#", "#", "# Group by atom", "#", "#" ]
[ { "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"...
c589d01dfad64b867394c4849c3049c18c0f4285
shambo001/peat
DNATool2/Utilities.py
[ "MIT" ]
Python
createRandomStrings
<not_specific>
def createRandomStrings(l,n,chars=None,upper=False): """create list of l random strings, each of length n""" names = [] if chars == None: chars = string.ascii_lowercase #for x in random.sample(alphabet,random.randint(min,max)): if upper == True: chars = [i.upper() f...
create list of l random strings, each of length n
create list of l random strings, each of length n
[ "create", "list", "of", "l", "random", "strings", "each", "of", "length", "n" ]
def createRandomStrings(l,n,chars=None,upper=False): names = [] if chars == None: chars = string.ascii_lowercase if upper == True: chars = [i.upper() for i in chars] for i in range(l): val = ''.join(random.choice(chars) for x in range(n)) names.append(val) ret...
[ "def", "createRandomStrings", "(", "l", ",", "n", ",", "chars", "=", "None", ",", "upper", "=", "False", ")", ":", "names", "=", "[", "]", "if", "chars", "==", "None", ":", "chars", "=", "string", ".", "ascii_lowercase", "if", "upper", "==", "True", ...
create list of l random strings, each of length n
[ "create", "list", "of", "l", "random", "strings", "each", "of", "length", "n" ]
[ "\"\"\"create list of l random strings, each of length n\"\"\"", "#for x in random.sample(alphabet,random.randint(min,max)):" ]
[ { "param": "l", "type": null }, { "param": "n", "type": null }, { "param": "chars", "type": null }, { "param": "upper", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "l", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "n", "type": null, "docstring": null, "docstring_tokens": [], ...
c589d01dfad64b867394c4849c3049c18c0f4285
shambo001/peat
DNATool2/Utilities.py
[ "MIT" ]
Python
createDummyRestrSites
<not_specific>
def createDummyRestrSites(l=200,n=40): """n random rest sites for seq of length l""" sites = {} names = createRandomStrings(l,6) locs = [random.randint(0, l) for i in range(n)] for x,name in zip(locs, names): sites[name] = {'position':x} return sites
n random rest sites for seq of length l
n random rest sites for seq of length l
[ "n", "random", "rest", "sites", "for", "seq", "of", "length", "l" ]
def createDummyRestrSites(l=200,n=40): sites = {} names = createRandomStrings(l,6) locs = [random.randint(0, l) for i in range(n)] for x,name in zip(locs, names): sites[name] = {'position':x} return sites
[ "def", "createDummyRestrSites", "(", "l", "=", "200", ",", "n", "=", "40", ")", ":", "sites", "=", "{", "}", "names", "=", "createRandomStrings", "(", "l", ",", "6", ")", "locs", "=", "[", "random", ".", "randint", "(", "0", ",", "l", ")", "for",...
n random rest sites for seq of length l
[ "n", "random", "rest", "sites", "for", "seq", "of", "length", "l" ]
[ "\"\"\"n random rest sites for seq of length l\"\"\"" ]
[ { "param": "l", "type": null }, { "param": "n", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "l", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "n", "type": null, "docstring": null, "docstring_tokens": [], ...
3f4beb53e45e8f6bd0cdb15285bf46b500f7e665
shambo001/peat
pKa/pdb2pka_interface.py
[ "MIT" ]
Python
pdb2pka_sugelm
<not_specific>
def pdb2pka_sugelm(self): """Explore all possible mutations and calculate a phimap for each using pdb2pka (APBS)""" import Protool P=Protool.structureIO() P.readpdb(self.pdbfile) P.RemoveALT() #import Protool.mutate #MUT=Protool.mutate.Mutate(P) # ...
Explore all possible mutations and calculate a phimap for each using pdb2pka (APBS)
Explore all possible mutations and calculate a phimap for each using pdb2pka (APBS)
[ "Explore", "all", "possible", "mutations", "and", "calculate", "a", "phimap", "for", "each", "using", "pdb2pka", "(", "APBS", ")" ]
def pdb2pka_sugelm(self): import Protool P=Protool.structureIO() P.readpdb(self.pdbfile) P.RemoveALT() Construct arrays import pKD_dict self.data=pKD_dict.pKD_dict() self.atom_data=pKD_dict.pKD_dict() Create dir for mutant PDB files impor...
[ "def", "pdb2pka_sugelm", "(", "self", ")", ":", "import", "Protool", "P", "=", "Protool", ".", "structureIO", "(", ")", "P", ".", "readpdb", "(", "self", ".", "pdbfile", ")", "P", ".", "RemoveALT", "(", ")", "import", "pKD_dict", "self", ".", "data", ...
Explore all possible mutations and calculate a phimap for each using pdb2pka (APBS)
[ "Explore", "all", "possible", "mutations", "and", "calculate", "a", "phimap", "for", "each", "using", "pdb2pka", "(", "APBS", ")" ]
[ "\"\"\"Explore all possible mutations and calculate a phimap for each using pdb2pka (APBS)\"\"\"", "#import Protool.mutate", "#MUT=Protool.mutate.Mutate(P)", "#", "# Construct arrays", "#", "#", "# Create dir for mutant PDB files", "#", "#", "# Loop over all residues", "#", "#", "# If neut...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3f4beb53e45e8f6bd0cdb15285bf46b500f7e665
shambo001/peat
pKa/pdb2pka_interface.py
[ "MIT" ]
Python
pdb2pka_desolv_backgr
<not_specific>
def pdb2pka_desolv_backgr(self,residue): """Calculate the desolvation and background interaction energy for a residue""" protein,routines,forcefield,apbs_setup,lig_titgrps = pdb2pka.pre_init(pdbfilename=self.pdbfile, ff='parse...
Calculate the desolvation and background interaction energy for a residue
Calculate the desolvation and background interaction energy for a residue
[ "Calculate", "the", "desolvation", "and", "background", "interaction", "energy", "for", "a", "residue" ]
def pdb2pka_desolv_backgr(self,residue): protein,routines,forcefield,apbs_setup,lig_titgrps = pdb2pka.pre_init(pdbfilename=self.pdbfile, ff='parse', ligand=...
[ "def", "pdb2pka_desolv_backgr", "(", "self", ",", "residue", ")", ":", "protein", ",", "routines", ",", "forcefield", ",", "apbs_setup", ",", "lig_titgrps", "=", "pdb2pka", ".", "pre_init", "(", "pdbfilename", "=", "self", ".", "pdbfile", ",", "ff", "=", "...
Calculate the desolvation and background interaction energy for a residue
[ "Calculate", "the", "desolvation", "and", "background", "interaction", "energy", "for", "a", "residue" ]
[ "\"\"\"Calculate the desolvation and background interaction energy for a residue\"\"\"", "#", "# Find our group", "#", "#if chainid!='':", "# raise Exception,'pKD cannot handle PDB files with ChainIDs!'", "#if pKa.residue.resSeq==resnum and pKa.residue.chainID==chainid and pKa.residue.name==target an...
[ { "param": "self", "type": null }, { "param": "residue", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "residue", "type": null, "docstring": null, "docstring_tokens"...
fcd1e406ad45b18e2e195acd3845edad2d8e186c
shambo001/peat
PEATDB/Ekin/Ekin_map.py
[ "MIT" ]
Python
map_datatab2structure
<not_specific>
def map_datatab2structure(self): """If the PEATDB record has a structure, then we allow the user to map each datatab to a specific part of the protein. One can map a datatab to an atom, a residue, a chain, or define a structural group and map to it""" if not self.parent: imp...
If the PEATDB record has a structure, then we allow the user to map each datatab to a specific part of the protein. One can map a datatab to an atom, a residue, a chain, or define a structural group and map to it
If the PEATDB record has a structure, then we allow the user to map each datatab to a specific part of the protein. One can map a datatab to an atom, a residue, a chain, or define a structural group and map to it
[ "If", "the", "PEATDB", "record", "has", "a", "structure", "then", "we", "allow", "the", "user", "to", "map", "each", "datatab", "to", "a", "specific", "part", "of", "the", "protein", ".", "One", "can", "map", "a", "datatab", "to", "an", "atom", "a", ...
def map_datatab2structure(self): if not self.parent: import tkMessageBox tkMessageBox.showinfo("No PEAT", "This option is only available when Ekin is started from PEAT", parent=self.ekin_win) return ...
[ "def", "map_datatab2structure", "(", "self", ")", ":", "if", "not", "self", ".", "parent", ":", "import", "tkMessageBox", "tkMessageBox", ".", "showinfo", "(", "\"No PEAT\"", ",", "\"This option is only available when Ekin is started from PEAT\"", ",", "parent", "=", ...
If the PEATDB record has a structure, then we allow the user to map each datatab to a specific part of the protein.
[ "If", "the", "PEATDB", "record", "has", "a", "structure", "then", "we", "allow", "the", "user", "to", "map", "each", "datatab", "to", "a", "specific", "part", "of", "the", "protein", "." ]
[ "\"\"\"If the PEATDB record has a structure, then we allow the user to map each datatab\n to a specific part of the protein.\n\n One can map a datatab to an atom, a residue, a chain, or define a structural group and map to it\"\"\"", "#", "# Do we have a record name", "#", "#", "# Is there a...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
fcd1e406ad45b18e2e195acd3845edad2d8e186c
shambo001/peat
PEATDB/Ekin/Ekin_map.py
[ "MIT" ]
Python
close_mapper_window
<not_specific>
def close_mapper_window(self): """Close the mapping window and delete references to it""" self.mapper_win.destroy() if hasattr(self,"mapper_win"): delattr(self,"mapper_win") return
Close the mapping window and delete references to it
Close the mapping window and delete references to it
[ "Close", "the", "mapping", "window", "and", "delete", "references", "to", "it" ]
def close_mapper_window(self): self.mapper_win.destroy() if hasattr(self,"mapper_win"): delattr(self,"mapper_win") return
[ "def", "close_mapper_window", "(", "self", ")", ":", "self", ".", "mapper_win", ".", "destroy", "(", ")", "if", "hasattr", "(", "self", ",", "\"mapper_win\"", ")", ":", "delattr", "(", "self", ",", "\"mapper_win\"", ")", "return" ]
Close the mapping window and delete references to it
[ "Close", "the", "mapping", "window", "and", "delete", "references", "to", "it" ]
[ "\"\"\"Close the mapping window and delete references 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": [] }
fcd1e406ad45b18e2e195acd3845edad2d8e186c
shambo001/peat
PEATDB/Ekin/Ekin_map.py
[ "MIT" ]
Python
update_mapping_window
<not_specific>
def update_mapping_window(self): """Update the mapping window when we change datatabs""" # # Update list of current mappings # datatab=self.currentdataset.get() mappings=self.get_structmappings(datatab) self.mapping_box.setlist(mappings) # # Update...
Update the mapping window when we change datatabs
Update the mapping window when we change datatabs
[ "Update", "the", "mapping", "window", "when", "we", "change", "datatabs" ]
def update_mapping_window(self): Update list of current mappings datatab=self.currentdataset.get() mappings=self.get_structmappings(datatab) self.mapping_box.setlist(mappings) Update List of parameters dataprops=['Data source']+self.FIT.parameter_names self.data...
[ "def", "update_mapping_window", "(", "self", ")", ":", "datatab", "=", "self", ".", "currentdataset", ".", "get", "(", ")", "mappings", "=", "self", ".", "get_structmappings", "(", "datatab", ")", "self", ".", "mapping_box", ".", "setlist", "(", "mappings", ...
Update the mapping window when we change datatabs
[ "Update", "the", "mapping", "window", "when", "we", "change", "datatabs" ]
[ "\"\"\"Update the mapping window when we change datatabs\"\"\"", "#", "# Update list of current mappings", "#", "#", "# Update List of parameters", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
fcd1e406ad45b18e2e195acd3845edad2d8e186c
shambo001/peat
PEATDB/Ekin/Ekin_map.py
[ "MIT" ]
Python
choose_savedir
<not_specific>
def choose_savedir(self): """Get a directory to save to""" import tkFileDialog, os if self.defaultsavedir == None: self.defaultsavedir = os.getcwd() dirname=tkFileDialog.askdirectory(parent=self.export_win, initialdir=self.defaultsave...
Get a directory to save to
Get a directory to save to
[ "Get", "a", "directory", "to", "save", "to" ]
def choose_savedir(self): import tkFileDialog, os if self.defaultsavedir == None: self.defaultsavedir = os.getcwd() dirname=tkFileDialog.askdirectory(parent=self.export_win, initialdir=self.defaultsavedir) if not dirname: ...
[ "def", "choose_savedir", "(", "self", ")", ":", "import", "tkFileDialog", ",", "os", "if", "self", ".", "defaultsavedir", "==", "None", ":", "self", ".", "defaultsavedir", "=", "os", ".", "getcwd", "(", ")", "dirname", "=", "tkFileDialog", ".", "askdirecto...
Get a directory to save to
[ "Get", "a", "directory", "to", "save", "to" ]
[ "\"\"\"Get a directory to save to\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
fcd1e406ad45b18e2e195acd3845edad2d8e186c
shambo001/peat
PEATDB/Ekin/Ekin_map.py
[ "MIT" ]
Python
export_as_csv
<not_specific>
def export_as_csv(self): """export struct mapping for specific filters as csv""" #prompt user for save dir savedir = self.choose_savedir() if savedir==None: return if self.currplatform == 'Windows': print 'using windows' import List_Utils ...
export struct mapping for specific filters as csv
export struct mapping for specific filters as csv
[ "export", "struct", "mapping", "for", "specific", "filters", "as", "csv" ]
def export_as_csv(self): savedir = self.choose_savedir() if savedir==None: return if self.currplatform == 'Windows': print 'using windows' import List_Utils def getexplist(assignedto): reslist={} reskeys=[] for key in se...
[ "def", "export_as_csv", "(", "self", ")", ":", "savedir", "=", "self", ".", "choose_savedir", "(", ")", "if", "savedir", "==", "None", ":", "return", "if", "self", ".", "currplatform", "==", "'Windows'", ":", "print", "'using windows'", "import", "List_Utils...
export struct mapping for specific filters as csv
[ "export", "struct", "mapping", "for", "specific", "filters", "as", "csv" ]
[ "\"\"\"export struct mapping for specific filters as csv\"\"\"", "#prompt user for save dir", "#sub function for tidiness", "#check if any dataprop list element contains the key eg 'pK' in pK1, pK2 etc..", "#try to extract the value from the ekin dataset", "#print 'val: ', val", "#iterate over group ele...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
fcd1e406ad45b18e2e195acd3845edad2d8e186c
shambo001/peat
PEATDB/Ekin/Ekin_map.py
[ "MIT" ]
Python
sort_by_Num
<not_specific>
def sort_by_Num(self, p): """Sort text keys by contained numbers - should be put in utils class""" splitkeys={} import re r=re.compile('\D') for k in p: splitkeys[k]=int(r.split(k)[1]) items = splitkeys.items() items = [(v, k) for (k, v) in items] ...
Sort text keys by contained numbers - should be put in utils class
Sort text keys by contained numbers - should be put in utils class
[ "Sort", "text", "keys", "by", "contained", "numbers", "-", "should", "be", "put", "in", "utils", "class" ]
def sort_by_Num(self, p): splitkeys={} import re r=re.compile('\D') for k in p: splitkeys[k]=int(r.split(k)[1]) items = splitkeys.items() items = [(v, k) for (k, v) in items] items.sort() return items
[ "def", "sort_by_Num", "(", "self", ",", "p", ")", ":", "splitkeys", "=", "{", "}", "import", "re", "r", "=", "re", ".", "compile", "(", "'\\D'", ")", "for", "k", "in", "p", ":", "splitkeys", "[", "k", "]", "=", "int", "(", "r", ".", "split", ...
Sort text keys by contained numbers - should be put in utils class
[ "Sort", "text", "keys", "by", "contained", "numbers", "-", "should", "be", "put", "in", "utils", "class" ]
[ "\"\"\"Sort text keys by contained numbers - should be put in utils class\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "p", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "p", "type": null, "docstring": null, "docstring_tokens": [], ...
f50a00699aea18200c770f15e27e684356451d36
shambo001/peat
PEATDB/Compare.py
[ "MIT" ]
Python
findNames
<not_specific>
def findNames(self, srecs, sfields, slabel): """Get datasets list from search string""" if slabel == '': s = re.compile('[a-z]*\d',re.IGNORECASE) else: s = re.compile(slabel, re.IGNORECASE) slabels = [] for r in srecs: rec = self.DB[r] ...
Get datasets list from search string
Get datasets list from search string
[ "Get", "datasets", "list", "from", "search", "string" ]
def findNames(self, srecs, sfields, slabel): if slabel == '': s = re.compile('[a-z]*\d',re.IGNORECASE) else: s = re.compile(slabel, re.IGNORECASE) slabels = [] for r in srecs: rec = self.DB[r] for f in sfields: if f == 'Stru...
[ "def", "findNames", "(", "self", ",", "srecs", ",", "sfields", ",", "slabel", ")", ":", "if", "slabel", "==", "''", ":", "s", "=", "re", ".", "compile", "(", "'[a-z]*\\d'", ",", "re", ".", "IGNORECASE", ")", "else", ":", "s", "=", "re", ".", "com...
Get datasets list from search string
[ "Get", "datasets", "list", "from", "search", "string" ]
[ "\"\"\"Get datasets list from search string\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "srecs", "type": null }, { "param": "sfields", "type": null }, { "param": "slabel", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "srecs", "type": null, "docstring": null, "docstring_tokens": ...
f50a00699aea18200c770f15e27e684356451d36
shambo001/peat
PEATDB/Compare.py
[ "MIT" ]
Python
displayEkin
<not_specific>
def displayEkin(self, srecs, sfields, slabel='', html=False, overlay=False, cols=None, groupby='field'): """Format and display ekin plots from given recs/fields/label, plots can be grouped according to field if required""" from Ekin.Base import EkinProject tmp...
Format and display ekin plots from given recs/fields/label, plots can be grouped according to field if required
Format and display ekin plots from given recs/fields/label, plots can be grouped according to field if required
[ "Format", "and", "display", "ekin", "plots", "from", "given", "recs", "/", "fields", "/", "label", "plots", "can", "be", "grouped", "according", "to", "field", "if", "required" ]
def displayEkin(self, srecs, sfields, slabel='', html=False, overlay=False, cols=None, groupby='field'): from Ekin.Base import EkinProject tmppath = os.getcwd() slabels = self.findNames(srecs, sfields, slabel) all_labels = self.findNames(srecs, sfields, '') ...
[ "def", "displayEkin", "(", "self", ",", "srecs", ",", "sfields", ",", "slabel", "=", "''", ",", "html", "=", "False", ",", "overlay", "=", "False", ",", "cols", "=", "None", ",", "groupby", "=", "'field'", ")", ":", "from", "Ekin", ".", "Base", "im...
Format and display ekin plots from given recs/fields/label, plots can be grouped according to field if required
[ "Format", "and", "display", "ekin", "plots", "from", "given", "recs", "/", "fields", "/", "label", "plots", "can", "be", "grouped", "according", "to", "field", "if", "required" ]
[ "\"\"\"Format and display ekin plots from given recs/fields/label,\n plots can be grouped according to field if required\"\"\"", "\"\"\"reused in both loops\"\"\"", "#create ekinprojects grouped by field or record, or just one big one" ]
[ { "param": "self", "type": null }, { "param": "srecs", "type": null }, { "param": "sfields", "type": null }, { "param": "slabel", "type": null }, { "param": "html", "type": null }, { "param": "overlay", "type": null }, { "param": "cols", ...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "srecs", "type": null, "docstring": null, "docstring_tokens": ...
f50a00699aea18200c770f15e27e684356451d36
shambo001/peat
PEATDB/Compare.py
[ "MIT" ]
Python
createResCheckbuttons
<not_specific>
def createResCheckbuttons(self, resnums): """Check buttons for residue list passed in ResiduesfromNames""" def updatelabels(tag, state): resnums=list(self.checkbuttons.getcurselection()) self.labelResidues(resnums) if hasattr(self, 'checkbuttons'): ...
Check buttons for residue list passed in ResiduesfromNames
Check buttons for residue list passed in ResiduesfromNames
[ "Check", "buttons", "for", "residue", "list", "passed", "in", "ResiduesfromNames" ]
def createResCheckbuttons(self, resnums): def updatelabels(tag, state): resnums=list(self.checkbuttons.getcurselection()) self.labelResidues(resnums) if hasattr(self, 'checkbuttons'): self.checkbuttons.destroy() self.checkbuttons = Pmw.RadioSelect(self.cbfr...
[ "def", "createResCheckbuttons", "(", "self", ",", "resnums", ")", ":", "def", "updatelabels", "(", "tag", ",", "state", ")", ":", "resnums", "=", "list", "(", "self", ".", "checkbuttons", ".", "getcurselection", "(", ")", ")", "self", ".", "labelResidues",...
Check buttons for residue list passed in ResiduesfromNames
[ "Check", "buttons", "for", "residue", "list", "passed", "in", "ResiduesfromNames" ]
[ "\"\"\"Check buttons for residue list passed in ResiduesfromNames\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "resnums", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "resnums", "type": null, "docstring": null, "docstring_tokens"...
f50a00699aea18200c770f15e27e684356451d36
shambo001/peat
PEATDB/Compare.py
[ "MIT" ]
Python
replot
<not_specific>
def replot(self, event=None, selected=None): """Replot all frames with current datasets""" if selected == None: selected = self.selector.getSelected() if len(selected) == 0: return for p in self.plotframes: pf = self.plotframes[p] ...
Replot all frames with current datasets
Replot all frames with current datasets
[ "Replot", "all", "frames", "with", "current", "datasets" ]
def replot(self, event=None, selected=None): if selected == None: selected = self.selector.getSelected() if len(selected) == 0: return for p in self.plotframes: pf = self.plotframes[p] E = pf.E datasets = self.getNames(selected...
[ "def", "replot", "(", "self", ",", "event", "=", "None", ",", "selected", "=", "None", ")", ":", "if", "selected", "==", "None", ":", "selected", "=", "self", ".", "selector", ".", "getSelected", "(", ")", "if", "len", "(", "selected", ")", "==", "...
Replot all frames with current datasets
[ "Replot", "all", "frames", "with", "current", "datasets" ]
[ "\"\"\"Replot all frames with current datasets\"\"\"", "#get all datasets matching values" ]
[ { "param": "self", "type": null }, { "param": "event", "type": null }, { "param": "selected", "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": ...
3227358cfdde9e8af62d39616210392dd4a39ab6
shambo001/peat
PEATDB/DNAtool/Restriction_Digest_driver.py
[ "MIT" ]
Python
plot_restriction_sites
<not_specific>
def plot_restriction_sites(self,cut_pos,colour='black',direction='up',add_text='', temporary=None,delete_temporary=1,underline_unique=1): """ Plot all restriction sites in enzymes """ enzymes=cut_pos.keys() #enzyme names, for string label of each site # # Control vars # if not getattr(self,'new_seq...
Plot all restriction sites in enzymes
Plot all restriction sites in enzymes
[ "Plot", "all", "restriction", "sites", "in", "enzymes" ]
def plot_restriction_sites(self,cut_pos,colour='black',direction='up',add_text='', temporary=None,delete_temporary=1,underline_unique=1): enzymes=cut_pos.keys() Control vars if not getattr(self,'new_seq_win_objs',None): self.new_seq_win_objs={} step=0 colour_cycle=[colour],'green','magenta','cyan','b...
[ "def", "plot_restriction_sites", "(", "self", ",", "cut_pos", ",", "colour", "=", "'black'", ",", "direction", "=", "'up'", ",", "add_text", "=", "''", ",", "temporary", "=", "None", ",", "delete_temporary", "=", "1", ",", "underline_unique", "=", "1", ")"...
Plot all restriction sites in enzymes
[ "Plot", "all", "restriction", "sites", "in", "enzymes" ]
[ "\"\"\"\n\t\tPlot all restriction sites in enzymes\n\t\t\"\"\"", "#enzyme names, for string label of each site", "#", "# Control vars", "#", "#", "#,'green','magenta','cyan','blue']", "# Keep track of all the sites we plot", "# Delete all temporary sites from last time", "# Remove the influence of...
[ { "param": "self", "type": null }, { "param": "cut_pos", "type": null }, { "param": "colour", "type": null }, { "param": "direction", "type": null }, { "param": "add_text", "type": null }, { "param": "temporary", "type": null }, { "param": ...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "cut_pos", "type": null, "docstring": null, "docstring_tokens"...
3227358cfdde9e8af62d39616210392dd4a39ab6
shambo001/peat
PEATDB/DNAtool/Restriction_Digest_driver.py
[ "MIT" ]
Python
tidy_restriction_labels
null
def tidy_restriction_labels(self,direction='up',temporary=None,underline_unique=None): """This function is for tidying up the restr. site placement after initial drawing It also draws the boxes and lines for the sites""" c = self.seqframe if direction=='up': l=-15 base_shift=0 else:...
This function is for tidying up the restr. site placement after initial drawing It also draws the boxes and lines for the sites
This function is for tidying up the restr. site placement after initial drawing It also draws the boxes and lines for the sites
[ "This", "function", "is", "for", "tidying", "up", "the", "restr", ".", "site", "placement", "after", "initial", "drawing", "It", "also", "draws", "the", "boxes", "and", "lines", "for", "the", "sites" ]
def tidy_restriction_labels(self,direction='up',temporary=None,underline_unique=None): c = self.seqframe if direction=='up': l=-15 base_shift=0 else: l=15 base_shift=30 self.seqframe.delete('templabelrect') self.seqframe.delete('templine') currentsites=[] if temporary: for obj in self.t...
[ "def", "tidy_restriction_labels", "(", "self", ",", "direction", "=", "'up'", ",", "temporary", "=", "None", ",", "underline_unique", "=", "None", ")", ":", "c", "=", "self", ".", "seqframe", "if", "direction", "==", "'up'", ":", "l", "=", "-", "15", "...
This function is for tidying up the restr.
[ "This", "function", "is", "for", "tidying", "up", "the", "restr", "." ]
[ "\"\"\"This function is for tidying up the restr. site placement after initial drawing\n It also draws the boxes and lines for the sites\"\"\"", "#clear the temporary rects and lines from previous time", "#use seperate lists depending on whether temp sites are being drawn", "#for each obj, s...
[ { "param": "self", "type": null }, { "param": "direction", "type": null }, { "param": "temporary", "type": null }, { "param": "underline_unique", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "direction", "type": null, "docstring": null, "docstring_token...
3227358cfdde9e8af62d39616210392dd4a39ab6
shambo001/peat
PEATDB/DNAtool/Restriction_Digest_driver.py
[ "MIT" ]
Python
show_item
null
def show_item(self, event): """Raise items(s) to top if selected with right click and show recognition seq if it's a site label, called from DNAtool main""" c=self.seqframe box = c.bbox(CURRENT) x1=box[0] y1=box[1] x2=box[2] y2=box[3] items=[] #make selection rectangle one pixel lar...
Raise items(s) to top if selected with right click and show recognition seq if it's a site label, called from DNAtool main
Raise items(s) to top if selected with right click and show recognition seq if it's a site label, called from DNAtool main
[ "Raise", "items", "(", "s", ")", "to", "top", "if", "selected", "with", "right", "click", "and", "show", "recognition", "seq", "if", "it", "'", "s", "a", "site", "label", "called", "from", "DNAtool", "main" ]
def show_item(self, event): c=self.seqframe box = c.bbox(CURRENT) x1=box[0] y1=box[1] x2=box[2] y2=box[3] items=[] items=c.find_enclosed(x1-1,y1-1,x2+1,y2+1) enzymes=self.RS.enzymes_regexs sfont = tkFont.Font (family='Arial', size=12,weight='bold') for obj in items: c.tag_raise(obj) if 'text...
[ "def", "show_item", "(", "self", ",", "event", ")", ":", "c", "=", "self", ".", "seqframe", "box", "=", "c", ".", "bbox", "(", "CURRENT", ")", "x1", "=", "box", "[", "0", "]", "y1", "=", "box", "[", "1", "]", "x2", "=", "box", "[", "2", "]"...
Raise items(s) to top if selected with right click and show recognition seq if it's a site label, called from DNAtool main
[ "Raise", "items", "(", "s", ")", "to", "top", "if", "selected", "with", "right", "click", "and", "show", "recognition", "seq", "if", "it", "'", "s", "a", "site", "label", "called", "from", "DNAtool", "main" ]
[ "\"\"\"Raise items(s) to top if selected with right click\n and show recognition seq if it's a site label, called from DNAtool main\"\"\"", "#make selection rectangle one pixel larger to include rect and text", "#get this for recog sequence", "#if item is text, get recog sequence and display...
[ { "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": ...
3227358cfdde9e8af62d39616210392dd4a39ab6
shambo001/peat
PEATDB/DNAtool/Restriction_Digest_driver.py
[ "MIT" ]
Python
clear_restriction_details
<not_specific>
def clear_restriction_details(self): """Remove all restriction sites from the sequence window""" if getattr(self,'new_seq_win_objs',None): for obj in self.new_seq_win_objs.keys(): self.seqframe.delete(obj) self.new_seq_win_objs={} self.donepos={} # for obj in self.temp_objs.keys(): self.seq...
Remove all restriction sites from the sequence window
Remove all restriction sites from the sequence window
[ "Remove", "all", "restriction", "sites", "from", "the", "sequence", "window" ]
def clear_restriction_details(self): if getattr(self,'new_seq_win_objs',None): for obj in self.new_seq_win_objs.keys(): self.seqframe.delete(obj) self.new_seq_win_objs={} self.donepos={} for obj in self.temp_objs.keys(): self.seqframe.delete(obj) self.temp_objs={} self.temp_sites={} self....
[ "def", "clear_restriction_details", "(", "self", ")", ":", "if", "getattr", "(", "self", ",", "'new_seq_win_objs'", ",", "None", ")", ":", "for", "obj", "in", "self", ".", "new_seq_win_objs", ".", "keys", "(", ")", ":", "self", ".", "seqframe", ".", "del...
Remove all restriction sites from the sequence window
[ "Remove", "all", "restriction", "sites", "from", "the", "sequence", "window" ]
[ "\"\"\"Remove all restriction sites from the sequence window\"\"\"", "#", "#also clear the sites list - this is used in tidying and rendering lines/rects" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ac798640ec5e53d3c0116ab33936ee0506a0ffdb
shambo001/peat
pKarun/pKa_ostools.py
[ "MIT" ]
Python
rmr
<not_specific>
def rmr(dir): """Remove a dir recursively (rm -r) or if it is a file: unlink it""" if os.path.isdir(dir): for file in os.listdir(dir): if os.path.isdir(os.path.join(dir,file)): rmr(os.path.join(dir,file)) if os.path.isfile(os.path.join(dir,file)) or os.path.islink...
Remove a dir recursively (rm -r) or if it is a file: unlink it
Remove a dir recursively (rm -r) or if it is a file: unlink it
[ "Remove", "a", "dir", "recursively", "(", "rm", "-", "r", ")", "or", "if", "it", "is", "a", "file", ":", "unlink", "it" ]
def rmr(dir): if os.path.isdir(dir): for file in os.listdir(dir): if os.path.isdir(os.path.join(dir,file)): rmr(os.path.join(dir,file)) if os.path.isfile(os.path.join(dir,file)) or os.path.islink(os.path.join(dir,file)): os.unlink(os.path.join(dir,file...
[ "def", "rmr", "(", "dir", ")", ":", "if", "os", ".", "path", ".", "isdir", "(", "dir", ")", ":", "for", "file", "in", "os", ".", "listdir", "(", "dir", ")", ":", "if", "os", ".", "path", ".", "isdir", "(", "os", ".", "path", ".", "join", "(...
Remove a dir recursively (rm -r) or if it is a file: unlink it
[ "Remove", "a", "dir", "recursively", "(", "rm", "-", "r", ")", "or", "if", "it", "is", "a", "file", ":", "unlink", "it" ]
[ "\"\"\"Remove a dir recursively (rm -r) or if it is a file: unlink it\"\"\"", "#print 'RMDIR:',dir" ]
[ { "param": "dir", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "dir", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ac798640ec5e53d3c0116ab33936ee0506a0ffdb
shambo001/peat
pKarun/pKa_ostools.py
[ "MIT" ]
Python
delete
<not_specific>
def delete(list): """Delete a file if it is there""" for file in list: if os.path.isfile(file): os.unlink(file) return
Delete a file if it is there
Delete a file if it is there
[ "Delete", "a", "file", "if", "it", "is", "there" ]
def delete(list): for file in list: if os.path.isfile(file): os.unlink(file) return
[ "def", "delete", "(", "list", ")", ":", "for", "file", "in", "list", ":", "if", "os", ".", "path", ".", "isfile", "(", "file", ")", ":", "os", ".", "unlink", "(", "file", ")", "return" ]
Delete a file if it is there
[ "Delete", "a", "file", "if", "it", "is", "there" ]
[ "\"\"\"Delete a file if it is there\"\"\"" ]
[ { "param": "list", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "list", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5fc6779823e6bc178cac6b1888f36d2a555b10c9
shambo001/peat
PEATDB/Ekin/List_Utils.py
[ "MIT" ]
Python
normList
<not_specific>
def normList(L, inputmin=None, inputmax=None, normalizeTo=1.0): '''normalize values of a list to make its max = normalizeTo''' if inputmin != None: vMin = inputmin else: vMin = min(L) if inputmax != None: vMax = inputmax else: vMax = max(L) ...
normalize values of a list to make its max = normalizeTo
normalize values of a list to make its max = normalizeTo
[ "normalize", "values", "of", "a", "list", "to", "make", "its", "max", "=", "normalizeTo" ]
def normList(L, inputmin=None, inputmax=None, normalizeTo=1.0): if inputmin != None: vMin = inputmin else: vMin = min(L) if inputmax != None: vMax = inputmax else: vMax = max(L) if vMax == vMin: return 0 else: return [ (x-vMin)...
[ "def", "normList", "(", "L", ",", "inputmin", "=", "None", ",", "inputmax", "=", "None", ",", "normalizeTo", "=", "1.0", ")", ":", "if", "inputmin", "!=", "None", ":", "vMin", "=", "inputmin", "else", ":", "vMin", "=", "min", "(", "L", ")", "if", ...
normalize values of a list to make its max = normalizeTo
[ "normalize", "values", "of", "a", "list", "to", "make", "its", "max", "=", "normalizeTo" ]
[ "'''normalize values of a list to make its max = normalizeTo'''" ]
[ { "param": "L", "type": null }, { "param": "inputmin", "type": null }, { "param": "inputmax", "type": null }, { "param": "normalizeTo", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "L", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "inputmin", "type": null, "docstring": null, "docstring_tokens": ...
5b7f2a4971797396718dcc40ec9d7b46be0ba3d3
shambo001/peat
pKaTool/MD_elec.py
[ "MIT" ]
Python
distance_geometry
<not_specific>
def distance_geometry(self,dists,error=0.5): # """From a set of distances produce coordinates that are consistent with them""" """The distances can vary +/- error A""" # # # Do triangle smoothing # atoms=self.dists.keys() atoms.sort() not_c...
From a set of distances produce coordinates that are consistent with them
From a set of distances produce coordinates that are consistent with them
[ "From", "a", "set", "of", "distances", "produce", "coordinates", "that", "are", "consistent", "with", "them" ]
def distance_geometry(self,dists,error=0.5): Do triangle smoothing atoms=self.dists.keys() atoms.sort() not_converged=None round=0 while not_converged>0: Maybe we will converge this time? not_converged=0 round=round+1 Loo...
[ "def", "distance_geometry", "(", "self", ",", "dists", ",", "error", "=", "0.5", ")", ":", "\"\"\"The distances can vary +/- error A\"\"\"", "atoms", "=", "self", ".", "dists", ".", "keys", "(", ")", "atoms", ".", "sort", "(", ")", "not_converged", "=", "Non...
From a set of distances produce coordinates that are consistent with them
[ "From", "a", "set", "of", "distances", "produce", "coordinates", "that", "are", "consistent", "with", "them" ]
[ "#", "\"\"\"From a set of distances produce coordinates that are consistent with them\"\"\"", "\"\"\"The distances can vary +/- error A\"\"\"", "#", "#", "# Do triangle smoothing", "#", "#", "# Maybe we will converge this time?", "#", "#", "# Loop over all triangles", "#", "#", "# Is dis...
[ { "param": "self", "type": null }, { "param": "dists", "type": null }, { "param": "error", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dists", "type": null, "docstring": null, "docstring_tokens": ...
ec3afc297eb1ab6a931a788443a6be918f258e2e
shambo001/peat
pKaTool/LM_Fitter.py
[ "MIT" ]
Python
simplex_fit
<not_specific>
def simplex_fit(self): """Use the Scipy simple algorithm to minimize R^2""" try: import scipy.optimize except: return False,[] #print self.variables #solution=scipy.optimize.fmin(self.get_difference,self.variables,callback=self.callback_scipy) #pri...
Use the Scipy simple algorithm to minimize R^2
Use the Scipy simple algorithm to minimize R^2
[ "Use", "the", "Scipy", "simple", "algorithm", "to", "minimize", "R^2" ]
def simplex_fit(self): try: import scipy.optimize except: return False,[] solution=scipy.optimize.fmin(self.get_difference,self.variables,callback=self.callback_scipy) return True,solution
[ "def", "simplex_fit", "(", "self", ")", ":", "try", ":", "import", "scipy", ".", "optimize", "except", ":", "return", "False", ",", "[", "]", "solution", "=", "scipy", ".", "optimize", ".", "fmin", "(", "self", ".", "get_difference", ",", "self", ".", ...
Use the Scipy simple algorithm to minimize R^2
[ "Use", "the", "Scipy", "simple", "algorithm", "to", "minimize", "R^2" ]
[ "\"\"\"Use the Scipy simple algorithm to minimize R^2\"\"\"", "#print self.variables", "#solution=scipy.optimize.fmin(self.get_difference,self.variables,callback=self.callback_scipy)", "#print 'Simple solution',solution" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ec3afc297eb1ab6a931a788443a6be918f258e2e
shambo001/peat
pKaTool/LM_Fitter.py
[ "MIT" ]
Python
fit
<not_specific>
def fit(self, rounds=500, error_crit=0.00005, gradient_crit = 1e-6, step=1E-8, LM_damper = 0.00001, damper_adjustment_factor = 2.0, silent=False): """Do 500 rounds of fitting, or until converged""" if silent == False: print 'Fitting..' print 'start vars:', self.va...
Do 500 rounds of fitting, or until converged
Do 500 rounds of fitting, or until converged
[ "Do", "500", "rounds", "of", "fitting", "or", "until", "converged" ]
def fit(self, rounds=500, error_crit=0.00005, gradient_crit = 1e-6, step=1E-8, LM_damper = 0.00001, damper_adjustment_factor = 2.0, silent=False): if silent == False: print 'Fitting..' print 'start vars:', self.variables self.step=step self.LM_damper = LM_...
[ "def", "fit", "(", "self", ",", "rounds", "=", "500", ",", "error_crit", "=", "0.00005", ",", "gradient_crit", "=", "1e-6", ",", "step", "=", "1E-8", ",", "LM_damper", "=", "0.00001", ",", "damper_adjustment_factor", "=", "2.0", ",", "silent", "=", "Fals...
Do 500 rounds of fitting, or until converged
[ "Do", "500", "rounds", "of", "fitting", "or", "until", "converged" ]
[ "\"\"\"Do 500 rounds of fitting, or until converged\"\"\"", "# Set damper", "#", "# Try to set error_crit using exp_data range", "#", "#get y vals", "#", "# Start iterating", "#", "#print 'Step Diff LM_damper'", "# check for singluar matrix", "#", "# Check convergence", "#", "#print...
[ { "param": "self", "type": null }, { "param": "rounds", "type": null }, { "param": "error_crit", "type": null }, { "param": "gradient_crit", "type": null }, { "param": "step", "type": null }, { "param": "LM_damper", "type": null }, { "param...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "rounds", "type": null, "docstring": null, "docstring_tokens":...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
SerializeDictionary
<not_specific>
def SerializeDictionary(aDict): '''Serializes a dictionary as a string''' stream = StringIO.StringIO() pickler = pickle.Pickler(stream) pickler.dump(aDict) stream.flush() data = stream.getvalue() stream.close() return data
Serializes a dictionary as a string
Serializes a dictionary as a string
[ "Serializes", "a", "dictionary", "as", "a", "string" ]
def SerializeDictionary(aDict): stream = StringIO.StringIO() pickler = pickle.Pickler(stream) pickler.dump(aDict) stream.flush() data = stream.getvalue() stream.close() return data
[ "def", "SerializeDictionary", "(", "aDict", ")", ":", "stream", "=", "StringIO", ".", "StringIO", "(", ")", "pickler", "=", "pickle", ".", "Pickler", "(", "stream", ")", "pickler", ".", "dump", "(", "aDict", ")", "stream", ".", "flush", "(", ")", "data...
Serializes a dictionary as a string
[ "Serializes", "a", "dictionary", "as", "a", "string" ]
[ "'''Serializes a dictionary as a string'''" ]
[ { "param": "aDict", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "aDict", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
UnserializeDictionary
<not_specific>
def UnserializeDictionary(string): '''Unserializes a dictionary stored as a string''' stream = StringIO.StringIO(string) dict = pickle.load(stream) stream.close() return dict
Unserializes a dictionary stored as a string
Unserializes a dictionary stored as a string
[ "Unserializes", "a", "dictionary", "stored", "as", "a", "string" ]
def UnserializeDictionary(string): stream = StringIO.StringIO(string) dict = pickle.load(stream) stream.close() return dict
[ "def", "UnserializeDictionary", "(", "string", ")", ":", "stream", "=", "StringIO", ".", "StringIO", "(", "string", ")", "dict", "=", "pickle", ".", "load", "(", "stream", ")", "stream", ".", "close", "(", ")", "return", "dict" ]
Unserializes a dictionary stored as a string
[ "Unserializes", "a", "dictionary", "stored", "as", "a", "string" ]
[ "'''Unserializes a dictionary stored as a string'''" ]
[ { "param": "string", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "string", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
DataIDsInTable
<not_specific>
def DataIDsInTable(dataTable, connection): '''Returns all the values of the PDBID column from the given table in the database.''' cursor = connection.cursor() query = "SELECT PDBID FROM %s" % (dataTable) cursor.execute(query) data = cursor.fetchall() cursor.close() if len(data) is not 0: return [element[0]...
Returns all the values of the PDBID column from the given table in the database.
Returns all the values of the PDBID column from the given table in the database.
[ "Returns", "all", "the", "values", "of", "the", "PDBID", "column", "from", "the", "given", "table", "in", "the", "database", "." ]
def DataIDsInTable(dataTable, connection): cursor = connection.cursor() query = "SELECT PDBID FROM %s" % (dataTable) cursor.execute(query) data = cursor.fetchall() cursor.close() if len(data) is not 0: return [element[0] for element in data] else: return None
[ "def", "DataIDsInTable", "(", "dataTable", ",", "connection", ")", ":", "cursor", "=", "connection", ".", "cursor", "(", ")", "query", "=", "\"SELECT PDBID FROM %s\"", "%", "(", "dataTable", ")", "cursor", ".", "execute", "(", "query", ")", "data", "=", "c...
Returns all the values of the PDBID column from the given table in the database.
[ "Returns", "all", "the", "values", "of", "the", "PDBID", "column", "from", "the", "given", "table", "in", "the", "database", "." ]
[ "'''Returns all the values of the PDBID column from the given table in the database.'''" ]
[ { "param": "dataTable", "type": null }, { "param": "connection", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "dataTable", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "connection", "type": null, "docstring": null, "docstring...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
JobIDsInTable
<not_specific>
def JobIDsInTable(dataTable, connection): '''Returns all the values of the JobID column from the given table in the database.''' cursor = connection.cursor() query = "SELECT JobID FROM %s" % (dataTable) cursor.execute(query) data = cursor.fetchall() cursor.close() if len(data) is not 0: return [element[0] ...
Returns all the values of the JobID column from the given table in the database.
Returns all the values of the JobID column from the given table in the database.
[ "Returns", "all", "the", "values", "of", "the", "JobID", "column", "from", "the", "given", "table", "in", "the", "database", "." ]
def JobIDsInTable(dataTable, connection): cursor = connection.cursor() query = "SELECT JobID FROM %s" % (dataTable) cursor.execute(query) data = cursor.fetchall() cursor.close() if len(data) is not 0: return [element[0] for element in data] else: return None
[ "def", "JobIDsInTable", "(", "dataTable", ",", "connection", ")", ":", "cursor", "=", "connection", ".", "cursor", "(", ")", "query", "=", "\"SELECT JobID FROM %s\"", "%", "(", "dataTable", ")", "cursor", ".", "execute", "(", "query", ")", "data", "=", "cu...
Returns all the values of the JobID column from the given table in the database.
[ "Returns", "all", "the", "values", "of", "the", "JobID", "column", "from", "the", "given", "table", "in", "the", "database", "." ]
[ "'''Returns all the values of the JobID column from the given table in the database.'''" ]
[ { "param": "dataTable", "type": null }, { "param": "connection", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "dataTable", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "connection", "type": null, "docstring": null, "docstring...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
numberOfRuns
<not_specific>
def numberOfRuns(self): '''Returns the number of runs managed by the receiver''' query = """SELECT COUNT(*) FROM %s""" % self.runTable self.cursor.execute(query) data = self.cursor.fetchall() return int(data[0][0])
Returns the number of runs managed by the receiver
Returns the number of runs managed by the receiver
[ "Returns", "the", "number", "of", "runs", "managed", "by", "the", "receiver" ]
def numberOfRuns(self): query = """SELECT COUNT(*) FROM %s""" % self.runTable self.cursor.execute(query) data = self.cursor.fetchall() return int(data[0][0])
[ "def", "numberOfRuns", "(", "self", ")", ":", "query", "=", "\"\"\"SELECT COUNT(*) FROM %s\"\"\"", "%", "self", ".", "runTable", "self", ".", "cursor", ".", "execute", "(", "query", ")", "data", "=", "self", ".", "cursor", ".", "fetchall", "(", ")", "retur...
Returns the number of runs managed by the receiver
[ "Returns", "the", "number", "of", "runs", "managed", "by", "the", "receiver" ]
[ "'''Returns the number of runs managed by the receiver'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
createRun
<not_specific>
def createRun(self, name=None, calculations=[], metadata={}): '''Creates a new Run. Parameters name - A string used to identify the run If not provided defaults to Run%d where %d is the number of the run in the run table Returns: A instance of the Job class''' #Create a unique id for the job ...
Creates a new Run. Parameters name - A string used to identify the run If not provided defaults to Run%d where %d is the number of the run in the run table Returns: A instance of the Job class
Creates a new Run. Parameters name - A string used to identify the run If not provided defaults to Run%d where %d is the number of the run in the run table
[ "Creates", "a", "new", "Run", ".", "Parameters", "name", "-", "A", "string", "used", "to", "identify", "the", "run", "If", "not", "provided", "defaults", "to", "Run%d", "where", "%d", "is", "the", "number", "of", "the", "run", "in", "the", "run", "tabl...
def createRun(self, name=None, calculations=[], metadata={}): runId = UtilityFunctions.GetNewSID(self.groupId) if name is None: name = "Run%d" % (len(self.allRuns())) data = SerializeDictionary(metadata) data = MySQLdb.escape_string(data) dateString = UtilityFunctions.CreateDateString() data = (self.run...
[ "def", "createRun", "(", "self", ",", "name", "=", "None", ",", "calculations", "=", "[", "]", ",", "metadata", "=", "{", "}", ")", ":", "runId", "=", "UtilityFunctions", ".", "GetNewSID", "(", "self", ".", "groupId", ")", "if", "name", "is", "None",...
Creates a new Run.
[ "Creates", "a", "new", "Run", "." ]
[ "'''Creates a new Run.\n\t\t\n\t\tParameters \n\t\t\tname - A string used to identify the run\n\t\t\tIf not provided defaults to Run%d where %d is the number of the run in the run table\t\n\t\t\n\t\tReturns:\n\t\t\tA instance of the Job class'''", "#Create a unique id for the job", "#Serialize metadata", "#Cr...
[ { "param": "self", "type": null }, { "param": "name", "type": null }, { "param": "calculations", "type": null }, { "param": "metadata", "type": null } ]
{ "returns": [ { "docstring": "A instance of the Job class", "docstring_tokens": [ "A", "instance", "of", "the", "Job", "class" ], "type": null } ], "raises": [], "params": [ { "identifier": "self", "type": null, ...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
deleteRun
null
def deleteRun(self, run): '''Deletes a run from the database Parameters run - a instance of the Run class''' deleteQuery = """DELETE FROM %s WHERE RunId='%s'""" % (self.runTable, run.identification) self.cursor.execute(deleteQuery) self.connection.commit()
Deletes a run from the database Parameters run - a instance of the Run class
Deletes a run from the database Parameters run - a instance of the Run class
[ "Deletes", "a", "run", "from", "the", "database", "Parameters", "run", "-", "a", "instance", "of", "the", "Run", "class" ]
def deleteRun(self, run): deleteQuery = """DELETE FROM %s WHERE RunId='%s'""" % (self.runTable, run.identification) self.cursor.execute(deleteQuery) self.connection.commit()
[ "def", "deleteRun", "(", "self", ",", "run", ")", ":", "deleteQuery", "=", "\"\"\"DELETE FROM %s WHERE RunId='%s'\"\"\"", "%", "(", "self", ".", "runTable", ",", "run", ".", "identification", ")", "self", ".", "cursor", ".", "execute", "(", "deleteQuery", ")",...
Deletes a run from the database Parameters run - a instance of the Run class
[ "Deletes", "a", "run", "from", "the", "database", "Parameters", "run", "-", "a", "instance", "of", "the", "Run", "class" ]
[ "'''Deletes a run from the database\n\t\t\n\t\tParameters\n\t\t\t run - a instance of the Run class'''" ]
[ { "param": "self", "type": null }, { "param": "run", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "run", "type": null, "docstring": null, "docstring_tokens": []...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
allRunIds
<not_specific>
def allRunIds(self): '''Returns all the run ids managed by the receiver''' query = "SELECT RunID FROM %s" % (self.runTable) self.cursor.execute(query) data = self.cursor.fetchall() if len(data) is not 0: return [element[0] for element in data] else: return None
Returns all the run ids managed by the receiver
Returns all the run ids managed by the receiver
[ "Returns", "all", "the", "run", "ids", "managed", "by", "the", "receiver" ]
def allRunIds(self): query = "SELECT RunID FROM %s" % (self.runTable) self.cursor.execute(query) data = self.cursor.fetchall() if len(data) is not 0: return [element[0] for element in data] else: return None
[ "def", "allRunIds", "(", "self", ")", ":", "query", "=", "\"SELECT RunID FROM %s\"", "%", "(", "self", ".", "runTable", ")", "self", ".", "cursor", ".", "execute", "(", "query", ")", "data", "=", "self", ".", "cursor", ".", "fetchall", "(", ")", "if", ...
Returns all the run ids managed by the receiver
[ "Returns", "all", "the", "run", "ids", "managed", "by", "the", "receiver" ]
[ "'''Returns all the run ids managed by the receiver'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
jobManager
<not_specific>
def jobManager(self): '''Returns a JobManager instance that manages the Job table''' if self.manager is None: self.manager = JobManager(self.connection, self.jobTable) return self.manager
Returns a JobManager instance that manages the Job table
Returns a JobManager instance that manages the Job table
[ "Returns", "a", "JobManager", "instance", "that", "manages", "the", "Job", "table" ]
def jobManager(self): if self.manager is None: self.manager = JobManager(self.connection, self.jobTable) return self.manager
[ "def", "jobManager", "(", "self", ")", ":", "if", "self", ".", "manager", "is", "None", ":", "self", ".", "manager", "=", "JobManager", "(", "self", ".", "connection", ",", "self", ".", "jobTable", ")", "return", "self", ".", "manager" ]
Returns a JobManager instance that manages the Job table
[ "Returns", "a", "JobManager", "instance", "that", "manages", "the", "Job", "table" ]
[ "'''Returns a JobManager instance that manages the Job table'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
exists
<not_specific>
def exists(self): '''Returns True if data corresponding to the receiver exists in the database''' #Check the job entry exists in the database query = "SELECT * FROM %s WHERE RunID = '%s'" % (self.runTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() if len(rows) == 0...
Returns True if data corresponding to the receiver exists in the database
Returns True if data corresponding to the receiver exists in the database
[ "Returns", "True", "if", "data", "corresponding", "to", "the", "receiver", "exists", "in", "the", "database" ]
def exists(self): query = "SELECT * FROM %s WHERE RunID = '%s'" % (self.runTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() if len(rows) == 0: return False else: return True
[ "def", "exists", "(", "self", ")", ":", "query", "=", "\"SELECT * FROM %s WHERE RunID = '%s'\"", "%", "(", "self", ".", "runTable", ",", "self", ".", "identification", ")", "self", ".", "cursor", ".", "execute", "(", "query", ")", "rows", "=", "self", ".",...
Returns True if data corresponding to the receiver exists in the database
[ "Returns", "True", "if", "data", "corresponding", "to", "the", "receiver", "exists", "in", "the", "database" ]
[ "'''Returns True if data corresponding to the receiver exists in the database'''", "#Check the job entry exists in the database" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
allJobIds
<not_specific>
def allJobIds(self): '''Returns the identifications of all the jobs in this run''' #Check the job entry exists in the database query = "SELECT JobID FROM %s WHERE RunID = '%s'" % (self.jobAssocTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() if len(rows) != 0: ...
Returns the identifications of all the jobs in this run
Returns the identifications of all the jobs in this run
[ "Returns", "the", "identifications", "of", "all", "the", "jobs", "in", "this", "run" ]
def allJobIds(self): query = "SELECT JobID FROM %s WHERE RunID = '%s'" % (self.jobAssocTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() if len(rows) != 0: return [row[0] for row in rows] else: return []
[ "def", "allJobIds", "(", "self", ")", ":", "query", "=", "\"SELECT JobID FROM %s WHERE RunID = '%s'\"", "%", "(", "self", ".", "jobAssocTable", ",", "self", ".", "identification", ")", "self", ".", "cursor", ".", "execute", "(", "query", ")", "rows", "=", "s...
Returns the identifications of all the jobs in this run
[ "Returns", "the", "identifications", "of", "all", "the", "jobs", "in", "this", "run" ]
[ "'''Returns the identifications of all the jobs in this run'''", "#Check the job entry exists in the database" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
allJobs
<not_specific>
def allJobs(self): '''Returns Job instances representing all the jobs in this run''' #Check the job entry exists in the database query = "SELECT * FROM %s WHERE RunID = '%s'" % (self.jobAssocTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() ids = self.allJobIds() ...
Returns Job instances representing all the jobs in this run
Returns Job instances representing all the jobs in this run
[ "Returns", "Job", "instances", "representing", "all", "the", "jobs", "in", "this", "run" ]
def allJobs(self): query = "SELECT * FROM %s WHERE RunID = '%s'" % (self.jobAssocTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() ids = self.allJobIds() jobs = [] for id in ids: job = Job(id, self.connection, self.jobTable, self.jobDataTable) jobs.append(job) retu...
[ "def", "allJobs", "(", "self", ")", ":", "query", "=", "\"SELECT * FROM %s WHERE RunID = '%s'\"", "%", "(", "self", ".", "jobAssocTable", ",", "self", ".", "identification", ")", "self", ".", "cursor", ".", "execute", "(", "query", ")", "rows", "=", "self", ...
Returns Job instances representing all the jobs in this run
[ "Returns", "Job", "instances", "representing", "all", "the", "jobs", "in", "this", "run" ]
[ "'''Returns Job instances representing all the jobs in this run'''", "#Check the job entry exists in the database" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
addJob
null
def addJob(self, job): '''Adds a job to the set of jobs in this run Parameters: job - A Job instance''' values = (self.jobAssocTable, self.identification, job.identification) statement = """INSERT IGNORE INTO %s (RunID, JobID) VALUES ('%s', '%s')""" % values self.cursor.execute(statement) self.con...
Adds a job to the set of jobs in this run Parameters: job - A Job instance
Adds a job to the set of jobs in this run Parameters: job - A Job instance
[ "Adds", "a", "job", "to", "the", "set", "of", "jobs", "in", "this", "run", "Parameters", ":", "job", "-", "A", "Job", "instance" ]
def addJob(self, job): values = (self.jobAssocTable, self.identification, job.identification) statement = """INSERT IGNORE INTO %s (RunID, JobID) VALUES ('%s', '%s')""" % values self.cursor.execute(statement) self.connection.commit()
[ "def", "addJob", "(", "self", ",", "job", ")", ":", "values", "=", "(", "self", ".", "jobAssocTable", ",", "self", ".", "identification", ",", "job", ".", "identification", ")", "statement", "=", "\"\"\"INSERT IGNORE INTO %s (RunID, JobID) VALUES ('%s', '%s')\"\"\""...
Adds a job to the set of jobs in this run Parameters: job - A Job instance
[ "Adds", "a", "job", "to", "the", "set", "of", "jobs", "in", "this", "run", "Parameters", ":", "job", "-", "A", "Job", "instance" ]
[ "'''Adds a job to the set of jobs in this run\n\t\t\n\t\tParameters:\n\t\t\tjob - A Job instance'''" ]
[ { "param": "self", "type": null }, { "param": "job", "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": []...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
removeJob
null
def removeJob(self, job): '''Removes a job from the set of jobs in the run Parameters: job - A job instance''' deleteQuery = """DELETE FROM %s WHERE RunId='%s'""" % (self.jobAssocTable, self.identification) self.cursor.execute(deleteQuery) self.connection.commit()
Removes a job from the set of jobs in the run Parameters: job - A job instance
Removes a job from the set of jobs in the run Parameters: job - A job instance
[ "Removes", "a", "job", "from", "the", "set", "of", "jobs", "in", "the", "run", "Parameters", ":", "job", "-", "A", "job", "instance" ]
def removeJob(self, job): deleteQuery = """DELETE FROM %s WHERE RunId='%s'""" % (self.jobAssocTable, self.identification) self.cursor.execute(deleteQuery) self.connection.commit()
[ "def", "removeJob", "(", "self", ",", "job", ")", ":", "deleteQuery", "=", "\"\"\"DELETE FROM %s WHERE RunId='%s'\"\"\"", "%", "(", "self", ".", "jobAssocTable", ",", "self", ".", "identification", ")", "self", ".", "cursor", ".", "execute", "(", "deleteQuery", ...
Removes a job from the set of jobs in the run Parameters: job - A job instance
[ "Removes", "a", "job", "from", "the", "set", "of", "jobs", "in", "the", "run", "Parameters", ":", "job", "-", "A", "job", "instance" ]
[ "'''Removes a job from the set of jobs in the run\n\t\t\n\t\tParameters: \n\t\t\tjob - A job instance'''" ]
[ { "param": "self", "type": null }, { "param": "job", "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": []...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
numberOfJobs
<not_specific>
def numberOfJobs(self): '''Returns the number of jobs in this run''' #Check the job entry exists in the database query = "SELECT COUNT(*) FROM %s WHERE RunID = '%s'" % (self.jobAssocTable, self.identification) self.cursor.execute(query) data = self.cursor.fetchall() return int(data[0][0])
Returns the number of jobs in this run
Returns the number of jobs in this run
[ "Returns", "the", "number", "of", "jobs", "in", "this", "run" ]
def numberOfJobs(self): query = "SELECT COUNT(*) FROM %s WHERE RunID = '%s'" % (self.jobAssocTable, self.identification) self.cursor.execute(query) data = self.cursor.fetchall() return int(data[0][0])
[ "def", "numberOfJobs", "(", "self", ")", ":", "query", "=", "\"SELECT COUNT(*) FROM %s WHERE RunID = '%s'\"", "%", "(", "self", ".", "jobAssocTable", ",", "self", ".", "identification", ")", "self", ".", "cursor", ".", "execute", "(", "query", ")", "data", "="...
Returns the number of jobs in this run
[ "Returns", "the", "number", "of", "jobs", "in", "this", "run" ]
[ "'''Returns the number of jobs in this run'''", "#Check the job entry exists in the database" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
name
<not_specific>
def name(self): '''Returns the name of the receiver''' query = "SELECT Name FROM %s WHERE RunID = '%s'" % (self.runTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() return rows[0][0]
Returns the name of the receiver
Returns the name of the receiver
[ "Returns", "the", "name", "of", "the", "receiver" ]
def name(self): query = "SELECT Name FROM %s WHERE RunID = '%s'" % (self.runTable, self.identification) self.cursor.execute(query) rows = self.cursor.fetchall() return rows[0][0]
[ "def", "name", "(", "self", ")", ":", "query", "=", "\"SELECT Name FROM %s WHERE RunID = '%s'\"", "%", "(", "self", ".", "runTable", ",", "self", ".", "identification", ")", "self", ".", "cursor", ".", "execute", "(", "query", ")", "rows", "=", "self", "."...
Returns the name of the receiver
[ "Returns", "the", "name", "of", "the", "receiver" ]
[ "'''Returns the name of the receiver'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
createJob
<not_specific>
def createJob(self, pdbId, calculations=[], dataTable='Data', metadata={}, optionArgs={}, fileArgs={}): '''Creates a new job entry in the database. Parameters Calculations is a list containing one or more of 'scan', 'stability' or 'binding'. dataTable - The table the job will store its data sets to R...
Creates a new job entry in the database. Parameters Calculations is a list containing one or more of 'scan', 'stability' or 'binding'. dataTable - The table the job will store its data sets to Returns: A instance of the Job class
Creates a new job entry in the database.
[ "Creates", "a", "new", "job", "entry", "in", "the", "database", "." ]
def createJob(self, pdbId, calculations=[], dataTable='Data', metadata={}, optionArgs={}, fileArgs={}): if len(calculations) is 0: raise Core.Exceptions.ArgumentError, 'At least one calculation must be specified' else: aDict = {'scan':'NotSelected', 'stability':'NotSelected', 'binding':'NotSelected'} for c...
[ "def", "createJob", "(", "self", ",", "pdbId", ",", "calculations", "=", "[", "]", ",", "dataTable", "=", "'Data'", ",", "metadata", "=", "{", "}", ",", "optionArgs", "=", "{", "}", ",", "fileArgs", "=", "{", "}", ")", ":", "if", "len", "(", "cal...
Creates a new job entry in the database.
[ "Creates", "a", "new", "job", "entry", "in", "the", "database", "." ]
[ "'''Creates a new job entry in the database.\n\t\t\n\t\tParameters\n\t\t\tCalculations is a list containing one or more of 'scan', 'stability' or 'binding'.\n\t\t\tdataTable - The table the job will store its data sets to\n\t\t\n\t\tReturns:\n\t\t\tA instance of the Job class'''", "#Temporary hack", "#Create a ...
[ { "param": "self", "type": null }, { "param": "pdbId", "type": null }, { "param": "calculations", "type": null }, { "param": "dataTable", "type": null }, { "param": "metadata", "type": null }, { "param": "optionArgs", "type": null }, { "par...
{ "returns": [ { "docstring": "A instance of the Job class", "docstring_tokens": [ "A", "instance", "of", "the", "Job", "class" ], "type": null } ], "raises": [], "params": [ { "identifier": "self", "type": null, ...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
deleteJob
null
def deleteJob(self, job): '''Deletes a job from the database Parameters job - a instance of the Job class''' #Check job is not running if job.state() != 'Running' and job.state() != 'Launched': deleteQuery = """DELETE FROM %s WHERE JobId='%s'""" % (job.jobTable, job.identification) self.cursor....
Deletes a job from the database Parameters job - a instance of the Job class
Deletes a job from the database Parameters job - a instance of the Job class
[ "Deletes", "a", "job", "from", "the", "database", "Parameters", "job", "-", "a", "instance", "of", "the", "Job", "class" ]
def deleteJob(self, job): if job.state() != 'Running' and job.state() != 'Launched': deleteQuery = """DELETE FROM %s WHERE JobId='%s'""" % (job.jobTable, job.identification) self.cursor.execute(deleteQuery) self.connection.commit() else: raise Core.Exceptions.ArgumentError, 'Cannot delete job - is runni...
[ "def", "deleteJob", "(", "self", ",", "job", ")", ":", "if", "job", ".", "state", "(", ")", "!=", "'Running'", "and", "job", ".", "state", "(", ")", "!=", "'Launched'", ":", "deleteQuery", "=", "\"\"\"DELETE FROM %s WHERE JobId='%s'\"\"\"", "%", "(", "job"...
Deletes a job from the database Parameters job - a instance of the Job class
[ "Deletes", "a", "job", "from", "the", "database", "Parameters", "job", "-", "a", "instance", "of", "the", "Job", "class" ]
[ "'''Deletes a job from the database\n\t\t\n\t\tParameters\n\t\t\tjob - a instance of the Job class'''", "#Check job is not running" ]
[ { "param": "self", "type": null }, { "param": "job", "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": []...
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
allJobs
<not_specific>
def allJobs(self): '''Returns all the job ids stored in the database''' return JobIDsInTable(self.jobTable, self.connection)
Returns all the job ids stored in the database
Returns all the job ids stored in the database
[ "Returns", "all", "the", "job", "ids", "stored", "in", "the", "database" ]
def allJobs(self): return JobIDsInTable(self.jobTable, self.connection)
[ "def", "allJobs", "(", "self", ")", ":", "return", "JobIDsInTable", "(", "self", ".", "jobTable", ",", "self", ".", "connection", ")" ]
Returns all the job ids stored in the database
[ "Returns", "all", "the", "job", "ids", "stored", "in", "the", "database" ]
[ "'''Returns all the job ids stored in the database'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
jobStates
<not_specific>
def jobStates(self): '''Returns a dict describing the state of each job The dicts keys are job ids. Each values is a dict containing the the jobs state and date''' self.connection.commit() selectQuery = """SELECT JobID, State, Date FROM %s""" % (self.jobTable) self.cursor.execute(selectQuery) rows...
Returns a dict describing the state of each job The dicts keys are job ids. Each values is a dict containing the the jobs state and date
Returns a dict describing the state of each job The dicts keys are job ids. Each values is a dict containing the the jobs state and date
[ "Returns", "a", "dict", "describing", "the", "state", "of", "each", "job", "The", "dicts", "keys", "are", "job", "ids", ".", "Each", "values", "is", "a", "dict", "containing", "the", "the", "jobs", "state", "and", "date" ]
def jobStates(self): self.connection.commit() selectQuery = """SELECT JobID, State, Date FROM %s""" % (self.jobTable) self.cursor.execute(selectQuery) rows = self.cursor.fetchall() stateDict = {} for row in rows: stateDict[row[0]] = {'State':row[1], 'Date':row[2]} return stateDict
[ "def", "jobStates", "(", "self", ")", ":", "self", ".", "connection", ".", "commit", "(", ")", "selectQuery", "=", "\"\"\"SELECT JobID, State, Date FROM %s\"\"\"", "%", "(", "self", ".", "jobTable", ")", "self", ".", "cursor", ".", "execute", "(", "selectQuery...
Returns a dict describing the state of each job The dicts keys are job ids.
[ "Returns", "a", "dict", "describing", "the", "state", "of", "each", "job", "The", "dicts", "keys", "are", "job", "ids", "." ]
[ "'''Returns a dict describing the state of each job\n\t\t\n\t\tThe dicts keys are job ids. Each values is a dict containing the the jobs state and date'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a682f745e7de9014ce60e5c61be17239d1ea073c
shambo001/peat
PEATSA/WebApp/Data.py
[ "MIT" ]
Python
jobsWithCalculationsInState
<not_specific>
def jobsWithCalculationsInState(self, state): '''Returns any job which has a calculation in \e state See Job.calculationState() for more info''' self.connection.commit() selectQuery = """SELECT JobID, Stability, Scan, Binding FROM %s""" % (self.jobTable) self.cursor.execute(selectQuery) rows = self...
Returns any job which has a calculation in \e state See Job.calculationState() for more info
Returns any job which has a calculation in \e state See Job.calculationState() for more info
[ "Returns", "any", "job", "which", "has", "a", "calculation", "in", "\\", "e", "state", "See", "Job", ".", "calculationState", "()", "for", "more", "info" ]
def jobsWithCalculationsInState(self, state): self.connection.commit() selectQuery = """SELECT JobID, Stability, Scan, Binding FROM %s""" % (self.jobTable) self.cursor.execute(selectQuery) rows = self.cursor.fetchall() print rows ids = [] for row in rows: if state in row: ids.append(row[0]) ret...
[ "def", "jobsWithCalculationsInState", "(", "self", ",", "state", ")", ":", "self", ".", "connection", ".", "commit", "(", ")", "selectQuery", "=", "\"\"\"SELECT JobID, Stability, Scan, Binding FROM %s\"\"\"", "%", "(", "self", ".", "jobTable", ")", "self", ".", "c...
Returns any job which has a calculation in \e state See Job.calculationState() for more info
[ "Returns", "any", "job", "which", "has", "a", "calculation", "in", "\\", "e", "state", "See", "Job", ".", "calculationState", "()", "for", "more", "info" ]
[ "'''Returns any job which has a calculation in \\e state\n\t\t\n\t\tSee Job.calculationState() for more info'''" ]
[ { "param": "self", "type": null }, { "param": "state", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "state", "type": null, "docstring": null, "docstring_tokens": ...