示例#1
0
    def __init__(self, **kwargs):
        OWRpy.__init__(self, **kwargs)
        self.RFunctionParam_data = ""
        self.setRvariableNames(["norm"])
        self.require_librarys(["reshape", "gregmisc"])
        self.inputs.addInput("data", "Data Table", signals.RDataFrame.RDataFrame, self.processdata)
        self.outputs.addOutput("data", "Data Table", signals.RDataFrame.RDataFrame)
        """Input sigals are base.RDataFrame, Output signals are base.RDataFrame"""

        self.GUIPARAM_Grouping = comboBox(self.controlArea, label="Sample Groupings")
        self.GUIPARAM_NormGroup = comboBox(
            self.controlArea, label="Normalization Groupings", callback=self.setGUIPARAM_NormPoint
        )
        self.GUIPARAM_NormPoint = comboBox(self.controlArea, label="Normalization Point")
        self.GUIPARAM_Measure = comboBox(self.controlArea, label="Measure Values")
        """
        .. rrgui:: Sample Groupings; the column that will be used to normalize against.

        .. rrgui:: Normalization Groupings; the column that holds the normalization descriptors for each group.
        
        .. rrgui:: Normalization Point; the point in the Normalization Groupings that the Sample Groupings values will be normalized to.
        
        .. rrgui:: Measure Values; the values that will be normalized.
        """

        self.GUIOUTPUT_Text = textEdit(self.controlArea, label="Data Sample")

        redRCommitButton(self.bottomAreaRight, "Commit", callback=self.commitFunction)
示例#2
0
 def __init__(self, **kwargs):
     OWRpy.__init__(self, **kwargs)
     self.setRvariableNames(['genesScores', 'conceptScores'])
     self.concepts = ''          ## the concepts, optional will replace the reading of the file
     self.geneIDs = ''           ## the geneIDs to be found in the concepts
     self.reference = ''         ## the set of reference genes, 
     self.packageDir = ''        ## the packageDir where all of the concept files are stored if not otherwise available.
     self.map = None
     self.go = None
     
     self.inputs.addInput('geneIDs', 'Gene ID List', redRDataFrame, self.processGeneIDs)
     self.inputs.addInput('consigData', 'Concepts Data [optional]', redRDataFrame, self.processConcepts)
     self.inputs.addInput('referenceList', 'Gene Reference List [optional]', redRRList, self.processReference)
     
     self.outputs.addOutput('scores', 'ConSig Concept Scores', redRDataFrame)
     self.outputs.addOutput('genescores', 'ConSig Gene Scores', redRDataFrame)
     
     myTabWidget = redRTabWidget(self.controlArea)
     geneIDArea = myTabWidget.createTabPage('Gene ID\'s')
     conceptsArea = myTabWidget.createTabPage('Concepts')
     fileSetupArea = myTabWidget.createTabPage('File Setup')
     
     ## file selection for consig files
     self.dirLabel = redRWidgetLabel(fileSetupArea, 'No Directory Currently Selected')
     button(fileSetupArea, label = 'Change File Directory', callback = self.changeFileDir)
     
     ## concepts area
     button(conceptsArea, label = 'Parse Concepts', callback = self.parseConcepts)
     
     ## 
     self.genes_geneIDCol = comboBox(geneIDArea, label = 'Gene ID Column')
     self.genes_scoreCol = comboBox(geneIDArea, label = 'Gene Scores (Weights)')
     
     redRCommitButton(self.controlArea, label = 'Commit', callback = self.commit)
示例#3
0
文件: ConSig.py 项目: aourednik/Red-R
 def __init__(self, parent=None, signalManager=None):
     OWRpy.__init__(self)
     self.setRvariableNames(['genesScores', 'conceptScores'])
     self.concepts = ''          ## the concepts, optional will replace the reading of the file
     self.geneIDs = ''           ## the geneIDs to be found in the concepts
     self.reference = ''         ## the set of reference genes, 
     self.packageDir = ''        ## the packageDir where all of the concept files are stored if not otherwise available.
     self.map = None
     self.go = None
     
     self.inputs.addInput('geneIDs', 'Gene ID List', redRDataFrame, self.processGeneIDs)
     self.inputs.addInput('consigData', 'Concepts Data [optional]', redRDataFrame, self.processConcepts)
     self.inputs.addInput('referenceList', 'Gene Reference List [optional]', redRRList, self.processReference)
     
     self.outputs.addOutput('scores', 'ConSig Concept Scores', redRDataFrame)
     self.outputs.addOutput('genescores', 'ConSig Gene Scores', redRDataFrame)
     
     myTabWidget = redRTabWidget(self.controlArea)
     geneIDArea = myTabWidget.createTabPage('Gene ID\'s')
     conceptsArea = myTabWidget.createTabPage('Concepts')
     fileSetupArea = myTabWidget.createTabPage('File Setup')
     
     ## file selection for consig files
     self.dirLabel = redRWidgetLabel(fileSetupArea, 'No Directory Currently Selected')
     button(fileSetupArea, label = 'Change File Directory', callback = self.changeFileDir)
     
     ## concepts area
     button(conceptsArea, label = 'Parse Concepts', callback = self.parseConcepts)
     
     ## 
     self.genes_geneIDCol = comboBox(geneIDArea, label = 'Gene ID Column')
     self.genes_scoreCol = comboBox(geneIDArea, label = 'Gene Scores (Weights)')
     
     redRCommitButton(self.controlArea, label = 'Commit', callback = self.commit)
 def __init__(self, **kwargs):
     OWRpy.__init__(self, **kwargs)
     
     self.require_librarys(["preprocessCore"])
     
     self.setRvariableNames(["normalize.quantiles"])
     self.RFunctionParam_x = ""
     self.RFunctionParam_copy = "TRUE"
      
     self.RFunctionParam_x = ''
     self.inputs.addInput("x", 'Data Table', signals.base.RDataFrame, self.processx)
     self.outputs.addOutput("normalize.quantiles Output", 'Normalized Quantiles', signals.base.RDataFrame)
     
     redRCommitButton(self.controlArea,label = "Commit", callback = self.commitFunction)
示例#5
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.RFunctionParam_y = ''
        self.RFunctionParam_x = ''
        self.inputs.addInput('id0', 'y', redRRVector, self.processy)
        self.inputs.addInput('id1', 'x', redRRVector, self.processx)

        self.standardTab = self.controlArea
        self.RFunctionParamy_lineEdit = lineEdit(self.standardTab,
                                                 label="y:",
                                                 text='')
        self.RFunctionParamx_lineEdit = lineEdit(self.standardTab,
                                                 label="x:",
                                                 text='')
        self.RFunctionParamscale_lineEdit = lineEdit(self.standardTab,
                                                     label="scale:",
                                                     text='1')
        self.RFunctionParamsize_lineEdit = lineEdit(self.standardTab,
                                                    label="size:",
                                                    text='c(1,4)')
        self.RFunctionParampow_lineEdit = lineEdit(self.standardTab,
                                                   label="pow:",
                                                   text='0.5')
        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
示例#6
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.RFunctionParam_y = ''
        self.RFunctionParam_x = ''
        self.inputs.addInput('id0', 'y', redRRVector, self.processy)
        self.inputs.addInput('id1', 'x', redRRVector, self.processx)

        self.RFunctionParamxlab_lineEdit = lineEdit(self.controlArea,
                                                    label="xlab:",
                                                    text='NULL')
        self.RFunctionParamspan_lineEdit = lineEdit(self.controlArea,
                                                    label="span:",
                                                    text='2/3')
        self.RFunctionParamdegree_lineEdit = lineEdit(self.controlArea,
                                                      label="degree:",
                                                      text='1')
        self.RFunctionParamfamily_comboBox = comboBox(
            self.controlArea, label="family:", items=['symmetric', 'gaussian'])
        self.RFunctionParamylab_lineEdit = lineEdit(self.controlArea,
                                                    label="ylab:",
                                                    text='NULL')
        self.RFunctionParamevaluation_lineEdit = lineEdit(self.controlArea,
                                                          label="evaluation:",
                                                          text='50')
        self.RFunctionParamylim_lineEdit = lineEdit(self.controlArea,
                                                    label="ylim:",
                                                    text='')
        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
示例#7
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.RFunctionParam_y = ''
        self.inputs.addInput('id0', 'y', redRRDataFrame, self.processy)

        self.RFunctionParammar_lineEdit = lineEdit(self.controlArea,
                                                   label="mar:",
                                                   text='c(2,8,5,8)')
        self.RFunctionParamlty_lineEdit = lineEdit(self.controlArea,
                                                   label="lty:",
                                                   text='1')
        self.RFunctionParamlabels_lineEdit = lineEdit(self.controlArea,
                                                      label="labels:",
                                                      text='rownames(y)')
        self.RFunctionParamrank_lineEdit = lineEdit(self.controlArea,
                                                    label="rank:",
                                                    text='TRUE')
        self.RFunctionParampch_lineEdit = lineEdit(self.controlArea,
                                                   label="pch:",
                                                   text='19')
        self.RFunctionParamtop_labels_lineEdit = lineEdit(self.controlArea,
                                                          label="top_labels:",
                                                          text='colnames(y)')
        self.RFunctionParamcol_lineEdit = lineEdit(self.controlArea,
                                                   label="col:",
                                                   text='par("fg")')
        self.RFunctionParamlwd_lineEdit = lineEdit(self.controlArea,
                                                   label="lwd:",
                                                   text='1')
        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
示例#8
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.RFunctionParam_x = ''
        self.inputs.addInput('id0', 'x', redRRList, self.processx)

        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
示例#9
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)

        self.require_librarys(["preprocessCore"])

        self.setRvariableNames(["normalize.quantiles"])
        self.RFunctionParam_x = ""
        self.RFunctionParam_copy = "TRUE"

        self.RFunctionParam_x = ''
        self.inputs.addInput("x", 'Data Table', signals.RDataFrame.RDataFrame,
                             self.processx)
        self.outputs.addOutput("normalize.quantiles Output",
                               'Normalized Quantiles',
                               signals.RDataFrame.RDataFrame)

        #self.help.setHtml('<small>Performs <a href="http://en.wikipedia.org/wiki/Normalization_(statistics)">quantile normailzation</a> on a data table containing numeric data.  This is generally used for expression array data but will work to standardize any numeric data.  For more infromation on widget functions and RedR please see either the <a href="http://www.code.google.com/p/r-orange">google code repository</a> or the <a href="http://www.red-r.org">RedR website</a>.</small>')
        redRCommitButton(self.controlArea,
                         label="Commit",
                         callback=self.commitFunction)
示例#10
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.RFunctionParam_object = ''
        self.saveSettingsList.extend(['RFunctionParam_object'])
        self.inputs.addInput('id0', 'object', 'All', self.processobject)

        
        box = groupBox(self.controlArea, "Output")
        self.commit = redRCommitButton(self.bottomAreaRight, "Commit", callback = self.commitFunction,
        processOnInput=True)
        self.RoutputWindow = textEdit(box,label='R Output', displayLabel=False)
示例#11
0
 def __init__(self, parent=None, signalManager=None):
     OWRpy.__init__(self)
     self.setRvariableNames(['saveData'])
     self.inputObject = None
     self.outputObject = None
     self.inputs.addInput('id0', _('Input Object'), 'All',
                          self.processobject)
     self.outputs.addOutput('id0', _('Output Object'), 'All')
     self.outputs.propogateNone = self.newPropNone  ## this is here to stop the propogation of None when a None is received.
     widgetLabel(
         self.controlArea,
         _('This widget acts as a save point for analyses so that data is not lost when upstream widgets are removed.  You can use this to help manage memory in your schemas by deleting upstream data (making the schema smaller) yet retaining the analyses.'
           ),
         wordWrap=True)
     redRCommitButton(self.bottomAreaRight,
                      label=_("Commit"),
                      callback=self.commitFunction)
     self.RoutputWindow = textEdit(self.controlArea,
                                   label=_('Input Object'))
     self.RoutputWindow2 = textEdit(self.controlArea,
                                    label=_('Output Object'))
示例#12
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["fisher.test"])
        self.data = {}
        self.RFunctionParam_x = ''
        self.inputs.addInput('id0', 'x', redRRMatrix, self.processx)

        self.RFunctionParamB_lineEdit = lineEdit(
            self.controlArea,
            label="Number of Replicates for Monte Carlo:",
            text='2000')
        self.RFunctionParamhybrid_checkBox = checkBox(
            self.controlArea,
            label="Hybrid Probabilities:",
            buttons=['FALSE', 'TRUE'],
            setChecked='FALSE')
        self.RFunctionParamsimulate_p_value_lineEdit = checkBox(
            self.controlArea,
            label="simulate_p_value:",
            buttons=['FALSE,TRUE'],
            setChecked='FALSE')
        self.RFunctionParamconf_level_lineEdit = lineEdit(
            self.controlArea, label="Confidence Level:", text='0.95')
        self.RFunctionParamconf_int_lineEdit = checkBox(
            self.controlArea,
            label="Calculate Confidence Interval:",
            buttons=['TRUE', 'FALSE'],
            setChecked='TRUE')
        self.RFunctionParamalternative_comboBox = comboBox(
            self.controlArea,
            label="Alternative Hypothesis:",
            items=["two.sided", "greater", "less"])
        self.RFunctionParamor_lineEdit = lineEdit(self.controlArea,
                                                  label="Odds Ratio:",
                                                  text='1')
        redRCommitButton(self.bottomAreaRight,
                         "Commit",
                         callback=self.commitFunction)
        self.RoutputWindow = textEdit(self.controlArea,
                                      label="R Output Window")
示例#13
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.RFunctionParam_mymodel = ''
        self.inputs.addInput('id0', 'mymodel', redRRModelFit,
                             self.processmymodel)

        self.RFunctionParamwhich_lineEdit = lineEdit(self.controlArea,
                                                     label="which:",
                                                     text='all')
        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
示例#14
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["prcomp"])
         
        self.RFunctionParam_x = ''
        self.inputs.addInput('id0', 'x', redRRDataFrame, self.processx)

        self.outputs.addOutput('id0', 'prcomp Output', redRRModelFit)
        self.outputs.addOutput('id1', 'Scaled Data', redRRMatrix)
        self.options = checkBox(self.controlArea, label = 'Options:', buttons = ['Center', 'Scale'])
        self.options.setChecked(['Center', 'Scale'])

        self.commit = redRCommitButton(self.bottomAreaRight, "Commit", callback = self.commitFunction,
        processOnInput=True)
示例#15
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self, wantGUIDialog=1)
        self.setRvariableNames(["lm"])
        self.RFunctionParam_formula = ""
        self.RFunctionParam_data = ''
        self.modelFormula = ''
        self.processingComplete = 0

        self.inputs.addInput('id0', 'data', redRRDataFrame, self.processdata)

        self.outputs.addOutput('id0', 'lm Output', redRRLMFit)
        self.outputs.addOutput('id1', 'lm plot attribute', redRRPlotAttribute)

        #GUI

        box = widgetBox(self.GUIDialog, orientation='horizontal')
        paramBox = groupBox(self.GUIDialog, 'Parameters')
        formulaBox = widgetBox(self.controlArea)
        self.RFunctionParam_subset = lineEdit(paramBox,
                                              'NULL',
                                              label="subset:")
        self.RFunctionParam_qr = lineEdit(paramBox, 'TRUE', label="qr:")

        self.RFunctionParam_singular_ok = lineEdit(paramBox,
                                                   'TRUE',
                                                   label="singular_ok:")
        self.RFunctionParam_y = lineEdit(paramBox, 'FALSE', label="y:")
        self.RFunctionParam_weights = lineEdit(paramBox, "", label="weights:")
        self.RFunctionParam_offset = lineEdit(paramBox, "", label="offset:")
        self.RFunctionParam_contrasts = lineEdit(paramBox,
                                                 "NULL",
                                                 label="contrasts:")
        self.RFunctionParam_x = lineEdit(paramBox, "FALSE", label="x:")
        self.RFunctionParam_model = lineEdit(paramBox, "TRUE", label="model:")
        self.RFunctionParam_method = lineEdit(paramBox, "qr", label="method:")

        #start formula entry section

        buttonsBox = widgetBox(formulaBox, "Commands")
        self.formulEntry = RFormulaEntry(buttonsBox,
                                         label='Formula',
                                         displayLabel=False)

        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
        #self.processButton.setEnabled(False)
        self.status.setText('Data Not Connected Yet')
示例#16
0
 def __init__(self, parent=None, signalManager=None):
     OWRpy.__init__(self)
     self.RFunctionParam_height = ''
     self.inputs.addInput("height", "Plotting Vector", signals.RList.RList, self.processheight)
     
     self.RFunctionParammain_lineEdit = redRlineEdit(self.controlArea, label = "main:", text = '')
     self.RFunctionParamhoriz_lineEdit = redRlineEdit(self.controlArea, label = "horiz:", text = '')
     self.namesBox = redRcomboBox(self.controlArea, label = 'Data Element:', callback = self.commitFunction)
     self.RFunctionParamspace_lineEdit = redRSpinBox(self.controlArea, label = "Space:", 
     min = 0, max = 99, value = 5)
     self.RFunctionParamxlab_lineEdit = redRlineEdit(self.controlArea, label = "xlab:", text = '')
     self.plotArea = redRgraphicsView(self.controlArea,label='Bar Plot', displayLabel=False)
     
     self.commit = redRCommitButton(self.bottomAreaRight, "Commit", callback = self.commitFunction,
     processOnInput=True)
示例#17
0
 def __init__(self, **kwargs):
     OWRpy.__init__(self, **kwargs))
     self.setRvariableNames(["dotchart"])
     self.data = {}
     self.RFunctionParam_x = ''
     self.labels = ''
     self.inputs.addInput('id0', 'Data', redRRMatrix, self.processx)
     self.inputs.addInput('id1', 'Labels', redRList, self.processLabels)
     
     self.standardTab = self.controlArea
     
     self.RFunctionParammain_lineEdit =  lineEdit(self.standardTab,  label = "Main Title:")
     self.RFunctionParamxlab_lineEdit =  lineEdit(self.standardTab,  label = "X Label:")
     self.RFunctionParamylab_lineEdit =  lineEdit(self.standardTab,  label = "Y Label:")
     self.labelNames = comboBox(self.standardTab, label = 'Label Data')
     self.commit = redRCommitButton(self.bottomAreaRight, "Commit", callback = self.commitFunction,
     processOnInput=True)
示例#18
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["points"])
        self.data = {}
        self.RFunctionParam_y = ''
        self.RFunctionParam_x = ''
        self.RFunctionParam_col = ''
        self.inputs.addInput('id0', 'y', redRRVector, self.processy)
        self.inputs.addInput('id1', 'x', redRRVector, self.processx)
        self.inputs.addInput('id2', 'col', redRRVector, self.processcol)

        self.outputs.addOutput('id0', 'points Output', plotsigs.RPlotAttribute)

        
        self.RFunctionParampch_lineEdit = lineEdit(self.controlArea, label = "pch:", text = '16')
        self.RFunctionParamcex_lineEdit = lineEdit(self.controlArea, label = "cex:", text = '2')
        self.commit = redRCommitButton(self.bottomAreaRight, "Commit", callback = self.commitFunction,
        processOnInput=True)
示例#19
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["wilcox.test"])

        self.RFunctionParam_x = ''
        self.RFunctionParam_y = ''
        self.inputs.addInput('id0', 'x', redRRVector, self.processx)
        self.inputs.addInput('id1', 'y', redRRVector, self.processy)

        self.outputs.addOutput('id0', 'wilcox.test Output', redRRVariable)

        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
        self.RoutputWindow = textEdit(self.controlArea,
                                      label='R Output',
                                      displayLabel=False)
示例#20
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["fft"])
        self.data = {}
        self.RFunctionParam_z = ''
        self.isNumeric = False
        self.inputs.addInput('id0', 'z', redRRMatrix, self.processz)

        self.outputs.addOutput('id0', 'fft Output', redRRMatrix)

        self.RFunctionParaminverse_radioBox = radioButtons(
            self.controlArea,
            label="inverse:",
            buttons=["Yes", "No"],
            setChecked="No")

        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
示例#21
0
文件: sort.py 项目: aourednik/Red-R
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["sort"])
        self.data = {}
         
        self.RFunctionParam_x = ''
        self.inputs.addInput('id0', _('Data Tabel'), redRRDataFrame, self.processx)

        self.outputs.addOutput('id0', _('Sorted Data Table'), redRRDataFrame)

        self.standardTab = widgetBox(self.controlArea)
        self.options =  checkBox(self.standardTab,label=_('Options'),
        buttons = [_("Decreasing"), _('NA Last')], orientation='horizontal')
        # self.standardTab.layout().setAlignment(self.options,Qt.AlignLeft)
        
        self.sortingColumn1 = comboBox(self.standardTab, label = _('First Column to Sort:'))
        self.sortingColumn2 = comboBox(self.standardTab, label = _('Second Column to Sort:'))
        self.sortingColumn3 = comboBox(self.standardTab, label = _('Third Column to Sort:'))
        
        self.commit = redRCommitButton(self.bottomAreaRight, _("Commit"), callback = self.commitFunction,
        processOnInput=True)
示例#22
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["dotchart"])
        self.data = {}
        self.RFunctionParam_x = ''
        self.labels = ''
        self.inputs.addInput('id0', 'Data', redRRMatrix, self.processx)
        self.inputs.addInput('id1', 'Labels', redRList, self.processLabels)

        self.standardTab = self.controlArea

        self.RFunctionParammain_lineEdit = lineEdit(self.standardTab,
                                                    label="Main Title:")
        self.RFunctionParamxlab_lineEdit = lineEdit(self.standardTab,
                                                    label="X Label:")
        self.RFunctionParamylab_lineEdit = lineEdit(self.standardTab,
                                                    label="Y Label:")
        self.labelNames = comboBox(self.standardTab, label='Label Data')
        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
示例#23
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.RFunctionParam_y = ''
        self.RFunctionParam_x = ''
        self.dataFrame = ''
        self.plotAttributes = {}
        self.RFunctionParam_plotatt = ''
        self.inputs.addInput('id0', 'y', [redRRVector, redRList], self.processy)
        self.inputs.addInput('id1', 'x', redRRVector, self.processx)
        self.inputs.addInput('id2', 'plotatt', redRRPlotAttribute, self.processplotatt, multiple = True)

        
        self.RFunctionParamxlab_lineEdit = lineEdit(self.controlArea, label = "X Label:", text = 'X Label')
        self.RFunctionParamylab_lineEdit = lineEdit(self.controlArea, label = "Y Label:", text = 'Y Label')
        self.RFunctionParammain_lineEdit = lineEdit(self.controlArea, label = "Main Title:", text = 'Main Title')
        self.namesListX = comboBox(self.controlArea, label = 'X Axis Data:')
        self.namesListX.setEnabled(False)
        self.namesListY = comboBox(self.controlArea, label = 'Y Axis Data:')
        self.namesListY.setEnabled(False)
        self.graphicsView = graphicsView(self.controlArea,label='XY Plot',displayLabel=False,
        name = self.captionTitle)
        self.commit = redRCommitButton(self.bottomAreaRight, "Commit", callback = self.commitFunction,
        processOnInput=True)
示例#24
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)
        self.setRvariableNames(["var.test"])
        self.data = {}
        self.RFunctionParam_y = ''
        self.RFunctionParam_x = ''
        self.inputs.addInput('id0', 'y', redRRVector, self.processy)
        self.inputs.addInput('id1', 'x', redRRVector, self.processx)

        self.RFunctionParamalternative_comboBox = comboBox(
            self.controlArea,
            label="alternative:",
            items=["two.sided", "less", "greater"])
        self.RFunctionParamratio_lineEdit = lineEdit(self.controlArea,
                                                     label="ratio:",
                                                     text='1')
        self.RFunctionParamconf_level_lineEdit = lineEdit(
            self.controlArea, label='Confidence Interval:', text='0.95')
        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)
        self.RoutputWindow = textEdit(self.controlArea, label="RoutputWindow")
示例#25
0
    def __init__(self, **kwargs):
        OWRpy.__init__(self, **kwargs)
        self.data = None
        self.RFunctionParam_x = ''
        self.plotAttributes = {}
        self.saveSettingsList = ['plotArea', 'data', 'RFunctionParam_x', 'plotAttributes']
        self.inputs.addInput('id0', 'x', redRRVariable, self.processx)

        # self.R('data <- iris')
        # self.RFunctionParam_x = 'data'
        self.data = 'iris'
        self.plotArea = graphicsView2(self.controlArea,label='Plot', displayLabel=False)
        #self.plotArea.hideTab('Points/Lines')
        
        self.plotArea.setCustomPlot(self.updatePlot)
        
        self.plotControls = self.plotArea.createTab('Barplot')
        imageBox = self.plotArea.createControlGroup('Barplot',label='Barplot')
        
        self.namesCombo = comboBox(imageBox,label='Group Name')
        self.heightCombo = listBox(self.plotControls,label='Heights',selectionMode=QAbstractItemView.ExtendedSelection)
        
        self.commit = redRCommitButton(self.bottomAreaRight, "Commit", callback = self.commitFunction,
        processOnInput=True)
 def __init__(self, **kwargs):
     OWRpy.__init__(self, **kwargs)
     
     self.require_librarys(["ggplot2"])
     self.RFunctionParam_y = ''
     self.RFunctionParam_x = ''
     self.setRvariableNames(["lineplot"])
     self.inputs.addInput('id0', 'Data Table', redRDataFrame, self.processy)
     self.colours = [(0, _('Two Color Gradient')), (1, _('Three Color Gradient')), (2, _('Sequential Brewer Colors')), (3, _('Diverging Brewer Colors')), (4, _('Qualitative Brewer Colors')), (5, _('No Color'))]
     self.colourScaleWidgets = []
     topBox = redRWidgetBox(self.controlArea, orientation = 'horizontal')
     aestheticsBox = redRGroupBox(topBox, label = _('Aesthetics'), orientation = 'horizontal')
     aestheticsBox.setSizePolicy(QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum))
     self.xGroup = comboBox(aestheticsBox, label = _('X Values'))
     self.yData = comboBox(aestheticsBox, label = _('Y Values'))
     self.fillData = comboBox(aestheticsBox, label = _('Fill Data'), callback = self.fillDataChanged)
     self.linetypeCombo = comboBox(aestheticsBox, label = _('Line Type'))
     self.colourScale = comboBox(aestheticsBox, label = _('Color Scale'), items = self.colours, callback = self.colourScaleChanged)
     
     ## make the scale selector
     self.colourSelectorStack = stackedWidget(aestheticsBox)
     
     
     
     ## vlaue stack 0; gradient selector
     gradientBox = self.colourSelectorStack.createWidgetBox()
     self.colourScaleWidgets.append(gradientBox)
     self.gradientFrom = colorButton(gradientBox, label = _('From'), startColor = '#000000')
     self.gradientTo = colorButton(gradientBox, label = _('To'), startColor = '#FFFFFF')
     
     ## value stack 1; gradient2 selector
     gradient2Box = self.colourSelectorStack.createWidgetBox()
     self.colourScaleWidgets.append(gradient2Box)
     self.gradient2From = colorButton(gradient2Box, label = _('From'), startColor = '#FF0000')
     self.gradient2To = colorButton(gradient2Box, label = _('To'), startColor = '#00FF00')
     self.gradient2Via = colorButton(gradient2Box, label = _('Via'), startColor = '#FFFFFF')
     
     ## value stack 2; sequential brewer colors
     sequentialBox = self.colourSelectorStack.createWidgetBox()
     self.colourScaleWidgets.append(sequentialBox)
     self.sequentialPalettes = comboBox(sequentialBox, label = _('Palette'), items = [('Blues', _('Blues')), ('BuGn', _('Blue Green')), ('BuPu', _('Blue Purple')), ('GnBu', _('Green Blue')), ('Greens', _('Greens')), ('Greys', _('Greys')), ('Oranges', _('Oranges')), ('OrRd', _('Orange Red')), ('PuBu', _('Purple Blue')), ('PuBuGn', _('Purple Blue Green')), ('PuRd', _('Purple Red')), ('Purples', _('Purples')), ('RdPu', _('Red Purple')), ('Reds', _('Reds')), ('YlGn', _('Yellow Green')), ('YlGnBu', _('Yellow Green Blue')), ('YlOrBr', _('Yellow Orange Brown')), ('YlOrRd', _('Yellow Orange Red'))])
     self.sequentialVariations = spinBox(sequentialBox, label = _('Variations'), decimals = 0, min = 3, max = 9, value = 5)
     
     ## value stack 3; diverging brewer colors
     divergingBox = self.colourSelectorStack.createWidgetBox()
     self.colourScaleWidgets.append(divergingBox)
     paletteItems = [('BrBG', _('Brown Blue Green')), ('PiYG', _('Pink Yellow Green')), ('PRGn', _('Pink Red Green')), ('PuOr', _('Purple Orange')), ('RdBu', _('Red Blue')), ('RdGy', _('Red Grey')), ('RdYlBu', _('Red Yellow Blue')), ('RdYlGn', _('Red Yellow Green')), ('Spectral', _('Spectral'))]
     self.divergingPalettes = comboBox(divergingBox, label = _('Palette'), items = paletteItems)
     self.divergingVariations = spinBox(divergingBox, label = _('Variations'), decimals = 0, min = 3, max = 11, value = 5)
     
     ## value stack 4; qualitative brewer colors
     qualitativeBox = self.colourSelectorStack.createWidgetBox()
     self.colourScaleWidgets.append(qualitativeBox)
     self.qualitativePalettes = comboBox(qualitativeBox, label = _('Palette'), items = [('Accent', _('Accent')), ('Dark2', _('Dark2')), ('Paired', _('Paired')), ('Pastel1', _('Pastel1')), ('Pastel2', _('Pastel2')), ('Set1', _('Set1')), ('Set2', _('Set2')), ('Set3', _('Set3'))])
     self.qualitativeVariations = spinBox(qualitativeBox, label = _('Variations'), decimals = 0, min = 3, max = 8, value = 5)
     
     ## value stack 5; no color
     noColorBox = self.colourSelectorStack.createWidgetBox()
     self.colourScaleWidgets.append(noColorBox)
     
     ## error bars
     errorBox = redRGroupBox(self.controlArea, label = _('Error Bar Options'), orientation = 'horizontal')
     self.errorBarData = comboBox(errorBox, label = _('Error Bar Data'))
     
     
     self.colourSelectorStack.setCurrentIndex(0)
     
     self.graphicsView = redRGGPlot(self.controlArea,label='Box Plot',displayLabel=False,
     name = self.captionTitle)
     self.commit = redRCommitButton(self.bottomAreaRight, _("Commit"), callback = self.commitFunction,
     processOnInput=True)
     self.colourScaleChanged()
示例#27
0
    def __init__(self, parent=None, signalManager=None):
        #Here we init the parent class of our widget OWRpy.
        OWRpy.__init__(self)

        #create a R variable cor in the R session.  These variables will be in the R session to track the ouputs of functions that run in R.
        #the cor variable will not conflict with some other widgets cor function
        self.setRvariableNames(["cor"])

        # declare some variables we will use later
        self.RFunctionParam_y = None
        self.RFunctionParam_x = None

        # Define the inputs that this widget will accept
        # When data is received the three element in the tuple which is a function will be executed
        self.inputs.addInput('id0', 'x', redRRDataFrame, self.processx)
        self.inputs.addInput('id1', 'y', redRRDataFrame, self.processy)

        # Define the outputs of this widget
        self.outputs.addOutput('id0', 'cor Output', redRRMatrix)

        #START THE GUI LAYOUT
        area = widgetBox(self.controlArea, orientation='horizontal')

        options = widgetBox(area, orientation='vertical')
        area.layout().setAlignment(options, Qt.AlignTop)

        # radioButtons are a type of qtWidget from the base package.  This widget will show radioButtons in a group.  Only one radio button may be selected at one time.  Buttons are declared using buttons = , the callback is the function that will be executed when the button selection changes.  setChecked sets a button to be checked by default.
        self.type = radioButtons(
            options,
            label="Perform",
            buttons=['Variance', 'Correlation', 'Covariance'],
            setChecked='Correlation',
            orientation='vertical',
            callback=self.changeType)

        self.methodButtons = radioButtons(
            options,
            label="Method",
            buttons=['pearson', 'kendall', 'spearman'],
            setChecked='pearson',
            orientation='vertical')

        self.useButtons = radioButtons(options,
                                       label='Handing Missing Values',
                                       setChecked='everything',
                                       buttons=[
                                           "everything", "all.obs",
                                           "complete.obs",
                                           "pairwise.complete.obs"
                                       ],
                                       orientation='vertical')

        # the commit button is a special button that can be set to process on data input.  Widgets must be aware of these selections.  Clicking the commit button executes the callback which in this case executes the commitFunction.
        self.commit = redRCommitButton(self.bottomAreaRight,
                                       "Commit",
                                       callback=self.commitFunction,
                                       processOnInput=True)

        # this is a filter table designed to hold R data.  The name is Cor/Var for the report generation but the user will not see this label because displayLabel is set to False.
        self.RoutputWindow = redRfilterTable(area,
                                             label='Cor/Var',
                                             displayLabel=False,
                                             sortable=True,
                                             filterable=False)
示例#28
0
    def __init__(self, parent=None, signalManager=None):
        OWRpy.__init__(self)

        self.setRvariableNames(['heatsubset', 'hclust', 'heatvect'])
        self.plotOnConnect = 0
        self.plotdata = ''
        self.rowvChoice = None
        self.colvChoice = None
        self.listOfColors = ['"red"', '"white"', '"blue"']

        self.inputs.addInput('id0', 'Expression Matrix', redRRDataFrame,
                             self.processMatrix)
        self.inputs.addInput('id1', 'Classes Data', redRRVector,
                             self.processClasses)

        #self.outputs.addOutput('id0', 'Cluster Subset List', redRRVector)
        self.outputs.addOutput('id1', 'Cluster Classes', redRRVector)

        #GUI
        infobox = groupBox(self.controlArea, label="Options")

        self.commit = redRCommitButton(self.bottomAreaRight,
                                       label="Replot",
                                       callback=self.makePlot,
                                       width=200,
                                       processOnInput=True)

        button(infobox, label='Identify', callback=self.identify, width=200)
        self.groupOrHeight = radioButtons(infobox,
                                          label='Identify by:',
                                          buttons=['Groups', 'Height'],
                                          setChecked='Groups',
                                          orientation='horizontal')
        self.groupOrHeightSpin = spinBox(infobox,
                                         label='Identify Value:',
                                         min=1,
                                         value=5)
        self.startSaturation = spinBox(infobox,
                                       label='Starting Saturation:',
                                       min=0,
                                       max=100)
        self.endSaturation = spinBox(infobox,
                                     label='Ending Saturation:',
                                     min=0,
                                     max=100)
        self.endSaturation.setValue(30)
        redRButton(self.controlArea,
                   label='Reset Colors',
                   callback=self.resetColors)
        #self.classesDropdown = comboBox(infobox, label = 'Classes:', toolTip = 'If classes data is connected you may select columns in the data to represent classes of your columns in the plotted data')

        self.rowDendrogram = checkBox(
            infobox,
            label='Dendrogram Options',
            displayLabel=False,
            buttons=['Plot Row Dendrogram', 'Plot Column Dendrogram'],
            setChecked=['Plot Row Dendrogram', 'Plot Column Dendrogram'])

        self.showClasses = checkBox(infobox,
                                    label='Show Classes',
                                    displayLabel=False,
                                    buttons=['Show Classes'])
        self.showClasses.setEnabled(False)
        #OWGUI.checkBox(infobox, self, )
        self.infoa = widgetLabel(infobox, label="Nothing to report")
        self.gview1 = graphicsView(self.controlArea,
                                   label='Heatmap',
                                   displayLabel=False)
        self.gview1.image = 'heatmap1_' + self.widgetID