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
6db75e42809e6e727319087fac001779c472a782
shambo001/peat
pKa/Design_pKa_help.py
[ "MIT" ]
Python
run_APBS_pKa_calc
<not_specific>
def run_APBS_pKa_calc(pdbfile,mutated_res): """ # Calculates the desolvation energy and the background interaction energy for # a single residue (mutated_res) which is given in the form :0000:RES (e.g. :0035:GLU) # # Create a temp dir """ import tempfile, os, string topdir=os.getcwd() ...
# Calculates the desolvation energy and the background interaction energy for # a single residue (mutated_res) which is given in the form :0000:RES (e.g. :0035:GLU) # # Create a temp dir
Calculates the desolvation energy and the background interaction energy for a single residue (mutated_res) which is given in the form :0000:RES Create a temp dir
[ "Calculates", "the", "desolvation", "energy", "and", "the", "background", "interaction", "energy", "for", "a", "single", "residue", "(", "mutated_res", ")", "which", "is", "given", "in", "the", "form", ":", "0000", ":", "RES", "Create", "a", "temp", "dir" ]
def run_APBS_pKa_calc(pdbfile,mutated_res): import tempfile, os, string topdir=os.getcwd() Start the pKa calculation import pdb2pka_interface P2P=pdb2pka_interface.P2pI(topdir,pdbfile,{}) desolv,backgr=P2P.pdb2pka_desolv_backgr(mutated_res) return desolv, backgr
[ "def", "run_APBS_pKa_calc", "(", "pdbfile", ",", "mutated_res", ")", ":", "import", "tempfile", ",", "os", ",", "string", "topdir", "=", "os", ".", "getcwd", "(", ")", "import", "pdb2pka_interface", "P2P", "=", "pdb2pka_interface", ".", "P2pI", "(", "topdir"...
Calculates the desolvation energy and the background interaction energy for a single residue (mutated_res) which is given in the form :0000:RES (e.g.
[ "Calculates", "the", "desolvation", "energy", "and", "the", "background", "interaction", "energy", "for", "a", "single", "residue", "(", "mutated_res", ")", "which", "is", "given", "in", "the", "form", ":", "0000", ":", "RES", "(", "e", ".", "g", "." ]
[ "\"\"\"\n # Calculates the desolvation energy and the background interaction energy for\n # a single residue (mutated_res) which is given in the form :0000:RES (e.g. :0035:GLU)\n #\n # Create a temp dir\n \"\"\"", "#", "# Start the pKa calculation", "#" ]
[ { "param": "pdbfile", "type": null }, { "param": "mutated_res", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbfile", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutated_res", "type": null, "docstring": null, "docstring_...
6db75e42809e6e727319087fac001779c472a782
shambo001/peat
pKa/Design_pKa_help.py
[ "MIT" ]
Python
lock
<not_specific>
def lock(self): """ # Obtain lock on the datafile # We wait max. 50 seconds before lock is released! """ return import os, time locked=None count=0 while not locked or count>50: if not os.path.isfile(self.lockfile): fd=o...
# Obtain lock on the datafile # We wait max. 50 seconds before lock is released!
Obtain lock on the datafile We wait max. 50 seconds before lock is released!
[ "Obtain", "lock", "on", "the", "datafile", "We", "wait", "max", ".", "50", "seconds", "before", "lock", "is", "released!" ]
def lock(self): return import os, time locked=None count=0 while not locked or count>50: if not os.path.isfile(self.lockfile): fd=open(self.lockfile,'w') fd.write('locked\n') fd.close() locked=1 ...
[ "def", "lock", "(", "self", ")", ":", "return", "import", "os", ",", "time", "locked", "=", "None", "count", "=", "0", "while", "not", "locked", "or", "count", ">", "50", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "self", ".", "lock...
Obtain lock on the datafile We wait max.
[ "Obtain", "lock", "on", "the", "datafile", "We", "wait", "max", "." ]
[ "\"\"\"\n # Obtain lock on the datafile\n # We wait max. 50 seconds before lock is released!\n \"\"\"", "#self.unlock()" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
6db75e42809e6e727319087fac001779c472a782
shambo001/peat
pKa/Design_pKa_help.py
[ "MIT" ]
Python
check_status
<not_specific>
def check_status(self): """If we have added more than five datapoints, then store the data on disk""" if self.data_added>=5: self.update_data() self.data_added=0 return
If we have added more than five datapoints, then store the data on disk
If we have added more than five datapoints, then store the data on disk
[ "If", "we", "have", "added", "more", "than", "five", "datapoints", "then", "store", "the", "data", "on", "disk" ]
def check_status(self): if self.data_added>=5: self.update_data() self.data_added=0 return
[ "def", "check_status", "(", "self", ")", ":", "if", "self", ".", "data_added", ">=", "5", ":", "self", ".", "update_data", "(", ")", "self", ".", "data_added", "=", "0", "return" ]
If we have added more than five datapoints, then store the data on disk
[ "If", "we", "have", "added", "more", "than", "five", "datapoints", "then", "store", "the", "data", "on", "disk" ]
[ "\"\"\"If we have added more than five datapoints, then store the data on disk\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
6db75e42809e6e727319087fac001779c472a782
shambo001/peat
pKa/Design_pKa_help.py
[ "MIT" ]
Python
update_data
<not_specific>
def update_data(self): """Add new data to the file on disk""" if self.data_added>0 and self.save_file: self.lock() import cPickle, os if os.path.isfile(self.datafile): fd=open(self.datafile) old_data=cPickle.load(fd) fd....
Add new data to the file on disk
Add new data to the file on disk
[ "Add", "new", "data", "to", "the", "file", "on", "disk" ]
def update_data(self): if self.data_added>0 and self.save_file: self.lock() import cPickle, os if os.path.isfile(self.datafile): fd=open(self.datafile) old_data=cPickle.load(fd) fd.close() else: old_d...
[ "def", "update_data", "(", "self", ")", ":", "if", "self", ".", "data_added", ">", "0", "and", "self", ".", "save_file", ":", "self", ".", "lock", "(", ")", "import", "cPickle", ",", "os", "if", "os", ".", "path", ".", "isfile", "(", "self", ".", ...
Add new data to the file on disk
[ "Add", "new", "data", "to", "the", "file", "on", "disk" ]
[ "\"\"\"Add new data to the file on disk\"\"\"", "#", "# Put any new data into our dict", "#", "#", "# copy entire sub-entry", "#", "#", "# check if we have all subentries", "#", "#", "# Done, now save the complete dictionary", "#", "#", "# Done", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
bf62eaefc69c019e81f7177286a041cc736892a6
shambo001/peat
pKaTool/pKa_system_micro.py
[ "MIT" ]
Python
update_microstates
<not_specific>
def update_microstates(self,X): """Update the curves describing the microscopic states""" self.X = X phvals=X.all_states.keys() self.init_kcat_array() if getattr(self,'activity_data',None): for ph in self.activity_data: if not ph in phvals: ...
Update the curves describing the microscopic states
Update the curves describing the microscopic states
[ "Update", "the", "curves", "describing", "the", "microscopic", "states" ]
def update_microstates(self,X): self.X = X phvals=X.all_states.keys() self.init_kcat_array() if getattr(self,'activity_data',None): for ph in self.activity_data: if not ph in phvals: phvals.append(ph) phvals.sort() self.phva...
[ "def", "update_microstates", "(", "self", ",", "X", ")", ":", "self", ".", "X", "=", "X", "phvals", "=", "X", ".", "all_states", ".", "keys", "(", ")", "self", ".", "init_kcat_array", "(", ")", "if", "getattr", "(", "self", ",", "'activity_data'", ",...
Update the curves describing the microscopic states
[ "Update", "the", "curves", "describing", "the", "microscopic", "states" ]
[ "\"\"\"Update the curves describing the microscopic states\"\"\"", "#", "# Delete all lines", "#", "#", "# Get the states", "#", "#", "# Do we have the window open?", "#", "#", "# Draw the states", "#", "#", "# Get the colour", "#", "#", "# Draw the state", "#", "#", "# Norma...
[ { "param": "self", "type": null }, { "param": "X", "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": [], ...
bf62eaefc69c019e81f7177286a041cc736892a6
shambo001/peat
pKaTool/pKa_system_micro.py
[ "MIT" ]
Python
determine_pkhalf
<not_specific>
def determine_pkhalf(self,charges,acid_base): """from a list of [pH,charge] determine two pKa values that define the population""" import copy # # First find out if there are one or two pKa values # pkas=self.determine_pkhalf_simple(charges,acid_base) if len(pkas)...
from a list of [pH,charge] determine two pKa values that define the population
from a list of [pH,charge] determine two pKa values that define the population
[ "from", "a", "list", "of", "[", "pH", "charge", "]", "determine", "two", "pKa", "values", "that", "define", "the", "population" ]
def determine_pkhalf(self,charges,acid_base): import copy First find out if there are one or two pKa values pkas=self.determine_pkhalf_simple(charges,acid_base) if len(pkas)==2: Function for two pKa values self.funktion="(1.0/(math.pow(10,-pH)/math.pow(10,-pKa1)...
[ "def", "determine_pkhalf", "(", "self", ",", "charges", ",", "acid_base", ")", ":", "import", "copy", "pkas", "=", "self", ".", "determine_pkhalf_simple", "(", "charges", ",", "acid_base", ")", "if", "len", "(", "pkas", ")", "==", "2", ":", "self", ".", ...
from a list of [pH,charge] determine two pKa values that define the population
[ "from", "a", "list", "of", "[", "pH", "charge", "]", "determine", "two", "pKa", "values", "that", "define", "the", "population" ]
[ "\"\"\"from a list of [pH,charge] determine two pKa values that define the population\"\"\"", "#", "# First find out if there are one or two pKa values", "#", "#", "# Function for two pKa values", "#", "#", "# Fit the function", "#", "#", "# Check convergence", "# ", "#", "# Compile the ...
[ { "param": "self", "type": null }, { "param": "charges", "type": null }, { "param": "acid_base", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "charges", "type": null, "docstring": null, "docstring_tokens"...
bf62eaefc69c019e81f7177286a041cc736892a6
shambo001/peat
pKaTool/pKa_system_micro.py
[ "MIT" ]
Python
close_state_win
<not_specific>
def close_state_win(self): """Set the vars so we now the state_win is closed""" if getattr(self,'state_win',None): self.state_win.destroy() self.state_win=None self.micro_var.set(0) self.state_lines={} return
Set the vars so we now the state_win is closed
Set the vars so we now the state_win is closed
[ "Set", "the", "vars", "so", "we", "now", "the", "state_win", "is", "closed" ]
def close_state_win(self): if getattr(self,'state_win',None): self.state_win.destroy() self.state_win=None self.micro_var.set(0) self.state_lines={} return
[ "def", "close_state_win", "(", "self", ")", ":", "if", "getattr", "(", "self", ",", "'state_win'", ",", "None", ")", ":", "self", ".", "state_win", ".", "destroy", "(", ")", "self", ".", "state_win", "=", "None", "self", ".", "micro_var", ".", "set", ...
Set the vars so we now the state_win is closed
[ "Set", "the", "vars", "so", "we", "now", "the", "state_win", "is", "closed" ]
[ "\"\"\"Set the vars so we now the state_win is closed\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
bf62eaefc69c019e81f7177286a041cc736892a6
shambo001/peat
pKaTool/pKa_system_micro.py
[ "MIT" ]
Python
saveCCPS
<not_specific>
def saveCCPS(self): """Save the CCPS curve to file""" act_prof,curve,ftir,act_prof2=self.get_act_prof_and_tc_and_ftir() import sys, os, tkFileDialog if not self.lastdir: self.lastdir=os.getcwd() filename=tkFileDialog.asksaveasfilename(defaultextension='.txt', ...
Save the CCPS curve to file
Save the CCPS curve to file
[ "Save", "the", "CCPS", "curve", "to", "file" ]
def saveCCPS(self): act_prof,curve,ftir,act_prof2=self.get_act_prof_and_tc_and_ftir() import sys, os, tkFileDialog if not self.lastdir: self.lastdir=os.getcwd() filename=tkFileDialog.asksaveasfilename(defaultextension='.txt', in...
[ "def", "saveCCPS", "(", "self", ")", ":", "act_prof", ",", "curve", ",", "ftir", ",", "act_prof2", "=", "self", ".", "get_act_prof_and_tc_and_ftir", "(", ")", "import", "sys", ",", "os", ",", "tkFileDialog", "if", "not", "self", ".", "lastdir", ":", "sel...
Save the CCPS curve to file
[ "Save", "the", "CCPS", "curve", "to", "file" ]
[ "\"\"\"Save the CCPS curve to file\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
bf62eaefc69c019e81f7177286a041cc736892a6
shambo001/peat
pKaTool/pKa_system_micro.py
[ "MIT" ]
Python
copy_to_Ekin_micro
<not_specific>
def copy_to_Ekin_micro(self): """Copy a population curve to the Ekin facility of EAT_DB""" import os,sys import EAT_DB.Ekin # # Pick a group # self.pick_group_micro=Toplevel() self.pick_group_micro.title('Pick a protonation state') self.pick_group_...
Copy a population curve to the Ekin facility of EAT_DB
Copy a population curve to the Ekin facility of EAT_DB
[ "Copy", "a", "population", "curve", "to", "the", "Ekin", "facility", "of", "EAT_DB" ]
def copy_to_Ekin_micro(self): import os,sys import EAT_DB.Ekin Pick a group self.pick_group_micro=Toplevel() self.pick_group_micro.title('Pick a protonation state') self.pick_group_micro.geometry('+200+200') self.state_picked=IntVar() count=0 for ...
[ "def", "copy_to_Ekin_micro", "(", "self", ")", ":", "import", "os", ",", "sys", "import", "EAT_DB", ".", "Ekin", "self", ".", "pick_group_micro", "=", "Toplevel", "(", ")", "self", ".", "pick_group_micro", ".", "title", "(", "'Pick a protonation state'", ")", ...
Copy a population curve to the Ekin facility of EAT_DB
[ "Copy", "a", "population", "curve", "to", "the", "Ekin", "facility", "of", "EAT_DB" ]
[ "\"\"\"Copy a population curve to the Ekin facility of EAT_DB\"\"\"", "#", "# Pick a group", "#", "#", "# Get colour", "#", "#", "# Put the radiobutton in the window", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
bf62eaefc69c019e81f7177286a041cc736892a6
shambo001/peat
pKaTool/pKa_system_micro.py
[ "MIT" ]
Python
copy_group_micro
<not_specific>
def copy_group_micro(self,event=None): """Get the population curve and send it to Ekin""" # # Get the data and reformat it # state=self.state_picked.get() data={} for pH in self.X_states.all_states.keys(): data[pH]=self.X_states.all_states[pH][state]['...
Get the population curve and send it to Ekin
Get the population curve and send it to Ekin
[ "Get", "the", "population", "curve", "and", "send", "it", "to", "Ekin" ]
def copy_group_micro(self,event=None): Get the data and reformat it state=self.state_picked.get() data={} for pH in self.X_states.all_states.keys(): data[pH]=self.X_states.all_states[pH][state]['pop'] new_data={} new_data[0]={} new_data[1]={} ...
[ "def", "copy_group_micro", "(", "self", ",", "event", "=", "None", ")", ":", "state", "=", "self", ".", "state_picked", ".", "get", "(", ")", "data", "=", "{", "}", "for", "pH", "in", "self", ".", "X_states", ".", "all_states", ".", "keys", "(", ")...
Get the population curve and send it to Ekin
[ "Get", "the", "population", "curve", "and", "send", "it", "to", "Ekin" ]
[ "\"\"\"Get the population curve and send it to Ekin\"\"\"", "#", "# Get the data and reformat it", "#", "#", "# Open Ekin, and load the data", "#", "#", "# Destroy the little 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": ...
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
runPKACalculation
null
def runPKACalculation(self): '''Runs a pKa calculation on the current pdb''' if not self.environment.isParallel: #Unlike the other tools PKA uses the WorkingDirectory class pKaRun = Programs.PKARun(workingDirectory=self.workingDirectory, outputDirectory=self.outputDirectory, configuration=sel...
Runs a pKa calculation on the current pdb
Runs a pKa calculation on the current pdb
[ "Runs", "a", "pKa", "calculation", "on", "the", "current", "pdb" ]
def runPKACalculation(self): if not self.environment.isParallel: pKaRun = Programs.PKARun(workingDirectory=self.workingDirectory, outputDirectory=self.outputDirectory, configuration=self.configuration, filename=self.pdbFile) pKaRun.run(cleanPDB=False) else: raise Exceptions.EnvironmentEr...
[ "def", "runPKACalculation", "(", "self", ")", ":", "if", "not", "self", ".", "environment", ".", "isParallel", ":", "pKaRun", "=", "Programs", ".", "PKARun", "(", "workingDirectory", "=", "self", ".", "workingDirectory", ",", "outputDirectory", "=", "self", ...
Runs a pKa calculation on the current pdb
[ "Runs", "a", "pKa", "calculation", "on", "the", "current", "pdb" ]
[ "'''Runs a pKa calculation on the current pdb'''", "#Unlike the other tools PKA uses the WorkingDirectory class" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
runScan
null
def runScan(self, mutantCollection, ionisableGroups=None, resultsName='ScanResults', verbose=False): '''Calculates the effect of the mutations in mutantCollection on the pKa of ionisable groups. Parameters: mutantCollection - A MutantCollection instance representing the mutations to be scanned. ionisable...
Calculates the effect of the mutations in mutantCollection on the pKa of ionisable groups. Parameters: mutantCollection - A MutantCollection instance representing the mutations to be scanned. ionisableGroups - A list of the residue codes of the groups that will be checked resultsName - The results matrix ...
Calculates the effect of the mutations in mutantCollection on the pKa of ionisable groups. Parameters: mutantCollection - A MutantCollection instance representing the mutations to be scanned. ionisableGroups - A list of the residue codes of the groups that will be checked resultsName - The results matrix will be added ...
[ "Calculates", "the", "effect", "of", "the", "mutations", "in", "mutantCollection", "on", "the", "pKa", "of", "ionisable", "groups", ".", "Parameters", ":", "mutantCollection", "-", "A", "MutantCollection", "instance", "representing", "the", "mutations", "to", "be"...
def runScan(self, mutantCollection, ionisableGroups=None, resultsName='ScanResults', verbose=False): scanner = self.scanTool() if ionisableGroups is not None: scanner.setIonisableResidues(ionisableGroups) runpka = False try: scanner.scan(mutantCollection=mutantCollection, verbose=verbose) self.environm...
[ "def", "runScan", "(", "self", ",", "mutantCollection", ",", "ionisableGroups", "=", "None", ",", "resultsName", "=", "'ScanResults'", ",", "verbose", "=", "False", ")", ":", "scanner", "=", "self", ".", "scanTool", "(", ")", "if", "ionisableGroups", "is", ...
Calculates the effect of the mutations in mutantCollection on the pKa of ionisable groups.
[ "Calculates", "the", "effect", "of", "the", "mutations", "in", "mutantCollection", "on", "the", "pKa", "of", "ionisable", "groups", "." ]
[ "'''Calculates the effect of the mutations in mutantCollection on the pKa of ionisable groups.\n\t\t\n\t\tParameters:\n\t\t\tmutantCollection - A MutantCollection instance representing the mutations to be scanned.\n\t\t\tionisableGroups - A list of the residue codes of the groups that will be checked\n\t\t\tresults...
[ { "param": "self", "type": null }, { "param": "mutantCollection", "type": null }, { "param": "ionisableGroups", "type": null }, { "param": "resultsName", "type": null }, { "param": "verbose", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutantCollection", "type": null, "docstring": null, "docstrin...
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
runStabilityCalculation
null
def runStabilityCalculation(self, mutantFiles=[], resultsName='StabilityResults', verbose=False): '''Runs a stability calculation Parameters: mutantFiles=A list of path to pdb files containing the mutants. Returns: Nothing Access the results of the scan through the receivers dataDirectory attribut...
Runs a stability calculation Parameters: mutantFiles=A list of path to pdb files containing the mutants. Returns: Nothing Access the results of the scan through the receivers dataDirectory attribute. i.e dataDirectory.scanResults
Runs a stability calculation Parameters: mutantFiles=A list of path to pdb files containing the mutants. Nothing Access the results of the scan through the receivers dataDirectory attribute.
[ "Runs", "a", "stability", "calculation", "Parameters", ":", "mutantFiles", "=", "A", "list", "of", "path", "to", "pdb", "files", "containing", "the", "mutants", ".", "Nothing", "Access", "the", "results", "of", "the", "scan", "through", "the", "receivers", "...
def runStabilityCalculation(self, mutantFiles=[], resultsName='StabilityResults', verbose=False): if len(mutantFiles) is 0: raise Exceptions.MutantCollectionError, 'No mutant files available for %s' % os.path.split(self.pdbFile)[1] uffbaps = self.uffbapsTool() uffbaps.deltaStability(comparePDBs=mutantFiles, ...
[ "def", "runStabilityCalculation", "(", "self", ",", "mutantFiles", "=", "[", "]", ",", "resultsName", "=", "'StabilityResults'", ",", "verbose", "=", "False", ")", ":", "if", "len", "(", "mutantFiles", ")", "is", "0", ":", "raise", "Exceptions", ".", "Muta...
Runs a stability calculation Parameters: mutantFiles=A list of path to pdb files containing the mutants.
[ "Runs", "a", "stability", "calculation", "Parameters", ":", "mutantFiles", "=", "A", "list", "of", "path", "to", "pdb", "files", "containing", "the", "mutants", "." ]
[ "'''Runs a stability calculation\n\t\t\t\n\t\tParameters:\n\t\t\tmutantFiles=A list of path to pdb files containing the mutants.\n\t\t\t\n\t\tReturns: Nothing\n\t\t\tAccess the results of the scan through the receivers dataDirectory attribute.\n\t\t\ti.e dataDirectory.scanResults'''" ]
[ { "param": "self", "type": null }, { "param": "mutantFiles", "type": null }, { "param": "resultsName", "type": null }, { "param": "verbose", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "mutantFiles", "type": null, "docstring": null, "docstring_tok...
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
runBindingCalculation
null
def runBindingCalculation(self, ligandFile, mutantFiles=[], bindingResults='BindingResults', deltaBindingResults='DeltaBindingResults', verbose=False): '''Runs a binding calculation Parameters: ligandFile=Path to a mol2 file containing the ligand mutantFiles=A list of pdb files containing th...
Runs a binding calculation Parameters: ligandFile=Path to a mol2 file containing the ligand mutantFiles=A list of pdb files containing the mutants.
Runs a binding calculation Parameters: ligandFile=Path to a mol2 file containing the ligand mutantFiles=A list of pdb files containing the mutants.
[ "Runs", "a", "binding", "calculation", "Parameters", ":", "ligandFile", "=", "Path", "to", "a", "mol2", "file", "containing", "the", "ligand", "mutantFiles", "=", "A", "list", "of", "pdb", "files", "containing", "the", "mutants", "." ]
def runBindingCalculation(self, ligandFile, mutantFiles=[], bindingResults='BindingResults', deltaBindingResults='DeltaBindingResults', verbose=False): if len(mutantFiles) is 0: raise Exceptions.MutantCollectionError, 'No mutant files available for %s' % os.path.split(self.pdbFile)[1] uffbaps = self....
[ "def", "runBindingCalculation", "(", "self", ",", "ligandFile", ",", "mutantFiles", "=", "[", "]", ",", "bindingResults", "=", "'BindingResults'", ",", "deltaBindingResults", "=", "'DeltaBindingResults'", ",", "verbose", "=", "False", ")", ":", "if", "len", "(",...
Runs a binding calculation Parameters: ligandFile=Path to a mol2 file containing the ligand mutantFiles=A list of pdb files containing the mutants.
[ "Runs", "a", "binding", "calculation", "Parameters", ":", "ligandFile", "=", "Path", "to", "a", "mol2", "file", "containing", "the", "ligand", "mutantFiles", "=", "A", "list", "of", "pdb", "files", "containing", "the", "mutants", "." ]
[ "'''Runs a binding calculation\n\t\t\n\t\tParameters:\n\t\t\tligandFile=Path to a mol2 file containing the ligand\n\t\t\tmutantFiles=A list of pdb files containing the mutants.'''" ]
[ { "param": "self", "type": null }, { "param": "ligandFile", "type": null }, { "param": "mutantFiles", "type": null }, { "param": "bindingResults", "type": null }, { "param": "deltaBindingResults", "type": null }, { "param": "verbose", "type": null ...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ligandFile", "type": null, "docstring": null, "docstring_toke...
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
scanTool
<not_specific>
def scanTool(self): '''Returns the scanner instance used by the receiver''' #Create a scanner object #The scanner is needed regardles of wheather or not a scan is performed. #This is because we may need to access the data from a previous scan for #e.g. a stability calculation. if self.scanner is None...
Returns the scanner instance used by the receiver
Returns the scanner instance used by the receiver
[ "Returns", "the", "scanner", "instance", "used", "by", "the", "receiver" ]
def scanTool(self): if self.scanner is None: self.scanner = Programs.Scanner(pdbName=self.pdbFile, workingDirectory=self.workingDirectory, configuration=self.configuration, outputDirectory=self.outputDirectory, ionisableResidues=None) return self.scanner
[ "def", "scanTool", "(", "self", ")", ":", "if", "self", ".", "scanner", "is", "None", ":", "self", ".", "scanner", "=", "Programs", ".", "Scanner", "(", "pdbName", "=", "self", ".", "pdbFile", ",", "workingDirectory", "=", "self", ".", "workingDirectory"...
Returns the scanner instance used by the receiver
[ "Returns", "the", "scanner", "instance", "used", "by", "the", "receiver" ]
[ "'''Returns the scanner instance used by the receiver'''", "#Create a scanner object", "#The scanner is needed regardles of wheather or not a scan is performed.", "#This is because we may need to access the data from a previous scan for", "#e.g. a stability calculation." ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
uffbapsTool
<not_specific>
def uffbapsTool(self): '''Returns the UFFBAPS instance used by the receiver''' if self.uffbaps is None: self.uffbaps = Programs.UFFBAPS(sourcePDB=self.pdbFile, executablePath=self.configuration.uffbapsLocation(), workingDirectory=self.workingDirectory) return self.uffbaps
Returns the UFFBAPS instance used by the receiver
Returns the UFFBAPS instance used by the receiver
[ "Returns", "the", "UFFBAPS", "instance", "used", "by", "the", "receiver" ]
def uffbapsTool(self): if self.uffbaps is None: self.uffbaps = Programs.UFFBAPS(sourcePDB=self.pdbFile, executablePath=self.configuration.uffbapsLocation(), workingDirectory=self.workingDirectory) return self.uffbaps
[ "def", "uffbapsTool", "(", "self", ")", ":", "if", "self", ".", "uffbaps", "is", "None", ":", "self", ".", "uffbaps", "=", "Programs", ".", "UFFBAPS", "(", "sourcePDB", "=", "self", ".", "pdbFile", ",", "executablePath", "=", "self", ".", "configuration"...
Returns the UFFBAPS instance used by the receiver
[ "Returns", "the", "UFFBAPS", "instance", "used", "by", "the", "receiver" ]
[ "'''Returns the UFFBAPS instance used by the receiver'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
CreateMutants
<not_specific>
def CreateMutants(pdbFile, configuration, parser, environment, cleanPDB=False): '''Creates a set of mutant pdbs based on the command line options''' environment.output('[PEAT-SA] Generating mutants now ...') ligandFile = None if parser.ligandFile() is not None: ligandFile = [parser.ligandFile()] #Check if a...
Creates a set of mutant pdbs based on the command line options
Creates a set of mutant pdbs based on the command line options
[ "Creates", "a", "set", "of", "mutant", "pdbs", "based", "on", "the", "command", "line", "options" ]
def CreateMutants(pdbFile, configuration, parser, environment, cleanPDB=False): environment.output('[PEAT-SA] Generating mutants now ...') ligandFile = None if parser.ligandFile() is not None: ligandFile = [parser.ligandFile()] if parser.mutationListFile() is not None: filename = parser.mutationListFile() obj...
[ "def", "CreateMutants", "(", "pdbFile", ",", "configuration", ",", "parser", ",", "environment", ",", "cleanPDB", "=", "False", ")", ":", "environment", ".", "output", "(", "'[PEAT-SA] Generating mutants now ...'", ")", "ligandFile", "=", "None", "if", "parser", ...
Creates a set of mutant pdbs based on the command line options
[ "Creates", "a", "set", "of", "mutant", "pdbs", "based", "on", "the", "command", "line", "options" ]
[ "'''Creates a set of mutant pdbs based on the command line options'''", "#Check if a mutation list was provided", "#If not create a scan list", "#Validate - Will raise an exception if it fails", "#Check if the overlap (mutationQuality) was specified on the command line", "#Create the collection\t\t" ]
[ { "param": "pdbFile", "type": null }, { "param": "configuration", "type": null }, { "param": "parser", "type": null }, { "param": "environment", "type": null }, { "param": "cleanPDB", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pdbFile", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "configuration", "type": null, "docstring": null, "docstrin...
ad7c8879a64e86e05dbefe1cb04c2d181190f780
shambo001/peat
PEATSA/Core/ProteinDesignTool.py
[ "MIT" ]
Python
main
null
def main(): '''Main function for the ProteinDesignTool program. Parses the command line and starts the jobs requested''' environment = Environment.Environment() #Read arguments parser = Utilities.CommandLineParser() parser.parseCommandLine() if parser.helpRequested() is True: print __doc__ sys.exit...
Main function for the ProteinDesignTool program. Parses the command line and starts the jobs requested
Main function for the ProteinDesignTool program. Parses the command line and starts the jobs requested
[ "Main", "function", "for", "the", "ProteinDesignTool", "program", ".", "Parses", "the", "command", "line", "and", "starts", "the", "jobs", "requested" ]
def main(): environment = Environment.Environment() parser = Utilities.CommandLineParser() parser.parseCommandLine() if parser.helpRequested() is True: print __doc__ sys.exit(0) if parser.createConfigurationRequested() is True: print 'Creating default configuration file, proteinDesignTool.conf, in the cu...
[ "def", "main", "(", ")", ":", "environment", "=", "Environment", ".", "Environment", "(", ")", "parser", "=", "Utilities", ".", "CommandLineParser", "(", ")", "parser", ".", "parseCommandLine", "(", ")", "if", "parser", ".", "helpRequested", "(", ")", "is"...
Main function for the ProteinDesignTool program.
[ "Main", "function", "for", "the", "ProteinDesignTool", "program", "." ]
[ "'''Main function for the ProteinDesignTool program.\n\t\n\tParses the command line and starts the jobs requested'''", "#Read arguments", "#Create the ProteinDesignTool instance", "#Check if an initial pKa run requested", "#Check if a previously created MutantCollection was specified", "#Note we use the P...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
8de27622bbeeeb000e8ac2995b697f01f2fe9fb6
shambo001/peat
pKaTool/group_control.py
[ "MIT" ]
Python
toggle_fix_intpka
<not_specific>
def toggle_fix_intpka(self,event=None): """Toggle the fix status of the intpka slider""" state=self.intpka_scale.cget('state') if state=='disabled': self.intpka_scale.configure(state='normal') self.intpka_scale.configure(troughcolor='grey') else: self....
Toggle the fix status of the intpka slider
Toggle the fix status of the intpka slider
[ "Toggle", "the", "fix", "status", "of", "the", "intpka", "slider" ]
def toggle_fix_intpka(self,event=None): state=self.intpka_scale.cget('state') if state=='disabled': self.intpka_scale.configure(state='normal') self.intpka_scale.configure(troughcolor='grey') else: self.intpka_scale.configure(state='disabled') self...
[ "def", "toggle_fix_intpka", "(", "self", ",", "event", "=", "None", ")", ":", "state", "=", "self", ".", "intpka_scale", ".", "cget", "(", "'state'", ")", "if", "state", "==", "'disabled'", ":", "self", ".", "intpka_scale", ".", "configure", "(", "state"...
Toggle the fix status of the intpka slider
[ "Toggle", "the", "fix", "status", "of", "the", "intpka", "slider" ]
[ "\"\"\"Toggle the fix status of the intpka slider\"\"\"" ]
[ { "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": ...
8de27622bbeeeb000e8ac2995b697f01f2fe9fb6
shambo001/peat
pKaTool/group_control.py
[ "MIT" ]
Python
update_scales
<not_specific>
def update_scales(self): """Called from the parent class # # updates graph when scales are moved by user # """ if not '%.1f'%self.intpka.get() == str(self.intpka_scale.get()): self.intpka.set(self.intpka_scale.get()) # for num in self.intenes_s...
Called from the parent class # # updates graph when scales are moved by user #
Called from the parent class updates graph when scales are moved by user
[ "Called", "from", "the", "parent", "class", "updates", "graph", "when", "scales", "are", "moved", "by", "user" ]
def update_scales(self): if not '%.1f'%self.intpka.get() == str(self.intpka_scale.get()): self.intpka.set(self.intpka_scale.get()) for num in self.intenes_scales: if not '%.1f'%self.intenes[num].get() == str(self.intenes_scales[num].get()): self.intenes[num].set(s...
[ "def", "update_scales", "(", "self", ")", ":", "if", "not", "'%.1f'", "%", "self", ".", "intpka", ".", "get", "(", ")", "==", "str", "(", "self", ".", "intpka_scale", ".", "get", "(", ")", ")", ":", "self", ".", "intpka", ".", "set", "(", "self",...
Called from the parent class updates graph when scales are moved by user
[ "Called", "from", "the", "parent", "class", "updates", "graph", "when", "scales", "are", "moved", "by", "user" ]
[ "\"\"\"Called from the parent class\n #\n # updates graph when scales are moved by user\n #\n \"\"\"", "#" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
8de27622bbeeeb000e8ac2995b697f01f2fe9fb6
shambo001/peat
pKaTool/group_control.py
[ "MIT" ]
Python
update_scales_from_fit
<not_specific>
def update_scales_from_fit(self): """Called from the parent class # # updates scales when parameters are changed by fitter # """ self.intpka_scale.set(self.intpka.get()) for num in self.intenes_scales: self.intenes_scales[num].set(self.intenes[num].get...
Called from the parent class # # updates scales when parameters are changed by fitter #
Called from the parent class updates scales when parameters are changed by fitter
[ "Called", "from", "the", "parent", "class", "updates", "scales", "when", "parameters", "are", "changed", "by", "fitter" ]
def update_scales_from_fit(self): self.intpka_scale.set(self.intpka.get()) for num in self.intenes_scales: self.intenes_scales[num].set(self.intenes[num].get()) return
[ "def", "update_scales_from_fit", "(", "self", ")", ":", "self", ".", "intpka_scale", ".", "set", "(", "self", ".", "intpka", ".", "get", "(", ")", ")", "for", "num", "in", "self", ".", "intenes_scales", ":", "self", ".", "intenes_scales", "[", "num", "...
Called from the parent class updates scales when parameters are changed by fitter
[ "Called", "from", "the", "parent", "class", "updates", "scales", "when", "parameters", "are", "changed", "by", "fitter" ]
[ "\"\"\"Called from the parent class\n #\n # updates scales when parameters are changed by fitter\n #\n \"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
8de27622bbeeeb000e8ac2995b697f01f2fe9fb6
shambo001/peat
pKaTool/group_control.py
[ "MIT" ]
Python
update_group_control
<not_specific>
def update_group_control(self): """Update the acid/base label""" if self.acid_base.get()==1: self.acid_base_text.set('Acid') else: self.acid_base_text.set('Base') if self.style.get()==1: self.style_text.set('Line') else: self.style...
Update the acid/base label
Update the acid/base label
[ "Update", "the", "acid", "/", "base", "label" ]
def update_group_control(self): if self.acid_base.get()==1: self.acid_base_text.set('Acid') else: self.acid_base_text.set('Base') if self.style.get()==1: self.style_text.set('Line') else: self.style_text.set('Dashed') return
[ "def", "update_group_control", "(", "self", ")", ":", "if", "self", ".", "acid_base", ".", "get", "(", ")", "==", "1", ":", "self", ".", "acid_base_text", ".", "set", "(", "'Acid'", ")", "else", ":", "self", ".", "acid_base_text", ".", "set", "(", "'...
Update the acid/base label
[ "Update", "the", "acid", "/", "base", "label" ]
[ "\"\"\"Update the acid/base label\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
202bca8a9f5105d1b8c57c100549c11aaa321e49
shambo001/peat
titration_db/titdb.py
[ "MIT" ]
Python
selectpKD
<not_specific>
def selectpKD(self): """Allow user to select a protein and field for pKD""" self.showHeader(menu=1) sys.stdout.flush() DB = self.DB = self.connect() names = [] for p in DB.getRecs(): names.append((DB[p].name,p)) names.sort() nucl = ['1H NMR',...
Allow user to select a protein and field for pKD
Allow user to select a protein and field for pKD
[ "Allow", "user", "to", "select", "a", "protein", "and", "field", "for", "pKD" ]
def selectpKD(self): self.showHeader(menu=1) sys.stdout.flush() DB = self.DB = self.connect() names = [] for p in DB.getRecs(): names.append((DB[p].name,p)) names.sort() nucl = ['1H NMR', '15N NMR', '13C NMR'] P = pKDInterface() pkdprot...
[ "def", "selectpKD", "(", "self", ")", ":", "self", ".", "showHeader", "(", "menu", "=", "1", ")", "sys", ".", "stdout", ".", "flush", "(", ")", "DB", "=", "self", ".", "DB", "=", "self", ".", "connect", "(", ")", "names", "=", "[", "]", "for", ...
Allow user to select a protein and field for pKD
[ "Allow", "user", "to", "select", "a", "protein", "and", "field", "for", "pKD" ]
[ "\"\"\"Allow user to select a protein and field for pKD\"\"\"", "#check pKD available calcs", "#add selection boxes", "#button", "#table of proteins and their PDBs" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
202bca8a9f5105d1b8c57c100549c11aaa321e49
shambo001/peat
titration_db/titdb.py
[ "MIT" ]
Python
showpKD
<not_specific>
def showpKD(self): """Show pKD calcs with exp data for selected ekindata""" protein = self.form.getfirst('protein') col = self.form.getfirst('column') showopt = self.form.getfirst('option') self.showHeader(menu=1) sys.stdout.flush() DB = self.DB = self.connect() ...
Show pKD calcs with exp data for selected ekindata
Show pKD calcs with exp data for selected ekindata
[ "Show", "pKD", "calcs", "with", "exp", "data", "for", "selected", "ekindata" ]
def showpKD(self): protein = self.form.getfirst('protein') col = self.form.getfirst('column') showopt = self.form.getfirst('option') self.showHeader(menu=1) sys.stdout.flush() DB = self.DB = self.connect() protname = DB[protein]['name'] pdbid = DB[protein]...
[ "def", "showpKD", "(", "self", ")", ":", "protein", "=", "self", ".", "form", ".", "getfirst", "(", "'protein'", ")", "col", "=", "self", ".", "form", ".", "getfirst", "(", "'column'", ")", "showopt", "=", "self", ".", "form", ".", "getfirst", "(", ...
Show pKD calcs with exp data for selected ekindata
[ "Show", "pKD", "calcs", "with", "exp", "data", "for", "selected", "ekindata" ]
[ "\"\"\"Show pKD calcs with exp data for selected ekindata\"\"\"", "#plot them" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
202bca8a9f5105d1b8c57c100549c11aaa321e49
shambo001/peat
titration_db/titdb.py
[ "MIT" ]
Python
plotpKDCalcs
<not_specific>
def plotpKDCalcs(self, calcs, Ed=None, option=1): """Do pKD calcs with exp data plots""" from PEATDB.Ekin.Web import EkinWeb from PEATDB.Ekin.Base import EkinProject from PEATDB.Ekin.Convert import EkinConvert from PEATDB.Ekin.Titration import TitrationAnalyser import PEA...
Do pKD calcs with exp data plots
Do pKD calcs with exp data plots
[ "Do", "pKD", "calcs", "with", "exp", "data", "plots" ]
def plotpKDCalcs(self, calcs, Ed=None, option=1): from PEATDB.Ekin.Web import EkinWeb from PEATDB.Ekin.Base import EkinProject from PEATDB.Ekin.Convert import EkinConvert from PEATDB.Ekin.Titration import TitrationAnalyser import PEATDB.Ekin.Utils as Utils t = TitrationAn...
[ "def", "plotpKDCalcs", "(", "self", ",", "calcs", ",", "Ed", "=", "None", ",", "option", "=", "1", ")", ":", "from", "PEATDB", ".", "Ekin", ".", "Web", "import", "EkinWeb", "from", "PEATDB", ".", "Ekin", ".", "Base", "import", "EkinProject", "from", ...
Do pKD calcs with exp data plots
[ "Do", "pKD", "calcs", "with", "exp", "data", "plots" ]
[ "\"\"\"Do pKD calcs with exp data plots\"\"\"", "#create ekin proj from pKD titcurves", "#transform exp data names to match pKD ones", "#if pKD names have no chain id, we don't need one for exp names", "#now we overlay the same datasets in Ed and Ec", "#also handles cases where same residue multiple times...
[ { "param": "self", "type": null }, { "param": "calcs", "type": null }, { "param": "Ed", "type": null }, { "param": "option", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "calcs", "type": null, "docstring": null, "docstring_tokens": ...
b48d7b21ad4eab86408524dfd1f0a10a64fd2c76
shambo001/peat
pKaTool/stab_fit/Decode_muts.py
[ "MIT" ]
Python
single_muts
<not_specific>
def single_muts(self,data): """Search for mutant proteins that just contain a single mutation""" enes=[] for protein in data.keys(): #print data[protein]['longform'] num=len(data[protein]['longform'].split('+')) if num==1: enes.append([data[pro...
Search for mutant proteins that just contain a single mutation
Search for mutant proteins that just contain a single mutation
[ "Search", "for", "mutant", "proteins", "that", "just", "contain", "a", "single", "mutation" ]
def single_muts(self,data): enes=[] for protein in data.keys(): num=len(data[protein]['longform'].split('+')) if num==1: enes.append([data[protein]['longform'],data[protein]['dtm']]) return enes
[ "def", "single_muts", "(", "self", ",", "data", ")", ":", "enes", "=", "[", "]", "for", "protein", "in", "data", ".", "keys", "(", ")", ":", "num", "=", "len", "(", "data", "[", "protein", "]", "[", "'longform'", "]", ".", "split", "(", "'+'", ...
Search for mutant proteins that just contain a single mutation
[ "Search", "for", "mutant", "proteins", "that", "just", "contain", "a", "single", "mutation" ]
[ "\"\"\"Search for mutant proteins that just contain a single mutation\"\"\"", "#print data[protein]['longform']" ]
[ { "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": [...
f15d68ded7329e6963888375fdb4ec8945b1cf8a
shambo001/peat
PEATDB/Ekin/Web.py
[ "MIT" ]
Python
makeHtml
<not_specific>
def makeHtml(self, images, outfile=None, imgpath=None, columns=2, title=None,colheader=None, rowheader=None): """Put given images into a html file and save it""" if outfile != None: saveout = sys.stdout fsock = open(outfile, 'w') sys.stdout = f...
Put given images into a html file and save it
Put given images into a html file and save it
[ "Put", "given", "images", "into", "a", "html", "file", "and", "save", "it" ]
def makeHtml(self, images, outfile=None, imgpath=None, columns=2, title=None,colheader=None, rowheader=None): if outfile != None: saveout = sys.stdout fsock = open(outfile, 'w') sys.stdout = fsock if title!=None: print '<h1>%s</h1>'...
[ "def", "makeHtml", "(", "self", ",", "images", ",", "outfile", "=", "None", ",", "imgpath", "=", "None", ",", "columns", "=", "2", ",", "title", "=", "None", ",", "colheader", "=", "None", ",", "rowheader", "=", "None", ")", ":", "if", "outfile", "...
Put given images into a html file and save it
[ "Put", "given", "images", "into", "a", "html", "file", "and", "save", "it" ]
[ "\"\"\"Put given images into a html file and save it\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "images", "type": null }, { "param": "outfile", "type": null }, { "param": "imgpath", "type": null }, { "param": "columns", "type": null }, { "param": "title", "type": null }, { "param": "colhea...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "images", "type": null, "docstring": null, "docstring_tokens":...
f15d68ded7329e6963888375fdb4ec8945b1cf8a
shambo001/peat
PEATDB/Ekin/Web.py
[ "MIT" ]
Python
showEkinPlots
<not_specific>
def showEkinPlots(self, ekindata=None, project=None, filename=None, datasets='ALL', title='Ekin plots', outfile=None, imgpath=None, path='', normalise=False, showfitvars=False, plo...
Plot ekin datasets from the provided ekin project data
Plot ekin datasets from the provided ekin project data
[ "Plot", "ekin", "datasets", "from", "the", "provided", "ekin", "project", "data" ]
def showEkinPlots(self, ekindata=None, project=None, filename=None, datasets='ALL', title='Ekin plots', outfile=None, imgpath=None, path='', normalise=False, showfitvars=False, plo...
[ "def", "showEkinPlots", "(", "self", ",", "ekindata", "=", "None", ",", "project", "=", "None", ",", "filename", "=", "None", ",", "datasets", "=", "'ALL'", ",", "title", "=", "'Ekin plots'", ",", "outfile", "=", "None", ",", "imgpath", "=", "None", ",...
Plot ekin datasets from the provided ekin project data
[ "Plot", "ekin", "datasets", "from", "the", "provided", "ekin", "project", "data" ]
[ "\"\"\"Plot ekin datasets from the provided ekin project data\"\"\"", "#do csv download link for data displayed", "#convert from ekindata", "#just passed object", "#load project from file", "#if outfile is given, we override imgpath", "#we plot all the datasets", "#use ekinproject to supply formatted ...
[ { "param": "self", "type": null }, { "param": "ekindata", "type": null }, { "param": "project", "type": null }, { "param": "filename", "type": null }, { "param": "datasets", "type": null }, { "param": "title", "type": null }, { "param": "ou...
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekindata", "type": null, "docstring": null, "docstring_tokens...
f15d68ded7329e6963888375fdb4ec8945b1cf8a
shambo001/peat
PEATDB/Ekin/Web.py
[ "MIT" ]
Python
showMetaData
<not_specific>
def showMetaData(self, ekinproj=None, ekindata=None, dataset=None, fdata=None, silent=False): """Print html of fit and metadata for the given dataset""" if fdata == None: if ekinproj == None and ekindata!=None: E = EkinProject(data=ekindata) else: ...
Print html of fit and metadata for the given dataset
Print html of fit and metadata for the given dataset
[ "Print", "html", "of", "fit", "and", "metadata", "for", "the", "given", "dataset" ]
def showMetaData(self, ekinproj=None, ekindata=None, dataset=None, fdata=None, silent=False): if fdata == None: if ekinproj == None and ekindata!=None: E = EkinProject(data=ekindata) else: E = ekinproj fdata = E.getMetaData(dataset) fso...
[ "def", "showMetaData", "(", "self", ",", "ekinproj", "=", "None", ",", "ekindata", "=", "None", ",", "dataset", "=", "None", ",", "fdata", "=", "None", ",", "silent", "=", "False", ")", ":", "if", "fdata", "==", "None", ":", "if", "ekinproj", "==", ...
Print html of fit and metadata for the given dataset
[ "Print", "html", "of", "fit", "and", "metadata", "for", "the", "given", "dataset" ]
[ "\"\"\"Print html of fit and metadata for the given dataset\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "ekinproj", "type": null }, { "param": "ekindata", "type": null }, { "param": "dataset", "type": null }, { "param": "fdata", "type": null }, { "param": "silent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "ekinproj", "type": null, "docstring": null, "docstring_tokens...
9fd7de39c75567abc51d9b3fe89cb1f78c1a43cc
shambo001/peat
Protool/energy.py
[ "MIT" ]
Python
VdWr
<not_specific>
def VdWr(self,atom): """Get the Van der Waals radius of an atom""" if self.is_carbon(atom): return self.vdwr['C'] elif self.is_nitrogen(atom): return self.vdwr['N'] elif self.is_oxygen(atom): return self.vdwr['O'] elif self.is_phosphor(atom): ...
Get the Van der Waals radius of an atom
Get the Van der Waals radius of an atom
[ "Get", "the", "Van", "der", "Waals", "radius", "of", "an", "atom" ]
def VdWr(self,atom): if self.is_carbon(atom): return self.vdwr['C'] elif self.is_nitrogen(atom): return self.vdwr['N'] elif self.is_oxygen(atom): return self.vdwr['O'] elif self.is_phosphor(atom): return self.vdwr['P'] elif self.is_...
[ "def", "VdWr", "(", "self", ",", "atom", ")", ":", "if", "self", ".", "is_carbon", "(", "atom", ")", ":", "return", "self", ".", "vdwr", "[", "'C'", "]", "elif", "self", ".", "is_nitrogen", "(", "atom", ")", ":", "return", "self", ".", "vdwr", "[...
Get the Van der Waals radius of an atom
[ "Get", "the", "Van", "der", "Waals", "radius", "of", "an", "atom" ]
[ "\"\"\"Get the Van der Waals radius of an atom\"\"\"" ]
[ { "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": [...
9fd7de39c75567abc51d9b3fe89cb1f78c1a43cc
shambo001/peat
Protool/energy.py
[ "MIT" ]
Python
Van_der_Waals_sum
<not_specific>
def Van_der_Waals_sum(self): """Get the sum of all Van der Waals radii""" sum=0.0 print " vdwr ",self.vdwr for atom in self.atoms.keys(): print "VW of ",atom," = ",self.VdWr(atom) sum_i = self.VdWr(atom) if sum_i !=None: sum=sum+sum_i ...
Get the sum of all Van der Waals radii
Get the sum of all Van der Waals radii
[ "Get", "the", "sum", "of", "all", "Van", "der", "Waals", "radii" ]
def Van_der_Waals_sum(self): sum=0.0 print " vdwr ",self.vdwr for atom in self.atoms.keys(): print "VW of ",atom," = ",self.VdWr(atom) sum_i = self.VdWr(atom) if sum_i !=None: sum=sum+sum_i return sum
[ "def", "Van_der_Waals_sum", "(", "self", ")", ":", "sum", "=", "0.0", "print", "\" vdwr \"", ",", "self", ".", "vdwr", "for", "atom", "in", "self", ".", "atoms", ".", "keys", "(", ")", ":", "print", "\"VW of \"", ",", "atom", ",", "\" = \"", ",", "se...
Get the sum of all Van der Waals radii
[ "Get", "the", "sum", "of", "all", "Van", "der", "Waals", "radii" ]
[ "\"\"\"Get the sum of all Van der Waals radii\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
9fd7de39c75567abc51d9b3fe89cb1f78c1a43cc
shambo001/peat
Protool/energy.py
[ "MIT" ]
Python
find_coordinates_extremes
<not_specific>
def find_coordinates_extremes(self): """Find the extremes of coordinates in all three directions""" minx=99999.9 maxx=-99999 miny=99999 maxy=-999999 minz=999999 maxz=-999999 for atom in self.atoms.keys(): X=self.atoms[atom]['X'] Y=s...
Find the extremes of coordinates in all three directions
Find the extremes of coordinates in all three directions
[ "Find", "the", "extremes", "of", "coordinates", "in", "all", "three", "directions" ]
def find_coordinates_extremes(self): minx=99999.9 maxx=-99999 miny=99999 maxy=-999999 minz=999999 maxz=-999999 for atom in self.atoms.keys(): X=self.atoms[atom]['X'] Y=self.atoms[atom]['Y'] Z=self.atoms[atom]['Z'] mi...
[ "def", "find_coordinates_extremes", "(", "self", ")", ":", "minx", "=", "99999.9", "maxx", "=", "-", "99999", "miny", "=", "99999", "maxy", "=", "-", "999999", "minz", "=", "999999", "maxz", "=", "-", "999999", "for", "atom", "in", "self", ".", "atoms"...
Find the extremes of coordinates in all three directions
[ "Find", "the", "extremes", "of", "coordinates", "in", "all", "three", "directions" ]
[ "\"\"\"Find the extremes of coordinates in all three directions\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a839c14721f63d75cb5230b48aeb34b1edbb7bc5
shambo001/peat
PEATDB/Ekin/IO.py
[ "MIT" ]
Python
do_import_data
<not_specific>
def do_import_data(self, filename=None): """Returns a list of new ekin datasets this functions requires the use of the vars from the dialog, so is not independently callable""" import string if not self.do_import: return s=self.separator.get() # Get a roo...
Returns a list of new ekin datasets this functions requires the use of the vars from the dialog, so is not independently callable
Returns a list of new ekin datasets this functions requires the use of the vars from the dialog, so is not independently callable
[ "Returns", "a", "list", "of", "new", "ekin", "datasets", "this", "functions", "requires", "the", "use", "of", "the", "vars", "from", "the", "dialog", "so", "is", "not", "independently", "callable" ]
def do_import_data(self, filename=None): import string if not self.do_import: return s=self.separator.get() if self.column_row.get() == 1: import tkSimpleDialog showname=tkSimpleDialog.askstring('Tab name', 'Root ...
[ "def", "do_import_data", "(", "self", ",", "filename", "=", "None", ")", ":", "import", "string", "if", "not", "self", ".", "do_import", ":", "return", "s", "=", "self", ".", "separator", ".", "get", "(", ")", "if", "self", ".", "column_row", ".", "g...
Returns a list of new ekin datasets this functions requires the use of the vars from the dialog, so is not independently callable
[ "Returns", "a", "list", "of", "new", "ekin", "datasets", "this", "functions", "requires", "the", "use", "of", "the", "vars", "from", "the", "dialog", "so", "is", "not", "independently", "callable" ]
[ "\"\"\"Returns a list of new ekin datasets this functions requires the use of\n the vars from the dialog, so is not independently callable\"\"\"", "# Get a root name for the datatabs if data in rows", "# Data in rows?", "#All the work is done in dopreview,", "#here we just really need to create th...
[ { "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...
a839c14721f63d75cb5230b48aeb34b1edbb7bc5
shambo001/peat
PEATDB/Ekin/IO.py
[ "MIT" ]
Python
import_multiple
<not_specific>
def import_multiple(self,event=None, default_extension='.txt'): """Import a single or multiple files""" # populate file list here filelist = self.open_filelist(default_extension=default_extension) self.filename = filelist[0] self.file_list = filelist ...
Import a single or multiple files
Import a single or multiple files
[ "Import", "a", "single", "or", "multiple", "files" ]
def import_multiple(self,event=None, default_extension='.txt'): filelist = self.open_filelist(default_extension=default_extension) self.filename = filelist[0] self.file_list = filelist self.lines = self.get_lines(self.filename) status = self.import_csv_dialog() ...
[ "def", "import_multiple", "(", "self", ",", "event", "=", "None", ",", "default_extension", "=", "'.txt'", ")", ":", "filelist", "=", "self", ".", "open_filelist", "(", "default_extension", "=", "default_extension", ")", "self", ".", "filename", "=", "filelist...
Import a single or multiple files
[ "Import", "a", "single", "or", "multiple", "files" ]
[ "\"\"\"Import a single or multiple files\"\"\"", "# populate file list here", "#get all lines from file and put in variable", "#get options for import and then do import" ]
[ { "param": "self", "type": null }, { "param": "event", "type": null }, { "param": "default_extension", "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": ...
a839c14721f63d75cb5230b48aeb34b1edbb7bc5
shambo001/peat
PEATDB/Ekin/IO.py
[ "MIT" ]
Python
import_sparky
<not_specific>
def import_sparky(self,event=None): """Dialog showing selected directory containing Sparky peak files""" # # Show what we got # self.overwrite_all = IntVar() self.overwrite_all.set(0) self.removecurrent = IntVar() self.removecurrent.set(0) self.as...
Dialog showing selected directory containing Sparky peak files
Dialog showing selected directory containing Sparky peak files
[ "Dialog", "showing", "selected", "directory", "containing", "Sparky", "peak", "files" ]
def import_sparky(self,event=None): Show what we got self.overwrite_all = IntVar() self.overwrite_all.set(0) self.removecurrent = IntVar() self.removecurrent.set(0) self.assigncol = self.assigncol_var.get() self.sparky_win=Toplevel() self.sparky_win.title...
[ "def", "import_sparky", "(", "self", ",", "event", "=", "None", ")", ":", "self", ".", "overwrite_all", "=", "IntVar", "(", ")", "self", ".", "overwrite_all", ".", "set", "(", "0", ")", "self", ".", "removecurrent", "=", "IntVar", "(", ")", "self", "...
Dialog showing selected directory containing Sparky peak files
[ "Dialog", "showing", "selected", "directory", "containing", "Sparky", "peak", "files" ]
[ "\"\"\"Dialog showing selected directory containing Sparky peak files\"\"\"", "#", "# Show what we got", "#", "#", "# List all of the groups", "#", "#", "# Loop over all pH values to get all the residues", "#", "#", "#", "#", "# Buttons for selecting", "#", "#Button(self.sparky_win,tex...
[ { "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": ...
a839c14721f63d75cb5230b48aeb34b1edbb7bc5
shambo001/peat
PEATDB/Ekin/IO.py
[ "MIT" ]
Python
copy_peak
<not_specific>
def copy_peak(self,event=None): """Copy the selected peak to the data""" selection=self.peaks_read.curselection() residues=[] data={} f = self.fval.get() for sel_number in selection: residue=self.peak_residues[int(sel_number)] # # Const...
Copy the selected peak to the data
Copy the selected peak to the data
[ "Copy", "the", "selected", "peak", "to", "the", "data" ]
def copy_peak(self,event=None): selection=self.peaks_read.curselection() residues=[] data={} f = self.fval.get() for sel_number in selection: residue=self.peak_residues[int(sel_number)] Construct the titration curve data[residue]={} ...
[ "def", "copy_peak", "(", "self", ",", "event", "=", "None", ")", ":", "selection", "=", "self", ".", "peaks_read", ".", "curselection", "(", ")", "residues", "=", "[", "]", "data", "=", "{", "}", "f", "=", "self", ".", "fval", ".", "get", "(", ")...
Copy the selected peak to the data
[ "Copy", "the", "selected", "peak", "to", "the", "data" ]
[ "\"\"\"Copy the selected peak to the data\"\"\"", "#", "# Construct the titration curve", "#", "#print data[residue]", "# Get combined shift if user chose 'both'", "#create lists for H and N", "#print data[residue]", "# Delete all the other tabs first if needed ", "# Insert the data if it's...
[ { "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": ...
a839c14721f63d75cb5230b48aeb34b1edbb7bc5
shambo001/peat
PEATDB/Ekin/IO.py
[ "MIT" ]
Python
import_chem_shift
<not_specific>
def import_chem_shift(self,event=None): """Import kinetic data from a nmr file""" import tkFileDialog filename=tkFileDialog.askopenfilename(defaultextension='.txt',initialdir=self.savedir, filetypes=[("NMR file","*.txt"), ...
Import kinetic data from a nmr file
Import kinetic data from a nmr file
[ "Import", "kinetic", "data", "from", "a", "nmr", "file" ]
def import_chem_shift(self,event=None): import tkFileDialog filename=tkFileDialog.askopenfilename(defaultextension='.txt',initialdir=self.savedir, filetypes=[("NMR file","*.txt"), ("All files","*.*")],...
[ "def", "import_chem_shift", "(", "self", ",", "event", "=", "None", ")", ":", "import", "tkFileDialog", "filename", "=", "tkFileDialog", ".", "askopenfilename", "(", "defaultextension", "=", "'.txt'", ",", "initialdir", "=", "self", ".", "savedir", ",", "filet...
Import kinetic data from a nmr file
[ "Import", "kinetic", "data", "from", "a", "nmr", "file" ]
[ "\"\"\"Import kinetic data from a nmr file\"\"\"", "#print values[i][0]", "#", "# Insert the data if it's not already there", "#", "#self.redraw_graph(fitting=1)" ]
[ { "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": ...
a839c14721f63d75cb5230b48aeb34b1edbb7bc5
shambo001/peat
PEATDB/Ekin/IO.py
[ "MIT" ]
Python
import_CD_tempscan
<not_specific>
def import_CD_tempscan(self): """Import a temperature scan from a Jasco CD spec""" import tkFileDialog, os filename=tkFileDialog.askopenfilename(defaultextension='.txt',initialdir=os.getcwd(), filetypes=[("Jasco txt","*.txt"), ...
Import a temperature scan from a Jasco CD spec
Import a temperature scan from a Jasco CD spec
[ "Import", "a", "temperature", "scan", "from", "a", "Jasco", "CD", "spec" ]
def import_CD_tempscan(self): import tkFileDialog, os filename=tkFileDialog.askopenfilename(defaultextension='.txt',initialdir=os.getcwd(), filetypes=[("Jasco txt","*.txt"), ("All files","*.*")], ...
[ "def", "import_CD_tempscan", "(", "self", ")", ":", "import", "tkFileDialog", ",", "os", "filename", "=", "tkFileDialog", ".", "askopenfilename", "(", "defaultextension", "=", "'.txt'", ",", "initialdir", "=", "os", ".", "getcwd", "(", ")", ",", "filetypes", ...
Import a temperature scan from a Jasco CD spec
[ "Import", "a", "temperature", "scan", "from", "a", "Jasco", "CD", "spec" ]
[ "\"\"\"Import a temperature scan from a Jasco CD spec\"\"\"", "#", "# If we got a filename then read the stuff", "#", "#", "# Open and read file", "#", "#", "# Parse file", "#", "# Format is:", "# 00 TITLE\t0.6mg/ml hewl sigma", "# 01 DATA TYPE", "# 02 ORIGIN\tJASCO", "# 03 OWNER", "# ...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
a839c14721f63d75cb5230b48aeb34b1edbb7bc5
shambo001/peat
PEATDB/Ekin/IO.py
[ "MIT" ]
Python
export_csv
<not_specific>
def export_csv(self, data, fitdata=None): """Export the current tab to a csv file""" import tkFileDialog filename=tkFileDialog.asksaveasfilename(defaultextension='.csv',initialdir=self.savedir, filetypes=[("CSV file","*.csv"), ...
Export the current tab to a csv file
Export the current tab to a csv file
[ "Export", "the", "current", "tab", "to", "a", "csv", "file" ]
def export_csv(self, data, fitdata=None): import tkFileDialog filename=tkFileDialog.asksaveasfilename(defaultextension='.csv',initialdir=self.savedir, filetypes=[("CSV file","*.csv"), ("All files","*.*...
[ "def", "export_csv", "(", "self", ",", "data", ",", "fitdata", "=", "None", ")", ":", "import", "tkFileDialog", "filename", "=", "tkFileDialog", ".", "asksaveasfilename", "(", "defaultextension", "=", "'.csv'", ",", "initialdir", "=", "self", ".", "savedir", ...
Export the current tab to a csv file
[ "Export", "the", "current", "tab", "to", "a", "csv", "file" ]
[ "\"\"\"Export the current tab to a csv file\"\"\"", "#labels=data[0]['label'],data[1]['label'] ", "#csvwriter = csv.writer(sys.stdout)", "# Ask if we should export the fit too" ]
[ { "param": "self", "type": null }, { "param": "data", "type": null }, { "param": "fitdata", "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": [...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
resourceDirectory
<not_specific>
def resourceDirectory(): '''Returns the directory containing the resources used by the ProteinDesignTool''' return resources
Returns the directory containing the resources used by the ProteinDesignTool
Returns the directory containing the resources used by the ProteinDesignTool
[ "Returns", "the", "directory", "containing", "the", "resources", "used", "by", "the", "ProteinDesignTool" ]
def resourceDirectory(): return resources
[ "def", "resourceDirectory", "(", ")", ":", "return", "resources" ]
Returns the directory containing the resources used by the ProteinDesignTool
[ "Returns", "the", "directory", "containing", "the", "resources", "used", "by", "the", "ProteinDesignTool" ]
[ "'''Returns the directory containing the resources used by the ProteinDesignTool'''" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
UffbapsResourceDirectory
<not_specific>
def UffbapsResourceDirectory(): '''Returns the directory containing the files necessary for running genialtNav from UFFBAPS genialtNav must be run in this directory''' return os.path.join(resourceDirectory(), 'UFFBAPSRun')
Returns the directory containing the files necessary for running genialtNav from UFFBAPS genialtNav must be run in this directory
Returns the directory containing the files necessary for running genialtNav from UFFBAPS genialtNav must be run in this directory
[ "Returns", "the", "directory", "containing", "the", "files", "necessary", "for", "running", "genialtNav", "from", "UFFBAPS", "genialtNav", "must", "be", "run", "in", "this", "directory" ]
def UffbapsResourceDirectory(): return os.path.join(resourceDirectory(), 'UFFBAPSRun')
[ "def", "UffbapsResourceDirectory", "(", ")", ":", "return", "os", ".", "path", ".", "join", "(", "resourceDirectory", "(", ")", ",", "'UFFBAPSRun'", ")" ]
Returns the directory containing the files necessary for running genialtNav from UFFBAPS genialtNav must be run in this directory
[ "Returns", "the", "directory", "containing", "the", "files", "necessary", "for", "running", "genialtNav", "from", "UFFBAPS", "genialtNav", "must", "be", "run", "in", "this", "directory" ]
[ "'''Returns the directory containing the files necessary for running genialtNav from UFFBAPS\n\t\n\tgenialtNav must be run in this directory'''" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
RequiredScanFilesDirectory
<not_specific>
def RequiredScanFilesDirectory(): '''Returns the paths to the directory containing the required scan files''' return os.path.join(resourceDirectory(), 'RequiredScanFiles')
Returns the paths to the directory containing the required scan files
Returns the paths to the directory containing the required scan files
[ "Returns", "the", "paths", "to", "the", "directory", "containing", "the", "required", "scan", "files" ]
def RequiredScanFilesDirectory(): return os.path.join(resourceDirectory(), 'RequiredScanFiles')
[ "def", "RequiredScanFilesDirectory", "(", ")", ":", "return", "os", ".", "path", ".", "join", "(", "resourceDirectory", "(", ")", ",", "'RequiredScanFiles'", ")" ]
Returns the paths to the directory containing the required scan files
[ "Returns", "the", "paths", "to", "the", "directory", "containing", "the", "required", "scan", "files" ]
[ "'''Returns the paths to the directory containing the required scan files'''" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
__validateConfiguration
<not_specific>
def __validateConfiguration(self, object, errorList=None): '''Checks if object is a valid configuration object Parameters: object - A ConfigParser instance errorList - An empty list Returns: True if object contains all the required options. False otherwise. If False and errorList was set i...
Checks if object is a valid configuration object Parameters: object - A ConfigParser instance errorList - An empty list Returns: True if object contains all the required options. False otherwise. If False and errorList was set if contains a list of what was missing
Checks if object is a valid configuration object Parameters: object - A ConfigParser instance errorList - An empty list True if object contains all the required options. False otherwise. If False and errorList was set if contains a list of what was missing
[ "Checks", "if", "object", "is", "a", "valid", "configuration", "object", "Parameters", ":", "object", "-", "A", "ConfigParser", "instance", "errorList", "-", "An", "empty", "list", "True", "if", "object", "contains", "all", "the", "required", "options", ".", ...
def __validateConfiguration(self, object, errorList=None): if errorList == None: errorList = [] requiredSections = Configuration.requiredOptions.keys() for section in requiredSections: if object.has_section(section): options = object.options(section) required = Configuration.requiredOptions[section]...
[ "def", "__validateConfiguration", "(", "self", ",", "object", ",", "errorList", "=", "None", ")", ":", "if", "errorList", "==", "None", ":", "errorList", "=", "[", "]", "requiredSections", "=", "Configuration", ".", "requiredOptions", ".", "keys", "(", ")", ...
Checks if object is a valid configuration object Parameters: object - A ConfigParser instance errorList - An empty list
[ "Checks", "if", "object", "is", "a", "valid", "configuration", "object", "Parameters", ":", "object", "-", "A", "ConfigParser", "instance", "errorList", "-", "An", "empty", "list" ]
[ "'''Checks if object is a valid configuration object\n\t\t\n\t\tParameters:\n\t\t\tobject - A ConfigParser instance\n\t\t\terrorList - An empty list\n\t\t\t\n\t\tReturns:\n\t\t\tTrue if object contains all the required options.\n\t\t\tFalse otherwise.\n\t\t\tIf False and errorList was set if contains a list of what...
[ { "param": "self", "type": null }, { "param": "object", "type": null }, { "param": "errorList", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "object", "type": null, "docstring": null, "docstring_tokens":...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
__readConfigurationsFromDefaultLocations
<not_specific>
def __readConfigurationsFromDefaultLocations(self): '''Checks if a configuration file exists at set of default locations and reads it The locations are (in order) - the current directory - the value of PEATSA_CONFIGURATION_PATH environment variable - the users home directory The first found confi...
Checks if a configuration file exists at set of default locations and reads it The locations are (in order) - the current directory - the value of PEATSA_CONFIGURATION_PATH environment variable - the users home directory The first found configuration file is used. Returns: The configuration o...
Checks if a configuration file exists at set of default locations and reads it The locations are (in order) the current directory the value of PEATSA_CONFIGURATION_PATH environment variable the users home directory The first found configuration file is used. The configuration object if one was successfully created. N...
[ "Checks", "if", "a", "configuration", "file", "exists", "at", "set", "of", "default", "locations", "and", "reads", "it", "The", "locations", "are", "(", "in", "order", ")", "the", "current", "directory", "the", "value", "of", "PEATSA_CONFIGURATION_PATH", "envi...
def __readConfigurationsFromDefaultLocations(self): default = ConfigParser.SafeConfigParser() default.optionxform = str current = os.path.abspath('proteinDesignTool.conf') home = os.path.join(os.path.expanduser('~'), 'proteinDesignTool.conf') array = [home, current] if os.environ.has_key('PEATSA_CONFIGURATI...
[ "def", "__readConfigurationsFromDefaultLocations", "(", "self", ")", ":", "default", "=", "ConfigParser", ".", "SafeConfigParser", "(", ")", "default", ".", "optionxform", "=", "str", "current", "=", "os", ".", "path", ".", "abspath", "(", "'proteinDesignTool.conf...
Checks if a configuration file exists at set of default locations and reads it The locations are (in order) the current directory the value of PEATSA_CONFIGURATION_PATH environment variable the users home directory
[ "Checks", "if", "a", "configuration", "file", "exists", "at", "set", "of", "default", "locations", "and", "reads", "it", "The", "locations", "are", "(", "in", "order", ")", "the", "current", "directory", "the", "value", "of", "PEATSA_CONFIGURATION_PATH", "envi...
[ "'''Checks if a configuration file exists at set of default locations and reads it\n\t\t\n\t\tThe locations are (in order)\n\t\t\t- the current directory\n\t\t\t- the value of PEATSA_CONFIGURATION_PATH environment variable\n\t\t\t- the users home directory\n\t\t\n\t\tThe first found configuration file is used.\n\t\...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
__defaultConfiguration
<not_specific>
def __defaultConfiguration(self, writeFile=True): '''Creates a default ConfigParser object instances of this class can use Parameters - writeFile - If True writes a default configuration file in the current directory''' default = ConfigParser.SafeConfigParser() default.optionxform = str #Add default...
Creates a default ConfigParser object instances of this class can use Parameters - writeFile - If True writes a default configuration file in the current directory
Creates a default ConfigParser object instances of this class can use Parameters writeFile - If True writes a default configuration file in the current directory
[ "Creates", "a", "default", "ConfigParser", "object", "instances", "of", "this", "class", "can", "use", "Parameters", "writeFile", "-", "If", "True", "writes", "a", "default", "configuration", "file", "in", "the", "current", "directory" ]
def __defaultConfiguration(self, writeFile=True): default = ConfigParser.SafeConfigParser() default.optionxform = str default.add_section('PKA SCAN PARAMETERS') default.add_section('PKA SCAN METHOD') default.add_section('PKA SCAN OUTPUT') default.add_section('PATHS') default.add_section('WORKING DIRECTORY...
[ "def", "__defaultConfiguration", "(", "self", ",", "writeFile", "=", "True", ")", ":", "default", "=", "ConfigParser", ".", "SafeConfigParser", "(", ")", "default", ".", "optionxform", "=", "str", "default", ".", "add_section", "(", "'PKA SCAN PARAMETERS'", ")",...
Creates a default ConfigParser object instances of this class can use Parameters writeFile - If True writes a default configuration file in the current directory
[ "Creates", "a", "default", "ConfigParser", "object", "instances", "of", "this", "class", "can", "use", "Parameters", "writeFile", "-", "If", "True", "writes", "a", "default", "configuration", "file", "in", "the", "current", "directory" ]
[ "'''Creates a default ConfigParser object instances of this class can use\n\t\t\n\t\tParameters -\n\t\t\twriteFile - If True writes a default configuration file in the current directory'''", "#Add default configuration values", "# pKa calculation parameters", "# Method", "# Be not-so-noisy", "# Do not sav...
[ { "param": "self", "type": null }, { "param": "writeFile", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "writeFile", "type": null, "docstring": null, "docstring_token...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
writeToFile
null
def writeToFile(self, filename): '''Writes the configuration object to a file Exceptions Raises an IOError if file cannot be created or written to''' file = open(filename, 'w') self.configuration.write(file) file.close
Writes the configuration object to a file Exceptions Raises an IOError if file cannot be created or written to
Writes the configuration object to a file Exceptions Raises an IOError if file cannot be created or written to
[ "Writes", "the", "configuration", "object", "to", "a", "file", "Exceptions", "Raises", "an", "IOError", "if", "file", "cannot", "be", "created", "or", "written", "to" ]
def writeToFile(self, filename): file = open(filename, 'w') self.configuration.write(file) file.close
[ "def", "writeToFile", "(", "self", ",", "filename", ")", ":", "file", "=", "open", "(", "filename", ",", "'w'", ")", "self", ".", "configuration", ".", "write", "(", "file", ")", "file", ".", "close" ]
Writes the configuration object to a file Exceptions Raises an IOError if file cannot be created or written to
[ "Writes", "the", "configuration", "object", "to", "a", "file", "Exceptions", "Raises", "an", "IOError", "if", "file", "cannot", "be", "created", "or", "written", "to" ]
[ "'''Writes the configuration object to a file\n\t\t\n\t\tExceptions\n\t\t\tRaises an IOError if file cannot be created or written to'''" ]
[ { "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...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
designPKAOptions
<not_specific>
def designPKAOptions(self): '''Returns the options for the scan calculation in the format used by Design_pKa.run_opt Exceptions Raises an Exceptions.EnvironmentError if the pKa modules cannot be found''' try: import pKa.Design_pKa as Design_pKa except ImportError: raise Exceptions.Configuration...
Returns the options for the scan calculation in the format used by Design_pKa.run_opt Exceptions Raises an Exceptions.EnvironmentError if the pKa modules cannot be found
Returns the options for the scan calculation in the format used by Design_pKa.run_opt Exceptions Raises an Exceptions.EnvironmentError if the pKa modules cannot be found
[ "Returns", "the", "options", "for", "the", "scan", "calculation", "in", "the", "format", "used", "by", "Design_pKa", ".", "run_opt", "Exceptions", "Raises", "an", "Exceptions", ".", "EnvironmentError", "if", "the", "pKa", "modules", "cannot", "be", "found" ]
def designPKAOptions(self): try: import pKa.Design_pKa as Design_pKa except ImportError: raise Exceptions.ConfigurationError, "Cannot located Design_pKa module. Check correct path specified in configuration" defaults = Design_pKa.get_defaults() for section in Configuration.scanSections: for option in s...
[ "def", "designPKAOptions", "(", "self", ")", ":", "try", ":", "import", "pKa", ".", "Design_pKa", "as", "Design_pKa", "except", "ImportError", ":", "raise", "Exceptions", ".", "ConfigurationError", ",", "\"Cannot located Design_pKa module. Check correct path specified in ...
Returns the options for the scan calculation in the format used by Design_pKa.run_opt Exceptions Raises an Exceptions.EnvironmentError if the pKa modules cannot be found
[ "Returns", "the", "options", "for", "the", "scan", "calculation", "in", "the", "format", "used", "by", "Design_pKa", ".", "run_opt", "Exceptions", "Raises", "an", "Exceptions", ".", "EnvironmentError", "if", "the", "pKa", "modules", "cannot", "be", "found" ]
[ "'''Returns the options for the scan calculation in the format used by Design_pKa.run_opt\n\t\t\n\t\tExceptions\n\t\t\tRaises an Exceptions.EnvironmentError if the pKa modules cannot be found'''", "#Get the default options", "#Go through sections and set values", "#print option", "#print defaults[option]", ...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
uffbapsLocation
<not_specific>
def uffbapsLocation(self): '''Returns the location of Uffbaps as given by the configuration file Defaults to /usr/local/bin if nothing is supplied''' return self.configuration.get('PATHS', 'uffbaps')
Returns the location of Uffbaps as given by the configuration file Defaults to /usr/local/bin if nothing is supplied
Returns the location of Uffbaps as given by the configuration file Defaults to /usr/local/bin if nothing is supplied
[ "Returns", "the", "location", "of", "Uffbaps", "as", "given", "by", "the", "configuration", "file", "Defaults", "to", "/", "usr", "/", "local", "/", "bin", "if", "nothing", "is", "supplied" ]
def uffbapsLocation(self): return self.configuration.get('PATHS', 'uffbaps')
[ "def", "uffbapsLocation", "(", "self", ")", ":", "return", "self", ".", "configuration", ".", "get", "(", "'PATHS'", ",", "'uffbaps'", ")" ]
Returns the location of Uffbaps as given by the configuration file Defaults to /usr/local/bin if nothing is supplied
[ "Returns", "the", "location", "of", "Uffbaps", "as", "given", "by", "the", "configuration", "file", "Defaults", "to", "/", "usr", "/", "local", "/", "bin", "if", "nothing", "is", "supplied" ]
[ "'''Returns the location of Uffbaps as given by the configuration file\n\t\t\n\t\tDefaults to /usr/local/bin if nothing is supplied'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
pkaModuleLocation
<not_specific>
def pkaModuleLocation(self): '''Returns the location of pKaTool. Note: This is the path provided by the configuration file. It may not be valid. User pKaCalculationsAvailable() to check''' return self.configuration.get('PATHS', 'pKa Tools')
Returns the location of pKaTool. Note: This is the path provided by the configuration file. It may not be valid. User pKaCalculationsAvailable() to check
Returns the location of pKaTool. Note: This is the path provided by the configuration file. It may not be valid. User pKaCalculationsAvailable() to check
[ "Returns", "the", "location", "of", "pKaTool", ".", "Note", ":", "This", "is", "the", "path", "provided", "by", "the", "configuration", "file", ".", "It", "may", "not", "be", "valid", ".", "User", "pKaCalculationsAvailable", "()", "to", "check" ]
def pkaModuleLocation(self): return self.configuration.get('PATHS', 'pKa Tools')
[ "def", "pkaModuleLocation", "(", "self", ")", ":", "return", "self", ".", "configuration", ".", "get", "(", "'PATHS'", ",", "'pKa Tools'", ")" ]
Returns the location of pKaTool.
[ "Returns", "the", "location", "of", "pKaTool", "." ]
[ "'''Returns the location of pKaTool.\n\t\t\n\t\tNote: This is the path provided by the configuration file. It may not be valid.\n\t\tUser pKaCalculationsAvailable() to check'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
pKaCalculationsAvailable
<not_specific>
def pKaCalculationsAvailable(self): '''Returns True if pKaCalculations are available''' return self.pKaToolAvailable
Returns True if pKaCalculations are available
Returns True if pKaCalculations are available
[ "Returns", "True", "if", "pKaCalculations", "are", "available" ]
def pKaCalculationsAvailable(self): return self.pKaToolAvailable
[ "def", "pKaCalculationsAvailable", "(", "self", ")", ":", "return", "self", ".", "pKaToolAvailable" ]
Returns True if pKaCalculations are available
[ "Returns", "True", "if", "pKaCalculations", "are", "available" ]
[ "'''Returns True if pKaCalculations are available'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
pdbCleanProgram
<not_specific>
def pdbCleanProgram(self): '''Returns the program to use to clean pdbs''' if self.configuration.has_option('PDBS', 'pdbCleanProgram'): return self.configuration.get('PDBS', 'pdbCleanProgram') else: return 'WHATIF'
Returns the program to use to clean pdbs
Returns the program to use to clean pdbs
[ "Returns", "the", "program", "to", "use", "to", "clean", "pdbs" ]
def pdbCleanProgram(self): if self.configuration.has_option('PDBS', 'pdbCleanProgram'): return self.configuration.get('PDBS', 'pdbCleanProgram') else: return 'WHATIF'
[ "def", "pdbCleanProgram", "(", "self", ")", ":", "if", "self", ".", "configuration", ".", "has_option", "(", "'PDBS'", ",", "'pdbCleanProgram'", ")", ":", "return", "self", ".", "configuration", ".", "get", "(", "'PDBS'", ",", "'pdbCleanProgram'", ")", "else...
Returns the program to use to clean pdbs
[ "Returns", "the", "program", "to", "use", "to", "clean", "pdbs" ]
[ "'''Returns the program to use to clean pdbs'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
_removeErrorHandler
null
def _removeErrorHandler(self, function, path, execInfo): '''Convience method for creating an remove directory exception Note: Do not use as handler to shutil.rmtree as the exception raised here cannot be caught then''' data = 'Error removing directory %s\n' % path data = data + 'Exception information ...
Convience method for creating an remove directory exception Note: Do not use as handler to shutil.rmtree as the exception raised here cannot be caught then
Convience method for creating an remove directory exception Note: Do not use as handler to shutil.rmtree as the exception raised here cannot be caught then
[ "Convience", "method", "for", "creating", "an", "remove", "directory", "exception", "Note", ":", "Do", "not", "use", "as", "handler", "to", "shutil", ".", "rmtree", "as", "the", "exception", "raised", "here", "cannot", "be", "caught", "then" ]
def _removeErrorHandler(self, function, path, execInfo): data = 'Error removing directory %s\n' % path data = data + 'Exception information - %s\n' % str(execInfo) raise Exceptions.WorkingDirectoryError, data
[ "def", "_removeErrorHandler", "(", "self", ",", "function", ",", "path", ",", "execInfo", ")", ":", "data", "=", "'Error removing directory %s\\n'", "%", "path", "data", "=", "data", "+", "'Exception information - %s\\n'", "%", "str", "(", "execInfo", ")", "rais...
Convience method for creating an remove directory exception Note: Do not use as handler to shutil.rmtree as the exception raised here cannot be caught then
[ "Convience", "method", "for", "creating", "an", "remove", "directory", "exception", "Note", ":", "Do", "not", "use", "as", "handler", "to", "shutil", ".", "rmtree", "as", "the", "exception", "raised", "here", "cannot", "be", "caught", "then" ]
[ "'''Convience method for creating an remove directory exception\n\t\t\n\t\tNote: Do not use as handler to shutil.rmtree as the exception raised here\n\t\tcannot be caught then'''" ]
[ { "param": "self", "type": null }, { "param": "function", "type": null }, { "param": "path", "type": null }, { "param": "execInfo", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "function", "type": null, "docstring": null, "docstring_tokens...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
_checkFile
<not_specific>
def _checkFile(self, pdbFile): '''Checks if the path pdbFile refers to an existing file. FIXME - Make changing of current working directory understandable. Parameters: pdbFile - A path to a file - Can be absolute or not. Returns: The absolute path to the file. Exceptions: Raises an excep...
Checks if the path pdbFile refers to an existing file. FIXME - Make changing of current working directory understandable. Parameters: pdbFile - A path to a file - Can be absolute or not. Returns: The absolute path to the file. Exceptions: Raises an exception if the file does not exist or if ...
Checks if the path pdbFile refers to an existing file. FIXME - Make changing of current working directory understandable. A path to a file - Can be absolute or not. The absolute path to the file. Raises an exception if the file does not exist or if its not a file
[ "Checks", "if", "the", "path", "pdbFile", "refers", "to", "an", "existing", "file", ".", "FIXME", "-", "Make", "changing", "of", "current", "working", "directory", "understandable", ".", "A", "path", "to", "a", "file", "-", "Can", "be", "absolute", "or", ...
def _checkFile(self, pdbFile): if not os.path.isabs(pdbFile): pdbFile = os.path.abspath(pdbFile) if not os.path.exists(pdbFile): raise Exceptions.WorkingDirectoryError, 'File %s does not exist' % pdbFile if not os.path.isfile(pdbFile): raise Exceptions.WorkingDirectoryError, 'Object at %s is not a file' ...
[ "def", "_checkFile", "(", "self", ",", "pdbFile", ")", ":", "if", "not", "os", ".", "path", ".", "isabs", "(", "pdbFile", ")", ":", "pdbFile", "=", "os", ".", "path", ".", "abspath", "(", "pdbFile", ")", "if", "not", "os", ".", "path", ".", "exis...
Checks if the path pdbFile refers to an existing file.
[ "Checks", "if", "the", "path", "pdbFile", "refers", "to", "an", "existing", "file", "." ]
[ "'''Checks if the path pdbFile refers to an existing file.\n\t\tFIXME - Make changing of current working directory understandable.\n\t\t\n\t\tParameters:\n\t\t\tpdbFile - A path to a file - Can be absolute or not.\n\t\t\t\n\t\tReturns:\n\t\t\tThe absolute path to the file.\n\t\t\t\n\t\tExceptions:\n\t\t\tRaises an ...
[ { "param": "self", "type": null }, { "param": "pdbFile", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pdbFile", "type": null, "docstring": null, "docstring_tokens"...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
_copyFileToDirectory
<not_specific>
def _copyFileToDirectory(self, filename, directory, overwrite=False): '''For internal use only. Copies filename to directory. Note that since this is for internal use error checking is less vigourous. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is...
For internal use only. Copies filename to directory. Note that since this is for internal use error checking is less vigourous. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the specified directory. directory - The directory to copy...
For internal use only. Copies filename to directory. Note that since this is for internal use error checking is less vigourous. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the specified directory. directory - The directory to copy the file to. over...
[ "For", "internal", "use", "only", ".", "Copies", "filename", "to", "directory", ".", "Note", "that", "since", "this", "is", "for", "internal", "use", "error", "checking", "is", "less", "vigourous", ".", "Parameters", "filename", "-", "A", "path", "to", "a"...
def _copyFileToDirectory(self, filename, directory, overwrite=False): destination = os.path.join(directory, os.path.split(filename)[1]) self.environment.log('Copying %s to %s' % (filename, destination)) if self.environment.isRoot(): filename = self._checkFile(filename) containingDirectory = os.path.split(fi...
[ "def", "_copyFileToDirectory", "(", "self", ",", "filename", ",", "directory", ",", "overwrite", "=", "False", ")", ":", "destination", "=", "os", ".", "path", ".", "join", "(", "directory", ",", "os", ".", "path", ".", "split", "(", "filename", ")", "...
For internal use only.
[ "For", "internal", "use", "only", "." ]
[ "'''For internal use only. Copies filename to directory.\n\t\t\n\t\tNote that since this is for internal use error checking is less vigourous.\n\t\t\n\t\tParameters\n\t\t\tfilename - A path to a file. Can be relative or absolute.\n\t\t\tIf the path is relative its is resolved w.r.t the specified directory.\n\t\t\td...
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "directory", "type": null }, { "param": "overwrite", "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...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
copyFileToDirectory
<not_specific>
def copyFileToDirectory(self, filename, overwrite=False): '''Copies filename to the working directory. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the working directory. overwrite - If True, if a file called filename exists in the ...
Copies filename to the working directory. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the working directory. overwrite - If True, if a file called filename exists in the working directory it is overwritten if possible. Otherwise th...
Copies filename to the working directory. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the working directory. overwrite - If True, if a file called filename exists in the working directory it is overwritten if possible. Otherwise that file is used. D...
[ "Copies", "filename", "to", "the", "working", "directory", ".", "Parameters", "filename", "-", "A", "path", "to", "a", "file", ".", "Can", "be", "relative", "or", "absolute", ".", "If", "the", "path", "is", "relative", "its", "is", "resolved", "w", ".", ...
def copyFileToDirectory(self, filename, overwrite=False): return self._copyFileToDirectory(filename=filename, directory=self.path(), overwrite=overwrite)
[ "def", "copyFileToDirectory", "(", "self", ",", "filename", ",", "overwrite", "=", "False", ")", ":", "return", "self", ".", "_copyFileToDirectory", "(", "filename", "=", "filename", ",", "directory", "=", "self", ".", "path", "(", ")", ",", "overwrite", "...
Copies filename to the working directory.
[ "Copies", "filename", "to", "the", "working", "directory", "." ]
[ "'''Copies filename to the working directory.\n\t\t\n\t\tParameters\n\t\t\tfilename - A path to a file. Can be relative or absolute.\n\t\t\tIf the path is relative its is resolved w.r.t the working directory.\n\t\t\toverwrite - If True, if a file called filename exists in the working directory\n\t\t\t\tit is overwr...
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "overwrite", "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...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
copyFileToUffbapsDirectory
<not_specific>
def copyFileToUffbapsDirectory(self, filename, overwrite=False): '''Copies filename to the uffbaps run directory. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the uffbaps run directory. overwrite - If True, if a file called filename...
Copies filename to the uffbaps run directory. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the uffbaps run directory. overwrite - If True, if a file called filename exists in the uffbaps run directory it is overwritten if possible. ...
Copies filename to the uffbaps run directory. Parameters filename - A path to a file. Can be relative or absolute. If the path is relative its is resolved w.r.t the uffbaps run directory. overwrite - If True, if a file called filename exists in the uffbaps run directory it is overwritten if possible. Otherwise that fil...
[ "Copies", "filename", "to", "the", "uffbaps", "run", "directory", ".", "Parameters", "filename", "-", "A", "path", "to", "a", "file", ".", "Can", "be", "relative", "or", "absolute", ".", "If", "the", "path", "is", "relative", "its", "is", "resolved", "w"...
def copyFileToUffbapsDirectory(self, filename, overwrite=False): return self._copyFileToDirectory(filename=filename, directory=self.uffbapsRunDirectory(), overwrite=overwrite)
[ "def", "copyFileToUffbapsDirectory", "(", "self", ",", "filename", ",", "overwrite", "=", "False", ")", ":", "return", "self", ".", "_copyFileToDirectory", "(", "filename", "=", "filename", ",", "directory", "=", "self", ".", "uffbapsRunDirectory", "(", ")", "...
Copies filename to the uffbaps run directory.
[ "Copies", "filename", "to", "the", "uffbaps", "run", "directory", "." ]
[ "'''Copies filename to the uffbaps run directory.\n\t\t\n\t\tParameters\n\t\t\tfilename - A path to a file. Can be relative or absolute.\n\t\t\tIf the path is relative its is resolved w.r.t the uffbaps run directory.\n\t\t\toverwrite - If True, if a file called filename exists in the uffbaps run directory\n\t\t\t\t...
[ { "param": "self", "type": null }, { "param": "filename", "type": null }, { "param": "overwrite", "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...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
containsFile
<not_specific>
def containsFile(self, filename): '''Returns True if the directory contains filename - False otherwise Note: Only check in the top-level directory''' filename = os.path.abspath(filename) path = os.path.split(filename)[0] isPresent = False if path == self.directory: isPresent = True return...
Returns True if the directory contains filename - False otherwise Note: Only check in the top-level directory
Returns True if the directory contains filename - False otherwise Note: Only check in the top-level directory
[ "Returns", "True", "if", "the", "directory", "contains", "filename", "-", "False", "otherwise", "Note", ":", "Only", "check", "in", "the", "top", "-", "level", "directory" ]
def containsFile(self, filename): filename = os.path.abspath(filename) path = os.path.split(filename)[0] isPresent = False if path == self.directory: isPresent = True return isPresent
[ "def", "containsFile", "(", "self", ",", "filename", ")", ":", "filename", "=", "os", ".", "path", ".", "abspath", "(", "filename", ")", "path", "=", "os", ".", "path", ".", "split", "(", "filename", ")", "[", "0", "]", "isPresent", "=", "False", "...
Returns True if the directory contains filename - False otherwise Note: Only check in the top-level directory
[ "Returns", "True", "if", "the", "directory", "contains", "filename", "-", "False", "otherwise", "Note", ":", "Only", "check", "in", "the", "top", "-", "level", "directory" ]
[ "'''Returns True if the directory contains filename - False otherwise\n\t\t\n\t\tNote: Only check in the top-level directory'''" ]
[ { "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...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
cleanUpScan
null
def cleanUpScan(self): '''Performs clean-up of the WorkingDirectory after a scan This basically involves removing any per-parallel-process copies of the pKa data''' if self.environment.isParallel: os.chdir(self.path()) directory = os.path.join(self.path(), "Process%d" % self.environment.rank()) ...
Performs clean-up of the WorkingDirectory after a scan This basically involves removing any per-parallel-process copies of the pKa data
Performs clean-up of the WorkingDirectory after a scan This basically involves removing any per-parallel-process copies of the pKa data
[ "Performs", "clean", "-", "up", "of", "the", "WorkingDirectory", "after", "a", "scan", "This", "basically", "involves", "removing", "any", "per", "-", "parallel", "-", "process", "copies", "of", "the", "pKa", "data" ]
def cleanUpScan(self): if self.environment.isParallel: os.chdir(self.path()) directory = os.path.join(self.path(), "Process%d" % self.environment.rank()) try: shutil.rmtree(directory, ignore_errors=True) except Exception, data: print Exception, data
[ "def", "cleanUpScan", "(", "self", ")", ":", "if", "self", ".", "environment", ".", "isParallel", ":", "os", ".", "chdir", "(", "self", ".", "path", "(", ")", ")", "directory", "=", "os", ".", "path", ".", "join", "(", "self", ".", "path", "(", "...
Performs clean-up of the WorkingDirectory after a scan This basically involves removing any per-parallel-process copies of the pKa data
[ "Performs", "clean", "-", "up", "of", "the", "WorkingDirectory", "after", "a", "scan", "This", "basically", "involves", "removing", "any", "per", "-", "parallel", "-", "process", "copies", "of", "the", "pKa", "data" ]
[ "'''Performs clean-up of the WorkingDirectory after a scan\n\t\t\n\t\tThis basically involves removing any per-parallel-process copies\n\t\tof the pKa data'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
clean
null
def clean(self): '''Cleans the working directory of unnecessary files.''' if self.environment.isRoot(): shutil.rmtree(self.uffbapsRunDirectory(), ignore_errors=True) #Remove scan files?
Cleans the working directory of unnecessary files.
Cleans the working directory of unnecessary files.
[ "Cleans", "the", "working", "directory", "of", "unnecessary", "files", "." ]
def clean(self): if self.environment.isRoot(): shutil.rmtree(self.uffbapsRunDirectory(), ignore_errors=True)
[ "def", "clean", "(", "self", ")", ":", "if", "self", ".", "environment", ".", "isRoot", "(", ")", ":", "shutil", ".", "rmtree", "(", "self", ".", "uffbapsRunDirectory", "(", ")", ",", "ignore_errors", "=", "True", ")" ]
Cleans the working directory of unnecessary files.
[ "Cleans", "the", "working", "directory", "of", "unnecessary", "files", "." ]
[ "'''Cleans the working directory of unnecessary files.'''", "#Remove scan files?" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
path
<not_specific>
def path(self): '''Returns the path of the working directory''' return self.directory
Returns the path of the working directory
Returns the path of the working directory
[ "Returns", "the", "path", "of", "the", "working", "directory" ]
def path(self): return self.directory
[ "def", "path", "(", "self", ")", ":", "return", "self", ".", "directory" ]
Returns the path of the working directory
[ "Returns", "the", "path", "of", "the", "working", "directory" ]
[ "'''Returns the path of the working directory'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
uffbapsRunDirectory
<not_specific>
def uffbapsRunDirectory(self): '''Returns the path of the subdir where genialtNav will be run''' return os.path.join(self.path(), 'UFFBAPSRun')
Returns the path of the subdir where genialtNav will be run
Returns the path of the subdir where genialtNav will be run
[ "Returns", "the", "path", "of", "the", "subdir", "where", "genialtNav", "will", "be", "run" ]
def uffbapsRunDirectory(self): return os.path.join(self.path(), 'UFFBAPSRun')
[ "def", "uffbapsRunDirectory", "(", "self", ")", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "path", "(", ")", ",", "'UFFBAPSRun'", ")" ]
Returns the path of the subdir where genialtNav will be run
[ "Returns", "the", "path", "of", "the", "subdir", "where", "genialtNav", "will", "be", "run" ]
[ "'''Returns the path of the subdir where genialtNav will be run'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
rank
<not_specific>
def rank(self): '''Returns the rank of the process in the environment This is 0 if there is only one process and for the root processor''' if Environment.isParallel: import pypar return pypar.rank() else: return 0
Returns the rank of the process in the environment This is 0 if there is only one process and for the root processor
Returns the rank of the process in the environment This is 0 if there is only one process and for the root processor
[ "Returns", "the", "rank", "of", "the", "process", "in", "the", "environment", "This", "is", "0", "if", "there", "is", "only", "one", "process", "and", "for", "the", "root", "processor" ]
def rank(self): if Environment.isParallel: import pypar return pypar.rank() else: return 0
[ "def", "rank", "(", "self", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "return", "pypar", ".", "rank", "(", ")", "else", ":", "return", "0" ]
Returns the rank of the process in the environment This is 0 if there is only one process and for the root processor
[ "Returns", "the", "rank", "of", "the", "process", "in", "the", "environment", "This", "is", "0", "if", "there", "is", "only", "one", "process", "and", "for", "the", "root", "processor" ]
[ "'''Returns the rank of the process in the environment\n\t\t\n\t\tThis is 0 if there is only one process and for the root processor'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
isRoot
<not_specific>
def isRoot(self): '''Returns True if the processes rank is 0''' if self.rank() == 0: return True else: return False
Returns True if the processes rank is 0
Returns True if the processes rank is 0
[ "Returns", "True", "if", "the", "processes", "rank", "is", "0" ]
def isRoot(self): if self.rank() == 0: return True else: return False
[ "def", "isRoot", "(", "self", ")", ":", "if", "self", ".", "rank", "(", ")", "==", "0", ":", "return", "True", "else", ":", "return", "False" ]
Returns True if the processes rank is 0
[ "Returns", "True", "if", "the", "processes", "rank", "is", "0" ]
[ "'''Returns True if the processes rank is 0'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
_divideArray
<not_specific>
def _divideArray(self, array): '''Divides an array roughly equally depending on the environment size Returns: A list with one entry for each node. The entry is a tuple giving the start and end elements in array that should be assigned to that node.''' import pypar #Divide evenly then add remainder...
Divides an array roughly equally depending on the environment size Returns: A list with one entry for each node. The entry is a tuple giving the start and end elements in array that should be assigned to that node.
Divides an array roughly equally depending on the environment size Returns: A list with one entry for each node. The entry is a tuple giving the start and end elements in array that should be assigned to that node.
[ "Divides", "an", "array", "roughly", "equally", "depending", "on", "the", "environment", "size", "Returns", ":", "A", "list", "with", "one", "entry", "for", "each", "node", ".", "The", "entry", "is", "a", "tuple", "giving", "the", "start", "and", "end", ...
def _divideArray(self, array): import pypar maxElements = int(math.floor(len(array)/pypar.size())) remainder = len(array) - maxElements*pypar.size() start = 0 end = 0 divisions = [] for i in range(pypar.size()): start = end end = end + maxElements if remainder != 0: end = end + 1 remainde...
[ "def", "_divideArray", "(", "self", ",", "array", ")", ":", "import", "pypar", "maxElements", "=", "int", "(", "math", ".", "floor", "(", "len", "(", "array", ")", "/", "pypar", ".", "size", "(", ")", ")", ")", "remainder", "=", "len", "(", "array"...
Divides an array roughly equally depending on the environment size Returns: A list with one entry for each node.
[ "Divides", "an", "array", "roughly", "equally", "depending", "on", "the", "environment", "size", "Returns", ":", "A", "list", "with", "one", "entry", "for", "each", "node", "." ]
[ "'''Divides an array roughly equally depending on the environment size\n\t\t\n\t\tReturns: A list with one entry for each node.\n\t\tThe entry is a tuple giving the start and end elements in array \n\t\tthat should be assigned to that node.'''", "#Divide evenly then add remainder elements to processors" ]
[ { "param": "self", "type": null }, { "param": "array", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "array", "type": null, "docstring": null, "docstring_tokens": ...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
splitArray
<not_specific>
def splitArray(self, array): '''Splits array between all the processes in the environment. Each process will be returned a different section of the array to work on''' if Environment.isParallel: import pypar #Split the array into sections and return the section for this processor divisions = [] ...
Splits array between all the processes in the environment. Each process will be returned a different section of the array to work on
Splits array between all the processes in the environment. Each process will be returned a different section of the array to work on
[ "Splits", "array", "between", "all", "the", "processes", "in", "the", "environment", ".", "Each", "process", "will", "be", "returned", "a", "different", "section", "of", "the", "array", "to", "work", "on" ]
def splitArray(self, array): if Environment.isParallel: import pypar divisions = [] if self.isRoot(): divisions = self._divideArray(array) for i in range(1,pypar.size()): pypar.send(divisions[i], i) start = divisions[0][0] end = divisions[0][1] else: indexes = pypar.receive(0) ...
[ "def", "splitArray", "(", "self", ",", "array", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "divisions", "=", "[", "]", "if", "self", ".", "isRoot", "(", ")", ":", "divisions", "=", "self", ".", "_divideArray", "(", "array...
Splits array between all the processes in the environment.
[ "Splits", "array", "between", "all", "the", "processes", "in", "the", "environment", "." ]
[ "'''Splits array between all the processes in the environment.\n\t\t\n\t\tEach process will be returned a different section of the array to work on'''", "#Split the array into sections and return the section for this processor", "#Root does the splitting - we send each processor the start and end index", "#NO...
[ { "param": "self", "type": null }, { "param": "array", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "array", "type": null, "docstring": null, "docstring_tokens": ...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
combineArray
<not_specific>
def combineArray(self, arrayFragment): '''Combines a set of arrayFragments from each processor into one array''' if Environment.isParallel: import pypar if self.isRoot(): completeArray = arrayFragment for i in range(1, pypar.size()): fragment = pypar.receive(i) completeArray.extend(fragme...
Combines a set of arrayFragments from each processor into one array
Combines a set of arrayFragments from each processor into one array
[ "Combines", "a", "set", "of", "arrayFragments", "from", "each", "processor", "into", "one", "array" ]
def combineArray(self, arrayFragment): if Environment.isParallel: import pypar if self.isRoot(): completeArray = arrayFragment for i in range(1, pypar.size()): fragment = pypar.receive(i) completeArray.extend(fragment) for i in range(1, pypar.size()): pypar.send(completeArray, i) e...
[ "def", "combineArray", "(", "self", ",", "arrayFragment", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "if", "self", ".", "isRoot", "(", ")", ":", "completeArray", "=", "arrayFragment", "for", "i", "in", "range", "(", "1", ",...
Combines a set of arrayFragments from each processor into one array
[ "Combines", "a", "set", "of", "arrayFragments", "from", "each", "processor", "into", "one", "array" ]
[ "'''Combines a set of arrayFragments from each processor into one array'''", "#Send the array", "#Send the fragment", "#Retrieve the array" ]
[ { "param": "self", "type": null }, { "param": "arrayFragment", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "arrayFragment", "type": null, "docstring": null, "docstring_t...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
combineDictionary
<not_specific>
def combineDictionary(self, dictFragment): '''Combines a set of arrayFragments from each processor into one array''' if Environment.isParallel: import pypar if self.isRoot(): completeDict = dictFragment for i in range(1, pypar.size()): fragment = pypar.receive(i) completeDict.update(fragm...
Combines a set of arrayFragments from each processor into one array
Combines a set of arrayFragments from each processor into one array
[ "Combines", "a", "set", "of", "arrayFragments", "from", "each", "processor", "into", "one", "array" ]
def combineDictionary(self, dictFragment): if Environment.isParallel: import pypar if self.isRoot(): completeDict = dictFragment for i in range(1, pypar.size()): fragment = pypar.receive(i) completeDict.update(fragment) for i in range(1, pypar.size()): pypar.send(completeDict, i) e...
[ "def", "combineDictionary", "(", "self", ",", "dictFragment", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "if", "self", ".", "isRoot", "(", ")", ":", "completeDict", "=", "dictFragment", "for", "i", "in", "range", "(", "1", ...
Combines a set of arrayFragments from each processor into one array
[ "Combines", "a", "set", "of", "arrayFragments", "from", "each", "processor", "into", "one", "array" ]
[ "'''Combines a set of arrayFragments from each processor into one array'''", "#Send the array", "#Send the fragment", "#Retrieve the array" ]
[ { "param": "self", "type": null }, { "param": "dictFragment", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dictFragment", "type": null, "docstring": null, "docstring_to...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
output
<not_specific>
def output(self, string, stream=None, rootOnly=True): '''Prints a string to a stream if the calling process is the root process Parameters: string: The string to be written stream: The stream to write to. If None or not specified defaults to stdout. rootOnly: If True only the root process writes the s...
Prints a string to a stream if the calling process is the root process Parameters: string: The string to be written stream: The stream to write to. If None or not specified defaults to stdout. rootOnly: If True only the root process writes the string. Default True.
Prints a string to a stream if the calling process is the root process
[ "Prints", "a", "string", "to", "a", "stream", "if", "the", "calling", "process", "is", "the", "root", "process" ]
def output(self, string, stream=None, rootOnly=True): if rootOnly is True and self.isRoot() is False: return if stream is None: print string if self.verbose: sys.stdout.flush() else: stream.write(string) if self.verbose: stream.flush()
[ "def", "output", "(", "self", ",", "string", ",", "stream", "=", "None", ",", "rootOnly", "=", "True", ")", ":", "if", "rootOnly", "is", "True", "and", "self", ".", "isRoot", "(", ")", "is", "False", ":", "return", "if", "stream", "is", "None", ":"...
Prints a string to a stream if the calling process is the root process
[ "Prints", "a", "string", "to", "a", "stream", "if", "the", "calling", "process", "is", "the", "root", "process" ]
[ "'''Prints a string to a stream if the calling process is the root process\n\t\t\n\t\tParameters:\n\t\t\tstring: The string to be written\n\t\t\tstream: The stream to write to. If None or not specified defaults to stdout.\n\t\t\trootOnly: If True only the root process writes the string. Default True.'''", "#With ...
[ { "param": "self", "type": null }, { "param": "string", "type": null }, { "param": "stream", "type": null }, { "param": "rootOnly", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "string", "type": null, "docstring": "The string to be written", ...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
log
null
def log(self, string): '''Logs a string to a specific file for the calling process The file is called ProcessorX.log where X is the rank of the process. The string is appended to this file''' from inspect import stack filename = os.path.join(self.outputDirectory, "Processor%d.log" % self.rank()) str...
Logs a string to a specific file for the calling process The file is called ProcessorX.log where X is the rank of the process. The string is appended to this file
Logs a string to a specific file for the calling process The file is called ProcessorX.log where X is the rank of the process. The string is appended to this file
[ "Logs", "a", "string", "to", "a", "specific", "file", "for", "the", "calling", "process", "The", "file", "is", "called", "ProcessorX", ".", "log", "where", "X", "is", "the", "rank", "of", "the", "process", ".", "The", "string", "is", "appended", "to", ...
def log(self, string): from inspect import stack filename = os.path.join(self.outputDirectory, "Processor%d.log" % self.rank()) stream = open(filename, 'a+') stream.write(string) stream.write(' (Logged at line %d of %s at %s)' % (stack()[1][0].f_lineno, stack()[1][0].f_code.co_filename, datetime.datetim...
[ "def", "log", "(", "self", ",", "string", ")", ":", "from", "inspect", "import", "stack", "filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "outputDirectory", ",", "\"Processor%d.log\"", "%", "self", ".", "rank", "(", ")", ")", "stream...
Logs a string to a specific file for the calling process The file is called ProcessorX.log where X is the rank of the process.
[ "Logs", "a", "string", "to", "a", "specific", "file", "for", "the", "calling", "process", "The", "file", "is", "called", "ProcessorX", ".", "log", "where", "X", "is", "the", "rank", "of", "the", "process", "." ]
[ "'''Logs a string to a specific file for the calling process\n\t\t\n\t\tThe file is called ProcessorX.log where X is the rank of the process.\n\t\tThe string is appended to this file'''" ]
[ { "param": "self", "type": null }, { "param": "string", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "string", "type": null, "docstring": null, "docstring_tokens":...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
logError
null
def logError(self, string): '''Logs a string to a specific error file for the calling process The file is called ProcessorX.error where X is the rank of the process. The string is appended to this file''' filename = os.path.join(self.outputDirectory, "Processor%d.error", self.rank()) stream = open(fil...
Logs a string to a specific error file for the calling process The file is called ProcessorX.error where X is the rank of the process. The string is appended to this file
Logs a string to a specific error file for the calling process The file is called ProcessorX.error where X is the rank of the process. The string is appended to this file
[ "Logs", "a", "string", "to", "a", "specific", "error", "file", "for", "the", "calling", "process", "The", "file", "is", "called", "ProcessorX", ".", "error", "where", "X", "is", "the", "rank", "of", "the", "process", ".", "The", "string", "is", "appended...
def logError(self, string): filename = os.path.join(self.outputDirectory, "Processor%d.error", self.rank()) stream = open(filename, 'a+') stream.write(string) stream.close()
[ "def", "logError", "(", "self", ",", "string", ")", ":", "filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "outputDirectory", ",", "\"Processor%d.error\"", ",", "self", ".", "rank", "(", ")", ")", "stream", "=", "open", "(", "filename"...
Logs a string to a specific error file for the calling process The file is called ProcessorX.error where X is the rank of the process.
[ "Logs", "a", "string", "to", "a", "specific", "error", "file", "for", "the", "calling", "process", "The", "file", "is", "called", "ProcessorX", ".", "error", "where", "X", "is", "the", "rank", "of", "the", "process", "." ]
[ "'''Logs a string to a specific error file for the calling process\n\t\t\n\t\tThe file is called ProcessorX.error where X is the rank of the process.\n\t\tThe string is appended to this file'''" ]
[ { "param": "self", "type": null }, { "param": "string", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "string", "type": null, "docstring": null, "docstring_tokens":...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
wait
null
def wait(self, error=False): '''This method will not return until all process in the environment have called it. This is a wrapper around MPI_Barrier which handles the case where MPI is not available''' from inspect import stack if self.verbose is True: string = '(%s) Waiting at line %d of %s' % (dat...
This method will not return until all process in the environment have called it. This is a wrapper around MPI_Barrier which handles the case where MPI is not available
This method will not return until all process in the environment have called it. This is a wrapper around MPI_Barrier which handles the case where MPI is not available
[ "This", "method", "will", "not", "return", "until", "all", "process", "in", "the", "environment", "have", "called", "it", ".", "This", "is", "a", "wrapper", "around", "MPI_Barrier", "which", "handles", "the", "case", "where", "MPI", "is", "not", "available" ...
def wait(self, error=False): from inspect import stack if self.verbose is True: string = '(%s) Waiting at line %d of %s' % (datetime.datetime.now().strftime('%H:%M:%S'), stack()[1][0].f_lineno, stack()[1][0].f_code.co_filename) self.log(string) if Environment.isParallel: import pypar pypar.barri...
[ "def", "wait", "(", "self", ",", "error", "=", "False", ")", ":", "from", "inspect", "import", "stack", "if", "self", ".", "verbose", "is", "True", ":", "string", "=", "'(%s) Waiting at line %d of %s'", "%", "(", "datetime", ".", "datetime", ".", "now", ...
This method will not return until all process in the environment have called it.
[ "This", "method", "will", "not", "return", "until", "all", "process", "in", "the", "environment", "have", "called", "it", "." ]
[ "'''This method will not return until all process in the environment have called it.\n\t\t\n\t\tThis is a wrapper around MPI_Barrier which handles the case where MPI is not available'''", "#Because MPI_ABORT doesn't work in pypar if called from one process", "#we need a way for process to communicate to each ot...
[ { "param": "self", "type": null }, { "param": "error", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "error", "type": null, "docstring": null, "docstring_tokens": ...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
exit
<not_specific>
def exit(self, code): '''This method exits the simulation. In a parallel environment calls MPI_ABORT. In serial, calls sys.exit(). Code is the exit code. Only used in serial processes.''' if Environment.isParallel: import pypar return pypar.abort(code) else: return sys.exit(code)
This method exits the simulation. In a parallel environment calls MPI_ABORT. In serial, calls sys.exit(). Code is the exit code. Only used in serial processes.
This method exits the simulation. In a parallel environment calls MPI_ABORT. Code is the exit code. Only used in serial processes.
[ "This", "method", "exits", "the", "simulation", ".", "In", "a", "parallel", "environment", "calls", "MPI_ABORT", ".", "Code", "is", "the", "exit", "code", ".", "Only", "used", "in", "serial", "processes", "." ]
def exit(self, code): if Environment.isParallel: import pypar return pypar.abort(code) else: return sys.exit(code)
[ "def", "exit", "(", "self", ",", "code", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "return", "pypar", ".", "abort", "(", "code", ")", "else", ":", "return", "sys", ".", "exit", "(", "code", ")" ]
This method exits the simulation.
[ "This", "method", "exits", "the", "simulation", "." ]
[ "'''This method exits the simulation.\n\t\t\n\t\tIn a parallel environment calls MPI_ABORT.\n\t\tIn serial, calls sys.exit().\n\t\t\n\t\tCode is the exit code. Only used in serial processes.'''" ]
[ { "param": "self", "type": null }, { "param": "code", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "code", "type": null, "docstring": null, "docstring_tokens": [...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
broadcast
<not_specific>
def broadcast(self, data, process): '''Broadcasts data from process to all other nodes''' if Environment.isParallel: import pypar if self.rank() == process: #NOTE: pypar broadcast won't work even when setting vanilla #It always returns message trucated error. for i in range(pypar.size()): ...
Broadcasts data from process to all other nodes
Broadcasts data from process to all other nodes
[ "Broadcasts", "data", "from", "process", "to", "all", "other", "nodes" ]
def broadcast(self, data, process): if Environment.isParallel: import pypar if self.rank() == process: for i in range(pypar.size()): if i != self.rank(): pypar.send(data, i) else: data = pypar.receive(process) return data
[ "def", "broadcast", "(", "self", ",", "data", ",", "process", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "if", "self", ".", "rank", "(", ")", "==", "process", ":", "for", "i", "in", "range", "(", "pypar", ".", "size", ...
Broadcasts data from process to all other nodes
[ "Broadcasts", "data", "from", "process", "to", "all", "other", "nodes" ]
[ "'''Broadcasts data from process to all other nodes'''", "#NOTE: pypar broadcast won't work even when setting vanilla", "#It always returns message trucated error." ]
[ { "param": "self", "type": null }, { "param": "data", "type": null }, { "param": "process", "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": [...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
balanceArrays
<not_specific>
def balanceArrays(self, arrayFragment): '''Redistributes the elements in a set of arrays equally across the nodes''' if Environment.isParallel: import pypar if self.isRoot(): completeArray = arrayFragment for i in range(1, pypar.size()): fragment = pypar.receive(i) completeArray.extend(...
Redistributes the elements in a set of arrays equally across the nodes
Redistributes the elements in a set of arrays equally across the nodes
[ "Redistributes", "the", "elements", "in", "a", "set", "of", "arrays", "equally", "across", "the", "nodes" ]
def balanceArrays(self, arrayFragment): if Environment.isParallel: import pypar if self.isRoot(): completeArray = arrayFragment for i in range(1, pypar.size()): fragment = pypar.receive(i) completeArray.extend(fragment) divisions = self._divideArray(completeArray) for i in range(1, pyp...
[ "def", "balanceArrays", "(", "self", ",", "arrayFragment", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "if", "self", ".", "isRoot", "(", ")", ":", "completeArray", "=", "arrayFragment", "for", "i", "in", "range", "(", "1", "...
Redistributes the elements in a set of arrays equally across the nodes
[ "Redistributes", "the", "elements", "in", "a", "set", "of", "arrays", "equally", "across", "the", "nodes" ]
[ "'''Redistributes the elements in a set of arrays equally across the nodes'''", "#Divide it up", "#Send the fragments", "#Assign root fragment\t", "#Send the fragment", "#Retrieve the array" ]
[ { "param": "self", "type": null }, { "param": "arrayFragment", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "arrayFragment", "type": null, "docstring": null, "docstring_t...
3e2b15e7d918389ddbe620e0772392fd9e6f135c
shambo001/peat
PEATSA/Core/Environment.py
[ "MIT" ]
Python
loadSkew
<not_specific>
def loadSkew(self, numberTasks): '''Computes the skew in the number of tasks to be processed by each node The skew is the standard deviation of the task number across the nodes''' if Environment.isParallel: import pypar if self.isRoot(): taskDistribution = [numberTasks] for i in ...
Computes the skew in the number of tasks to be processed by each node The skew is the standard deviation of the task number across the nodes
Computes the skew in the number of tasks to be processed by each node The skew is the standard deviation of the task number across the nodes
[ "Computes", "the", "skew", "in", "the", "number", "of", "tasks", "to", "be", "processed", "by", "each", "node", "The", "skew", "is", "the", "standard", "deviation", "of", "the", "task", "number", "across", "the", "nodes" ]
def loadSkew(self, numberTasks): if Environment.isParallel: import pypar if self.isRoot(): taskDistribution = [numberTasks] for i in range(1, pypar.size()): numberTasks = pypar.receive(i) taskDistribution.append(numberTasks) mean = reduce(operator.add, taskDistribution) mean = mean/flo...
[ "def", "loadSkew", "(", "self", ",", "numberTasks", ")", ":", "if", "Environment", ".", "isParallel", ":", "import", "pypar", "if", "self", ".", "isRoot", "(", ")", ":", "taskDistribution", "=", "[", "numberTasks", "]", "for", "i", "in", "range", "(", ...
Computes the skew in the number of tasks to be processed by each node The skew is the standard deviation of the task number across the nodes
[ "Computes", "the", "skew", "in", "the", "number", "of", "tasks", "to", "be", "processed", "by", "each", "node", "The", "skew", "is", "the", "standard", "deviation", "of", "the", "task", "number", "across", "the", "nodes" ]
[ "'''Computes the skew in the number of tasks to be processed by each node\n\t\t\n\t\tThe skew is the standard deviation of the task number across the nodes'''", "#Std. dev", "#Send the fragment", "#Retrieve the array" ]
[ { "param": "self", "type": null }, { "param": "numberTasks", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "numberTasks", "type": null, "docstring": null, "docstring_tok...
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
tearDown
null
def tearDown(self): '''Removes the path added by the configuration object instantiation''' sys.path.remove(self.configuration.pkaModuleLocation())
Removes the path added by the configuration object instantiation
Removes the path added by the configuration object instantiation
[ "Removes", "the", "path", "added", "by", "the", "configuration", "object", "instantiation" ]
def tearDown(self): sys.path.remove(self.configuration.pkaModuleLocation())
[ "def", "tearDown", "(", "self", ")", ":", "sys", ".", "path", ".", "remove", "(", "self", ".", "configuration", ".", "pkaModuleLocation", "(", ")", ")" ]
Removes the path added by the configuration object instantiation
[ "Removes", "the", "path", "added", "by", "the", "configuration", "object", "instantiation" ]
[ "'''Removes the path added by the configuration object instantiation'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testPKAModulePath
null
def testPKAModulePath(self): '''Checks the path given for PKA Tools is whats expected This is set to /usr/lib for test purposes''' path = '/usr/lib' #If it it should be in sys.path self.assertNotEqual(sys.path.count(path), 0) #Also test return value from the class itself self.assertEqual(self.c...
Checks the path given for PKA Tools is whats expected This is set to /usr/lib for test purposes
Checks the path given for PKA Tools is whats expected This is set to /usr/lib for test purposes
[ "Checks", "the", "path", "given", "for", "PKA", "Tools", "is", "whats", "expected", "This", "is", "set", "to", "/", "usr", "/", "lib", "for", "test", "purposes" ]
def testPKAModulePath(self): path = '/usr/lib' self.assertNotEqual(sys.path.count(path), 0) self.assertEqual(self.configuration.pkaModuleLocation(), path)
[ "def", "testPKAModulePath", "(", "self", ")", ":", "path", "=", "'/usr/lib'", "self", ".", "assertNotEqual", "(", "sys", ".", "path", ".", "count", "(", "path", ")", ",", "0", ")", "self", ".", "assertEqual", "(", "self", ".", "configuration", ".", "pk...
Checks the path given for PKA Tools is whats expected This is set to /usr/lib for test purposes
[ "Checks", "the", "path", "given", "for", "PKA", "Tools", "is", "whats", "expected", "This", "is", "set", "to", "/", "usr", "/", "lib", "for", "test", "purposes" ]
[ "'''Checks the path given for PKA Tools is whats expected\n\t\t\n\t\tThis is set to /usr/lib for test purposes'''", "#If it it should be in sys.path", "#Also test return value from the class itself" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testInvalidPKAModulePath
null
def testInvalidPKAModulePath(self): '''Checks that the object detects invalid paths Here we read an invalid configuration file''' self.assertRaises(Exceptions.ConfigurationError, Environment.Configuration, filename='invalid.conf')
Checks that the object detects invalid paths Here we read an invalid configuration file
Checks that the object detects invalid paths Here we read an invalid configuration file
[ "Checks", "that", "the", "object", "detects", "invalid", "paths", "Here", "we", "read", "an", "invalid", "configuration", "file" ]
def testInvalidPKAModulePath(self): self.assertRaises(Exceptions.ConfigurationError, Environment.Configuration, filename='invalid.conf')
[ "def", "testInvalidPKAModulePath", "(", "self", ")", ":", "self", ".", "assertRaises", "(", "Exceptions", ".", "ConfigurationError", ",", "Environment", ".", "Configuration", ",", "filename", "=", "'invalid.conf'", ")" ]
Checks that the object detects invalid paths Here we read an invalid configuration file
[ "Checks", "that", "the", "object", "detects", "invalid", "paths", "Here", "we", "read", "an", "invalid", "configuration", "file" ]
[ "'''Checks that the object detects invalid paths\n\t\t\n\t\tHere we read an invalid configuration file'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testDesignPKAOptions
null
def testDesignPKAOptions(self): '''Test the design pka options Requires that the design pka tools are installed and in the path''' import pKa returnedOptions = self.configuration.designPKAOptions() realOptions = pKa.Design_pKa.get_defaults() #Check they have the same keys self.assertEqual(re...
Test the design pka options Requires that the design pka tools are installed and in the path
Test the design pka options Requires that the design pka tools are installed and in the path
[ "Test", "the", "design", "pka", "options", "Requires", "that", "the", "design", "pka", "tools", "are", "installed", "and", "in", "the", "path" ]
def testDesignPKAOptions(self): import pKa returnedOptions = self.configuration.designPKAOptions() realOptions = pKa.Design_pKa.get_defaults() self.assertEqual(realOptions.keys(), returnedOptions.keys()) returnedTypes = [returnedOptions[key][1] for key in returnedOptions.keys()] realTypes = [realOptions[key...
[ "def", "testDesignPKAOptions", "(", "self", ")", ":", "import", "pKa", "returnedOptions", "=", "self", ".", "configuration", ".", "designPKAOptions", "(", ")", "realOptions", "=", "pKa", ".", "Design_pKa", ".", "get_defaults", "(", ")", "self", ".", "assertEqu...
Test the design pka options Requires that the design pka tools are installed and in the path
[ "Test", "the", "design", "pka", "options", "Requires", "that", "the", "design", "pka", "tools", "are", "installed", "and", "in", "the", "path" ]
[ "'''Test the design pka options\n\t\t\n\t\tRequires that the design pka tools are installed and in the path'''", "#Check they have the same keys", "#The value for each pka design default key is an list with the form [optionValue, type] ", "#Check the types are all corrected" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testOverides
null
def testOverides(self): '''Explicit test that information in a configuration file overides default ones''' #Create a default instance that doesn't read the configuration file newConfiguration = Environment.Configuration(searchDefaultLocations=False, writeFile=False) self.assertNotEqual(newConfiguration, se...
Explicit test that information in a configuration file overides default ones
Explicit test that information in a configuration file overides default ones
[ "Explicit", "test", "that", "information", "in", "a", "configuration", "file", "overides", "default", "ones" ]
def testOverides(self): newConfiguration = Environment.Configuration(searchDefaultLocations=False, writeFile=False) self.assertNotEqual(newConfiguration, self.configuration)
[ "def", "testOverides", "(", "self", ")", ":", "newConfiguration", "=", "Environment", ".", "Configuration", "(", "searchDefaultLocations", "=", "False", ",", "writeFile", "=", "False", ")", "self", ".", "assertNotEqual", "(", "newConfiguration", ",", "self", "."...
Explicit test that information in a configuration file overides default ones
[ "Explicit", "test", "that", "information", "in", "a", "configuration", "file", "overides", "default", "ones" ]
[ "'''Explicit test that information in a configuration file overides default ones'''", "#Create a default instance that doesn't read the configuration file" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testFowarding
null
def testFowarding(self): '''Test that any methods the Configuration doesn't respond to are fowarded to the underlying configuration object''' sections = ['PKA SCAN METHOD', 'PKA SCAN PARAMETERS', 'PKA SCAN OUTPUT', 'PATHS'] self.assertEqual(sections, self.configuration.sections())
Test that any methods the Configuration doesn't respond to are fowarded to the underlying configuration object
Test that any methods the Configuration doesn't respond to are fowarded to the underlying configuration object
[ "Test", "that", "any", "methods", "the", "Configuration", "doesn", "'", "t", "respond", "to", "are", "fowarded", "to", "the", "underlying", "configuration", "object" ]
def testFowarding(self): sections = ['PKA SCAN METHOD', 'PKA SCAN PARAMETERS', 'PKA SCAN OUTPUT', 'PATHS'] self.assertEqual(sections, self.configuration.sections())
[ "def", "testFowarding", "(", "self", ")", ":", "sections", "=", "[", "'PKA SCAN METHOD'", ",", "'PKA SCAN PARAMETERS'", ",", "'PKA SCAN OUTPUT'", ",", "'PATHS'", "]", "self", ".", "assertEqual", "(", "sections", ",", "self", ".", "configuration", ".", "sections"...
Test that any methods the Configuration doesn't respond to are fowarded to the underlying configuration object
[ "Test", "that", "any", "methods", "the", "Configuration", "doesn", "'", "t", "respond", "to", "are", "fowarded", "to", "the", "underlying", "configuration", "object" ]
[ "'''Test that any methods the Configuration doesn't respond to are fowarded to the underlying configuration object'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testUFFBAPSLocation
null
def testUFFBAPSLocation(self): '''Test the path to UFFBAPS is correct''' #This is the path set in the configuration file path = '/usr/bin' self.assertEqual(path, self.configuration.uffbapsLocation())
Test the path to UFFBAPS is correct
Test the path to UFFBAPS is correct
[ "Test", "the", "path", "to", "UFFBAPS", "is", "correct" ]
def testUFFBAPSLocation(self): path = '/usr/bin' self.assertEqual(path, self.configuration.uffbapsLocation())
[ "def", "testUFFBAPSLocation", "(", "self", ")", ":", "path", "=", "'/usr/bin'", "self", ".", "assertEqual", "(", "path", ",", "self", ".", "configuration", ".", "uffbapsLocation", "(", ")", ")" ]
Test the path to UFFBAPS is correct
[ "Test", "the", "path", "to", "UFFBAPS", "is", "correct" ]
[ "'''Test the path to UFFBAPS is correct'''", "#This is the path set in the configuration file" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testPKAModulePath
null
def testPKAModulePath(self): '''Checks the path given for PKA Tools is whats expected This is set to $HOME/PEAT for test purposes''' path = os.path.join(os.path.expanduser('~'), 'PEAT') #If it worked the last entry in sys.path should be this path self.assertNotEqual(sys.path.count(path), 0) #Also t...
Checks the path given for PKA Tools is whats expected This is set to $HOME/PEAT for test purposes
Checks the path given for PKA Tools is whats expected This is set to $HOME/PEAT for test purposes
[ "Checks", "the", "path", "given", "for", "PKA", "Tools", "is", "whats", "expected", "This", "is", "set", "to", "$HOME", "/", "PEAT", "for", "test", "purposes" ]
def testPKAModulePath(self): path = os.path.join(os.path.expanduser('~'), 'PEAT') self.assertNotEqual(sys.path.count(path), 0) self.assertEqual(self.configuration.pkaModuleLocation(), path)
[ "def", "testPKAModulePath", "(", "self", ")", ":", "path", "=", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "expanduser", "(", "'~'", ")", ",", "'PEAT'", ")", "self", ".", "assertNotEqual", "(", "sys", ".", "path", ".", "count", "(...
Checks the path given for PKA Tools is whats expected This is set to $HOME/PEAT for test purposes
[ "Checks", "the", "path", "given", "for", "PKA", "Tools", "is", "whats", "expected", "This", "is", "set", "to", "$HOME", "/", "PEAT", "for", "test", "purposes" ]
[ "'''Checks the path given for PKA Tools is whats expected\n\t\t\n\t\tThis is set to $HOME/PEAT for test purposes'''", "#If it worked the last entry in sys.path should be this path", "#Also test return value from the class itself" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testWriteToFile
null
def testWriteToFile(self): '''Tests writing and reading the configuration file''' self.configuration.writeToFile('temp') newConfiguration = Environment.Configuration(filename='temp') self.assertEqual(newConfiguration, self.configuration)
Tests writing and reading the configuration file
Tests writing and reading the configuration file
[ "Tests", "writing", "and", "reading", "the", "configuration", "file" ]
def testWriteToFile(self): self.configuration.writeToFile('temp') newConfiguration = Environment.Configuration(filename='temp') self.assertEqual(newConfiguration, self.configuration)
[ "def", "testWriteToFile", "(", "self", ")", ":", "self", ".", "configuration", ".", "writeToFile", "(", "'temp'", ")", "newConfiguration", "=", "Environment", ".", "Configuration", "(", "filename", "=", "'temp'", ")", "self", ".", "assertEqual", "(", "newConfi...
Tests writing and reading the configuration file
[ "Tests", "writing", "and", "reading", "the", "configuration", "file" ]
[ "'''Tests writing and reading the configuration file'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
tearDown
null
def tearDown(self): '''Resets the current working directory to the initial directory''' os.chdir(self.initialWorkingDirectory) #Clean any created working directory instance try: self.workingDirectory.clean() except AttributeError: pass
Resets the current working directory to the initial directory
Resets the current working directory to the initial directory
[ "Resets", "the", "current", "working", "directory", "to", "the", "initial", "directory" ]
def tearDown(self): os.chdir(self.initialWorkingDirectory) try: self.workingDirectory.clean() except AttributeError: pass
[ "def", "tearDown", "(", "self", ")", ":", "os", ".", "chdir", "(", "self", ".", "initialWorkingDirectory", ")", "try", ":", "self", ".", "workingDirectory", ".", "clean", "(", ")", "except", "AttributeError", ":", "pass" ]
Resets the current working directory to the initial directory
[ "Resets", "the", "current", "working", "directory", "to", "the", "initial", "directory" ]
[ "'''Resets the current working directory to the initial directory'''", "#Clean any created working directory instance" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testDefaultInitialisation
null
def testDefaultInitialisation(self): '''Tests initialisation on valid working directory See if no errors are raised''' try: self.workingDirectory = Environment.WorkingDirectory(location=validDirectory) except Exceptions.WorkingDirectoryError: self.fail() #If we are here we have passed the tes...
Tests initialisation on valid working directory See if no errors are raised
Tests initialisation on valid working directory See if no errors are raised
[ "Tests", "initialisation", "on", "valid", "working", "directory", "See", "if", "no", "errors", "are", "raised" ]
def testDefaultInitialisation(self): try: self.workingDirectory = Environment.WorkingDirectory(location=validDirectory) except Exceptions.WorkingDirectoryError: self.fail() self.assertEqual(1,1)
[ "def", "testDefaultInitialisation", "(", "self", ")", ":", "try", ":", "self", ".", "workingDirectory", "=", "Environment", ".", "WorkingDirectory", "(", "location", "=", "validDirectory", ")", "except", "Exceptions", ".", "WorkingDirectoryError", ":", "self", "."...
Tests initialisation on valid working directory See if no errors are raised
[ "Tests", "initialisation", "on", "valid", "working", "directory", "See", "if", "no", "errors", "are", "raised" ]
[ "'''Tests initialisation on valid working directory\n\t\t\n\t\tSee if no errors are raised'''", "#If we are here we have passed the test" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testMissingDesignFiles
null
def testMissingDesignFiles(self): '''Tests initialisation on a working directory not containing the design files If these files are missing the object should copy them there''' #Remove the design files from the test dir for file in Environment.requiredPKADesignFiles: path = os.path.join(validDirector...
Tests initialisation on a working directory not containing the design files If these files are missing the object should copy them there
Tests initialisation on a working directory not containing the design files If these files are missing the object should copy them there
[ "Tests", "initialisation", "on", "a", "working", "directory", "not", "containing", "the", "design", "files", "If", "these", "files", "are", "missing", "the", "object", "should", "copy", "them", "there" ]
def testMissingDesignFiles(self): for file in Environment.requiredPKADesignFiles: path = os.path.join(validDirectory, file) os.remove(path) try: object = Environment.WorkingDirectory(location=validDirectory) object.setup(pdbFile=testPDB, scan=True, stability=False) except Exception, data: print dat...
[ "def", "testMissingDesignFiles", "(", "self", ")", ":", "for", "file", "in", "Environment", ".", "requiredPKADesignFiles", ":", "path", "=", "os", ".", "path", ".", "join", "(", "validDirectory", ",", "file", ")", "os", ".", "remove", "(", "path", ")", "...
Tests initialisation on a working directory not containing the design files If these files are missing the object should copy them there
[ "Tests", "initialisation", "on", "a", "working", "directory", "not", "containing", "the", "design", "files", "If", "these", "files", "are", "missing", "the", "object", "should", "copy", "them", "there" ]
[ "'''Tests initialisation on a working directory not containing the design files\n\t\t\n\t\tIf these files are missing the object should copy them there'''", "#Remove the design files from the test dir", "#The object should identify the files are missing and copy them back", "#Put stability=false to prevent co...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testMissingProteinFiles
null
def testMissingProteinFiles(self): '''Tests initialisation on a working directory not containing the required protein files Should raise a WorkingDirectoryError. Also checks that it cleans up after itself before raising the error''' preContents = os.listdir(invalidDirectory) self.workingDirectory = En...
Tests initialisation on a working directory not containing the required protein files Should raise a WorkingDirectoryError. Also checks that it cleans up after itself before raising the error
Tests initialisation on a working directory not containing the required protein files Should raise a WorkingDirectoryError. Also checks that it cleans up after itself before raising the error
[ "Tests", "initialisation", "on", "a", "working", "directory", "not", "containing", "the", "required", "protein", "files", "Should", "raise", "a", "WorkingDirectoryError", ".", "Also", "checks", "that", "it", "cleans", "up", "after", "itself", "before", "raising", ...
def testMissingProteinFiles(self): preContents = os.listdir(invalidDirectory) self.workingDirectory = Environment.WorkingDirectory(location=invalidDirectory) self.assertRaises(Exceptions.WorkingDirectoryError, self.workingDirectory.setup, pdbFile='Unknown.pdb', scan = True, stability = False) post...
[ "def", "testMissingProteinFiles", "(", "self", ")", ":", "preContents", "=", "os", ".", "listdir", "(", "invalidDirectory", ")", "self", ".", "workingDirectory", "=", "Environment", ".", "WorkingDirectory", "(", "location", "=", "invalidDirectory", ")", "self", ...
Tests initialisation on a working directory not containing the required protein files Should raise a WorkingDirectoryError.
[ "Tests", "initialisation", "on", "a", "working", "directory", "not", "containing", "the", "required", "protein", "files", "Should", "raise", "a", "WorkingDirectoryError", "." ]
[ "'''Tests initialisation on a working directory not containing the required protein files\n\t\t\n\t\tShould raise a WorkingDirectoryError.\n\t\tAlso checks that it cleans up after itself before raising the error'''", "#Check it cleaned itself up properly - in this case it should remove anything it put there" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testCurrentWorkingDir
null
def testCurrentWorkingDir(self): '''Tests initialisation changes the current working directory''' self.workingDirectory = Environment.WorkingDirectory(location=validDirectory) self.assertEqual(self.workingDirectory.path(), os.getcwd())
Tests initialisation changes the current working directory
Tests initialisation changes the current working directory
[ "Tests", "initialisation", "changes", "the", "current", "working", "directory" ]
def testCurrentWorkingDir(self): self.workingDirectory = Environment.WorkingDirectory(location=validDirectory) self.assertEqual(self.workingDirectory.path(), os.getcwd())
[ "def", "testCurrentWorkingDir", "(", "self", ")", ":", "self", ".", "workingDirectory", "=", "Environment", ".", "WorkingDirectory", "(", "location", "=", "validDirectory", ")", "self", ".", "assertEqual", "(", "self", ".", "workingDirectory", ".", "path", "(", ...
Tests initialisation changes the current working directory
[ "Tests", "initialisation", "changes", "the", "current", "working", "directory" ]
[ "'''Tests initialisation changes the current working directory'''" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testSkipScan
null
def testSkipScan(self): '''Tests that not specifying scan skips checking for scan files''' #Remove the design files from the test dir #They could be there if another test failed for file in Environment.requiredPKADesignFiles: path = os.path.join(invalidDirectory, file) try: os.remove(path) ex...
Tests that not specifying scan skips checking for scan files
Tests that not specifying scan skips checking for scan files
[ "Tests", "that", "not", "specifying", "scan", "skips", "checking", "for", "scan", "files" ]
def testSkipScan(self): for file in Environment.requiredPKADesignFiles: path = os.path.join(invalidDirectory, file) try: os.remove(path) except OSError: pass try: self.workingDirectory = Environment.WorkingDirectory(location=invalidDirectory) self.workingDirectory.setup(pdbFile=testPDB, scan...
[ "def", "testSkipScan", "(", "self", ")", ":", "for", "file", "in", "Environment", ".", "requiredPKADesignFiles", ":", "path", "=", "os", ".", "path", ".", "join", "(", "invalidDirectory", ",", "file", ")", "try", ":", "os", ".", "remove", "(", "path", ...
Tests that not specifying scan skips checking for scan files
[ "Tests", "that", "not", "specifying", "scan", "skips", "checking", "for", "scan", "files" ]
[ "'''Tests that not specifying scan skips checking for scan files'''", "#Remove the design files from the test dir", "#They could be there if another test failed", "#The file isn't there", "#Check that none of the required scan files were copied" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testUFFBAPSPath
null
def testUFFBAPSPath(self): '''Tests that a valid path to the UFFBAPS run dir is returned and that everything is present''' self.workingDirectory = Environment.WorkingDirectory(location=validDirectory) self.assertEqual(self.workingDirectory.uffbapsRunDirectory(), uffbapsRunDirectory) self.workingDirectory.se...
Tests that a valid path to the UFFBAPS run dir is returned and that everything is present
Tests that a valid path to the UFFBAPS run dir is returned and that everything is present
[ "Tests", "that", "a", "valid", "path", "to", "the", "UFFBAPS", "run", "dir", "is", "returned", "and", "that", "everything", "is", "present" ]
def testUFFBAPSPath(self): self.workingDirectory = Environment.WorkingDirectory(location=validDirectory) self.assertEqual(self.workingDirectory.uffbapsRunDirectory(), uffbapsRunDirectory) self.workingDirectory.setupUFFBAPS() contents = os.listdir(self.workingDirectory.uffbapsRunDirectory()) expectedContents =...
[ "def", "testUFFBAPSPath", "(", "self", ")", ":", "self", ".", "workingDirectory", "=", "Environment", ".", "WorkingDirectory", "(", "location", "=", "validDirectory", ")", "self", ".", "assertEqual", "(", "self", ".", "workingDirectory", ".", "uffbapsRunDirectory"...
Tests that a valid path to the UFFBAPS run dir is returned and that everything is present
[ "Tests", "that", "a", "valid", "path", "to", "the", "UFFBAPS", "run", "dir", "is", "returned", "and", "that", "everything", "is", "present" ]
[ "'''Tests that a valid path to the UFFBAPS run dir is returned and that everything is present'''", "#Check everthing was copied" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
7202a365a9f8dc802952a7497c3b6ba4fd18ff1b
shambo001/peat
PEATSA/Core/Tests/UnitTests/TestEnvironment.py
[ "MIT" ]
Python
testClean
null
def testClean(self): '''Tests that clean works Does this by checking the directory is in the same state afterwards as before Note this check only works does not setup a scan since this may copy the design files and these will not be removed by clean (as they could have been present already) They are onl...
Tests that clean works Does this by checking the directory is in the same state afterwards as before Note this check only works does not setup a scan since this may copy the design files and these will not be removed by clean (as they could have been present already) They are only removed if there was an er...
Tests that clean works Does this by checking the directory is in the same state afterwards as before Note this check only works does not setup a scan since this may copy the design files and these will not be removed by clean (as they could have been present already) They are only removed if there was an error during t...
[ "Tests", "that", "clean", "works", "Does", "this", "by", "checking", "the", "directory", "is", "in", "the", "same", "state", "afterwards", "as", "before", "Note", "this", "check", "only", "works", "does", "not", "setup", "a", "scan", "since", "this", "may"...
def testClean(self): contents = os.listdir(validDirectory) self.workingDirectory = Environment.WorkingDirectory(location=validDirectory) self.workingDirectory.setup(pdbFile=testPDB, scan=False, stability=True) self.workingDirectory.clean() newContents = os.listdir(validDirectory) self.assertEqual...
[ "def", "testClean", "(", "self", ")", ":", "contents", "=", "os", ".", "listdir", "(", "validDirectory", ")", "self", ".", "workingDirectory", "=", "Environment", ".", "WorkingDirectory", "(", "location", "=", "validDirectory", ")", "self", ".", "workingDirect...
Tests that clean works Does this by checking the directory is in the same state afterwards as before Note this check only works does not setup a scan since this may copy the design files and these will not be removed by clean (as they could have been present already) They are only removed if there was an error during t...
[ "Tests", "that", "clean", "works", "Does", "this", "by", "checking", "the", "directory", "is", "in", "the", "same", "state", "afterwards", "as", "before", "Note", "this", "check", "only", "works", "does", "not", "setup", "a", "scan", "since", "this", "may"...
[ "'''Tests that clean works\n\t\t\n\t\tDoes this by checking the directory is in the same state afterwards as before\n\t\tNote this check only works does not setup a scan since this may copy the design files\n\t\tand these will not be removed by clean (as they could have been present already) \n\t\tThey are only rem...
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
f7c3dea9381d50abd0be12281feab59caae79633
shambo001/peat
PEATDB/Tables_IO.py
[ "MIT" ]
Python
import_Dialog
<not_specific>
def import_Dialog(self, parent): """Allows user to set some import options""" import Pmw self.parent=parent self.master=Toplevel() self.master.title("Import Data") self.xsize = 450 self.ysize = 370 top=self.master.winfo_toplevel() rootx=top.winfo_r...
Allows user to set some import options
Allows user to set some import options
[ "Allows", "user", "to", "set", "some", "import", "options" ]
def import_Dialog(self, parent): import Pmw self.parent=parent self.master=Toplevel() self.master.title("Import Data") self.xsize = 450 self.ysize = 370 top=self.master.winfo_toplevel() rootx=top.winfo_rootx() rooty=top.winfo_rooty() self.s...
[ "def", "import_Dialog", "(", "self", ",", "parent", ")", ":", "import", "Pmw", "self", ".", "parent", "=", "parent", "self", ".", "master", "=", "Toplevel", "(", ")", "self", ".", "master", ".", "title", "(", "\"Import Data\"", ")", "self", ".", "xsize...
Allows user to set some import options
[ "Allows", "user", "to", "set", "some", "import", "options" ]
[ "\"\"\"Allows user to set some import options\"\"\"", "#place for text preview frame", "#buttons" ]
[ { "param": "self", "type": null }, { "param": "parent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "parent", "type": null, "docstring": null, "docstring_tokens":...
f7c3dea9381d50abd0be12281feab59caae79633
shambo001/peat
PEATDB/Tables_IO.py
[ "MIT" ]
Python
do_ModelImport
<not_specific>
def do_ModelImport(self): """imports and places the result in self.modeldata""" self.modeldata = self.ImportTableModel(self.datafile) self.close() return
imports and places the result in self.modeldata
imports and places the result in self.modeldata
[ "imports", "and", "places", "the", "result", "in", "self", ".", "modeldata" ]
def do_ModelImport(self): self.modeldata = self.ImportTableModel(self.datafile) self.close() return
[ "def", "do_ModelImport", "(", "self", ")", ":", "self", ".", "modeldata", "=", "self", ".", "ImportTableModel", "(", "self", ".", "datafile", ")", "self", ".", "close", "(", ")", "return" ]
imports and places the result in self.modeldata
[ "imports", "and", "places", "the", "result", "in", "self", ".", "modeldata" ]
[ "\"\"\"imports and places the result in self.modeldata\"\"\"" ]
[ { "param": "self", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
f7c3dea9381d50abd0be12281feab59caae79633
shambo001/peat
PEATDB/Tables_IO.py
[ "MIT" ]
Python
ImportTableModel
<not_specific>
def ImportTableModel(self,filename): """Import table data from a comma separated file and create data for a model This is reusable outside the GUI dialog also.""" import os if not os.path.isfile(filename): return None try: sep = self.var_se...
Import table data from a comma separated file and create data for a model This is reusable outside the GUI dialog also.
Import table data from a comma separated file and create data for a model This is reusable outside the GUI dialog also.
[ "Import", "table", "data", "from", "a", "comma", "separated", "file", "and", "create", "data", "for", "a", "model", "This", "is", "reusable", "outside", "the", "GUI", "dialog", "also", "." ]
def ImportTableModel(self,filename): import os if not os.path.isfile(filename): return None try: sep = self.var_sep.get() except: sep = ',' dictreader = csv.DictReader(open(filename, "rb"), delimiter=sep) dictdata = {} count=0 ...
[ "def", "ImportTableModel", "(", "self", ",", "filename", ")", ":", "import", "os", "if", "not", "os", ".", "path", ".", "isfile", "(", "filename", ")", ":", "return", "None", "try", ":", "sep", "=", "self", ".", "var_sep", ".", "get", "(", ")", "ex...
Import table data from a comma separated file and create data for a model This is reusable outside the GUI dialog also.
[ "Import", "table", "data", "from", "a", "comma", "separated", "file", "and", "create", "data", "for", "a", "model", "This", "is", "reusable", "outside", "the", "GUI", "dialog", "also", "." ]
[ "\"\"\"Import table data from a comma separated file and create data for a model\n This is reusable outside the GUI dialog also.\"\"\"", "#takes first row as field names", "#check for col types, text or num?", "'''coltype='text'\n for row in dictdata.keys():\n if \n ...
[ { "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...
f7c3dea9381d50abd0be12281feab59caae79633
shambo001/peat
PEATDB/Tables_IO.py
[ "MIT" ]
Python
ExportTableData
<not_specific>
def ExportTableData(self, table, sep=None): """Export table data to a comma separated file""" parent=table.parentframe import tkFileDialog filename = tkFileDialog.asksaveasfilename(parent=parent,defaultextension='.csv', ...
Export table data to a comma separated file
Export table data to a comma separated file
[ "Export", "table", "data", "to", "a", "comma", "separated", "file" ]
def ExportTableData(self, table, sep=None): parent=table.parentframe import tkFileDialog filename = tkFileDialog.asksaveasfilename(parent=parent,defaultextension='.csv', fi...
[ "def", "ExportTableData", "(", "self", ",", "table", ",", "sep", "=", "None", ")", ":", "parent", "=", "table", ".", "parentframe", "import", "tkFileDialog", "filename", "=", "tkFileDialog", ".", "asksaveasfilename", "(", "parent", "=", "parent", ",", "defau...
Export table data to a comma separated file
[ "Export", "table", "data", "to", "a", "comma", "separated", "file" ]
[ "\"\"\"Export table data to a comma separated file\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "table", "type": null }, { "param": "sep", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "table", "type": null, "docstring": null, "docstring_tokens": ...
7a94ed1b30c03a42c15a93c334068177390964aa
shambo001/peat
PEATDB/Ekin/Meta.py
[ "MIT" ]
Python
add
<not_specific>
def add(self, fieldname, data, attrib='', dataset=None): """Add a new field, if no dataset name is provided, the field is global to all datasets""" d=self.data if fieldname==None or data==None: print 'error, provide field name and data' return if datase...
Add a new field, if no dataset name is provided, the field is global to all datasets
Add a new field, if no dataset name is provided, the field is global to all datasets
[ "Add", "a", "new", "field", "if", "no", "dataset", "name", "is", "provided", "the", "field", "is", "global", "to", "all", "datasets" ]
def add(self, fieldname, data, attrib='', dataset=None): d=self.data if fieldname==None or data==None: print 'error, provide field name and data' return if dataset==None: if not d.has_key('glob'): self.glob = {} self.glob[fieldname]...
[ "def", "add", "(", "self", ",", "fieldname", ",", "data", ",", "attrib", "=", "''", ",", "dataset", "=", "None", ")", ":", "d", "=", "self", ".", "data", "if", "fieldname", "==", "None", "or", "data", "==", "None", ":", "print", "'error, provide fiel...
Add a new field, if no dataset name is provided, the field is global to all datasets
[ "Add", "a", "new", "field", "if", "no", "dataset", "name", "is", "provided", "the", "field", "is", "global", "to", "all", "datasets" ]
[ "\"\"\"Add a new field, if no dataset name is provided, the field\n is global to all datasets\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "fieldname", "type": null }, { "param": "data", "type": null }, { "param": "attrib", "type": null }, { "param": "dataset", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fieldname", "type": null, "docstring": null, "docstring_token...
7a94ed1b30c03a42c15a93c334068177390964aa
shambo001/peat
PEATDB/Ekin/Meta.py
[ "MIT" ]
Python
remove
<not_specific>
def remove(self, field, dataset=None): """Remove a field for all datsets or just supplied name""" if field in self.glob: del self.glob[field] if dataset==None: for d in self.data: if field in self.data[d]: #print d,field ...
Remove a field for all datsets or just supplied name
Remove a field for all datsets or just supplied name
[ "Remove", "a", "field", "for", "all", "datsets", "or", "just", "supplied", "name" ]
def remove(self, field, dataset=None): if field in self.glob: del self.glob[field] if dataset==None: for d in self.data: if field in self.data[d]: del self.data[d][field] else: del self.data[dataset][field] return
[ "def", "remove", "(", "self", ",", "field", ",", "dataset", "=", "None", ")", ":", "if", "field", "in", "self", ".", "glob", ":", "del", "self", ".", "glob", "[", "field", "]", "if", "dataset", "==", "None", ":", "for", "d", "in", "self", ".", ...
Remove a field for all datsets or just supplied name
[ "Remove", "a", "field", "for", "all", "datsets", "or", "just", "supplied", "name" ]
[ "\"\"\"Remove a field for all datsets or just supplied name\"\"\"", "#print d,field" ]
[ { "param": "self", "type": null }, { "param": "field", "type": null }, { "param": "dataset", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "field", "type": null, "docstring": null, "docstring_tokens": ...
7a94ed1b30c03a42c15a93c334068177390964aa
shambo001/peat
PEATDB/Ekin/Meta.py
[ "MIT" ]
Python
createDialog
<not_specific>
def createDialog(self, dataset=None, showglob=True, parent=None): """Create a dialog for inputing fields, include all current global fields and ones local to the supplied dataset""" d=self.data self.currdataset = dataset self.metawin=Toplevel(parent) metawin =...
Create a dialog for inputing fields, include all current global fields and ones local to the supplied dataset
Create a dialog for inputing fields, include all current global fields and ones local to the supplied dataset
[ "Create", "a", "dialog", "for", "inputing", "fields", "include", "all", "current", "global", "fields", "and", "ones", "local", "to", "the", "supplied", "dataset" ]
def createDialog(self, dataset=None, showglob=True, parent=None): d=self.data self.currdataset = dataset self.metawin=Toplevel(parent) metawin = self.metawin metawin.title('Edit/View meta data') metawin.geometry('+200+200') self.datasetlabel=StringVar() se...
[ "def", "createDialog", "(", "self", ",", "dataset", "=", "None", ",", "showglob", "=", "True", ",", "parent", "=", "None", ")", ":", "d", "=", "self", ".", "data", "self", ".", "currdataset", "=", "dataset", "self", ".", "metawin", "=", "Toplevel", "...
Create a dialog for inputing fields, include all current global fields and ones local to the supplied dataset
[ "Create", "a", "dialog", "for", "inputing", "fields", "include", "all", "current", "global", "fields", "and", "ones", "local", "to", "the", "supplied", "dataset" ]
[ "\"\"\"Create a dialog for inputing fields, include all current global\n fields and ones local to the supplied dataset\"\"\"" ]
[ { "param": "self", "type": null }, { "param": "dataset", "type": null }, { "param": "showglob", "type": null }, { "param": "parent", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dataset", "type": null, "docstring": null, "docstring_tokens"...
7a94ed1b30c03a42c15a93c334068177390964aa
shambo001/peat
PEATDB/Ekin/Meta.py
[ "MIT" ]
Python
updateFields
<not_specific>
def updateFields(self, dataset=None): """Do field entry widgets for standard meta data items of the form data, attrib. Other fields are not displayed but are allowed """ gvars=self.gvars={} cvars=self.cvars={} tvars=self.tvars={} d=self.data metawin = self.meta...
Do field entry widgets for standard meta data items of the form data, attrib. Other fields are not displayed but are allowed
Do field entry widgets for standard meta data items of the form data, attrib. Other fields are not displayed but are allowed
[ "Do", "field", "entry", "widgets", "for", "standard", "meta", "data", "items", "of", "the", "form", "data", "attrib", ".", "Other", "fields", "are", "not", "displayed", "but", "are", "allowed" ]
def updateFields(self, dataset=None): gvars=self.gvars={} cvars=self.cvars={} tvars=self.tvars={} d=self.data metawin = self.metawin glbals = self.glob self.currdataset = dataset def addwidget(frame, fname, fdata, fattrib, r): var=None ...
[ "def", "updateFields", "(", "self", ",", "dataset", "=", "None", ")", ":", "gvars", "=", "self", ".", "gvars", "=", "{", "}", "cvars", "=", "self", ".", "cvars", "=", "{", "}", "tvars", "=", "self", ".", "tvars", "=", "{", "}", "d", "=", "self"...
Do field entry widgets for standard meta data items of the form data, attrib.
[ "Do", "field", "entry", "widgets", "for", "standard", "meta", "data", "items", "of", "the", "form", "data", "attrib", "." ]
[ "\"\"\"Do field entry widgets for standard meta data items of the form\n data, attrib. Other fields are not displayed but are allowed \"\"\"", "#more readable", "#attributes" ]
[ { "param": "self", "type": null }, { "param": "dataset", "type": null } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "self", "type": null, "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "dataset", "type": null, "docstring": null, "docstring_tokens"...