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
43ef7777bcc0b06cae4bb221196eb1c364b3bb4d
shambo001/peat
PEATSA/Core/Utilities.py
[ "MIT" ]
Python
outputName
<not_specific>
def outputName(self): '''Returns the values of the output name command line argument if it exists''' if self.opt.has_key('-n'): return self.opt['-n'] return None
Returns the values of the output name command line argument if it exists
Returns the values of the output name command line argument if it exists
[ "Returns", "the", "values", "of", "the", "output", "name", "command", "line", "argument", "if", "it", "exists" ]
def outputName(self): if self.opt.has_key('-n'): return self.opt['-n'] return None
[ "def", "outputName", "(", "self", ")", ":", "if", "self", ".", "opt", ".", "has_key", "(", "'-n'", ")", ":", "return", "self", ".", "opt", "[", "'-n'", "]", "return", "None" ]
Returns the values of the output name command line argument if it exists
[ "Returns", "the", "values", "of", "the", "output", "name", "command", "line", "argument", "if", "it", "exists" ]
[ "'''Returns the values of the output name command line argument if it exists'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
43ef7777bcc0b06cae4bb221196eb1c364b3bb4d
shambo001/peat
PEATSA/Core/Utilities.py
[ "MIT" ]
Python
ionisableGroups
<not_specific>
def ionisableGroups(self): '''Returns the ionisable groups specified on the command line''' if self.opt.has_key('--ionisableGroups'): return self.opt['--ionisableGroups'].split(',') return None
Returns the ionisable groups specified on the command line
Returns the ionisable groups specified on the command line
[ "Returns", "the", "ionisable", "groups", "specified", "on", "the", "command", "line" ]
def ionisableGroups(self): if self.opt.has_key('--ionisableGroups'): return self.opt['--ionisableGroups'].split(',') return None
[ "def", "ionisableGroups", "(", "self", ")", ":", "if", "self", ".", "opt", ".", "has_key", "(", "'--ionisableGroups'", ")", ":", "return", "self", ".", "opt", "[", "'--ionisableGroups'", "]", ".", "split", "(", "','", ")", "return", "None" ]
Returns the ionisable groups specified on the command line
[ "Returns", "the", "ionisable", "groups", "specified", "on", "the", "command", "line" ]
[ "'''Returns the ionisable groups specified on the command line'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
43ef7777bcc0b06cae4bb221196eb1c364b3bb4d
shambo001/peat
PEATSA/Core/Utilities.py
[ "MIT" ]
Python
mutationQuality
<not_specific>
def mutationQuality(self): '''Defines the threshold modelled mutations must be below to be used. Returns None if this was not specified Note: This is the limit on each subsitution''' if self.opt.has_key('--mutationQuality'): return float(self.opt['--mutationQuality']) return None
Defines the threshold modelled mutations must be below to be used. Returns None if this was not specified Note: This is the limit on each subsitution
Defines the threshold modelled mutations must be below to be used. Returns None if this was not specified This is the limit on each subsitution
[ "Defines", "the", "threshold", "modelled", "mutations", "must", "be", "below", "to", "be", "used", ".", "Returns", "None", "if", "this", "was", "not", "specified", "This", "is", "the", "limit", "on", "each", "subsitution" ]
def mutationQuality(self): if self.opt.has_key('--mutationQuality'): return float(self.opt['--mutationQuality']) return None
[ "def", "mutationQuality", "(", "self", ")", ":", "if", "self", ".", "opt", ".", "has_key", "(", "'--mutationQuality'", ")", ":", "return", "float", "(", "self", ".", "opt", "[", "'--mutationQuality'", "]", ")", "return", "None" ]
Defines the threshold modelled mutations must be below to be used.
[ "Defines", "the", "threshold", "modelled", "mutations", "must", "be", "below", "to", "be", "used", "." ]
[ "'''Defines the threshold modelled mutations must be below to be used.\n\t\t\n\t\tReturns None if this was not specified\n\t\t\n\t\tNote: This is the limit on each subsitution'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
b398f904c9f93404fdb35fe81cadcbd9021f1272
shambo001/peat
PEATDB/IO.py
[ "MIT" ]
Python
doImport
<not_specific>
def doImport(self, event=None): """This does the import using the current dialog options and shows a preview. Only works within GUI context.""" lines = self.lines data = [] #set up start row try: self.startnum = int(self.linenum.get()) exce...
This does the import using the current dialog options and shows a preview. Only works within GUI context.
This does the import using the current dialog options and shows a preview. Only works within GUI context.
[ "This", "does", "the", "import", "using", "the", "current", "dialog", "options", "and", "shows", "a", "preview", ".", "Only", "works", "within", "GUI", "context", "." ]
def doImport(self, event=None): lines = self.lines data = [] try: self.startnum = int(self.linenum.get()) except: self.startnum = 0 if self.startnum < 0 or self.startnum > len(lines): return -1 self.colnames = [] s = self.separa...
[ "def", "doImport", "(", "self", ",", "event", "=", "None", ")", ":", "lines", "=", "self", ".", "lines", "data", "=", "[", "]", "try", ":", "self", ".", "startnum", "=", "int", "(", "self", ".", "linenum", ".", "get", "(", ")", ")", "except", "...
This does the import using the current dialog options and shows a preview.
[ "This", "does", "the", "import", "using", "the", "current", "dialog", "options", "and", "shows", "a", "preview", "." ]
[ "\"\"\"This does the import using the current dialog options\n and shows a preview. Only works within GUI context.\"\"\"", "#set up start row ", "#set up cols", "#splits by any non-single whitespace", "#data in rows", "#use first row as x-column", "#x and y cols are in every row, so use...
[ { "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": ...
9a01158b1e97dd149f622c08b046f0ad8986edfd
shambo001/peat
PEATDB/DNA_sequence.py
[ "MIT" ]
Python
writepir
<not_specific>
def writepir(self,sequence,filename,name='Sequence'): """Save the sequence as a PIR file""" import os topdir=os.getcwd() fd=open(os.path.join(topdir,filename),'w') fd.write('>%s;\n\n' %name) buffer='' for char in sequence: buffer=buffer+char ...
Save the sequence as a PIR file
Save the sequence as a PIR file
[ "Save", "the", "sequence", "as", "a", "PIR", "file" ]
def writepir(self,sequence,filename,name='Sequence'): import os topdir=os.getcwd() fd=open(os.path.join(topdir,filename),'w') fd.write('>%s;\n\n' %name) buffer='' for char in sequence: buffer=buffer+char if len(buffer)==80: fd.write...
[ "def", "writepir", "(", "self", ",", "sequence", ",", "filename", ",", "name", "=", "'Sequence'", ")", ":", "import", "os", "topdir", "=", "os", ".", "getcwd", "(", ")", "fd", "=", "open", "(", "os", ".", "path", ".", "join", "(", "topdir", ",", ...
Save the sequence as a PIR file
[ "Save", "the", "sequence", "as", "a", "PIR", "file" ]
[ "\"\"\"Save the sequence as a PIR file\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "sequence", "type": null }, { "param": "filename", "type": null }, { "param": "name", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sequence", "type": null, "docstring": null, "docstring_tokens...
9a01158b1e97dd149f622c08b046f0ad8986edfd
shambo001/peat
PEATDB/DNA_sequence.py
[ "MIT" ]
Python
read_fastamult
<not_specific>
def read_fastamult(self,filename): """Read a fasta database file, i.e. multiple (or a single) sequences""" fd=open(filename) lines=fd.readlines() fd.close() sequences=[] count=0 buffer='' ID=None while 1: if count==len(lines): ...
Read a fasta database file, i.e. multiple (or a single) sequences
Read a fasta database file, i.e. multiple (or a single) sequences
[ "Read", "a", "fasta", "database", "file", "i", ".", "e", ".", "multiple", "(", "or", "a", "single", ")", "sequences" ]
def read_fastamult(self,filename): fd=open(filename) lines=fd.readlines() fd.close() sequences=[] count=0 buffer='' ID=None while 1: if count==len(lines): if buffer!='': sequences.append([ID,buffer.replace(' ...
[ "def", "read_fastamult", "(", "self", ",", "filename", ")", ":", "fd", "=", "open", "(", "filename", ")", "lines", "=", "fd", ".", "readlines", "(", ")", "fd", ".", "close", "(", ")", "sequences", "=", "[", "]", "count", "=", "0", "buffer", "=", ...
Read a fasta database file, i.e.
[ "Read", "a", "fasta", "database", "file", "i", ".", "e", "." ]
[ "\"\"\"Read a fasta database file, i.e. multiple (or a single) sequences\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
9a01158b1e97dd149f622c08b046f0ad8986edfd
shambo001/peat
PEATDB/DNA_sequence.py
[ "MIT" ]
Python
PirSeq
<not_specific>
def PirSeq(self,seq=None): """ # This function returns a string holding the sequence of the PDB file # (aa one-letter code) """ import string pir='' if not seq: seq=self.sequence for residue,type in seq: if self.three_to_one.has_key...
# This function returns a string holding the sequence of the PDB file # (aa one-letter code)
This function returns a string holding the sequence of the PDB file (aa one-letter code)
[ "This", "function", "returns", "a", "string", "holding", "the", "sequence", "of", "the", "PDB", "file", "(", "aa", "one", "-", "letter", "code", ")" ]
def PirSeq(self,seq=None): import string pir='' if not seq: seq=self.sequence for residue,type in seq: if self.three_to_one.has_key(string.upper(type)): pir=pir+string.upper(self.three_to_one[string.upper(type)]) return pir
[ "def", "PirSeq", "(", "self", ",", "seq", "=", "None", ")", ":", "import", "string", "pir", "=", "''", "if", "not", "seq", ":", "seq", "=", "self", ".", "sequence", "for", "residue", ",", "type", "in", "seq", ":", "if", "self", ".", "three_to_one",...
This function returns a string holding the sequence of the PDB file (aa one-letter code)
[ "This", "function", "returns", "a", "string", "holding", "the", "sequence", "of", "the", "PDB", "file", "(", "aa", "one", "-", "letter", "code", ")" ]
[ "\"\"\"\n # This function returns a string holding the sequence of the PDB file\n # (aa one-letter code)\n \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "seq", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "seq", "type": null, "docstring": null, "docstring_tokens": []...
9a01158b1e97dd149f622c08b046f0ad8986edfd
shambo001/peat
PEATDB/DNA_sequence.py
[ "MIT" ]
Python
Seq2Pir
<not_specific>
def Seq2Pir(self,seq=None,name='Dummy_protein',description=' '): """ # Translates self.seq or seq into pir format. # The pir file is returned as a list of strings """ import string pir=[] pir.append('>P1;'+name+'\n') pir.append(description+'\n') if...
# Translates self.seq or seq into pir format. # The pir file is returned as a list of strings
Translates self.seq or seq into pir format. The pir file is returned as a list of strings
[ "Translates", "self", ".", "seq", "or", "seq", "into", "pir", "format", ".", "The", "pir", "file", "is", "returned", "as", "a", "list", "of", "strings" ]
def Seq2Pir(self,seq=None,name='Dummy_protein',description=' '): import string pir=[] pir.append('>P1;'+name+'\n') pir.append(description+'\n') if not seq: seq='' for x in self.sequence: if self.three_to_one.has_key(x[1]): ...
[ "def", "Seq2Pir", "(", "self", ",", "seq", "=", "None", ",", "name", "=", "'Dummy_protein'", ",", "description", "=", "' '", ")", ":", "import", "string", "pir", "=", "[", "]", "pir", ".", "append", "(", "'>P1;'", "+", "name", "+", "'\\n'", ")", "p...
Translates self.seq or seq into pir format.
[ "Translates", "self", ".", "seq", "or", "seq", "into", "pir", "format", "." ]
[ "\"\"\"\n # Translates self.seq or seq into pir format.\n # The pir file is returned as a list of strings\n \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "seq", "type": null }, { "param": "name", "type": null }, { "param": "description", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "seq", "type": null, "docstring": null, "docstring_tokens": []...
9a01158b1e97dd149f622c08b046f0ad8986edfd
shambo001/peat
PEATDB/DNA_sequence.py
[ "MIT" ]
Python
align_withseq
<not_specific>
def align_withseq(self,sequence): """Extract the sequence of the current molecule and align it with the sequence given. Return an array giving the relation between the sequence position and the PDB residue ID""" pdbpir=self.clean_seq(self.PirSeq(),remove_gaps=True) sequence=self.clean_se...
Extract the sequence of the current molecule and align it with the sequence given. Return an array giving the relation between the sequence position and the PDB residue ID
Extract the sequence of the current molecule and align it with the sequence given. Return an array giving the relation between the sequence position and the PDB residue ID
[ "Extract", "the", "sequence", "of", "the", "current", "molecule", "and", "align", "it", "with", "the", "sequence", "given", ".", "Return", "an", "array", "giving", "the", "relation", "between", "the", "sequence", "position", "and", "the", "PDB", "residue", "...
def align_withseq(self,sequence): pdbpir=self.clean_seq(self.PirSeq(),remove_gaps=True) sequence=self.clean_seq(sequence,remove_gaps=True) import sequence_alignment NW=sequence_alignment.NW(pdbpir,sequence) al1,al2,map1,map2=NW.Align(verbose=True) map=[] residues=...
[ "def", "align_withseq", "(", "self", ",", "sequence", ")", ":", "pdbpir", "=", "self", ".", "clean_seq", "(", "self", ".", "PirSeq", "(", ")", ",", "remove_gaps", "=", "True", ")", "sequence", "=", "self", ".", "clean_seq", "(", "sequence", ",", "remov...
Extract the sequence of the current molecule and align it with the sequence given.
[ "Extract", "the", "sequence", "of", "the", "current", "molecule", "and", "align", "it", "with", "the", "sequence", "given", "." ]
[ "\"\"\"Extract the sequence of the current molecule and align it with the sequence given.\n Return an array giving the relation between the sequence position and the PDB residue ID\"\"\"", "#", "#", "# Check that we have 100% sequence identify for the aligned residues", "#" ]
[ { "param": "self", "type": null }, { "param": "sequence", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sequence", "type": null, "docstring": null, "docstring_tokens...
aa24787da69c073f7be431787402b0faf54f504d
shambo001/peat
PEATSA/Core/PEATSAParallel.py
[ "MIT" ]
Python
PBSScriptFromConfiguration
<not_specific>
def PBSScriptFromConfiguration(configuration, arguments, runDirectory=None, logDirectory=None): '''Creates a launch script using the information specified by the configuration object The configuration object specifies the following parameters numberOfNodes processorsPerNode runDir logDir executable ...
Creates a launch script using the information specified by the configuration object The configuration object specifies the following parameters numberOfNodes processorsPerNode runDir logDir executable queue keep However runDir and logDir can be overridden The arguments to the executable mus...
Creates a launch script using the information specified by the configuration object The configuration object specifies the following parameters numberOfNodes processorsPerNode runDir logDir executable queue keep However runDir and logDir can be overridden The arguments to the executable must be passed to this functi...
[ "Creates", "a", "launch", "script", "using", "the", "information", "specified", "by", "the", "configuration", "object", "The", "configuration", "object", "specifies", "the", "following", "parameters", "numberOfNodes", "processorsPerNode", "runDir", "logDir", "executable...
def PBSScriptFromConfiguration(configuration, arguments, runDirectory=None, logDirectory=None): numberOfNodes = configuration.get('PARALLEL', 'numberOfNodes') processorsPerNode = configuration.get('PARALLEL', 'processorsPerNode') executable = configuration.get('PARALLEL', 'executable') if runDirectory is None: ru...
[ "def", "PBSScriptFromConfiguration", "(", "configuration", ",", "arguments", ",", "runDirectory", "=", "None", ",", "logDirectory", "=", "None", ")", ":", "numberOfNodes", "=", "configuration", ".", "get", "(", "'PARALLEL'", ",", "'numberOfNodes'", ")", "processor...
Creates a launch script using the information specified by the configuration object The configuration object specifies the following parameters
[ "Creates", "a", "launch", "script", "using", "the", "information", "specified", "by", "the", "configuration", "object", "The", "configuration", "object", "specifies", "the", "following", "parameters" ]
[ "'''Creates a launch script using the information specified by the configuration object\n\t\n\tThe configuration object specifies the following parameters\n\t\t\n\t\tnumberOfNodes\n\t\tprocessorsPerNode\n\t\trunDir\n\t\tlogDir\n\t\texecutable\n\t\tqueue\n\t\tkeep\n\t\t\n\tHowever runDir and logDir can be overridden...
[ { "param": "configuration", "type": null }, { "param": "arguments", "type": null }, { "param": "runDirectory", "type": null }, { "param": "logDirectory", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "configuration", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "arguments", "type": null, "docstring": null, "docstr...
aa24787da69c073f7be431787402b0faf54f504d
shambo001/peat
PEATSA/Core/PEATSAParallel.py
[ "MIT" ]
Python
CreatePBSLaunchScript
<not_specific>
def CreatePBSLaunchScript(executable, arguments, numberOfNodes=4, processorsPerNode=2, queue="short", runDirectory=os.getcwd(), logDirectory=os.getcwd(), keep=True): '''Creates a PBS script for a parallel job submission''' argString = " ".join(arguments) runString = "%s %s" % (executable, argString) pbsString...
Creates a PBS script for a parallel job submission
Creates a PBS script for a parallel job submission
[ "Creates", "a", "PBS", "script", "for", "a", "parallel", "job", "submission" ]
def CreatePBSLaunchScript(executable, arguments, numberOfNodes=4, processorsPerNode=2, queue="short", runDirectory=os.getcwd(), logDirectory=os.getcwd(), keep=True): argString = " ".join(arguments) runString = "%s %s" % (executable, argString) pbsString = "## Autogenerated script for submitting PEAT_SA to the PBS qu...
[ "def", "CreatePBSLaunchScript", "(", "executable", ",", "arguments", ",", "numberOfNodes", "=", "4", ",", "processorsPerNode", "=", "2", ",", "queue", "=", "\"short\"", ",", "runDirectory", "=", "os", ".", "getcwd", "(", ")", ",", "logDirectory", "=", "os", ...
Creates a PBS script for a parallel job submission
[ "Creates", "a", "PBS", "script", "for", "a", "parallel", "job", "submission" ]
[ "'''Creates a PBS script for a parallel job submission'''" ]
[ { "param": "executable", "type": null }, { "param": "arguments", "type": null }, { "param": "numberOfNodes", "type": null }, { "param": "processorsPerNode", "type": null }, { "param": "queue", "type": null }, { "param": "runDirectory", "type": null...
{ "returns": [], "raises": [], "params": [ { "identifier": "executable", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "arguments", "type": null, "docstring": null, "docstring...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
createConfig
<not_specific>
def createConfig(self, conffile='functions.conf', **kwargs): """Create a separate config file to store""" c = ConfigParser.ConfigParser() defaults = {'smooth': [('window', 'hanning'),('windowlen', 11)], 'gaussiansmooth':[('degree',6)], 'baselineco...
Create a separate config file to store
Create a separate config file to store
[ "Create", "a", "separate", "config", "file", "to", "store" ]
def createConfig(self, conffile='functions.conf', **kwargs): c = ConfigParser.ConfigParser() defaults = {'smooth': [('window', 'hanning'),('windowlen', 11)], 'gaussiansmooth':[('degree',6)], 'baselinecorrection':[('segmentsize',0.3)], '...
[ "def", "createConfig", "(", "self", ",", "conffile", "=", "'functions.conf'", ",", "**", "kwargs", ")", ":", "c", "=", "ConfigParser", ".", "ConfigParser", "(", ")", "defaults", "=", "{", "'smooth'", ":", "[", "(", "'window'", ",", "'hanning'", ")", ",",...
Create a separate config file to store
[ "Create", "a", "separate", "config", "file", "to", "store" ]
[ "\"\"\"Create a separate config file to store\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "conffile", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "conffile", "type": null, "docstring": null, "docstring_tokens...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
doFunctions
<not_specific>
def doFunctions(self, names, data): """Apply one or more functions to the data, need to account for nesting of data here names: names of functions, should be in class.predefined data: dictionary with paired x,y tuples """ newdata = copy.deepcopy(data) for name i...
Apply one or more functions to the data, need to account for nesting of data here names: names of functions, should be in class.predefined data: dictionary with paired x,y tuples
Apply one or more functions to the data, need to account for nesting of data here names: names of functions, should be in class.predefined data: dictionary with paired x,y tuples
[ "Apply", "one", "or", "more", "functions", "to", "the", "data", "need", "to", "account", "for", "nesting", "of", "data", "here", "names", ":", "names", "of", "functions", "should", "be", "in", "class", ".", "predefined", "data", ":", "dictionary", "with", ...
def doFunctions(self, names, data): newdata = copy.deepcopy(data) for name in names: func = getattr(self, name) args = self.getArgs(name) for d in data: x,y = newdata[d] newdata[d] = func(x,y, **args) ...
[ "def", "doFunctions", "(", "self", ",", "names", ",", "data", ")", ":", "newdata", "=", "copy", ".", "deepcopy", "(", "data", ")", "for", "name", "in", "names", ":", "func", "=", "getattr", "(", "self", ",", "name", ")", "args", "=", "self", ".", ...
Apply one or more functions to the data, need to account for nesting of data here names: names of functions, should be in class.predefined data: dictionary with paired x,y tuples
[ "Apply", "one", "or", "more", "functions", "to", "the", "data", "need", "to", "account", "for", "nesting", "of", "data", "here", "names", ":", "names", "of", "functions", "should", "be", "in", "class", ".", "predefined", "data", ":", "dictionary", "with", ...
[ "\"\"\"Apply one or more functions to the data, need to account\n for nesting of data here\n names: names of functions, should be in class.predefined\n data: dictionary with paired x,y tuples \"\"\"", "#print name, args", "#print d, newdata[d][0]" ]
[ { "param": "self", "type": null }, { "param": "names", "type": null }, { "param": "data", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "names", "type": null, "docstring": null, "docstring_tokens": ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
baselinecorrection
<not_specific>
def baselinecorrection(self, x, y, segmentsize=0.3): """Detect and remove baseline by dividing list into segments and then interpolating the result over all x values""" seg = int(len(x) * segmentsize) bx=[];by=[] for i in range(0,len(x),seg): m = np.min(y[i...
Detect and remove baseline by dividing list into segments and then interpolating the result over all x values
Detect and remove baseline by dividing list into segments and then interpolating the result over all x values
[ "Detect", "and", "remove", "baseline", "by", "dividing", "list", "into", "segments", "and", "then", "interpolating", "the", "result", "over", "all", "x", "values" ]
def baselinecorrection(self, x, y, segmentsize=0.3): seg = int(len(x) * segmentsize) bx=[];by=[] for i in range(0,len(x),seg): m = np.min(y[i:i+seg]) bx.append(i) by.append(m) by = np.interp(x, bx, by) y=y-by return x, y
[ "def", "baselinecorrection", "(", "self", ",", "x", ",", "y", ",", "segmentsize", "=", "0.3", ")", ":", "seg", "=", "int", "(", "len", "(", "x", ")", "*", "segmentsize", ")", "bx", "=", "[", "]", ";", "by", "=", "[", "]", "for", "i", "in", "r...
Detect and remove baseline by dividing list into segments and then interpolating the result over all x values
[ "Detect", "and", "remove", "baseline", "by", "dividing", "list", "into", "segments", "and", "then", "interpolating", "the", "result", "over", "all", "x", "values" ]
[ "\"\"\"Detect and remove baseline by dividing list into segments and\n then interpolating the result over all x values\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "segmentsize", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
differentiate
<not_specific>
def differentiate(self, x, y): """Get numerical derivative of y vales""" dy = list(np.diff(y,1)) dx = list(x[:len(dy)]) return dx,dy
Get numerical derivative of y vales
Get numerical derivative of y vales
[ "Get", "numerical", "derivative", "of", "y", "vales" ]
def differentiate(self, x, y): dy = list(np.diff(y,1)) dx = list(x[:len(dy)]) return dx,dy
[ "def", "differentiate", "(", "self", ",", "x", ",", "y", ")", ":", "dy", "=", "list", "(", "np", ".", "diff", "(", "y", ",", "1", ")", ")", "dx", "=", "list", "(", "x", "[", ":", "len", "(", "dy", ")", "]", ")", "return", "dx", ",", "dy" ...
Get numerical derivative of y vales
[ "Get", "numerical", "derivative", "of", "y", "vales" ]
[ "\"\"\"Get numerical derivative of y vales\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
gaussiansmooth
<not_specific>
def gaussiansmooth(self, x, y, degree=6): """Smooth noisy data with gaussian filter""" window=degree*2-1 weight=np.array([1.0]*window) weightGauss=[] for i in range(window): i=i-degree+1 frac=i/float(window) gauss=1/(np.exp((4*(frac))**2)) ...
Smooth noisy data with gaussian filter
Smooth noisy data with gaussian filter
[ "Smooth", "noisy", "data", "with", "gaussian", "filter" ]
def gaussiansmooth(self, x, y, degree=6): window=degree*2-1 weight=np.array([1.0]*window) weightGauss=[] for i in range(window): i=i-degree+1 frac=i/float(window) gauss=1/(np.exp((4*(frac))**2)) weightGauss.append(gauss) weight=np.a...
[ "def", "gaussiansmooth", "(", "self", ",", "x", ",", "y", ",", "degree", "=", "6", ")", ":", "window", "=", "degree", "*", "2", "-", "1", "weight", "=", "np", ".", "array", "(", "[", "1.0", "]", "*", "window", ")", "weightGauss", "=", "[", "]",...
Smooth noisy data with gaussian filter
[ "Smooth", "noisy", "data", "with", "gaussian", "filter" ]
[ "\"\"\"Smooth noisy data with gaussian filter\"\"\"", "#cut x vals so they match y - may introduce some error", "#print d,len(sx), len(smoothed)" ]
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "degree", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
smooth
<not_specific>
def smooth(self,x,y,windowlen=11,window='hanning'): """smooth the data using a window with requested size. This method is based on the convolution of a scaled window with the signal. The signal is prepared by introducing reflected copies of the signal (with the window size) in both end...
smooth the data using a window with requested size. This method is based on the convolution of a scaled window with the signal. The signal is prepared by introducing reflected copies of the signal (with the window size) in both ends so that transient parts are minimized in the begining...
smooth the data using a window with requested size. This method is based on the convolution of a scaled window with the signal. The signal is prepared by introducing reflected copies of the signal (with the window size) in both ends so that transient parts are minimized in the begining and end part of the output signal...
[ "smooth", "the", "data", "using", "a", "window", "with", "requested", "size", ".", "This", "method", "is", "based", "on", "the", "convolution", "of", "a", "scaled", "window", "with", "the", "signal", ".", "The", "signal", "is", "prepared", "by", "introduci...
def smooth(self,x,y,windowlen=11,window='hanning'): if len(x) < windowlen: raise ValueError, "Input list needs to be bigger than window size." if windowlen<3: return y if not window in ['hanning', 'hamming', 'bartlett', 'blackman']: raise ValueError, 'wrong fi...
[ "def", "smooth", "(", "self", ",", "x", ",", "y", ",", "windowlen", "=", "11", ",", "window", "=", "'hanning'", ")", ":", "if", "len", "(", "x", ")", "<", "windowlen", ":", "raise", "ValueError", ",", "\"Input list needs to be bigger than window size.\"", ...
smooth the data using a window with requested size.
[ "smooth", "the", "data", "using", "a", "window", "with", "requested", "size", "." ]
[ "\"\"\"smooth the data using a window with requested size. \n This method is based on the convolution of a scaled window with the signal.\n The signal is prepared by introducing reflected copies of the signal \n (with the window size) in both ends so that transient parts are minimized\n ...
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "windowlen", "type": null }, { "param": "window", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
savitzkygolayfilter
<not_specific>
def savitzkygolayfilter(self, x, y, windowsize=11, order=3, deriv=0): """Smooth (and optionally differentiate) data with a Savitzky-Golay filter. The Savitzky-Golay filter removes high frequency noise from data. It has the advantage of preserving the original shape and features of the si...
Smooth (and optionally differentiate) data with a Savitzky-Golay filter. The Savitzky-Golay filter removes high frequency noise from data. It has the advantage of preserving the original shape and features of the signal better than other types of filtering approaches, such as moving aver...
Smooth (and optionally differentiate) data with a Savitzky-Golay filter. The Savitzky-Golay filter removes high frequency noise from data. It has the advantage of preserving the original shape and features of the signal better than other types of filtering approaches, such as moving averages techhniques. The main idea ...
[ "Smooth", "(", "and", "optionally", "differentiate", ")", "data", "with", "a", "Savitzky", "-", "Golay", "filter", ".", "The", "Savitzky", "-", "Golay", "filter", "removes", "high", "frequency", "noise", "from", "data", ".", "It", "has", "the", "advantage", ...
def savitzkygolayfilter(self, x, y, windowsize=11, order=3, deriv=0): try: windowsize = np.abs(np.int(windowsize)) order = np.abs(np.int(order)) except ValueError, msg: raise ValueError("window_size and order have to be of type int") if windowsize % 2 != 1 or ...
[ "def", "savitzkygolayfilter", "(", "self", ",", "x", ",", "y", ",", "windowsize", "=", "11", ",", "order", "=", "3", ",", "deriv", "=", "0", ")", ":", "try", ":", "windowsize", "=", "np", ".", "abs", "(", "np", ".", "int", "(", "windowsize", ")",...
Smooth (and optionally differentiate) data with a Savitzky-Golay filter.
[ "Smooth", "(", "and", "optionally", "differentiate", ")", "data", "with", "a", "Savitzky", "-", "Golay", "filter", "." ]
[ "\"\"\"Smooth (and optionally differentiate) data with a Savitzky-Golay filter.\n The Savitzky-Golay filter removes high frequency noise from data.\n It has the advantage of preserving the original shape and\n features of the signal better than other types of filtering\n approaches, such...
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "windowsize", "type": null }, { "param": "order", "type": null }, { "param": "deriv", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
percentile
<not_specific>
def percentile(self, x, y, percent=0.95): """Find the percentile of a list of y values. @parameter percent - a float value from 0.0 to 1.0. @return - the percentile of the values adapted from http://code.activestate.com/recipes/511478/ """ key=lambda x:x y = sor...
Find the percentile of a list of y values. @parameter percent - a float value from 0.0 to 1.0. @return - the percentile of the values adapted from http://code.activestate.com/recipes/511478/
Find the percentile of a list of y values. @parameter percent - a float value from 0.0 to 1.0.
[ "Find", "the", "percentile", "of", "a", "list", "of", "y", "values", ".", "@parameter", "percent", "-", "a", "float", "value", "from", "0", ".", "0", "to", "1", ".", "0", "." ]
def percentile(self, x, y, percent=0.95): key=lambda x:x y = sorted(y) if not y: return None k = (len(y)-1) * percent f = math.floor(k) c = math.ceil(k) if f == c: return key(y[int(k)]) d0 = key(y[int(f)]) * (c-k) d1 = key(y...
[ "def", "percentile", "(", "self", ",", "x", ",", "y", ",", "percent", "=", "0.95", ")", ":", "key", "=", "lambda", "x", ":", "x", "y", "=", "sorted", "(", "y", ")", "if", "not", "y", ":", "return", "None", "k", "=", "(", "len", "(", "y", ")...
Find the percentile of a list of y values.
[ "Find", "the", "percentile", "of", "a", "list", "of", "y", "values", "." ]
[ "\"\"\"Find the percentile of a list of y values.\n \n @parameter percent - a float value from 0.0 to 1.0.\n @return - the percentile of the values\n adapted from http://code.activestate.com/recipes/511478/ \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "percent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
removeoutliers
<not_specific>
def removeoutliers(self, x, y, percentile=0.95): """Remove outliers based on nth percentile""" p = self.percentile(x,y,percentile) print p rx=[]; ry=[] for i,j in zip(x,y): print j,p if j<p: rx.append(i) ry.append(j) ...
Remove outliers based on nth percentile
Remove outliers based on nth percentile
[ "Remove", "outliers", "based", "on", "nth", "percentile" ]
def removeoutliers(self, x, y, percentile=0.95): p = self.percentile(x,y,percentile) print p rx=[]; ry=[] for i,j in zip(x,y): print j,p if j<p: rx.append(i) ry.append(j) return rx,ry
[ "def", "removeoutliers", "(", "self", ",", "x", ",", "y", ",", "percentile", "=", "0.95", ")", ":", "p", "=", "self", ".", "percentile", "(", "x", ",", "y", ",", "percentile", ")", "print", "p", "rx", "=", "[", "]", ";", "ry", "=", "[", "]", ...
Remove outliers based on nth percentile
[ "Remove", "outliers", "based", "on", "nth", "percentile" ]
[ "\"\"\"Remove outliers based on nth percentile\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "percentile", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
76a501bb8e791ff1810a50e80bd144be2ec35f8f
shambo001/peat
DataPipeline/Processing.py
[ "MIT" ]
Python
omitrange
<not_specific>
def omitrange(self, x, y, xmin='',xmax='', ymin='',ymax=''): """Omit range of data points by given range""" rx=[]; ry=[] if xmin=='': xmin=min(x) if xmax=='': xmax=max(x) if ymin=='': ymin=min(y) if ymax=='': ymax=max(y) ...
Omit range of data points by given range
Omit range of data points by given range
[ "Omit", "range", "of", "data", "points", "by", "given", "range" ]
def omitrange(self, x, y, xmin='',xmax='', ymin='',ymax=''): rx=[]; ry=[] if xmin=='': xmin=min(x) if xmax=='': xmax=max(x) if ymin=='': ymin=min(y) if ymax=='': ymax=max(y) for i,j in zip(x,y)[:]: print i,j,xmin...
[ "def", "omitrange", "(", "self", ",", "x", ",", "y", ",", "xmin", "=", "''", ",", "xmax", "=", "''", ",", "ymin", "=", "''", ",", "ymax", "=", "''", ")", ":", "rx", "=", "[", "]", ";", "ry", "=", "[", "]", "if", "xmin", "==", "''", ":", ...
Omit range of data points by given range
[ "Omit", "range", "of", "data", "points", "by", "given", "range" ]
[ "\"\"\"Omit range of data points by given range\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "x", "type": null }, { "param": "y", "type": null }, { "param": "xmin", "type": null }, { "param": "xmax", "type": null }, { "param": "ymin", "type": null }, { "param": "ymax", "type": null ...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "x", "type": null, "docstring": null, "docstring_tokens": [], ...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
load_system
<not_specific>
def load_system(self): """ loads parameters and experimental curves from a file """ import tkFileDialog, os savedir=os.getcwd() filename=tkFileDialog.askopenfilename(defaultextension="*.pks", initialdir=savedir, ...
loads parameters and experimental curves from a file
loads parameters and experimental curves from a file
[ "loads", "parameters", "and", "experimental", "curves", "from", "a", "file" ]
def load_system(self): import tkFileDialog, os savedir=os.getcwd() filename=tkFileDialog.askopenfilename(defaultextension="*.pks", initialdir=savedir, filetypes=[("pKaTool system file","*.pks"),("All file...
[ "def", "load_system", "(", "self", ")", ":", "import", "tkFileDialog", ",", "os", "savedir", "=", "os", ".", "getcwd", "(", ")", "filename", "=", "tkFileDialog", ".", "askopenfilename", "(", "defaultextension", "=", "\"*.pks\"", ",", "initialdir", "=", "save...
loads parameters and experimental curves from a file
[ "loads", "parameters", "and", "experimental", "curves", "from", "a", "file" ]
[ "\"\"\" loads parameters and experimental curves from a file \"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
save_system
<not_specific>
def save_system(self): """ saves parameters and experimental curves to a file """ import tkFileDialog, os savedir=os.getcwd() filename=tkFileDialog.asksaveasfilename(defaultextension="*.pks", initialdir=savedir, ...
saves parameters and experimental curves to a file
saves parameters and experimental curves to a file
[ "saves", "parameters", "and", "experimental", "curves", "to", "a", "file" ]
def save_system(self): import tkFileDialog, os savedir=os.getcwd() filename=tkFileDialog.asksaveasfilename(defaultextension="*.pks", initialdir=savedir, filetypes=[("pKaTool system file","*.pks"),("Al...
[ "def", "save_system", "(", "self", ")", ":", "import", "tkFileDialog", ",", "os", "savedir", "=", "os", ".", "getcwd", "(", ")", "filename", "=", "tkFileDialog", ".", "asksaveasfilename", "(", "defaultextension", "=", "\"*.pks\"", ",", "initialdir", "=", "sa...
saves parameters and experimental curves to a file
[ "saves", "parameters", "and", "experimental", "curves", "to", "a", "file" ]
[ "\"\"\" saves parameters and experimental curves to a file \"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
load_curves
<not_specific>
def load_curves(self, filename = '', acid_bases = None): """Read titration curves from a text file""" import tkFileDialog, os savedir=os.getcwd() if filename == '': filename=tkFileDialog.askopenfilename(defaultextension="*.tcrv", ...
Read titration curves from a text file
Read titration curves from a text file
[ "Read", "titration", "curves", "from", "a", "text", "file" ]
def load_curves(self, filename = '', acid_bases = None): import tkFileDialog, os savedir=os.getcwd() if filename == '': filename=tkFileDialog.askopenfilename(defaultextension="*.tcrv", initialdir=savedir, ...
[ "def", "load_curves", "(", "self", ",", "filename", "=", "''", ",", "acid_bases", "=", "None", ")", ":", "import", "tkFileDialog", ",", "os", "savedir", "=", "os", ".", "getcwd", "(", ")", "if", "filename", "==", "''", ":", "filename", "=", "tkFileDial...
Read titration curves from a text file
[ "Read", "titration", "curves", "from", "a", "text", "file" ]
[ "\"\"\"Read titration curves from a text file\"\"\"", "#", "# Get the type", "#", "#", "# Read the file", "#", "#", "# store experimental data in local_titration_data", "#", "#", "# Read the next line", "#" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "acid_bases", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
load_titdb
<not_specific>
def load_titdb(self, filename = '', acid_bases = None): """Read titration curves from a titdb exported file - added by damien""" import tkFileDialog, os savedir=os.getcwd() if filename == '': filename=tkFileDialog.askopenfilename(defaultextension="*.tcrv", ...
Read titration curves from a titdb exported file - added by damien
Read titration curves from a titdb exported file - added by damien
[ "Read", "titration", "curves", "from", "a", "titdb", "exported", "file", "-", "added", "by", "damien" ]
def load_titdb(self, filename = '', acid_bases = None): import tkFileDialog, os savedir=os.getcwd() if filename == '': filename=tkFileDialog.askopenfilename(defaultextension="*.tcrv", initialdir=savedir, ...
[ "def", "load_titdb", "(", "self", ",", "filename", "=", "''", ",", "acid_bases", "=", "None", ")", ":", "import", "tkFileDialog", ",", "os", "savedir", "=", "os", ".", "getcwd", "(", ")", "if", "filename", "==", "''", ":", "filename", "=", "tkFileDialo...
Read titration curves from a titdb exported file - added by damien
[ "Read", "titration", "curves", "from", "a", "titdb", "exported", "file", "-", "added", "by", "damien" ]
[ "\"\"\"Read titration curves from a titdb exported file - added by damien\"\"\"", "# Read the file", "#dataset name" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "acid_bases", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
convert_titration_data
<not_specific>
def convert_titration_data(self,exp_tit_data, acid_bases = None): """Scale the loaded curves and fix the experimental -> theoretical curve mapping""" if not getattr(self,'titration_data',None): self.titration_data={} # # associate experimental curves with groups # ...
Scale the loaded curves and fix the experimental -> theoretical curve mapping
Scale the loaded curves and fix the experimental -> theoretical curve mapping
[ "Scale", "the", "loaded", "curves", "and", "fix", "the", "experimental", "-", ">", "theoretical", "curve", "mapping" ]
def convert_titration_data(self,exp_tit_data, acid_bases = None): if not getattr(self,'titration_data',None): self.titration_data={} associate experimental curves with groups do_scaling = IntVar() keys = exp_tit_data.keys() experimental -> theoretical group mapping,...
[ "def", "convert_titration_data", "(", "self", ",", "exp_tit_data", ",", "acid_bases", "=", "None", ")", ":", "if", "not", "getattr", "(", "self", ",", "'titration_data'", ",", "None", ")", ":", "self", ".", "titration_data", "=", "{", "}", "do_scaling", "=...
Scale the loaded curves and fix the experimental -> theoretical curve mapping
[ "Scale", "the", "loaded", "curves", "and", "fix", "the", "experimental", "-", ">", "theoretical", "curve", "mapping" ]
[ "\"\"\"Scale the loaded curves and fix the experimental -> theoretical curve mapping\"\"\"", "#", "# associate experimental curves with groups", "#", "# experimental -> theoretical group mapping, if not provided", "# exp residue, acid/base,Group name", "#print 'Matching',acid_bases[i][2].get(),'with',ac...
[ { "param": "self", "type": null }, { "param": "exp_tit_data", "type": null }, { "param": "acid_bases", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "exp_tit_data", "type": null, "docstring": null, "docstring_to...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
save_curves
<not_specific>
def save_curves(self): """Save titration curves in a file""" import tkFileDialog, os savedir=os.getcwd() filename=tkFileDialog.asksaveasfilename(defaultextension='.tcrv', initialdir=savedir, f...
Save titration curves in a file
Save titration curves in a file
[ "Save", "titration", "curves", "in", "a", "file" ]
def save_curves(self): import tkFileDialog, os savedir=os.getcwd() filename=tkFileDialog.asksaveasfilename(defaultextension='.tcrv', initialdir=savedir, filetypes=[("pKaTool titration curve file","*.t...
[ "def", "save_curves", "(", "self", ")", ":", "import", "tkFileDialog", ",", "os", "savedir", "=", "os", ".", "getcwd", "(", ")", "filename", "=", "tkFileDialog", ".", "asksaveasfilename", "(", "defaultextension", "=", "'.tcrv'", ",", "initialdir", "=", "save...
Save titration curves in a file
[ "Save", "titration", "curves", "in", "a", "file" ]
[ "\"\"\"Save titration curves in a file\"\"\"", "#", "# If the file is already there then delete it", "#", "#", "# Write everything nicely", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
load_pH_activity_profile
<not_specific>
def load_pH_activity_profile(self, filename=None,parent=None): """Read pH activity profile from a text file""" if not parent: parent=self.win import tkFileDialog, os if not filename: savedir=os.getcwd() filename=tkFileDialog.askopenfilename(defaultexte...
Read pH activity profile from a text file
Read pH activity profile from a text file
[ "Read", "pH", "activity", "profile", "from", "a", "text", "file" ]
def load_pH_activity_profile(self, filename=None,parent=None): if not parent: parent=self.win import tkFileDialog, os if not filename: savedir=os.getcwd() filename=tkFileDialog.askopenfilename(defaultextension="*.txt", ...
[ "def", "load_pH_activity_profile", "(", "self", ",", "filename", "=", "None", ",", "parent", "=", "None", ")", ":", "if", "not", "parent", ":", "parent", "=", "self", ".", "win", "import", "tkFileDialog", ",", "os", "if", "not", "filename", ":", "savedir...
Read pH activity profile from a text file
[ "Read", "pH", "activity", "profile", "from", "a", "text", "file" ]
[ "\"\"\"Read pH activity profile from a text file\"\"\"", "#", "# Read the file", "#", "#", "# normalise profile", "#", "#print 'max',max", "#print self.activity_data" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "parent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
load_pH_stability_profile
<not_specific>
def load_pH_stability_profile(self, filename=None,parent=None): """Read pH stability profile from a text file""" if not parent: parent=self.win import tkFileDialog, os if not filename: savedir=os.getcwd() filename=tkFileDialog.askopenfilename(defaultex...
Read pH stability profile from a text file
Read pH stability profile from a text file
[ "Read", "pH", "stability", "profile", "from", "a", "text", "file" ]
def load_pH_stability_profile(self, filename=None,parent=None): if not parent: parent=self.win import tkFileDialog, os if not filename: savedir=os.getcwd() filename=tkFileDialog.askopenfilename(defaultextension="*.txt", ...
[ "def", "load_pH_stability_profile", "(", "self", ",", "filename", "=", "None", ",", "parent", "=", "None", ")", ":", "if", "not", "parent", ":", "parent", "=", "self", ".", "win", "import", "tkFileDialog", ",", "os", "if", "not", "filename", ":", "savedi...
Read pH stability profile from a text file
[ "Read", "pH", "stability", "profile", "from", "a", "text", "file" ]
[ "\"\"\"Read pH stability profile from a text file\"\"\"", "#", "# Read the file", "#" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "parent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
load_2nd_pH_activity_profile
<not_specific>
def load_2nd_pH_activity_profile(self,filename=None,parent=None): """Load a 2nd pH-activity profile""" if getattr(self,'activity_data',None): self.backup=self.activity_data.copy() else: self.backup={} self.load_pH_activity_profile(filename,parent=parent) s...
Load a 2nd pH-activity profile
Load a 2nd pH-activity profile
[ "Load", "a", "2nd", "pH", "-", "activity", "profile" ]
def load_2nd_pH_activity_profile(self,filename=None,parent=None): if getattr(self,'activity_data',None): self.backup=self.activity_data.copy() else: self.backup={} self.load_pH_activity_profile(filename,parent=parent) self.secondary_activity_data=self.activity_dat...
[ "def", "load_2nd_pH_activity_profile", "(", "self", ",", "filename", "=", "None", ",", "parent", "=", "None", ")", ":", "if", "getattr", "(", "self", ",", "'activity_data'", ",", "None", ")", ":", "self", ".", "backup", "=", "self", ".", "activity_data", ...
Load a 2nd pH-activity profile
[ "Load", "a", "2nd", "pH", "-", "activity", "profile" ]
[ "\"\"\"Load a 2nd pH-activity profile\"\"\"", "#", "# copy the old one back", "#" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "parent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
fit_system_to_curves
<not_specific>
def fit_system_to_curves(self): """Given loaded titration curves, attempt to fit the system characteristics (intrinsic pKa value and interaction energies) so that we get the best match. We map the titration curves to groups (in the system) based on the charges""" # # Can we fit? ...
Given loaded titration curves, attempt to fit the system characteristics (intrinsic pKa value and interaction energies) so that we get the best match. We map the titration curves to groups (in the system) based on the charges
Given loaded titration curves, attempt to fit the system characteristics (intrinsic pKa value and interaction energies) so that we get the best match. We map the titration curves to groups (in the system) based on the charges
[ "Given", "loaded", "titration", "curves", "attempt", "to", "fit", "the", "system", "characteristics", "(", "intrinsic", "pKa", "value", "and", "interaction", "energies", ")", "so", "that", "we", "get", "the", "best", "match", ".", "We", "map", "the", "titrat...
def fit_system_to_curves(self): Can we fit? if not getattr(self,'titration_data',None): import tkMessageBox tkMessageBox.showwarning('No titration curves loaded', 'Load titration curves first') return self.fit() re...
[ "def", "fit_system_to_curves", "(", "self", ")", ":", "if", "not", "getattr", "(", "self", ",", "'titration_data'", ",", "None", ")", ":", "import", "tkMessageBox", "tkMessageBox", ".", "showwarning", "(", "'No titration curves loaded'", ",", "'Load titration curves...
Given loaded titration curves, attempt to fit the system characteristics (intrinsic pKa value and interaction energies) so that we get the best match.
[ "Given", "loaded", "titration", "curves", "attempt", "to", "fit", "the", "system", "characteristics", "(", "intrinsic", "pKa", "value", "and", "interaction", "energies", ")", "so", "that", "we", "get", "the", "best", "match", "." ]
[ "\"\"\"Given loaded titration curves, attempt to fit the system characteristics\n (intrinsic pKa value and interaction energies) so that we get the best match.\n We map the titration curves to groups (in the system) based on the charges\"\"\"", "#", "# Can we fit?", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
uniqueness_scan
<not_specific>
def uniqueness_scan(self): """Attempts to find critiria for when a unique solution can be found. Combinatorial scans are carried out on generated titration curves based on varius pKa values and interaction energies """ self.display_loaded_curves.set(1) # pka_dists = range(0,10) # for i in ...
Attempts to find critiria for when a unique solution can be found. Combinatorial scans are carried out on generated titration curves based on varius pKa values and interaction energies
Attempts to find critiria for when a unique solution can be found. Combinatorial scans are carried out on generated titration curves based on varius pKa values and interaction energies
[ "Attempts", "to", "find", "critiria", "for", "when", "a", "unique", "solution", "can", "be", "found", ".", "Combinatorial", "scans", "are", "carried", "out", "on", "generated", "titration", "curves", "based", "on", "varius", "pKa", "values", "and", "interactio...
def uniqueness_scan(self): self.display_loaded_curves.set(1) pka_dists = [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0] int_dists = [0.0, 0.5, 1.0, 1.5, 2.0] out = 'pka_dist int_dist no_close max_para_dist' print out for pka_dist in pka_dists: for int_dist in int_di...
[ "def", "uniqueness_scan", "(", "self", ")", ":", "self", ".", "display_loaded_curves", ".", "set", "(", "1", ")", "pka_dists", "=", "[", "0.0", ",", "0.5", ",", "1.0", ",", "1.5", ",", "2.0", ",", "2.5", ",", "3.0", "]", "int_dists", "=", "[", "0.0...
Attempts to find critiria for when a unique solution can be found.
[ "Attempts", "to", "find", "critiria", "for", "when", "a", "unique", "solution", "can", "be", "found", "." ]
[ "\"\"\"Attempts to find critiria for when a unique solution can be found. Combinatorial scans are carried out on generated titration curves based on varius pKa values and interaction energies \"\"\"", "# pka_dists = range(0,10)", "# for i in range(len(pka_dists)):", "# pka_dists[i]=pk...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
fit
<not_specific>
def fit(self, silent=0): """Do 10000 rounds of fitting, or until converged""" # # Set damper # self.LM_damper = DoubleVar() self.LM_damper.set(0.1) # # Open the window # if not silent == 1: self.count_win=Toplevel() ...
Do 10000 rounds of fitting, or until converged
Do 10000 rounds of fitting, or until converged
[ "Do", "10000", "rounds", "of", "fitting", "or", "until", "converged" ]
def fit(self, silent=0): Set damper self.LM_damper = DoubleVar() self.LM_damper.set(0.1) Open the window if not silent == 1: self.count_win=Toplevel() self.count_win.geometry('100x100+200+200') self.count_win.title('Fit in progress') ...
[ "def", "fit", "(", "self", ",", "silent", "=", "0", ")", ":", "self", ".", "LM_damper", "=", "DoubleVar", "(", ")", "self", ".", "LM_damper", ".", "set", "(", "0.1", ")", "if", "not", "silent", "==", "1", ":", "self", ".", "count_win", "=", "Topl...
Do 10000 rounds of fitting, or until converged
[ "Do", "10000", "rounds", "of", "fitting", "or", "until", "converged" ]
[ "\"\"\"Do 10000 rounds of fitting, or until converged\"\"\"", "#", "# Set damper", "#", "#", "# Open the window", "#", "#", "# Keep track of number of pKa calcs", "#", "#", "#", "# Make copies of all the variables", "#", "#", "# Set up the loaded curves", "#", "#", "# Start itera...
[ { "param": "self", "type": null }, { "param": "silent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "silent", "type": null, "docstring": null, "docstring_tokens":...
895f31fb1075e1495de7f74f3916a5891a4c4840
shambo001/peat
pKaTool/pKa_system_file_menu.py
[ "MIT" ]
Python
show_close
<not_specific>
def show_close(self, filename='close.txt'): """Displays close parameter sets found in a combinatorial scan""" import tkMessageBox if not getattr(self,'titration_data',None): tkMessageBox.showwarning('No titration curves loaded', 'Make sure to load...
Displays close parameter sets found in a combinatorial scan
Displays close parameter sets found in a combinatorial scan
[ "Displays", "close", "parameter", "sets", "found", "in", "a", "combinatorial", "scan" ]
def show_close(self, filename='close.txt'): import tkMessageBox if not getattr(self,'titration_data',None): tkMessageBox.showwarning('No titration curves loaded', 'Make sure to load the titration curves used in the last combinatorial scan first') ...
[ "def", "show_close", "(", "self", ",", "filename", "=", "'close.txt'", ")", ":", "import", "tkMessageBox", "if", "not", "getattr", "(", "self", ",", "'titration_data'", ",", "None", ")", ":", "tkMessageBox", ".", "showwarning", "(", "'No titration curves loaded'...
Displays close parameter sets found in a combinatorial scan
[ "Displays", "close", "parameter", "sets", "found", "in", "a", "combinatorial", "scan" ]
[ "\"\"\"Displays close parameter sets found in a combinatorial scan\"\"\"", "# record vars", "# close vars", "#print 'record_vars',record_vars", "# print 'close_vars',close_vars", "# for i in range(len(old)):", "# print '--------------------------------------------'", "# ...
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
formatTests
null
def formatTests( testinfo, names=None): """Test basic standard format handling and fitting""" total=0; success=0 if names == None: names = testinfo.keys() for t in sorted(names): doTest(testinfo[t], t)
Test basic standard format handling and fitting
Test basic standard format handling and fitting
[ "Test", "basic", "standard", "format", "handling", "and", "fitting" ]
def formatTests( testinfo, names=None): total=0; success=0 if names == None: names = testinfo.keys() for t in sorted(names): doTest(testinfo[t], t)
[ "def", "formatTests", "(", "testinfo", ",", "names", "=", "None", ")", ":", "total", "=", "0", ";", "success", "=", "0", "if", "names", "==", "None", ":", "names", "=", "testinfo", ".", "keys", "(", ")", "for", "t", "in", "sorted", "(", "names", ...
Test basic standard format handling and fitting
[ "Test", "basic", "standard", "format", "handling", "and", "fitting" ]
[ "\"\"\"Test basic standard format handling and fitting\"\"\"" ]
[ { "param": "testinfo", "type": null }, { "param": "names", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "testinfo", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "names", "type": null, "docstring": null, "docstring_token...
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
multiFileTest
<not_specific>
def multiFileTest(): """Test handling of single datasets per file with grouping per filename""" path = 'testfiles/singlefiles' Utilities.createSingleFileData(path) conf = {'format':'databycolumn', 'groupbyname':1, 'parsenamesindex':'0,1', 'parsemethod':'both', 'model1':'linear',...
Test handling of single datasets per file with grouping per filename
Test handling of single datasets per file with grouping per filename
[ "Test", "handling", "of", "single", "datasets", "per", "file", "with", "grouping", "per", "filename" ]
def multiFileTest(): path = 'testfiles/singlefiles' Utilities.createSingleFileData(path) conf = {'format':'databycolumn', 'groupbyname':1, 'parsenamesindex':'0,1', 'parsemethod':'both', 'model1':'linear','variable1':'a','model2':'sigmoid','variable2':'tm'} p = Pipeline() p.c...
[ "def", "multiFileTest", "(", ")", ":", "path", "=", "'testfiles/singlefiles'", "Utilities", ".", "createSingleFileData", "(", "path", ")", "conf", "=", "{", "'format'", ":", "'databycolumn'", ",", "'groupbyname'", ":", "1", ",", "'parsenamesindex'", ":", "'0,1'"...
Test handling of single datasets per file with grouping per filename
[ "Test", "handling", "of", "single", "datasets", "per", "file", "with", "grouping", "per", "filename" ]
[ "\"\"\"Test handling of single datasets per file with grouping per filename\"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
groupedFilesTest
<not_specific>
def groupedFilesTest(): """Tests the processing and grouping of multiple files with the same sets of datasets in all files""" path = 'testfiles/grouped' Utilities.createGroupedData(path) conf = {'format':'databycolumn','groupbyname':1, 'parsenamesindex':0, 'parsemethod':'numeric', '...
Tests the processing and grouping of multiple files with the same sets of datasets in all files
Tests the processing and grouping of multiple files with the same sets of datasets in all files
[ "Tests", "the", "processing", "and", "grouping", "of", "multiple", "files", "with", "the", "same", "sets", "of", "datasets", "in", "all", "files" ]
def groupedFilesTest(): path = 'testfiles/grouped' Utilities.createGroupedData(path) conf = {'format':'databycolumn','groupbyname':1, 'parsenamesindex':0, 'parsemethod':'numeric', 'model1':'linear','variable1':'a','model2':'sigmoid','variable2':'tm'} p = Pipeline() p.createConfig('temp.c...
[ "def", "groupedFilesTest", "(", ")", ":", "path", "=", "'testfiles/grouped'", "Utilities", ".", "createGroupedData", "(", "path", ")", "conf", "=", "{", "'format'", ":", "'databycolumn'", ",", "'groupbyname'", ":", "1", ",", "'parsenamesindex'", ":", "0", ",",...
Tests the processing and grouping of multiple files with the same sets of datasets in all files
[ "Tests", "the", "processing", "and", "grouping", "of", "multiple", "files", "with", "the", "same", "sets", "of", "datasets", "in", "all", "files" ]
[ "\"\"\"Tests the processing and grouping of multiple files with the same\n sets of datasets in all files\"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
multiFolderTest
<not_specific>
def multiFolderTest(): """Handling of multiple folders in a hierarchy with replicates""" p = Pipeline() conf = {'format':'databycolumn','groupbyname':1,'parsenamesindex':0, 'parsemethod':'numeric', 'replicates':1, #'saveplots':1, 'model1':'linear','variable1':'a','model2':'sigmoid','...
Handling of multiple folders in a hierarchy with replicates
Handling of multiple folders in a hierarchy with replicates
[ "Handling", "of", "multiple", "folders", "in", "a", "hierarchy", "with", "replicates" ]
def multiFolderTest(): p = Pipeline() conf = {'format':'databycolumn','groupbyname':1,'parsenamesindex':0, 'parsemethod':'numeric', 'replicates':1, 'model1':'linear','variable1':'a','model2':'sigmoid','variable2':'tm'} p.createConfig('temp.conf',**conf) path = 'testfiles/multifo...
[ "def", "multiFolderTest", "(", ")", ":", "p", "=", "Pipeline", "(", ")", "conf", "=", "{", "'format'", ":", "'databycolumn'", ",", "'groupbyname'", ":", "1", ",", "'parsenamesindex'", ":", "0", ",", "'parsemethod'", ":", "'numeric'", ",", "'replicates'", "...
Handling of multiple folders in a hierarchy with replicates
[ "Handling", "of", "multiple", "folders", "in", "a", "hierarchy", "with", "replicates" ]
[ "\"\"\"Handling of multiple folders in a hierarchy with replicates\"\"\"", "#'saveplots':1,", "#replicates", "#sigmoid dependence of the slopes on 'ph'", "#so we know we are getting the right results" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
fitPropagationTest
<not_specific>
def fitPropagationTest(): """Tests the propagation of fit data direct from a dict - no importing""" start=time.time() p = Pipeline() conf = {'model1':'linear','model2':'Michaelis-Menten','model3':'sigmoid', 'variable1':'a','variable2':'Km','variable3':'tm',#'xerror':.1,'yerror':0.05, ...
Tests the propagation of fit data direct from a dict - no importing
Tests the propagation of fit data direct from a dict - no importing
[ "Tests", "the", "propagation", "of", "fit", "data", "direct", "from", "a", "dict", "-", "no", "importing" ]
def fitPropagationTest(): start=time.time() p = Pipeline() conf = {'model1':'linear','model2':'Michaelis-Menten','model3':'sigmoid', 'variable1':'a','variable2':'Km','variable3':'tm', } p.createConfig('temp.conf',**conf) data = Utilities.createNestedData() Em = EkinProjec...
[ "def", "fitPropagationTest", "(", ")", ":", "start", "=", "time", ".", "time", "(", ")", "p", "=", "Pipeline", "(", ")", "conf", "=", "{", "'model1'", ":", "'linear'", ",", "'model2'", ":", "'Michaelis-Menten'", ",", "'model3'", ":", "'sigmoid'", ",", ...
Tests the propagation of fit data direct from a dict - no importing
[ "Tests", "the", "propagation", "of", "fit", "data", "direct", "from", "a", "dict", "-", "no", "importing" ]
[ "\"\"\"Tests the propagation of fit data direct from a dict - no importing\"\"\"", "#'xerror':.1,'yerror':0.05," ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
groupbyFieldsTest
<not_specific>
def groupbyFieldsTest(): """Tests grouping by fields function using NMRdata""" conf = {'format':'databycolumn','colheaderlabels':'15N,1H', 'parsenamesindex':0,'parsemethod':'numeric', 'delimeter':' ', 'groupbyfields':1,'extension':'.inp'} path = 'testfiles/NMRdata' p = Pipeline(...
Tests grouping by fields function using NMRdata
Tests grouping by fields function using NMRdata
[ "Tests", "grouping", "by", "fields", "function", "using", "NMRdata" ]
def groupbyFieldsTest(): conf = {'format':'databycolumn','colheaderlabels':'15N,1H', 'parsenamesindex':0,'parsemethod':'numeric', 'delimeter':' ', 'groupbyfields':1,'extension':'.inp'} path = 'testfiles/NMRdata' p = Pipeline() p.createConfig('temp.conf',**conf) p.addFolder(pa...
[ "def", "groupbyFieldsTest", "(", ")", ":", "conf", "=", "{", "'format'", ":", "'databycolumn'", ",", "'colheaderlabels'", ":", "'15N,1H'", ",", "'parsenamesindex'", ":", "0", ",", "'parsemethod'", ":", "'numeric'", ",", "'delimeter'", ":", "' '", ",", "'groupb...
Tests grouping by fields function using NMRdata
[ "Tests", "grouping", "by", "fields", "function", "using", "NMRdata" ]
[ "\"\"\"Tests grouping by fields function using NMRdata\"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
preProcessingTest
<not_specific>
def preProcessingTest(): """Test processing steps like differentation of the data""" path = "testfiles" names = Utilities.createRandomStrings(8,6) fname = os.path.join(path,'preprocessingtest.txt') Utilities.createCDData(fname, names, 300, .5) conf = {'format':'databycolumn','model1':'gaussian',...
Test processing steps like differentation of the data
Test processing steps like differentation of the data
[ "Test", "processing", "steps", "like", "differentation", "of", "the", "data" ]
def preProcessingTest(): path = "testfiles" names = Utilities.createRandomStrings(8,6) fname = os.path.join(path,'preprocessingtest.txt') Utilities.createCDData(fname, names, 300, .5) conf = {'format':'databycolumn','model1':'gaussian', 'function1':'differentiate','function2':'gaussiansm...
[ "def", "preProcessingTest", "(", ")", ":", "path", "=", "\"testfiles\"", "names", "=", "Utilities", ".", "createRandomStrings", "(", "8", ",", "6", ")", "fname", "=", "os", ".", "path", ".", "join", "(", "path", ",", "'preprocessingtest.txt'", ")", "Utilit...
Test processing steps like differentation of the data
[ "Test", "processing", "steps", "like", "differentation", "of", "the", "data" ]
[ "\"\"\"Test processing steps like differentation of the data\"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
2a2925cbee4e00603f92173ae8a145d502b3e22f
shambo001/peat
DataPipeline/Testing.py
[ "MIT" ]
Python
peakDetectionTest
<not_specific>
def peakDetectionTest(path=None, noise=0.08): """Use pre-processing funcs to detect peaks""" if path == None: path = "testfiles" names = Utilities.createRandomStrings(8,6) fname = os.path.join(path,'spectraldata.txt') peaks = Utilities.createSimulatedSpectralData(fname, names, noise=noise) ...
Use pre-processing funcs to detect peaks
Use pre-processing funcs to detect peaks
[ "Use", "pre", "-", "processing", "funcs", "to", "detect", "peaks" ]
def peakDetectionTest(path=None, noise=0.08): if path == None: path = "testfiles" names = Utilities.createRandomStrings(8,6) fname = os.path.join(path,'spectraldata.txt') peaks = Utilities.createSimulatedSpectralData(fname, names, noise=noise) conf = {'format':'databycolumn', 'saveplots':1, ...
[ "def", "peakDetectionTest", "(", "path", "=", "None", ",", "noise", "=", "0.08", ")", ":", "if", "path", "==", "None", ":", "path", "=", "\"testfiles\"", "names", "=", "Utilities", ".", "createRandomStrings", "(", "8", ",", "6", ")", "fname", "=", "os"...
Use pre-processing funcs to detect peaks
[ "Use", "pre", "-", "processing", "funcs", "to", "detect", "peaks" ]
[ "\"\"\"Use pre-processing funcs to detect peaks\"\"\"", "#compare predicted peaks", "#print name, sorted(peaks[name]), results[name][0]" ]
[ { "param": "path", "type": null }, { "param": "noise", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "path", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "noise", "type": null, "docstring": null, "docstring_tokens": ...
8b00a45a04be447ab44a6497ecce8b406139bfe8
shambo001/peat
pKaTool/Ghosts/CSP_explicit.py
[ "MIT" ]
Python
parseCoordCharges
<not_specific>
def parseCoordCharges(self, pqrFile, pdb=False): ''' Parse coordinates and charges from pqr files ''' try: fd = open(pqrFile, 'r'); lines = fd.readlines() fd.close() except IOError: print '\n\t\tFATAL: Cannot open %s file'%pqrFile coordMol = {} chargeMol = {} for line in lines: record...
Parse coordinates and charges from pqr files
Parse coordinates and charges from pqr files
[ "Parse", "coordinates", "and", "charges", "from", "pqr", "files" ]
def parseCoordCharges(self, pqrFile, pdb=False): try: fd = open(pqrFile, 'r'); lines = fd.readlines() fd.close() except IOError: print '\n\t\tFATAL: Cannot open %s file'%pqrFile coordMol = {} chargeMol = {} for line in lines: record = line[:6].strip() if record == 'ATOM': chainID = parse...
[ "def", "parseCoordCharges", "(", "self", ",", "pqrFile", ",", "pdb", "=", "False", ")", ":", "try", ":", "fd", "=", "open", "(", "pqrFile", ",", "'r'", ")", ";", "lines", "=", "fd", ".", "readlines", "(", ")", "fd", ".", "close", "(", ")", "excep...
Parse coordinates and charges from pqr files
[ "Parse", "coordinates", "and", "charges", "from", "pqr", "files" ]
[ "'''\n\t\tParse coordinates and charges from pqr files\n\t\t'''" ]
[ { "param": "self", "type": null }, { "param": "pqrFile", "type": null }, { "param": "pdb", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pqrFile", "type": null, "docstring": null, "docstring_tokens"...
ea596d7e2a17973e406e24b5f85e5e12a77c14aa
shambo001/peat
PEATDB/Ekin/Ekin_prefs.py
[ "MIT" ]
Python
save_preferences
<not_specific>
def save_preferences(self): """Saves the sequence display settings to prefs file""" import preferences print 'Saving Ekin preferences' self.preferences.set('font',self.font_input.get()) self.preferences.set('fontsize',self.fontsize_input.get()) self.preferences.set(...
Saves the sequence display settings to prefs file
Saves the sequence display settings to prefs file
[ "Saves", "the", "sequence", "display", "settings", "to", "prefs", "file" ]
def save_preferences(self): import preferences print 'Saving Ekin preferences' self.preferences.set('font',self.font_input.get()) self.preferences.set('fontsize',self.fontsize_input.get()) self.preferences.set('fontstyle',self.fontstyle_input.get()) self.preferences.set('...
[ "def", "save_preferences", "(", "self", ")", ":", "import", "preferences", "print", "'Saving Ekin preferences'", "self", ".", "preferences", ".", "set", "(", "'font'", ",", "self", ".", "font_input", ".", "get", "(", ")", ")", "self", ".", "preferences", "."...
Saves the sequence display settings to prefs file
[ "Saves", "the", "sequence", "display", "settings", "to", "prefs", "file" ]
[ "\"\"\"Saves the sequence display settings to prefs file\"\"\"", "#self.preferences.set('showgraphlegend',self.showgraphlegend)\r", "#self.preferences.set('showgraphoptions',self.showgraphoptions)\r" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ea596d7e2a17973e406e24b5f85e5e12a77c14aa
shambo001/peat
PEATDB/Ekin/Ekin_prefs.py
[ "MIT" ]
Python
load_preferences
<not_specific>
def load_preferences(self): """Loads the sequence display settings from prefs file, if present""" from PEATDB.Prefs import Preferences print 'Loading current Ekin preferences' self.preferences=Preferences('Ekin',{'canvas_height':600}) try: f=self.preferences.g...
Loads the sequence display settings from prefs file, if present
Loads the sequence display settings from prefs file, if present
[ "Loads", "the", "sequence", "display", "settings", "from", "prefs", "file", "if", "present" ]
def load_preferences(self): from PEATDB.Prefs import Preferences print 'Loading current Ekin preferences' self.preferences=Preferences('Ekin',{'canvas_height':600}) try: f=self.preferences.get('font') self.font_input.set(f) except: self.prefere...
[ "def", "load_preferences", "(", "self", ")", ":", "from", "PEATDB", ".", "Prefs", "import", "Preferences", "print", "'Loading current Ekin preferences'", "self", ".", "preferences", "=", "Preferences", "(", "'Ekin'", ",", "{", "'canvas_height'", ":", "600", "}", ...
Loads the sequence display settings from prefs file, if present
[ "Loads", "the", "sequence", "display", "settings", "from", "prefs", "file", "if", "present" ]
[ "\"\"\"Loads the sequence display settings from prefs file, if present\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
bec7608279326d8fe30a5739999005786013380b
shambo001/peat
DataPipeline/Editor.py
[ "MIT" ]
Python
addFunction
<not_specific>
def addFunction(self, name, func): """Add an external function to the buttons bar""" x=Button(self.buttonpanel,text=name,command=func) x.pack(side=LEFT,fill=BOTH,padx=2,pady=2) return
Add an external function to the buttons bar
Add an external function to the buttons bar
[ "Add", "an", "external", "function", "to", "the", "buttons", "bar" ]
def addFunction(self, name, func): x=Button(self.buttonpanel,text=name,command=func) x.pack(side=LEFT,fill=BOTH,padx=2,pady=2) return
[ "def", "addFunction", "(", "self", ",", "name", ",", "func", ")", ":", "x", "=", "Button", "(", "self", ".", "buttonpanel", ",", "text", "=", "name", ",", "command", "=", "func", ")", "x", ".", "pack", "(", "side", "=", "LEFT", ",", "fill", "=", ...
Add an external function to the buttons bar
[ "Add", "an", "external", "function", "to", "the", "buttons", "bar" ]
[ "\"\"\"Add an external function to the buttons bar\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "name", "type": null }, { "param": "func", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "name", "type": null, "docstring": null, "docstring_tokens": [...
bec7608279326d8fe30a5739999005786013380b
shambo001/peat
DataPipeline/Editor.py
[ "MIT" ]
Python
openFile
<not_specific>
def openFile(self, filename=None): """Displays text from a simple text file""" if filename == None: filename = self.openFilename() if not filename: return for line in fileinput.input(filename): self.text.insert(END, line) self.filename = filena...
Displays text from a simple text file
Displays text from a simple text file
[ "Displays", "text", "from", "a", "simple", "text", "file" ]
def openFile(self, filename=None): if filename == None: filename = self.openFilename() if not filename: return for line in fileinput.input(filename): self.text.insert(END, line) self.filename = filename self.main.title(filename) return
[ "def", "openFile", "(", "self", ",", "filename", "=", "None", ")", ":", "if", "filename", "==", "None", ":", "filename", "=", "self", ".", "openFilename", "(", ")", "if", "not", "filename", ":", "return", "for", "line", "in", "fileinput", ".", "input",...
Displays text from a simple text file
[ "Displays", "text", "from", "a", "simple", "text", "file" ]
[ "\"\"\"Displays text from a simple text file\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
5b0cc4048d846a5197a817be03e2a0353a4206ca
shambo001/peat
pKa/pKD_tools.py
[ "MIT" ]
Python
filter_deletion_insertion
<not_specific>
def filter_deletion_insertion(mutation): """Process insertions and mutations so we get the right residue numbers""" if mutation.split(':')[0]=='delete': # Right now we model deletions as glycines mutation=mutation.replace('delete:','') mutation=mutation+':GLY' elif mutation.find('ins...
Process insertions and mutations so we get the right residue numbers
Process insertions and mutations so we get the right residue numbers
[ "Process", "insertions", "and", "mutations", "so", "we", "get", "the", "right", "residue", "numbers" ]
def filter_deletion_insertion(mutation): if mutation.split(':')[0]=='delete': mutation=mutation.replace('delete:','') mutation=mutation+':GLY' elif mutation.find('insert')!=-1: sp=mutation.split(':') mutation='%s:%s:NON:%s' %(sp[1],sp[2],sp[3]) elif mutation.find('+')!=-1: ...
[ "def", "filter_deletion_insertion", "(", "mutation", ")", ":", "if", "mutation", ".", "split", "(", "':'", ")", "[", "0", "]", "==", "'delete'", ":", "mutation", "=", "mutation", ".", "replace", "(", "'delete:'", ",", "''", ")", "mutation", "=", "mutatio...
Process insertions and mutations so we get the right residue numbers
[ "Process", "insertions", "and", "mutations", "so", "we", "get", "the", "right", "residue", "numbers" ]
[ "\"\"\"Process insertions and mutations so we get the right residue numbers\"\"\"", "# Right now we model deletions as glycines" ]
[ { "param": "mutation", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "mutation", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5b0cc4048d846a5197a817be03e2a0353a4206ca
shambo001/peat
pKa/pKD_tools.py
[ "MIT" ]
Python
check_mutation_syntax
<not_specific>
def check_mutation_syntax(operations,sequence=None): """Check the syntax of an operation string and check that the residue is present in the sequence""" single=get_single_operations(operations) for op in single: resid=get_resid_from_mut(op) new=get_newrestyp_from_mut(op) old=get_oldr...
Check the syntax of an operation string and check that the residue is present in the sequence
Check the syntax of an operation string and check that the residue is present in the sequence
[ "Check", "the", "syntax", "of", "an", "operation", "string", "and", "check", "that", "the", "residue", "is", "present", "in", "the", "sequence" ]
def check_mutation_syntax(operations,sequence=None): single=get_single_operations(operations) for op in single: resid=get_resid_from_mut(op) new=get_newrestyp_from_mut(op) old=get_oldrestyp_from_mut(op) import Protool X=Protool.structureIO() if not X.aminoacids.ha...
[ "def", "check_mutation_syntax", "(", "operations", ",", "sequence", "=", "None", ")", ":", "single", "=", "get_single_operations", "(", "operations", ")", "for", "op", "in", "single", ":", "resid", "=", "get_resid_from_mut", "(", "op", ")", "new", "=", "get_...
Check the syntax of an operation string and check that the residue is present in the sequence
[ "Check", "the", "syntax", "of", "an", "operation", "string", "and", "check", "that", "the", "residue", "is", "present", "in", "the", "sequence" ]
[ "\"\"\"Check the syntax of an operation string and check that the residue is present in the sequence\"\"\"" ]
[ { "param": "operations", "type": null }, { "param": "sequence", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "operations", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sequence", "type": null, "docstring": null, "docstring_...
5b0cc4048d846a5197a817be03e2a0353a4206ca
shambo001/peat
pKa/pKD_tools.py
[ "MIT" ]
Python
interpret_mutations
<not_specific>
def interpret_mutations(operations): """Combine a string of operations to a set of PEAT operations. This function detects whether we have a classic or a PEAT format and cleans the operations afterwards""" if operations.find(':')!=-1: pass else: operations=convert_classic_to_PEAT(oper...
Combine a string of operations to a set of PEAT operations. This function detects whether we have a classic or a PEAT format and cleans the operations afterwards
Combine a string of operations to a set of PEAT operations. This function detects whether we have a classic or a PEAT format and cleans the operations afterwards
[ "Combine", "a", "string", "of", "operations", "to", "a", "set", "of", "PEAT", "operations", ".", "This", "function", "detects", "whether", "we", "have", "a", "classic", "or", "a", "PEAT", "format", "and", "cleans", "the", "operations", "afterwards" ]
def interpret_mutations(operations): if operations.find(':')!=-1: pass else: operations=convert_classic_to_PEAT(operations) if not operations: return False return check_mutation_syntax(operations)
[ "def", "interpret_mutations", "(", "operations", ")", ":", "if", "operations", ".", "find", "(", "':'", ")", "!=", "-", "1", ":", "pass", "else", ":", "operations", "=", "convert_classic_to_PEAT", "(", "operations", ")", "if", "not", "operations", ":", "re...
Combine a string of operations to a set of PEAT operations.
[ "Combine", "a", "string", "of", "operations", "to", "a", "set", "of", "PEAT", "operations", "." ]
[ "\"\"\"Combine a string of operations to a set of PEAT operations.\n This function detects whether we have a classic or a PEAT format\n and cleans the operations afterwards\"\"\"" ]
[ { "param": "operations", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "operations", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5b0cc4048d846a5197a817be03e2a0353a4206ca
shambo001/peat
pKa/pKD_tools.py
[ "MIT" ]
Python
combine_operations
<not_specific>
def combine_operations(operations): """Combine single operations into a single operation string""" operations.sort() import string return string.join(operations,'+')
Combine single operations into a single operation string
Combine single operations into a single operation string
[ "Combine", "single", "operations", "into", "a", "single", "operation", "string" ]
def combine_operations(operations): operations.sort() import string return string.join(operations,'+')
[ "def", "combine_operations", "(", "operations", ")", ":", "operations", ".", "sort", "(", ")", "import", "string", "return", "string", ".", "join", "(", "operations", ",", "'+'", ")" ]
Combine single operations into a single operation string
[ "Combine", "single", "operations", "into", "a", "single", "operation", "string" ]
[ "\"\"\"Combine single operations into a single operation string\"\"\"" ]
[ { "param": "operations", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "operations", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5b0cc4048d846a5197a817be03e2a0353a4206ca
shambo001/peat
pKa/pKD_tools.py
[ "MIT" ]
Python
convert_classic_to_PEAT
<not_specific>
def convert_classic_to_PEAT(operations): """Convert a set of classic mutations to a set of PEAT operations The classic operations are in the format: A12G+R45V etc.""" # # Do a quick sanity check # for junk in ['?','unknown','empty']: if operations.lower().find(junk)!=-1: retu...
Convert a set of classic mutations to a set of PEAT operations The classic operations are in the format: A12G+R45V etc.
Convert a set of classic mutations to a set of PEAT operations The classic operations are in the format: A12G+R45V etc.
[ "Convert", "a", "set", "of", "classic", "mutations", "to", "a", "set", "of", "PEAT", "operations", "The", "classic", "operations", "are", "in", "the", "format", ":", "A12G", "+", "R45V", "etc", "." ]
def convert_classic_to_PEAT(operations): Do a quick sanity check for junk in ['?','unknown','empty']: if operations.lower().find(junk)!=-1: return False Deal with the operations sp=operations.split('+') import Protool, string P=Protool.structureIO() POP=[] for op in...
[ "def", "convert_classic_to_PEAT", "(", "operations", ")", ":", "for", "junk", "in", "[", "'?'", ",", "'unknown'", ",", "'empty'", "]", ":", "if", "operations", ".", "lower", "(", ")", ".", "find", "(", "junk", ")", "!=", "-", "1", ":", "return", "Fal...
Convert a set of classic mutations to a set of PEAT operations The classic operations are in the format: A12G+R45V etc.
[ "Convert", "a", "set", "of", "classic", "mutations", "to", "a", "set", "of", "PEAT", "operations", "The", "classic", "operations", "are", "in", "the", "format", ":", "A12G", "+", "R45V", "etc", "." ]
[ "\"\"\"Convert a set of classic mutations to a set of PEAT operations\n The classic operations are in the format: A12G+R45V etc.\"\"\"", "#", "# Do a quick sanity check", "#", "#", "# Deal with the operations", "#" ]
[ { "param": "operations", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "operations", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
5b0cc4048d846a5197a817be03e2a0353a4206ca
shambo001/peat
pKa/pKD_tools.py
[ "MIT" ]
Python
findSequenceDifferences
<not_specific>
def findSequenceDifferences(child_sequence, parent_sequence,full_parent_sequence,ignoreCterm=False): """ # Find all amino acid differences between child_sequence and parent_sequence Child sequence and parent sequence must be aligned and in 1-letter format: child_sequence, parent_sequence: AAADEFFG f...
# Find all amino acid differences between child_sequence and parent_sequence Child sequence and parent sequence must be aligned and in 1-letter format: child_sequence, parent_sequence: AAADEFFG full parent sequence is a Protool.sequence object
Find all amino acid differences between child_sequence and parent_sequence Child sequence and parent sequence must be aligned and in 1-letter format: child_sequence, parent_sequence: AAADEFFG full parent sequence is a Protool.sequence object
[ "Find", "all", "amino", "acid", "differences", "between", "child_sequence", "and", "parent_sequence", "Child", "sequence", "and", "parent", "sequence", "must", "be", "aligned", "and", "in", "1", "-", "letter", "format", ":", "child_sequence", "parent_sequence", ":...
def findSequenceDifferences(child_sequence, parent_sequence,full_parent_sequence,ignoreCterm=False): Loop over the sequences - changes are record from parent -> child import string operations=[] import Protool PI=Protool.structureIO() Cterm_add=0 insert_num=0 full_parent_count=0 for...
[ "def", "findSequenceDifferences", "(", "child_sequence", ",", "parent_sequence", ",", "full_parent_sequence", ",", "ignoreCterm", "=", "False", ")", ":", "import", "string", "operations", "=", "[", "]", "import", "Protool", "PI", "=", "Protool", ".", "structureIO"...
Find all amino acid differences between child_sequence and parent_sequence Child sequence and parent sequence must be aligned and in 1-letter format: child_sequence, parent_sequence: AAADEFFG full parent sequence is a Protool.sequence object
[ "Find", "all", "amino", "acid", "differences", "between", "child_sequence", "and", "parent_sequence", "Child", "sequence", "and", "parent", "sequence", "must", "be", "aligned", "and", "in", "1", "-", "letter", "format", ":", "child_sequence", "parent_sequence", ":...
[ "\"\"\"\n # Find all amino acid differences between child_sequence and parent_sequence\n Child sequence and parent sequence must be aligned and in 1-letter format:\n child_sequence, parent_sequence: AAADEFFG\n full parent sequence is a Protool.sequence object\n \"\"\"", "#", "# Loop over the sequ...
[ { "param": "child_sequence", "type": null }, { "param": "parent_sequence", "type": null }, { "param": "full_parent_sequence", "type": null }, { "param": "ignoreCterm", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "child_sequence", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parent_sequence", "type": null, "docstring": null, ...
5b0cc4048d846a5197a817be03e2a0353a4206ca
shambo001/peat
pKa/pKD_tools.py
[ "MIT" ]
Python
shortenOperations
<not_specific>
def shortenOperations(operations): """Provide the more conventional short form of the mutations""" new_ops=[] import DNAtool.mutation import pKa.pKD_tools as pKD_tools for operation in operations: if operation.find('insert')!=-1: text=operation.replace('insert','').split(':') ...
Provide the more conventional short form of the mutations
Provide the more conventional short form of the mutations
[ "Provide", "the", "more", "conventional", "short", "form", "of", "the", "mutations" ]
def shortenOperations(operations): new_ops=[] import DNAtool.mutation import pKa.pKD_tools as pKD_tools for operation in operations: if operation.find('insert')!=-1: text=operation.replace('insert','').split(':') insertnum=int(text[0]) resnum='%s:%s' %(text[1]...
[ "def", "shortenOperations", "(", "operations", ")", ":", "new_ops", "=", "[", "]", "import", "DNAtool", ".", "mutation", "import", "pKa", ".", "pKD_tools", "as", "pKD_tools", "for", "operation", "in", "operations", ":", "if", "operation", ".", "find", "(", ...
Provide the more conventional short form of the mutations
[ "Provide", "the", "more", "conventional", "short", "form", "of", "the", "mutations" ]
[ "\"\"\"Provide the more conventional short form of the mutations\"\"\"" ]
[ { "param": "operations", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "operations", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_hydrogen_bond
<not_specific>
def is_hydrogen_bond(self,atom1,atom2,low_cutoff=2.2,high_cutoff=3.5): """Returns 1 or 2 if there is a potential hydrogen bond between these two atoms. Returns None otherwise. Returns 1 if the first atom is the donor, and 2 if the second atom is the donor""" # # INCLUDE ANGLE REQ...
Returns 1 or 2 if there is a potential hydrogen bond between these two atoms. Returns None otherwise. Returns 1 if the first atom is the donor, and 2 if the second atom is the donor
Returns 1 or 2 if there is a potential hydrogen bond between these two atoms. Returns None otherwise. Returns 1 if the first atom is the donor, and 2 if the second atom is the donor
[ "Returns", "1", "or", "2", "if", "there", "is", "a", "potential", "hydrogen", "bond", "between", "these", "two", "atoms", ".", "Returns", "None", "otherwise", ".", "Returns", "1", "if", "the", "first", "atom", "is", "the", "donor", "and", "2", "if", "t...
def is_hydrogen_bond(self,atom1,atom2,low_cutoff=2.2,high_cutoff=3.5): INCLUDE ANGLE REQUIREMENTS! if self.is_hbond_donor(atom1) and self.is_hbond_acceptor(atom2): if self.dist(atom1,atom2)>low_cutoff and self.dist(atom1,atom2)<=high_cutoff: return 1 if self.is_hbond...
[ "def", "is_hydrogen_bond", "(", "self", ",", "atom1", ",", "atom2", ",", "low_cutoff", "=", "2.2", ",", "high_cutoff", "=", "3.5", ")", ":", "if", "self", ".", "is_hbond_donor", "(", "atom1", ")", "and", "self", ".", "is_hbond_acceptor", "(", "atom2", ")...
Returns 1 or 2 if there is a potential hydrogen bond between these two atoms.
[ "Returns", "1", "or", "2", "if", "there", "is", "a", "potential", "hydrogen", "bond", "between", "these", "two", "atoms", "." ]
[ "\"\"\"Returns 1 or 2 if there is a potential hydrogen bond between these two atoms.\n Returns None otherwise. Returns 1 if the first atom is the donor, and 2\n if the second atom is the donor\"\"\"", "#", "# INCLUDE ANGLE REQUIREMENTS!", "#" ]
[ { "param": "self", "type": null }, { "param": "atom1", "type": null }, { "param": "atom2", "type": null }, { "param": "low_cutoff", "type": null }, { "param": "high_cutoff", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom1", "type": null, "docstring": null, "docstring_tokens": ...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_hbond_donor
<not_specific>
def is_hbond_donor(self,atom): """Returns 1 if the atom can be a hydrogen donor""" atomname=atom.split(':')[-1] residuename=self.resname(atom) donors={'LYS':['NZ'], 'ARG':['NE','NH1','NH2'], 'SER':['OG'], 'THR':['OG1'], 'TYR...
Returns 1 if the atom can be a hydrogen donor
Returns 1 if the atom can be a hydrogen donor
[ "Returns", "1", "if", "the", "atom", "can", "be", "a", "hydrogen", "donor" ]
def is_hbond_donor(self,atom): atomname=atom.split(':')[-1] residuename=self.resname(atom) donors={'LYS':['NZ'], 'ARG':['NE','NH1','NH2'], 'SER':['OG'], 'THR':['OG1'], 'TYR':['OH'], 'HIS':['ND1','NE2'], ...
[ "def", "is_hbond_donor", "(", "self", ",", "atom", ")", ":", "atomname", "=", "atom", ".", "split", "(", "':'", ")", "[", "-", "1", "]", "residuename", "=", "self", ".", "resname", "(", "atom", ")", "donors", "=", "{", "'LYS'", ":", "[", "'NZ'", ...
Returns 1 if the atom can be a hydrogen donor
[ "Returns", "1", "if", "the", "atom", "can", "be", "a", "hydrogen", "donor" ]
[ "\"\"\"Returns 1 if the atom can be a hydrogen donor\"\"\"", "#", "# Backbone", "#", "#", "# Other residues", "#" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_hbond_acceptor
<not_specific>
def is_hbond_acceptor(self,atom): """Returns 1 if the atom can be a hydrogen acceptor""" atomname=atom.split(':')[-1] residuename=self.resname(atom) acceptors={'ASP':['OD1','OD2'], 'GLU':['OE1','OE2'], 'SER':['OG'], 'THR':['OG1'], ...
Returns 1 if the atom can be a hydrogen acceptor
Returns 1 if the atom can be a hydrogen acceptor
[ "Returns", "1", "if", "the", "atom", "can", "be", "a", "hydrogen", "acceptor" ]
def is_hbond_acceptor(self,atom): atomname=atom.split(':')[-1] residuename=self.resname(atom) acceptors={'ASP':['OD1','OD2'], 'GLU':['OE1','OE2'], 'SER':['OG'], 'THR':['OG1'], 'TYR':['OH'], 'HIS':['ND1...
[ "def", "is_hbond_acceptor", "(", "self", ",", "atom", ")", ":", "atomname", "=", "atom", ".", "split", "(", "':'", ")", "[", "-", "1", "]", "residuename", "=", "self", ".", "resname", "(", "atom", ")", "acceptors", "=", "{", "'ASP'", ":", "[", "'OD...
Returns 1 if the atom can be a hydrogen acceptor
[ "Returns", "1", "if", "the", "atom", "can", "be", "a", "hydrogen", "acceptor" ]
[ "\"\"\"Returns 1 if the atom can be a hydrogen acceptor\"\"\"", "#", "# Backbone", "#", "#", "# Other residues", "#" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_hydrophilic
<not_specific>
def is_hydrophilic(self,atom): """Returns 1 if the atom is hydrophilic""" if self.is_oxygen(atom) or self.is_nitrogen(atom): return 1 return None
Returns 1 if the atom is hydrophilic
Returns 1 if the atom is hydrophilic
[ "Returns", "1", "if", "the", "atom", "is", "hydrophilic" ]
def is_hydrophilic(self,atom): if self.is_oxygen(atom) or self.is_nitrogen(atom): return 1 return None
[ "def", "is_hydrophilic", "(", "self", ",", "atom", ")", ":", "if", "self", ".", "is_oxygen", "(", "atom", ")", "or", "self", ".", "is_nitrogen", "(", "atom", ")", ":", "return", "1", "return", "None" ]
Returns 1 if the atom is hydrophilic
[ "Returns", "1", "if", "the", "atom", "is", "hydrophilic" ]
[ "\"\"\"Returns 1 if the atom is hydrophilic\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_CB
<not_specific>
def is_CB(self,atom): """Returns 1 if the atom is CB""" import string atomname=string.split(atom,':')[-1] if atomname=='CB': return 1 else: return None
Returns 1 if the atom is CB
Returns 1 if the atom is CB
[ "Returns", "1", "if", "the", "atom", "is", "CB" ]
def is_CB(self,atom): import string atomname=string.split(atom,':')[-1] if atomname=='CB': return 1 else: return None
[ "def", "is_CB", "(", "self", ",", "atom", ")", ":", "import", "string", "atomname", "=", "string", ".", "split", "(", "atom", ",", "':'", ")", "[", "-", "1", "]", "if", "atomname", "==", "'CB'", ":", "return", "1", "else", ":", "return", "None" ]
Returns 1 if the atom is CB
[ "Returns", "1", "if", "the", "atom", "is", "CB" ]
[ "\"\"\"Returns 1 if the atom is CB\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_oxygen
<not_specific>
def is_oxygen(self,atom): """Returns 1 if the current atom is an oxygen""" atomname=atom.split(':')[-1] if atomname.find('O')!=-1: return 1 return None
Returns 1 if the current atom is an oxygen
Returns 1 if the current atom is an oxygen
[ "Returns", "1", "if", "the", "current", "atom", "is", "an", "oxygen" ]
def is_oxygen(self,atom): atomname=atom.split(':')[-1] if atomname.find('O')!=-1: return 1 return None
[ "def", "is_oxygen", "(", "self", ",", "atom", ")", ":", "atomname", "=", "atom", ".", "split", "(", "':'", ")", "[", "-", "1", "]", "if", "atomname", ".", "find", "(", "'O'", ")", "!=", "-", "1", ":", "return", "1", "return", "None" ]
Returns 1 if the current atom is an oxygen
[ "Returns", "1", "if", "the", "current", "atom", "is", "an", "oxygen" ]
[ "\"\"\"Returns 1 if the current atom is an oxygen\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_nitrogen
<not_specific>
def is_nitrogen(self,atom): """Returns 1 if the current atom is a nitrogen""" atomname=atom.split(':')[-1] if atomname.find('N')!=-1: return 1 return None
Returns 1 if the current atom is a nitrogen
Returns 1 if the current atom is a nitrogen
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "nitrogen" ]
def is_nitrogen(self,atom): atomname=atom.split(':')[-1] if atomname.find('N')!=-1: return 1 return None
[ "def", "is_nitrogen", "(", "self", ",", "atom", ")", ":", "atomname", "=", "atom", ".", "split", "(", "':'", ")", "[", "-", "1", "]", "if", "atomname", ".", "find", "(", "'N'", ")", "!=", "-", "1", ":", "return", "1", "return", "None" ]
Returns 1 if the current atom is a nitrogen
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "nitrogen" ]
[ "\"\"\"Returns 1 if the current atom is a nitrogen\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_carbon
<not_specific>
def is_carbon(self,atom): """Returns 1 if the current atom is a carbon""" atomname=atom.split(':')[-1] if atomname.find('C')!=-1: return 1 return None
Returns 1 if the current atom is a carbon
Returns 1 if the current atom is a carbon
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "carbon" ]
def is_carbon(self,atom): atomname=atom.split(':')[-1] if atomname.find('C')!=-1: return 1 return None
[ "def", "is_carbon", "(", "self", ",", "atom", ")", ":", "atomname", "=", "atom", ".", "split", "(", "':'", ")", "[", "-", "1", "]", "if", "atomname", ".", "find", "(", "'C'", ")", "!=", "-", "1", ":", "return", "1", "return", "None" ]
Returns 1 if the current atom is a carbon
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "carbon" ]
[ "\"\"\"Returns 1 if the current atom is a carbon\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_sulphur
<not_specific>
def is_sulphur(self,atom): """Returns 1 if the current atom is a carbon""" atomname=atom.split(':')[-1] if atomname.find('S')!=-1: return 1 return None
Returns 1 if the current atom is a carbon
Returns 1 if the current atom is a carbon
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "carbon" ]
def is_sulphur(self,atom): atomname=atom.split(':')[-1] if atomname.find('S')!=-1: return 1 return None
[ "def", "is_sulphur", "(", "self", ",", "atom", ")", ":", "atomname", "=", "atom", ".", "split", "(", "':'", ")", "[", "-", "1", "]", "if", "atomname", ".", "find", "(", "'S'", ")", "!=", "-", "1", ":", "return", "1", "return", "None" ]
Returns 1 if the current atom is a carbon
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "carbon" ]
[ "\"\"\"Returns 1 if the current atom is a carbon\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f23b064b1a1e8b9e6709fd12510296e006d94c99
shambo001/peat
Protool/flags.py
[ "MIT" ]
Python
is_phosphor
<not_specific>
def is_phosphor(self,atom): """Returns 1 if the current atom is a carbon""" atomname=atom.split(':')[-1] if atomname.find('P')!=-1: return 1 return None
Returns 1 if the current atom is a carbon
Returns 1 if the current atom is a carbon
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "carbon" ]
def is_phosphor(self,atom): atomname=atom.split(':')[-1] if atomname.find('P')!=-1: return 1 return None
[ "def", "is_phosphor", "(", "self", ",", "atom", ")", ":", "atomname", "=", "atom", ".", "split", "(", "':'", ")", "[", "-", "1", "]", "if", "atomname", ".", "find", "(", "'P'", ")", "!=", "-", "1", ":", "return", "1", "return", "None" ]
Returns 1 if the current atom is a carbon
[ "Returns", "1", "if", "the", "current", "atom", "is", "a", "carbon" ]
[ "\"\"\"Returns 1 if the current atom is a carbon\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "atom", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "atom", "type": null, "docstring": null, "docstring_tokens": [...
f246b9a3de6f067d7c6397cdb7317a3ddb0b5cf1
shambo001/peat
PEATDB/Search.py
[ "MIT" ]
Python
searchfunc
<not_specific>
def searchfunc(self, col, attr, val, op): """Must be overriden, this code is an example only col: field in DB attr: name of attribute to search val: value to search for op: relational operator to apply e.g. '>' returns a list of records that are True for th...
Must be overriden, this code is an example only col: field in DB attr: name of attribute to search val: value to search for op: relational operator to apply e.g. '>' returns a list of records that are True for the search
Must be overriden, this code is an example only col: field in DB attr: name of attribute to search val: value to search for op: relational operator to apply e.g. '>' returns a list of records that are True for the search
[ "Must", "be", "overriden", "this", "code", "is", "an", "example", "only", "col", ":", "field", "in", "DB", "attr", ":", "name", "of", "attribute", "to", "search", "val", ":", "value", "to", "search", "for", "op", ":", "relational", "operator", "to", "a...
def searchfunc(self, col, attr, val, op): func = self.funcs[op] for rec in self.reclist: if not self.data[rec].has_key(col): continue if func(val,data[rec][col]): names.append(rec) return names
[ "def", "searchfunc", "(", "self", ",", "col", ",", "attr", ",", "val", ",", "op", ")", ":", "func", "=", "self", ".", "funcs", "[", "op", "]", "for", "rec", "in", "self", ".", "reclist", ":", "if", "not", "self", ".", "data", "[", "rec", "]", ...
Must be overriden, this code is an example only col: field in DB attr: name of attribute to search val: value to search for op: relational operator to apply e.g.
[ "Must", "be", "overriden", "this", "code", "is", "an", "example", "only", "col", ":", "field", "in", "DB", "attr", ":", "name", "of", "attribute", "to", "search", "val", ":", "value", "to", "search", "for", "op", ":", "relational", "operator", "to", "a...
[ "\"\"\"Must be overriden, this code is an example only\n col: field in DB\n attr: name of attribute to search\n val: value to search for\n op: relational operator to apply e.g. '>'\n returns a list of records that are True for the search\n \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "col", "type": null }, { "param": "attr", "type": null }, { "param": "val", "type": null }, { "param": "op", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "col", "type": null, "docstring": null, "docstring_tokens": []...
f246b9a3de6f067d7c6397cdb7317a3ddb0b5cf1
shambo001/peat
PEATDB/Search.py
[ "MIT" ]
Python
doSearch
<not_specific>
def doSearch(self, filters=None): """If we need to search directly from handler""" if filters==None: F = [self.getFilter] else: F = filters SF = [self.searchfunc for i in F] names = Base.Filter(F, SF) self.names = names return names
If we need to search directly from handler
If we need to search directly from handler
[ "If", "we", "need", "to", "search", "directly", "from", "handler" ]
def doSearch(self, filters=None): if filters==None: F = [self.getFilter] else: F = filters SF = [self.searchfunc for i in F] names = Base.Filter(F, SF) self.names = names return names
[ "def", "doSearch", "(", "self", ",", "filters", "=", "None", ")", ":", "if", "filters", "==", "None", ":", "F", "=", "[", "self", ".", "getFilter", "]", "else", ":", "F", "=", "filters", "SF", "=", "[", "self", ".", "searchfunc", "for", "i", "in"...
If we need to search directly from handler
[ "If", "we", "need", "to", "search", "directly", "from", "handler" ]
[ "\"\"\"If we need to search directly from handler\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filters", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filters", "type": null, "docstring": null, "docstring_tokens"...
f246b9a3de6f067d7c6397cdb7317a3ddb0b5cf1
shambo001/peat
PEATDB/Search.py
[ "MIT" ]
Python
searchfunc
<not_specific>
def searchfunc(self, col, attr, val, op): """Simple search for strings, attr is always the string itself, so it can be passed as empty""" floatops = ['=','>','<'] func = self.funcs[op] data = self.data names=[] for rec in self.reclist: if data[rec]....
Simple search for strings, attr is always the string itself, so it can be passed as empty
Simple search for strings, attr is always the string itself, so it can be passed as empty
[ "Simple", "search", "for", "strings", "attr", "is", "always", "the", "string", "itself", "so", "it", "can", "be", "passed", "as", "empty" ]
def searchfunc(self, col, attr, val, op): floatops = ['=','>','<'] func = self.funcs[op] data = self.data names=[] for rec in self.reclist: if data[rec].has_key(col): if op in floatops: try: item = float(data...
[ "def", "searchfunc", "(", "self", ",", "col", ",", "attr", ",", "val", ",", "op", ")", ":", "floatops", "=", "[", "'='", ",", "'>'", ",", "'<'", "]", "func", "=", "self", ".", "funcs", "[", "op", "]", "data", "=", "self", ".", "data", "names", ...
Simple search for strings, attr is always the string itself, so it can be passed as empty
[ "Simple", "search", "for", "strings", "attr", "is", "always", "the", "string", "itself", "so", "it", "can", "be", "passed", "as", "empty" ]
[ "\"\"\"Simple search for strings, attr is always the string itself,\n so it can be passed as empty\"\"\"", "#try to do numerical comparisons if required" ]
[ { "param": "self", "type": null }, { "param": "col", "type": null }, { "param": "attr", "type": null }, { "param": "val", "type": null }, { "param": "op", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "col", "type": null, "docstring": null, "docstring_tokens": []...
f246b9a3de6f067d7c6397cdb7317a3ddb0b5cf1
shambo001/peat
PEATDB/Search.py
[ "MIT" ]
Python
searchfunc
<not_specific>
def searchfunc(self, col, attr, val, op): """attr is a subkey in the dict that can be recursively found """ floatops = ['=','>','<'] func = self.funcs[op] data = self.data names=[] subdata = {} print attr for rec in self.reclist: if data[rec].h...
attr is a subkey in the dict that can be recursively found
attr is a subkey in the dict that can be recursively found
[ "attr", "is", "a", "subkey", "in", "the", "dict", "that", "can", "be", "recursively", "found" ]
def searchfunc(self, col, attr, val, op): floatops = ['=','>','<'] func = self.funcs[op] data = self.data names=[] subdata = {} print attr for rec in self.reclist: if data[rec].has_key(col): item = self.data[rec][col] pr...
[ "def", "searchfunc", "(", "self", ",", "col", ",", "attr", ",", "val", ",", "op", ")", ":", "floatops", "=", "[", "'='", ",", "'>'", ",", "'<'", "]", "func", "=", "self", ".", "funcs", "[", "op", "]", "data", "=", "self", ".", "data", "names", ...
attr is a subkey in the dict that can be recursively found
[ "attr", "is", "a", "subkey", "in", "the", "dict", "that", "can", "be", "recursively", "found" ]
[ "\"\"\"attr is a subkey in the dict that can be recursively found \"\"\"", "#if not type(item) is types.DictType():", "# continue", "#do recursive search if sub dicts" ]
[ { "param": "self", "type": null }, { "param": "col", "type": null }, { "param": "attr", "type": null }, { "param": "val", "type": null }, { "param": "op", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "col", "type": null, "docstring": null, "docstring_tokens": []...
f246b9a3de6f067d7c6397cdb7317a3ddb0b5cf1
shambo001/peat
PEATDB/Search.py
[ "MIT" ]
Python
addSearch
<not_specific>
def addSearch(self, evt=None): """Show filter dialog for current handler""" if self.handler.get() == 'ekin': S=ekinSearch(self.DB) elif self.handler.get() == 'simple': S=simpleSearch(self.DB) elif self.handler.get() == 'dict': S=dictSearch(self.DB) ...
Show filter dialog for current handler
Show filter dialog for current handler
[ "Show", "filter", "dialog", "for", "current", "handler" ]
def addSearch(self, evt=None): if self.handler.get() == 'ekin': S=ekinSearch(self.DB) elif self.handler.get() == 'simple': S=simpleSearch(self.DB) elif self.handler.get() == 'dict': S=dictSearch(self.DB) elif self.handler.get() == 'structure': ...
[ "def", "addSearch", "(", "self", ",", "evt", "=", "None", ")", ":", "if", "self", ".", "handler", ".", "get", "(", ")", "==", "'ekin'", ":", "S", "=", "ekinSearch", "(", "self", ".", "DB", ")", "elif", "self", ".", "handler", ".", "get", "(", "...
Show filter dialog for current handler
[ "Show", "filter", "dialog", "for", "current", "handler" ]
[ "\"\"\"Show filter dialog for current handler\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "evt", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "evt", "type": null, "docstring": null, "docstring_tokens": []...
f246b9a3de6f067d7c6397cdb7317a3ddb0b5cf1
shambo001/peat
PEATDB/Search.py
[ "MIT" ]
Python
doSearch
<not_specific>
def doSearch(self, evt=None): """Put searches together for all search handlers present""" if len(self.currenthandlers)==0: return F=[] SF=[] for s in self.currenthandlers: F.append(s.getFilter()) SF.append(s.searchfunc) names = Base.Fil...
Put searches together for all search handlers present
Put searches together for all search handlers present
[ "Put", "searches", "together", "for", "all", "search", "handlers", "present" ]
def doSearch(self, evt=None): if len(self.currenthandlers)==0: return F=[] SF=[] for s in self.currenthandlers: F.append(s.getFilter()) SF.append(s.searchfunc) names = Base.Filter(F, SF) self.updateResults(names) print names ...
[ "def", "doSearch", "(", "self", ",", "evt", "=", "None", ")", ":", "if", "len", "(", "self", ".", "currenthandlers", ")", "==", "0", ":", "return", "F", "=", "[", "]", "SF", "=", "[", "]", "for", "s", "in", "self", ".", "currenthandlers", ":", ...
Put searches together for all search handlers present
[ "Put", "searches", "together", "for", "all", "search", "handlers", "present" ]
[ "\"\"\"Put searches together for all search handlers present\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "evt", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "evt", "type": null, "docstring": null, "docstring_tokens": []...
08013c2c68e03604ae2a450059814a6a7b6f3255
shambo001/peat
pKa/effective_dielectric_constant.py
[ "MIT" ]
Python
analyse_one_pdbfile
<not_specific>
def analyse_one_pdbfile(pdbfile,bigdict=None): """Load the MC.tabdata file and the sugelm file to determine the effective dielectric constant for single mutations""" mcfile=pdbfile+'.MC.tabdata' sugelm=pdbfile+'.sugelm_data' print 'Loading:' print mcfile print sugelm print import os ...
Load the MC.tabdata file and the sugelm file to determine the effective dielectric constant for single mutations
Load the MC.tabdata file and the sugelm file to determine the effective dielectric constant for single mutations
[ "Load", "the", "MC", ".", "tabdata", "file", "and", "the", "sugelm", "file", "to", "determine", "the", "effective", "dielectric", "constant", "for", "single", "mutations" ]
def analyse_one_pdbfile(pdbfile,bigdict=None): mcfile=pdbfile+'.MC.tabdata' sugelm=pdbfile+'.sugelm_data' print 'Loading:' print mcfile print sugelm print import os if not os.path.isfile(mcfile): return [],[],0 if not os.path.isfile(sugelm): return [],[],0 if bigd...
[ "def", "analyse_one_pdbfile", "(", "pdbfile", ",", "bigdict", "=", "None", ")", ":", "mcfile", "=", "pdbfile", "+", "'.MC.tabdata'", "sugelm", "=", "pdbfile", "+", "'.sugelm_data'", "print", "'Loading:'", "print", "mcfile", "print", "sugelm", "print", "import", ...
Load the MC.tabdata file and the sugelm file to determine the effective dielectric constant for single mutations
[ "Load", "the", "MC", ".", "tabdata", "file", "and", "the", "sugelm", "file", "to", "determine", "the", "effective", "dielectric", "constant", "for", "single", "mutations" ]
[ "\"\"\"Load the MC.tabdata file and the sugelm file to determine the\n effective dielectric constant for single mutations\"\"\"", "#", "# Get the PDB file", "#", "# Matrix", "# Intrinsic pKa values for mutated residues", "#", "# Read the PDB file", "#", "#", "# Start calculating", "#", "#...
[ { "param": "pdbfile", "type": null }, { "param": "bigdict", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbfile", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "bigdict", "type": null, "docstring": null, "docstring_toke...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
createMenuBar
<not_specific>
def createMenuBar(self): """Create the menu bar for the application. """ self.menu=Menu(self.labbook_win) self.proj_menu={'01New':{'cmd':self.new_project}, '02Open':{'cmd':self.open_project}, '03Close':{'cmd':self.close_project}, ...
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.labbook_win) self.proj_menu={'01New':{'cmd':self.new_project}, '02Open':{'cmd':self.open_project}, '03Close':{'cmd':self.close_project}, '04Save':{'cmd':self.save_project}, ...
[ "def", "createMenuBar", "(", "self", ")", ":", "self", ".", "menu", "=", "Menu", "(", "self", ".", "labbook_win", ")", "self", ".", "proj_menu", "=", "{", "'01New'", ":", "{", "'cmd'", ":", "self", ".", "new_project", "}", ",", "'02Open'", ":", "{", ...
Create the menu bar for the application.
[ "Create", "the", "menu", "bar", "for", "the", "application", "." ]
[ "\"\"\"Create the menu bar for the application. \"\"\"", "#", "# 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": [] }
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
loadprefs
<not_specific>
def loadprefs(self): """Setup default prefs file if any of the keys are not present""" defaultprefs = {'textsize':14, 'windowwidth': 800 ,'windowheight':600} for prop in defaultprefs.keys(): try: self.preferences.get(prop) except: ...
Setup default prefs file if any of the keys are not present
Setup default prefs file if any of the keys are not present
[ "Setup", "default", "prefs", "file", "if", "any", "of", "the", "keys", "are", "not", "present" ]
def loadprefs(self): defaultprefs = {'textsize':14, 'windowwidth': 800 ,'windowheight':600} for prop in defaultprefs.keys(): try: self.preferences.get(prop) except: self.preferences.set(prop, defaultprefs[pro...
[ "def", "loadprefs", "(", "self", ")", ":", "defaultprefs", "=", "{", "'textsize'", ":", "14", ",", "'windowwidth'", ":", "800", ",", "'windowheight'", ":", "600", "}", "for", "prop", "in", "defaultprefs", ".", "keys", "(", ")", ":", "try", ":", "self",...
Setup default prefs file if any of the keys are not present
[ "Setup", "default", "prefs", "file", "if", "any", "of", "the", "keys", "are", "not", "present" ]
[ "\"\"\"Setup default prefs file if any of the keys are not present\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
new_project
<not_specific>
def new_project(self, data=None): """Create a new table, with model and add the frame""" if hasattr(self,'currenttable'): self.notebook.destroy() self.currenttable.destroy() #Create the sheets dict self.sheets = {} self.notebook = Pmw.NoteBook(self.labboo...
Create a new table, with model and add the frame
Create a new table, with model and add the frame
[ "Create", "a", "new", "table", "with", "model", "and", "add", "the", "frame" ]
def new_project(self, data=None): if hasattr(self,'currenttable'): self.notebook.destroy() self.currenttable.destroy() self.sheets = {} self.notebook = Pmw.NoteBook(self.labbook_win, raisecommand=self.setcurrenttable) self.notebook.pack(fill='both', expand=1, padx...
[ "def", "new_project", "(", "self", ",", "data", "=", "None", ")", ":", "if", "hasattr", "(", "self", ",", "'currenttable'", ")", ":", "self", ".", "notebook", ".", "destroy", "(", ")", "self", ".", "currenttable", ".", "destroy", "(", ")", "self", "....
Create a new table, with model and add the frame
[ "Create", "a", "new", "table", "with", "model", "and", "add", "the", "frame" ]
[ "\"\"\"Create a new table, with model and add the frame\"\"\"", "#Create the sheets dict", "#try:", "#except:", "# print 'skipping'", "#do the table adding stuff for the initial sheet" ]
[ { "param": "self", "type": null }, { "param": "data", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "data", "type": null, "docstring": null, "docstring_tokens": [...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
do_save_project
<not_specific>
def do_save_project(self, filename): """Get model dicts and write all to pickle file""" data={} for s in self.sheets.keys(): currtable = self.sheets[s] model = currtable.getModel() data[s] = model.getData() fd=open(filename,'w') import pickl...
Get model dicts and write all to pickle file
Get model dicts and write all to pickle file
[ "Get", "model", "dicts", "and", "write", "all", "to", "pickle", "file" ]
def do_save_project(self, filename): data={} for s in self.sheets.keys(): currtable = self.sheets[s] model = currtable.getModel() data[s] = model.getData() fd=open(filename,'w') import pickle pickle.dump(data,fd) fd.close() retu...
[ "def", "do_save_project", "(", "self", ",", "filename", ")", ":", "data", "=", "{", "}", "for", "s", "in", "self", ".", "sheets", ".", "keys", "(", ")", ":", "currtable", "=", "self", ".", "sheets", "[", "s", "]", "model", "=", "currtable", ".", ...
Get model dicts and write all to pickle file
[ "Get", "model", "dicts", "and", "write", "all", "to", "pickle", "file" ]
[ "\"\"\"Get model dicts and write all to pickle file\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "filename", "type": null, "docstring": null, "docstring_tokens...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
import_fileset
<not_specific>
def import_fileset(self): """Import a series of external files in a folder""" if self.parent == None: import tkMessageBox tkMessageBox.showwarning("Not available", "You can't use this feature outside PEAT.") return from Extfile import FileHandler fh =...
Import a series of external files in a folder
Import a series of external files in a folder
[ "Import", "a", "series", "of", "external", "files", "in", "a", "folder" ]
def import_fileset(self): if self.parent == None: import tkMessageBox tkMessageBox.showwarning("Not available", "You can't use this feature outside PEAT.") return from Extfile import FileHandler fh = FileHandler(parent=self) fh.importFileset(DB=self.DB...
[ "def", "import_fileset", "(", "self", ")", ":", "if", "self", ".", "parent", "==", "None", ":", "import", "tkMessageBox", "tkMessageBox", ".", "showwarning", "(", "\"Not available\"", ",", "\"You can't use this feature outside PEAT.\"", ")", "return", "from", "Extfi...
Import a series of external files in a folder
[ "Import", "a", "series", "of", "external", "files", "in", "a", "folder" ]
[ "\"\"\"Import a series of external files in a folder\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
add_Sheet
<not_specific>
def add_Sheet(self, sheetname=None, sheetdata=None, model=None): """Add a new sheet - handles all the table creation stuff""" def checksheet_name(name): if name == '': tkMessageBox.showwarning("Whoops", "Name should not be blank.") return 0 if self...
Add a new sheet - handles all the table creation stuff
Add a new sheet - handles all the table creation stuff
[ "Add", "a", "new", "sheet", "-", "handles", "all", "the", "table", "creation", "stuff" ]
def add_Sheet(self, sheetname=None, sheetdata=None, model=None): def checksheet_name(name): if name == '': tkMessageBox.showwarning("Whoops", "Name should not be blank.") return 0 if self.sheets.has_key(name): tkMessageBox.showwarning("Name...
[ "def", "add_Sheet", "(", "self", ",", "sheetname", "=", "None", ",", "sheetdata", "=", "None", ",", "model", "=", "None", ")", ":", "def", "checksheet_name", "(", "name", ")", ":", "if", "name", "==", "''", ":", "tkMessageBox", ".", "showwarning", "(",...
Add a new sheet - handles all the table creation stuff
[ "Add", "a", "new", "sheet", "-", "handles", "all", "the", "table", "creation", "stuff" ]
[ "\"\"\"Add a new sheet - handles all the table creation stuff\"\"\"", "#Create the model if none provided", "#create the table: we pass the parent instance of peat", "#and peat row/col if present", "#Load preferences into table", "#This handles all the canvas and header in the frame passed to constructor"...
[ { "param": "self", "type": null }, { "param": "sheetname", "type": null }, { "param": "sheetdata", "type": null }, { "param": "model", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sheetname", "type": null, "docstring": null, "docstring_token...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
delete_Column
<not_specific>
def delete_Column(self): """Delete currently selected column in table""" self.currenttable.delete_Column() self.saved = 0 return
Delete currently selected column in table
Delete currently selected column in table
[ "Delete", "currently", "selected", "column", "in", "table" ]
def delete_Column(self): self.currenttable.delete_Column() self.saved = 0 return
[ "def", "delete_Column", "(", "self", ")", ":", "self", ".", "currenttable", ".", "delete_Column", "(", ")", "self", ".", "saved", "=", "0", "return" ]
Delete currently selected column in table
[ "Delete", "currently", "selected", "column", "in", "table" ]
[ "\"\"\"Delete currently selected column in table\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
copy
<not_specific>
def copy(self): """Copy current selection to internal clipboard""" T = self.currenttable self.clipboard = T.copyCell() return
Copy current selection to internal clipboard
Copy current selection to internal clipboard
[ "Copy", "current", "selection", "to", "internal", "clipboard" ]
def copy(self): T = self.currenttable self.clipboard = T.copyCell() return
[ "def", "copy", "(", "self", ")", ":", "T", "=", "self", ".", "currenttable", "self", ".", "clipboard", "=", "T", ".", "copyCell", "(", ")", "return" ]
Copy current selection to internal clipboard
[ "Copy", "current", "selection", "to", "internal", "clipboard" ]
[ "\"\"\"Copy current selection to internal clipboard\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
do_find_text
<not_specific>
def do_find_text(self, event=None): """Find the text in the table""" if not hasattr(self,'currenttable'): return import string if string.strip(self.findtext.get())=='': return searchstring=self.findtext.get() if self.currenttable!=None: ...
Find the text in the table
Find the text in the table
[ "Find", "the", "text", "in", "the", "table" ]
def do_find_text(self, event=None): if not hasattr(self,'currenttable'): return import string if string.strip(self.findtext.get())=='': return searchstring=self.findtext.get() if self.currenttable!=None: self.currenttable.findValue(searchstring...
[ "def", "do_find_text", "(", "self", ",", "event", "=", "None", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'currenttable'", ")", ":", "return", "import", "string", "if", "string", ".", "strip", "(", "self", ".", "findtext", ".", "get", "(", ...
Find the text in the table
[ "Find", "the", "text", "in", "the", "table" ]
[ "\"\"\"Find the text in the table\"\"\"" ]
[ { "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": ...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
draw_file_tooltip
<not_specific>
def draw_file_tooltip(self, row, col): """Draw a tooltip for image and file previews""" import os h=self.height x1,y1,x2,y2 = self.getCellCoords(row,col) w=x2-x1 absrow = self.get_AbsoluteRow(row) text = self.model.getValueAt(absrow,col) if text == '' or t...
Draw a tooltip for image and file previews
Draw a tooltip for image and file previews
[ "Draw", "a", "tooltip", "for", "image", "and", "file", "previews" ]
def draw_file_tooltip(self, row, col): import os h=self.height x1,y1,x2,y2 = self.getCellCoords(row,col) w=x2-x1 absrow = self.get_AbsoluteRow(row) text = self.model.getValueAt(absrow,col) if text == '' or text == None: return cell = self.model...
[ "def", "draw_file_tooltip", "(", "self", ",", "row", ",", "col", ")", ":", "import", "os", "h", "=", "self", ".", "height", "x1", ",", "y1", ",", "x2", ",", "y2", "=", "self", ".", "getCellCoords", "(", "row", ",", "col", ")", "w", "=", "x2", "...
Draw a tooltip for image and file previews
[ "Draw", "a", "tooltip", "for", "image", "and", "file", "previews" ]
[ "\"\"\"Draw a tooltip for image and file previews\"\"\"", "#actual blob data is stored in parent db blob attr", "#Check if its an image and try to make thumbnail.. needs PIL", "#if can't get thumb, just create icon for the file type", "#now draw text" ]
[ { "param": "self", "type": null }, { "param": "row", "type": null }, { "param": "col", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "row", "type": null, "docstring": null, "docstring_tokens": []...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
handle_double_click
<not_specific>
def handle_double_click(self, event): """Do double click stuff. Selected row/cols will already have been set with single click binding""" row = self.get_row_clicked(event) col = self.get_col_clicked(event) absrow = self.get_AbsoluteRow(row) model=self.getModel() ...
Do double click stuff. Selected row/cols will already have been set with single click binding
Do double click stuff. Selected row/cols will already have been set with single click binding
[ "Do", "double", "click", "stuff", ".", "Selected", "row", "/", "cols", "will", "already", "have", "been", "set", "with", "single", "click", "binding" ]
def handle_double_click(self, event): row = self.get_row_clicked(event) col = self.get_col_clicked(event) absrow = self.get_AbsoluteRow(row) model=self.getModel() coltype = model.getColumnType(col) cellvalue = self.model.getCellRecord(absrow, col) if Formula.isFor...
[ "def", "handle_double_click", "(", "self", ",", "event", ")", ":", "row", "=", "self", ".", "get_row_clicked", "(", "event", ")", "col", "=", "self", ".", "get_col_clicked", "(", "event", ")", "absrow", "=", "self", ".", "get_AbsoluteRow", "(", "row", ")...
Do double click stuff.
[ "Do", "double", "click", "stuff", "." ]
[ "\"\"\"Do double click stuff. Selected row/cols will already have\n been set with single click binding\"\"\"", "#if coltype == 'text' or coltype == 'number':", "# self.draw_cellentry(self.currentrow, self.currentcol)" ]
[ { "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": ...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
handle_motion
<not_specific>
def handle_motion(self, event): """Handle mouse motion overridden to handle file type tooltips""" self.delete('tooltip') self.pic = None row = self.get_row_clicked(event) col = self.get_col_clicked(event) if col == None: return if self.check_PageView(r...
Handle mouse motion overridden to handle file type tooltips
Handle mouse motion overridden to handle file type tooltips
[ "Handle", "mouse", "motion", "overridden", "to", "handle", "file", "type", "tooltips" ]
def handle_motion(self, event): self.delete('tooltip') self.pic = None row = self.get_row_clicked(event) col = self.get_col_clicked(event) if col == None: return if self.check_PageView(row) == 1: return coltype = self.model.getColumnType(co...
[ "def", "handle_motion", "(", "self", ",", "event", ")", ":", "self", ".", "delete", "(", "'tooltip'", ")", "self", ".", "pic", "=", "None", "row", "=", "self", ".", "get_row_clicked", "(", "event", ")", "col", "=", "self", ".", "get_col_clicked", "(", ...
Handle mouse motion overridden to handle file type tooltips
[ "Handle", "mouse", "motion", "overridden", "to", "handle", "file", "type", "tooltips" ]
[ "\"\"\"Handle mouse motion overridden to handle file type tooltips\"\"\"" ]
[ { "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": ...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
addBlob
<not_specific>
def addBlob(self, row, col, filename): """Adds an external file as a blob to the DB""" from Record import FileRecord f=os.path.split(filename)[1] model = self.getModel() blob = self.getBlob(filename) f = FileRecord(name=filename, blob=blob) rec = {'text': f.name, ...
Adds an external file as a blob to the DB
Adds an external file as a blob to the DB
[ "Adds", "an", "external", "file", "as", "a", "blob", "to", "the", "DB" ]
def addBlob(self, row, col, filename): from Record import FileRecord f=os.path.split(filename)[1] model = self.getModel() blob = self.getBlob(filename) f = FileRecord(name=filename, blob=blob) rec = {'text': f.name, 'filename': filename} model.setValueAt(rec, row,...
[ "def", "addBlob", "(", "self", ",", "row", ",", "col", ",", "filename", ")", ":", "from", "Record", "import", "FileRecord", "f", "=", "os", ".", "path", ".", "split", "(", "filename", ")", "[", "1", "]", "model", "=", "self", ".", "getModel", "(", ...
Adds an external file as a blob to the DB
[ "Adds", "an", "external", "file", "as", "a", "blob", "to", "the", "DB" ]
[ "\"\"\"Adds an external file as a blob to the DB\"\"\"", "#we add the blob to the parent DB blob struct rather than to table model", "#print f, blob, model.getCellRecord(row,col)" ]
[ { "param": "self", "type": null }, { "param": "row", "type": null }, { "param": "col", "type": null }, { "param": "filename", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "row", "type": null, "docstring": null, "docstring_tokens": []...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
addFile
<not_specific>
def addFile(self, row, col): """Uses a new method of file storage with blobs We just get the blob from the filerecord object""" from Extfile import FileHandler model = self.getModel() celldata = model.getCellRecord(row, col) fh = FileHandler(self) newfile = fh....
Uses a new method of file storage with blobs We just get the blob from the filerecord object
Uses a new method of file storage with blobs We just get the blob from the filerecord object
[ "Uses", "a", "new", "method", "of", "file", "storage", "with", "blobs", "We", "just", "get", "the", "blob", "from", "the", "filerecord", "object" ]
def addFile(self, row, col): from Extfile import FileHandler model = self.getModel() celldata = model.getCellRecord(row, col) fh = FileHandler(self) newfile = fh.addFileDialog() print newfile if newfile != None: self.addBlob(row, col, fh.newfile) ...
[ "def", "addFile", "(", "self", ",", "row", ",", "col", ")", ":", "from", "Extfile", "import", "FileHandler", "model", "=", "self", ".", "getModel", "(", ")", "celldata", "=", "model", ".", "getCellRecord", "(", "row", ",", "col", ")", "fh", "=", "Fil...
Uses a new method of file storage with blobs We just get the blob from the filerecord object
[ "Uses", "a", "new", "method", "of", "file", "storage", "with", "blobs", "We", "just", "get", "the", "blob", "from", "the", "filerecord", "object" ]
[ "\"\"\"Uses a new method of file storage with blobs\n We just get the blob from the filerecord object\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "row", "type": null }, { "param": "col", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "row", "type": null, "docstring": null, "docstring_tokens": []...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
displayFile
<not_specific>
def displayFile(self, row, col): """Uses a new method of file storage with blobs We just get the blob from the filerecord object""" from Extfile import FileHandler model = self.getModel() celldata = model.getCellRecord(row, col) if celldata != None: filerec...
Uses a new method of file storage with blobs We just get the blob from the filerecord object
Uses a new method of file storage with blobs We just get the blob from the filerecord object
[ "Uses", "a", "new", "method", "of", "file", "storage", "with", "blobs", "We", "just", "get", "the", "blob", "from", "the", "filerecord", "object" ]
def displayFile(self, row, col): from Extfile import FileHandler model = self.getModel() celldata = model.getCellRecord(row, col) if celldata != None: filerec=celldata else: return fh = FileHandler(self) fh.displayFile(filerec) retu...
[ "def", "displayFile", "(", "self", ",", "row", ",", "col", ")", ":", "from", "Extfile", "import", "FileHandler", "model", "=", "self", ".", "getModel", "(", ")", "celldata", "=", "model", ".", "getCellRecord", "(", "row", ",", "col", ")", "if", "cellda...
Uses a new method of file storage with blobs We just get the blob from the filerecord object
[ "Uses", "a", "new", "method", "of", "file", "storage", "with", "blobs", "We", "just", "get", "the", "blob", "from", "the", "filerecord", "object" ]
[ "\"\"\"Uses a new method of file storage with blobs\n We just get the blob from the filerecord object\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "row", "type": null }, { "param": "col", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "row", "type": null, "docstring": null, "docstring_tokens": []...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
edit_Table
<not_specific>
def edit_Table(self, row, col): """Edit a nested table. Done by opening up another instance of labbook and returning the data to the parent""" #get cell data and pass to labbook as a new table model = self.getModel() tabledata = model.getCellRecord(row,col) refna...
Edit a nested table. Done by opening up another instance of labbook and returning the data to the parent
Edit a nested table. Done by opening up another instance of labbook and returning the data to the parent
[ "Edit", "a", "nested", "table", ".", "Done", "by", "opening", "up", "another", "instance", "of", "labbook", "and", "returning", "the", "data", "to", "the", "parent" ]
def edit_Table(self, row, col): model = self.getModel() tabledata = model.getCellRecord(row,col) refname = str(row)+'_'+str(col) if self.peatinfo != None: refname = self.peatinfo['record']+'_'+self.peatinfo['column']+'_'+refname from Labbook import LabbookApp ...
[ "def", "edit_Table", "(", "self", ",", "row", ",", "col", ")", ":", "model", "=", "self", ".", "getModel", "(", ")", "tabledata", "=", "model", ".", "getCellRecord", "(", "row", ",", "col", ")", "refname", "=", "str", "(", "row", ")", "+", "'_'", ...
Edit a nested table.
[ "Edit", "a", "nested", "table", "." ]
[ "\"\"\"Edit a nested table.\n Done by opening up another instance of labbook and\n returning the data to the parent\"\"\"", "#get cell data and pass to labbook as a new table", "# did we get any data back?" ]
[ { "param": "self", "type": null }, { "param": "row", "type": null }, { "param": "col", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "row", "type": null, "docstring": null, "docstring_tokens": []...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
open_Ekin
<not_specific>
def open_Ekin(self, row, col): """Edit Ekin data, can be used outside PEAT, but does not contain protein and field references""" model = self.getModel() cell_data = model.getCellRecord(row,col) if not cell_data: ed = EkinModesDialog(title="Select Mode", ...
Edit Ekin data, can be used outside PEAT, but does not contain protein and field references
Edit Ekin data, can be used outside PEAT, but does not contain protein and field references
[ "Edit", "Ekin", "data", "can", "be", "used", "outside", "PEAT", "but", "does", "not", "contain", "protein", "and", "field", "references" ]
def open_Ekin(self, row, col): model = self.getModel() cell_data = model.getCellRecord(row,col) if not cell_data: ed = EkinModesDialog(title="Select Mode", parent=self.parentframe) mode = ed.result print 'MODE',mode ...
[ "def", "open_Ekin", "(", "self", ",", "row", ",", "col", ")", ":", "model", "=", "self", ".", "getModel", "(", ")", "cell_data", "=", "model", ".", "getCellRecord", "(", "row", ",", "col", ")", "if", "not", "cell_data", ":", "ed", "=", "EkinModesDial...
Edit Ekin data, can be used outside PEAT, but does not contain protein and field references
[ "Edit", "Ekin", "data", "can", "be", "used", "outside", "PEAT", "but", "does", "not", "contain", "protein", "and", "field", "references" ]
[ "\"\"\"Edit Ekin data, can be used outside PEAT, but does not contain protein and\n field references\"\"\"", "#mode=cell_data['mode']", "#ekindata=cell_data['ekindata']", "#newdata={}", "#newdata['mode']=mode", "#newdata['ekindata']=self.Ekindata" ]
[ { "param": "self", "type": null }, { "param": "row", "type": null }, { "param": "col", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "row", "type": null, "docstring": null, "docstring_tokens": []...
ef8d20941fb95bbd01cdc3c53cd91a11a46bba17
shambo001/peat
PEATDB/Labbook.py
[ "MIT" ]
Python
saveSheet
<not_specific>
def saveSheet(self, name, model=None, data=None): """Save sheet using model or dict""" if model != None: self.data[name] = model.getData() return
Save sheet using model or dict
Save sheet using model or dict
[ "Save", "sheet", "using", "model", "or", "dict" ]
def saveSheet(self, name, model=None, data=None): if model != None: self.data[name] = model.getData() return
[ "def", "saveSheet", "(", "self", ",", "name", ",", "model", "=", "None", ",", "data", "=", "None", ")", ":", "if", "model", "!=", "None", ":", "self", ".", "data", "[", "name", "]", "=", "model", ".", "getData", "(", ")", "return" ]
Save sheet using model or dict
[ "Save", "sheet", "using", "model", "or", "dict" ]
[ "\"\"\"Save sheet using model or dict\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "name", "type": null }, { "param": "model", "type": null }, { "param": "data", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "name", "type": null, "docstring": null, "docstring_tokens": [...
7af2635a944f53b1d9697b60f337a47ca4a785b5
shambo001/peat
pKaTool/get_CCPS_population.py
[ "MIT" ]
Python
_get_CCPS_population
<not_specific>
def _get_CCPS_population(options,args): """recalculate titration curves and get the pH-dependent population of select protonation states""" import pKaIO pdbfile=args[0] MCsteps=options.MCsteps pHstep=options.pHstep pHstart=options.pHstart pHend=options.pHstop IO=pKaIO.pKaIO(pdbfile) ...
recalculate titration curves and get the pH-dependent population of select protonation states
recalculate titration curves and get the pH-dependent population of select protonation states
[ "recalculate", "titration", "curves", "and", "get", "the", "pH", "-", "dependent", "population", "of", "select", "protonation", "states" ]
def _get_CCPS_population(options,args): import pKaIO pdbfile=args[0] MCsteps=options.MCsteps pHstep=options.pHstep pHstart=options.pHstart pHend=options.pHstop IO=pKaIO.pKaIO(pdbfile) import pKa.pKa_MC print 'Recalculating wild type titration curves' pKa_params={'pHstart':pHstar...
[ "def", "_get_CCPS_population", "(", "options", ",", "args", ")", ":", "import", "pKaIO", "pdbfile", "=", "args", "[", "0", "]", "MCsteps", "=", "options", ".", "MCsteps", "pHstep", "=", "options", ".", "pHstep", "pHstart", "=", "options", ".", "pHstart", ...
recalculate titration curves and get the pH-dependent population of select protonation states
[ "recalculate", "titration", "curves", "and", "get", "the", "pH", "-", "dependent", "population", "of", "select", "protonation", "states" ]
[ "\"\"\"recalculate titration curves and get the pH-dependent population of select protonation states\"\"\"", "#", "#", "#", "#", "# Set the protonation state", "#", "#", "# Construct monitor_states ", "#", "#", "# Calculate the pKa values", "#" ]
[ { "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"...
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
check_primers
null
def check_primers(self): """Check that all primers are ok""" primer_keys=['sequence','description'] if self.data.has_key('primer_dict'): for primer in self.data['primer_dict'].keys(): for key in primer_keys: if not self.data['primer_dict'][primer]....
Check that all primers are ok
Check that all primers are ok
[ "Check", "that", "all", "primers", "are", "ok" ]
def check_primers(self): primer_keys=['sequence','description'] if self.data.has_key('primer_dict'): for primer in self.data['primer_dict'].keys(): for key in primer_keys: if not self.data['primer_dict'][primer].has_key(key): self.d...
[ "def", "check_primers", "(", "self", ")", ":", "primer_keys", "=", "[", "'sequence'", ",", "'description'", "]", "if", "self", ".", "data", ".", "has_key", "(", "'primer_dict'", ")", ":", "for", "primer", "in", "self", ".", "data", "[", "'primer_dict'", ...
Check that all primers are ok
[ "Check", "that", "all", "primers", "are", "ok" ]
[ "\"\"\"Check that all primers are ok\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
resize
<not_specific>
def resize(self,event): """ Make sure the visible portion of the canvas is resized with the window """ if event.widget==self.master: Y=event.height X=event.width self.seqframe.configure(width=X-self.canvas_border_x, height=Y-s...
Make sure the visible portion of the canvas is resized with the window
Make sure the visible portion of the canvas is resized with the window
[ "Make", "sure", "the", "visible", "portion", "of", "the", "canvas", "is", "resized", "with", "the", "window" ]
def resize(self,event): if event.widget==self.master: Y=event.height X=event.width self.seqframe.configure(width=X-self.canvas_border_x, height=Y-self.canvas_border_y) return
[ "def", "resize", "(", "self", ",", "event", ")", ":", "if", "event", ".", "widget", "==", "self", ".", "master", ":", "Y", "=", "event", ".", "height", "X", "=", "event", ".", "width", "self", ".", "seqframe", ".", "configure", "(", "width", "=", ...
Make sure the visible portion of the canvas is resized with the window
[ "Make", "sure", "the", "visible", "portion", "of", "the", "canvas", "is", "resized", "with", "the", "window" ]
[ "\"\"\" Make sure the visible portion of the canvas is resized with the\n 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": ...
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
assess_status
<not_specific>
def assess_status(self): """Figures out which buttons to activate/deactivate""" # Update the PEATDB_record information if self.data.has_key('PEAT_DBrecord'): self.PEAT_DBrecord.set(self.data['PEAT_DBrecord']) # Do we have an open project? if self.data['Project filen...
Figures out which buttons to activate/deactivate
Figures out which buttons to activate/deactivate
[ "Figures", "out", "which", "buttons", "to", "activate", "/", "deactivate" ]
def assess_status(self): if self.data.has_key('PEAT_DBrecord'): self.PEAT_DBrecord.set(self.data['PEAT_DBrecord']) if self.data['Project filename']: self.file_menu.entryconfigure(0,state=DISABLED) self.file_menu.entryconfigure(1,state=NORMAL) self.file_m...
[ "def", "assess_status", "(", "self", ")", ":", "if", "self", ".", "data", ".", "has_key", "(", "'PEAT_DBrecord'", ")", ":", "self", ".", "PEAT_DBrecord", ".", "set", "(", "self", ".", "data", "[", "'PEAT_DBrecord'", "]", ")", "if", "self", ".", "data",...
Figures out which buttons to activate/deactivate
[ "Figures", "out", "which", "buttons", "to", "activate", "/", "deactivate" ]
[ "\"\"\"Figures out which buttons to activate/deactivate\"\"\"", "# Update the PEATDB_record information", "# Do we have an open project?", "# Open project", "# Close project", "# Save project as", "# Is the current project saved?", "# Save Project", "# Save Project", "# No project", "# Close pro...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
handle_left_click
<not_specific>
def handle_left_click(self,event): """handle left mouse press on canvas""" c = self.seqframe if 'textlabel' in c.gettags(CURRENT): self.show_item(event) elif 'comparison_seq' in c.gettags(CURRENT): self.show_sequence_label(event) else: self.st...
handle left mouse press on canvas
handle left mouse press on canvas
[ "handle", "left", "mouse", "press", "on", "canvas" ]
def handle_left_click(self,event): c = self.seqframe if 'textlabel' in c.gettags(CURRENT): self.show_item(event) elif 'comparison_seq' in c.gettags(CURRENT): self.show_sequence_label(event) else: self.start_selection(event) return
[ "def", "handle_left_click", "(", "self", ",", "event", ")", ":", "c", "=", "self", ".", "seqframe", "if", "'textlabel'", "in", "c", ".", "gettags", "(", "CURRENT", ")", ":", "self", ".", "show_item", "(", "event", ")", "elif", "'comparison_seq'", "in", ...
handle left mouse press on canvas
[ "handle", "left", "mouse", "press", "on", "canvas" ]
[ "\"\"\"handle left mouse press on canvas\"\"\"" ]
[ { "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": ...
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
handle_left_release
<not_specific>
def handle_left_release(self,event): """handle left mouse release on canvas""" c = self.seqframe if 'textlabel' in c.gettags(CURRENT): self.remove_recog_label(event) elif 'comparison_seq' in c.gettags(CURRENT): self.remove_seq_label(event) elif 'DNA_select...
handle left mouse release on canvas
handle left mouse release on canvas
[ "handle", "left", "mouse", "release", "on", "canvas" ]
def handle_left_release(self,event): c = self.seqframe if 'textlabel' in c.gettags(CURRENT): self.remove_recog_label(event) elif 'comparison_seq' in c.gettags(CURRENT): self.remove_seq_label(event) elif 'DNA_selection' in self.data.keys(): if self.data...
[ "def", "handle_left_release", "(", "self", ",", "event", ")", ":", "c", "=", "self", ".", "seqframe", "if", "'textlabel'", "in", "c", ".", "gettags", "(", "CURRENT", ")", ":", "self", ".", "remove_recog_label", "(", "event", ")", "elif", "'comparison_seq'"...
handle left mouse release on canvas
[ "handle", "left", "mouse", "release", "on", "canvas" ]
[ "\"\"\"handle left mouse release on canvas\"\"\"" ]
[ { "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": ...
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
print_aa_seq
<not_specific>
def print_aa_seq(self,sequence,y,position=0,frame=0,font=None): """ Write a single aa sequence in the sequence window """ for letter in sequence: position=position+1 x,y_junk=self.get_aa_pos_on_screen(position,frame) self.seq_win_objs[self.seqframe.cre...
Write a single aa sequence in the sequence window
Write a single aa sequence in the sequence window
[ "Write", "a", "single", "aa", "sequence", "in", "the", "sequence", "window" ]
def print_aa_seq(self,sequence,y,position=0,frame=0,font=None): for letter in sequence: position=position+1 x,y_junk=self.get_aa_pos_on_screen(position,frame) self.seq_win_objs[self.seqframe.create_text(x,y,text=letter,font=font,anchor='w')]=1 return
[ "def", "print_aa_seq", "(", "self", ",", "sequence", ",", "y", ",", "position", "=", "0", ",", "frame", "=", "0", ",", "font", "=", "None", ")", ":", "for", "letter", "in", "sequence", ":", "position", "=", "position", "+", "1", "x", ",", "y_junk",...
Write a single aa sequence in the sequence window
[ "Write", "a", "single", "aa", "sequence", "in", "the", "sequence", "window" ]
[ "\"\"\"\n Write a single aa sequence in the sequence window\n \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "sequence", "type": null }, { "param": "y", "type": null }, { "param": "position", "type": null }, { "param": "frame", "type": null }, { "param": "font", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sequence", "type": null, "docstring": null, "docstring_tokens...
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
print_aa3_seq
<not_specific>
def print_aa3_seq(self,sequence,y,position=0,frame=0,highlight_aa=None,font=None): """ Write a single aa sequence in the sequence window """ for aa_name in sequence: position=position+1 x,y_junk=self.get_aa_pos_on_screen(position-1,frame+1) if position...
Write a single aa sequence in the sequence window
Write a single aa sequence in the sequence window
[ "Write", "a", "single", "aa", "sequence", "in", "the", "sequence", "window" ]
def print_aa3_seq(self,sequence,y,position=0,frame=0,highlight_aa=None,font=None): for aa_name in sequence: position=position+1 x,y_junk=self.get_aa_pos_on_screen(position-1,frame+1) if position==highlight_aa: colour='red' else: col...
[ "def", "print_aa3_seq", "(", "self", ",", "sequence", ",", "y", ",", "position", "=", "0", ",", "frame", "=", "0", ",", "highlight_aa", "=", "None", ",", "font", "=", "None", ")", ":", "for", "aa_name", "in", "sequence", ":", "position", "=", "positi...
Write a single aa sequence in the sequence window
[ "Write", "a", "single", "aa", "sequence", "in", "the", "sequence", "window" ]
[ "\"\"\"\n Write a single aa sequence in the sequence window\n \"\"\"" ]
[ { "param": "self", "type": null }, { "param": "sequence", "type": null }, { "param": "y", "type": null }, { "param": "position", "type": null }, { "param": "frame", "type": null }, { "param": "highlight_aa", "type": null }, { "param": "font...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sequence", "type": null, "docstring": null, "docstring_tokens...
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
quit
<not_specific>
def quit(self,event=None): """ Exit or return to DB_Main. If going to DB_Main, make sure that we save the primer_dict in the Database. Make sure that we close the primer database window. """ #Make sure that we close the primer database window if open if self.pDB_...
Exit or return to DB_Main. If going to DB_Main, make sure that we save the primer_dict in the Database. Make sure that we close the primer database window.
Exit or return to DB_Main. If going to DB_Main, make sure that we save the primer_dict in the Database. Make sure that we close the primer database window.
[ "Exit", "or", "return", "to", "DB_Main", ".", "If", "going", "to", "DB_Main", "make", "sure", "that", "we", "save", "the", "primer_dict", "in", "the", "Database", ".", "Make", "sure", "that", "we", "close", "the", "primer", "database", "window", "." ]
def quit(self,event=None): if self.pDB_open: self.pDB_open.close_pDB() self.pDB_open=None if self.sequ_win: self.sequ_win.close() self.sequ_win=None if getattr(self,'primer_win',None): self.primer_win.destroy() if self.parent: ...
[ "def", "quit", "(", "self", ",", "event", "=", "None", ")", ":", "if", "self", ".", "pDB_open", ":", "self", ".", "pDB_open", ".", "close_pDB", "(", ")", "self", ".", "pDB_open", "=", "None", "if", "self", ".", "sequ_win", ":", "self", ".", "sequ_w...
Exit or return to DB_Main.
[ "Exit", "or", "return", "to", "DB_Main", "." ]
[ "\"\"\"\n Exit or return to DB_Main.\n If going to DB_Main, make sure that we save the primer_dict in the Database.\n Make sure that we close the primer database window.\n \"\"\"", "#Make sure that we close the primer database window if open", "# Close the design_mutagenic primer win...
[ { "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": ...
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
seq_display_settings
<not_specific>
def seq_display_settings(self): """Dialog to change sequence display settings""" # Open a new window for setting the restriction enzymes self.seq_display_setupwin=Toplevel() self.seq_display_setupwin.geometry('+300+450') self.seq_display_setupwin.title('Sequence Display Setup') ...
Dialog to change sequence display settings
Dialog to change sequence display settings
[ "Dialog", "to", "change", "sequence", "display", "settings" ]
def seq_display_settings(self): self.seq_display_setupwin=Toplevel() self.seq_display_setupwin.geometry('+300+450') self.seq_display_setupwin.title('Sequence Display Setup') row=1 lblspace=Label(self.seq_display_setupwin,text='Bases Spacing:') lblspace.grid(row=row,column...
[ "def", "seq_display_settings", "(", "self", ")", ":", "self", ".", "seq_display_setupwin", "=", "Toplevel", "(", ")", "self", ".", "seq_display_setupwin", ".", "geometry", "(", "'+300+450'", ")", "self", ".", "seq_display_setupwin", ".", "title", "(", "'Sequence...
Dialog to change sequence display settings
[ "Dialog", "to", "change", "sequence", "display", "settings" ]
[ "\"\"\"Dialog to change sequence display settings\"\"\"", "# Open a new window for setting the restriction enzymes", "# Spacing between bases", "# Other fonts available", "#text='Font '+text", "# Apply Button", "# Close button", "# Save Settings button" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
535f6fccc44bf532f1700aba30493c21b723a489
shambo001/peat
PEATDB/DNAtool/DNAtool.py
[ "MIT" ]
Python
save_preferences
<not_specific>
def save_preferences(self): """Saves the sequence display settings to prefs file""" print 'Saving DNAtool preferences' self.preferences.set('seqfont',self.seqfont.get()) self.preferences.set('seqfontsize',self.seqfontsize.get()) self.preferences.set('fontstyle',self.fontstyle.ge...
Saves the sequence display settings to prefs file
Saves the sequence display settings to prefs file
[ "Saves", "the", "sequence", "display", "settings", "to", "prefs", "file" ]
def save_preferences(self): print 'Saving DNAtool preferences' self.preferences.set('seqfont',self.seqfont.get()) self.preferences.set('seqfontsize',self.seqfontsize.get()) self.preferences.set('fontstyle',self.fontstyle.get()) self.preferences.set('base_scale',self.base_scale.ge...
[ "def", "save_preferences", "(", "self", ")", ":", "print", "'Saving DNAtool preferences'", "self", ".", "preferences", ".", "set", "(", "'seqfont'", ",", "self", ".", "seqfont", ".", "get", "(", ")", ")", "self", ".", "preferences", ".", "set", "(", "'seqf...
Saves the sequence display settings to prefs file
[ "Saves", "the", "sequence", "display", "settings", "to", "prefs", "file" ]
[ "\"\"\"Saves the sequence display settings to prefs file\"\"\"", "#print self.preferences.get('restr_font')" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }