AUREA.GUI.Controller
index
/home/john/AUREA/build/lib.linux-i686-2.7/AUREA/GUI/Controller.py

Copyright (C) 2011  N.D. Price Lab
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.
 
You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

 
Modules
       
copy
AUREA.learner.dirac
AUREA.learner.ktsp
os
pyBabel
shutil
socket
sys
time
_tkinter
AUREA.learner.tsp
AUREA.learner.tst
urllib2

 
Classes
       
Controller

 
class Controller
    #thread_message_queue
 
  Methods defined here:
__init__(self, workspace)
This is the controller (MVC design pattern) for the GUI.
workspace is the folder that contains the config file and where
temporary files and data files will be brought.
addSOFTFile(self, softFile)
addUnclassified(self, table, sample_name)
Adds an unclassified sample to the data package
buildDataPackage(self)
Merges all the data tables into one package from which we pull our
data for learning
buildDataTables(self)
Builds a table for each data file
classifyAdaptive(self)
classifyDirac(self)
classifyTSP(self)
classifyTST(self)
classifykTSP(self)
clearClassSamples(self)
Removes samples from any classifications
clearLearningAlg(self)
Set all learning algorithms to None.
Happens when we change something further up the dependency
createClassification(self, page)
Gets and sets the class labels
crossValidateAdaptive(self, target_acc, maxtime)
crossValidateDirac(self)
crossValidateKTSP(self)
crossValidateTSP(self)
crossValidateTST(self)
downloadSOFT(self, softfilename)
Note raises urllib2.URLError when the download attempt fails
getClassificationInfo(self)
Returns the names and sizes of the partitioned classes 
(c1name, c1size, c2name, c2size)
('',0,'',0) is returned if classifications have not been created
getCrossValidationResults(self)
Returns the cross validation accuracy of the learners over 
the training set
(TSP,kTSP,TST,DiRaC, Adaptive)
getDataPackagingResults(self)
Returns a list of tuples with
(genes in merge, probes in merge)
getLearnerAccuracy(self)
Returns the apparent accuracy of the learners over the training set
(TSP,kTSP,TST,DiRaC, Adaptive)
getNetworkInfo(self)
getSampleInfo(self, table, sample_id)
Gets the information about a sample if it is available
getSamples(self)
Returns a list of strings describing all available samples in the data tables
[ '[dt1].samp_name', '[dt2].samp_name', ...]
getSubsets(self)
Returns a list of 2-tuples, 
[
(description, list of sample names formatted to match getSamples),
...]
getUntrainedSamples(self)
This is basically getSamples with the training set removed
initWorkspace(self)
Initialize the workspace files.
Copy from the system any necessary files. (config, gene_syn, etc)
DEPRECATED!!!!
loadFiles(self)
Loads all of the specified files
parseNetworkFile(self)
Parse network file and add networks to datapackage
parseSOFTFiles(self)
adds SOFTparser objects to softparser
partitionClasses(self, class1List, class2List)
Puts the samples into their chosen classes
setApp(self, app)
setGeneNetworkFile(self, gnFile)
setSOFTFile(self, softFile)
DEPRECATED
setSynonymFile(self, sFile)
trainAdaptive(self, target_accuracy, maxTime)
trainDirac(self, crossValidate=False)
trainTSP(self, crossValidate=False)
Performs the training of TSP
trainTST(self, crossValidate=False)
Performs the training of tst
trainkTSP(self, crossValidate=False)
Performs the training of k-TSP
unloadFiles(self)
updateState(self, dependency, satisfied)
Given a dependency, update to satisfied in global dependencies, propagating change

 
Data
        ACTIVE = 'active'
ALL = 'all'
ANCHOR = 'anchor'
ARC = 'arc'
BASELINE = 'baseline'
BEVEL = 'bevel'
BOTH = 'both'
BOTTOM = 'bottom'
BROWSE = 'browse'
BUTT = 'butt'
CASCADE = 'cascade'
CENTER = 'center'
CHAR = 'char'
CHECKBUTTON = 'checkbutton'
CHORD = 'chord'
COMMAND = 'command'
CURRENT = 'current'
DISABLED = 'disabled'
DOTBOX = 'dotbox'
E = 'e'
END = 'end'
EW = 'ew'
EXCEPTION = 8
EXTENDED = 'extended'
FALSE = 0
FIRST = 'first'
FLAT = 'flat'
GROOVE = 'groove'
HIDDEN = 'hidden'
HORIZONTAL = 'horizontal'
INSERT = 'insert'
INSIDE = 'inside'
LAST = 'last'
LEFT = 'left'
MITER = 'miter'
MOVETO = 'moveto'
MULTIPLE = 'multiple'
N = 'n'
NE = 'ne'
NO = 0
NONE = 'none'
NORMAL = 'normal'
NS = 'ns'
NSEW = 'nsew'
NUMERIC = 'numeric'
NW = 'nw'
OFF = 0
ON = 1
OUTSIDE = 'outside'
PAGES = 'pages'
PIESLICE = 'pieslice'
PROJECTING = 'projecting'
RADIOBUTTON = 'radiobutton'
RAISED = 'raised'
READABLE = 2
RIDGE = 'ridge'
RIGHT = 'right'
ROUND = 'round'
S = 's'
SCROLL = 'scroll'
SE = 'se'
SEL = 'sel'
SEL_FIRST = 'sel.first'
SEL_LAST = 'sel.last'
SEPARATOR = 'separator'
SINGLE = 'single'
SOLID = 'solid'
SUNKEN = 'sunken'
SW = 'sw'
StringTypes = (<type 'str'>, <type 'unicode'>)
TOP = 'top'
TRUE = 1
TclVersion = 8.5
TkVersion = 8.5
UNDERLINE = 'underline'
UNITS = 'units'
VERTICAL = 'vertical'
W = 'w'
WORD = 'word'
WRITABLE = 4
X = 'x'
Y = 'y'
YES = 1
wantobjects = 1