当前位置: 首页>>代码示例>>Python>>正文


Python OWGUI.button方法代码示例

本文整理汇总了Python中Orange.OrangeWidgets.OWGUI.button方法的典型用法代码示例。如果您正苦于以下问题:Python OWGUI.button方法的具体用法?Python OWGUI.button怎么用?Python OWGUI.button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Orange.OrangeWidgets.OWGUI的用法示例。


在下文中一共展示了OWGUI.button方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager = None):
        OWWidget.__init__(self, parent, signalManager, "Save Data Files", wantMainArea = 0, resizingEnabled = 1)

        self.inputs = [("Structured Data", DataFiles, self.structuredData, Default)]
        self.outputs = []
        self.dataStructure = None

        # Settings
        self.recentDirs=[]
        self.selectedDirName = "(none)"
        self.loadSettings()

        # GUI
        rfbox = OWGUI.widgetBox(self.controlArea, "Directory", orientation="horizontal", addSpace = True)
        self.dircombo = QComboBox(rfbox)
        rfbox.layout().addWidget(self.dircombo)
        browse = OWGUI.button(rfbox, self, '&...', callback = self.browseDirectory, disabled=0)
        browse.setMaximumWidth(25)
        # info
        box = OWGUI.widgetBox(self.controlArea, "Info", addSpace = True)
        self.infoa = OWGUI.widgetLabel(box, 'No data on input.')
        # Output
        box = OWGUI.widgetBox(self.controlArea, "Output", addSpace = True)
        self.save = OWGUI.button(box, self, '&Save', callback = self.saveData, disabled=1)
        self.adjustSize()
           
        # initial settings            
        self.recentDirs=filter(os.path.exists, self.recentDirs)
        self.setDirlist()
        self.dircombo.setCurrentIndex(0)
        self.resize(300,self.height())
开发者ID:acopar,项目名称:orange-bio,代码行数:33,代码来源:OWDataFilesSave.py

示例2: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager = None, loaddata=1):
        OWWidget.__init__(self, parent, signalManager, 'Data Files', wantMainArea = 0, resizingEnabled = 1)

        self.callbackDeposit = []

        self.inputs = []
        self.outputs = [("Examples", ExampleTable), ("Structured Data", DataFiles)]

        self.dataStructure = []
        self.datasets = None
        self.lastSentIds = []

        # Settings
        self.recentDirs=[]  
        self.selectedDirName = "None"
        self.applyOnChange = 0
        self.loadSettings()

        # CONTROLS
        box = OWGUI.widgetBox(self.controlArea, "Directory", addSpace = True, orientation=0)
        self.dircombo=QComboBox(box)
        box.layout().addWidget(self.dircombo)
        button = OWGUI.button(box, self, '...', callback = self.browseDirectory, disabled=0)
        button.setMaximumWidth(25)
        # connecting GUI to code
        self.connect(self.dircombo,SIGNAL('activated(int)'),self.selectDir)

        # info
        box = OWGUI.widgetBox(self.controlArea, "Info", addSpace = True)
        self.infoa = OWGUI.widgetLabel(box, 'No data loaded.')
        self.infob = OWGUI.widgetLabel(box, '')
        self.infoc = OWGUI.widgetLabel(box, '')
            
        # LIST VIEW
        frmListView = OWGUI.widgetBox(self.controlArea, None, addSpace = True)
        self.tree = QTreeWidget(frmListView)
        self.tree.setSelectionMode(QAbstractItemView.MultiSelection)
        self.tree.setHeaderLabel("Directory/Data File")
        frmListView.layout().addWidget(self.tree)
        self.connect(self.tree,SIGNAL('itemSelectionChanged()'),self.selectionChanged)

        # Output
        box = OWGUI.widgetBox(self.controlArea, "Output", addSpace = True)
        OWGUI.checkBox(box, self, 'applyOnChange', 'Commit data on selection change')
        self.commitBtn = OWGUI.button(box, self, "Commit", callback=self.sendData, disabled=1)
        self.resize(300,600)

        # initial settings            
        self.recentDirs=filter(os.path.exists,self.recentDirs)
        self.setDirlist()
        self.dircombo.setCurrentIndex(0)
        if self.recentDirs!=[] and loaddata:
            self.loadData(self.recentDirs[0])
开发者ID:acopar,项目名称:orange-bio,代码行数:55,代码来源:OWDataFiles.py

示例3: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self,parent=None, signalManager = None):
        OWWidget.__init__(self, parent, signalManager, "&Display Motifs", 0)

        # set default settings
        self.colorBy = None
        self.pvalThresholdIndex = None
        self.pvalThreshold = None

        #load settings
        self.loadSettings()

        # GUI
        self.graph = OWGraph(self.mainArea)
        self.graph.setYRlabels(None)
        self.graph.enableGridXB(0)
        self.graph.enableGridYL(1)
        self.graph.setAxisMaxMinor(QwtPlot.xBottom, 10)
        self.graph.setAxisMaxMajor(QwtPlot.xBottom, 10)
        self.graph.setAxisAutoScale(QwtPlot.xBottom)
        self.graph.setAxisScale(QwtPlot.xBottom, -1020, 0, 0)
        self.mainArea.layout().addWidget(self.graph)
        
        # inputs
        # data and graph temp variables
        self.inputs = [("Examples", ExampleTable, self.cdata, Default), ("Genes", list, self.newGeneList, Default), ("Motifs", list, self.newMotifList, Default)]

        self.data = None
        self.motifLines = []
        self.visibleValues = []
        self.valueToCurve = {}
        self.allGenes = [] ## genes displayed always in same order
        self.geneList = [] ## selected genes
        self.motifList = [] ## selected motifs
        self.valuesPresentInData = []

        self.clusterPostProbThreshold = 0

        # GUI
        self.selValues = OWGUI.widgetBox(self.controlArea, "Values")
        self.selcolorBy = OWGUI.widgetBox(self.controlArea, "Color By")

        self.colorByCombo = OWGUI.comboBox(self.selcolorBy, self, "colorBy",
                                           items=[],
                                           callback=self.colorByChanged)
        
        self.pvalThresholdCombo = OWGUI.comboBox(self.selValues, self, "pvalThresholdIndex",
                                                 items=[],
                                                 callback=self.pvalThresholdChanged)
        
        self.valuesQLB = QListWidget(self.selValues)
        self.valuesQLB.setSelectionMode(QListWidget.MultiSelection)
        self.connect(self.valuesQLB, SIGNAL("itemSelectionChanged()"), self.valuesSelectionChange)
        self.selValues.layout().addWidget(self.valuesQLB)
        
        self.unselectAllQLB = OWGUI.button(self.selValues, self, "Unselect all",
                                           callback = self.unselAll)
开发者ID:acopar,项目名称:orange-bio,代码行数:58,代码来源:OWDisplayMotifs.py

示例4: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager = None):
        OWWidget.__init__(self, parent, signalManager, 'Process Chip Data')
        self.callbackDeposit = []

        self.inputs = [("Structured Data", DataFiles, self.chipdata)]
        self.outputs = [("Structured Data", DataFiles)]

        self.chipdata = None; self.datasets = None
        self.std = [("No preprocessing", None),
                    ("Array-based standardization", chipstat.standardize_arrays),
                    ("Gene-based standardization", chipstat.standardize_genes),
                    ("First array-, then gene-based standardization", lambda e,r: chipstat.standardize_genes(chipstat.standardize_arrays(e,r),r)),
                    ("First gene-, then array-based standardization", lambda e,r: chipstat.standardize_arrays(chipstat.standardize_genes(e,r),r))]
        # Settings
        self.data = None
        self.preStdMethod = 0; self.preStdRob = 1
        self.postStdMethod = 0; self.postStdRob = 1
        
        self.mergeType = 0
        self.commitOnChange = 0
        self.loadSettings()

        # GUI
        # info
        box = QVGroupBox("Info", self.controlArea)
        self.infoa = QLabel('No data on input.', box)
        self.infob = QLabel('', box)
        
        # preprocessing
        OWGUI.separator(self.controlArea)
        box = QVGroupBox("Preprocessing", self.controlArea)
        labels = [x[0] for x in self.std]
        OWGUI.comboBox(box, self, 'preStdMethod', label=None, labelWidth=None, orientation='vertical', items=labels, callback=self.selectionChange)
        self.preRobBtn = OWGUI.checkBox(box, self, "preStdRob", "Robust standardization", callback=self.selectionChange)
        
        # merge
        OWGUI.separator(self.controlArea)
        self.mergeTypes = [(0, "No merging"), ('mean', 'Mean'), ('median', 'Median'), ('min', 'Minimum expression'), ('max', 'Maximum expression')]
        labels = [x[1] for x in self.mergeTypes]
        OWGUI.radioButtonsInBox(self.controlArea, self, 'mergeType', labels, box='Merge Replicas', tooltips=None, callback=self.selectionChange)

        # postprocessing
        OWGUI.separator(self.controlArea)
        self.boxPostproc = QVGroupBox("Postprocessing", self.controlArea)
        labels = [x[0] for x in self.std]
        OWGUI.comboBox(self.boxPostproc, self, 'postStdMethod', label=None, labelWidth=None, orientation='vertical', items=labels, callback=self.selectionChange)
        self.postRobBtn = OWGUI.checkBox(self.boxPostproc, self, "postStdRob", "Robust standardization", callback=self.selectionChange)

        # output
        OWGUI.separator(self.controlArea)
        box = QVGroupBox("Output", self.controlArea)
        OWGUI.checkBox(box, self, 'commitOnChange', 'Commit data on selection change')
        self.commitBtn = OWGUI.button(box, self, "Commit", callback=self.selectionChange, disabled=1)

        self.setBtnsState()
        self.resize(100,100)
开发者ID:acopar,项目名称:orange-bio,代码行数:58,代码来源:OWProcessChipData.py

示例5: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager=None, name="dictyExpress"):
        OWWidget.__init__(self, parent, signalManager, name)
        self.outputs = [("Example table", ExampleTable)]
        self.serverToken = ""
        self.server = obiDicty.defaddress

        self.platform = None

        self.selectedExperiments = []
        self.buffer = obiDicty.CacheSQLite(bufferfile)

        self.searchString = ""
        self.excludeconstant = False
        
        box = OWGUI.widgetBox(self.controlArea, "Cache")
        OWGUI.button(box, self, "Clear cache", callback=self.clear_buffer)

        OWGUI.checkBox(self.controlArea, self, "excludeconstant", "Exclude labels with constant values" )

        OWGUI.button(self.controlArea, self, "&Commit", callback=self.Commit)
        box  = OWGUI.widgetBox(self.controlArea, "Server")
        OWGUI.lineEdit(box, self, "serverToken","Token", callback=self.Connect)
        OWGUI.rubber(self.controlArea)

        OWGUI.lineEdit(self.mainArea, self, "searchString", "Search", callbackOnType=True, callback=self.SearchUpdate)
        self.experimentsWidget = QTreeWidget()
        self.experimentsWidget.setHeaderLabels(["Strain", "Treatment", "Growth condition", "Platform", "N", "Chips"]) 
        self.experimentsWidget.setSelectionMode(QTreeWidget.ExtendedSelection)
        self.experimentsWidget.setRootIsDecorated(False)
        self.experimentsWidget.setSortingEnabled(True)
##        self.experimentsWidget.setAlternatingRowColors(True)

        self.mainArea.layout().addWidget(self.experimentsWidget)

        self.loadSettings()
        self.dbc = None        

        QTimer.singleShot(0, self.UpdateExperiments)        

        self.resize(800, 600)
开发者ID:JakaKokosar,项目名称:orange-bio,代码行数:42,代码来源:OWDicty.py

示例6: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager = None, name='Approximate Profiles'):
        self.callbackDeposit = [] # deposit for OWGUI callback functions
        OWWidget.__init__(self, parent, signalManager, name)

        self._data = None       # exampleTable
        self._dataN = None      # 2d numeric array
        self._chipdata = None       # [(dirname0, [et0, et1, ...]), ...]
        self._chipdataN = None      # 3d numeric array
        self.kernel = 0
        self.kernels = ["Orthogonal polynomials", "Trigonometric functions"]
        self.kernelSize = None
        self.kernelSizes = [    ["Const"] + map(lambda x: "degree <= %i"%x, range(1,99)),
                                ["Const", "cos x", "sin x"] + reduce(lambda x,y: x+[y[0],y[1]], map(lambda i: ("cos %ix"%i, "sin %ix"%i), range(2,99)), [])
                            ]
        self.useSignificance = 0
        self.alpha = 3
        self.alphas = [0.0001, 0.001, 0.01, 0.05, 0.1, 0.2, 0.5]
        self.commitOnChange = 1
               
        # Settings
        self.loadSettings()

        # GUI: info, comboKernelSize, cbUseSignificance, vboxSignificance, commitBtn
        # info
        box = QVGroupBox("Info", self.controlArea)
        self.infoa = QLabel("No examples on input", box)
        OWGUI.separator(box,250)
        self.infob = QLabel("No structured data on input", box)
        OWGUI.separator(self.controlArea)

        # kernel selection
        box = QVGroupBox("Kernel functions", self.controlArea)
        OWGUI.comboBox(box, self, "kernel", items=self.kernels, callback=self.kernelChange)
        OWGUI.separator(self.controlArea)

        # kernel settings
        box = QVGroupBox("Kernel settings", self.controlArea)
        self.comboKernelSize = OWGUI.comboBox(box, self, "kernelSize", callback=self.kernelSizeChange, label="Number of kernel functions", labelWidth=135, orientation="horizontal", valueType=int)
        self.comboKernelSize.setDisabled(1)
        self.cbUseSignificance = OWGUI.checkBox(box, self, "useSignificance", "Significance of coefficients (F-statistics)", callback=self.useSignificanceChange, tooltip="Use kernels with coefficients significantly different from 0.")
        self.vboxSignificance = QVBox(box)
        OWGUI.comboBox(self.vboxSignificance, self, "alpha", items = self.alphas, callback=self.alphaChange, label="p <", labelWidth=20, orientation="horizontal")
        OWGUI.separator(self.controlArea)

        # output
        box = QVGroupBox("Output", self.controlArea)
        OWGUI.checkBox(box, self, 'commitOnChange', 'Commit data on selection change')
        self.commitBtn = OWGUI.button(box, self, "Commit", callback=self.senddata, disabled=1)

        self.inputs = [("Examples", ExampleTable, self.data), ("Structured Data", DataFiles, self.chipdata)]
        self.outputs = [("Approximated Examples", ExampleTable, Default), ("Approximation Coefficients", ExampleTable), ("Approximated Structured Data", DataFiles, Default), ("Structured Approximation Coefficients", DataFiles)]
        self.resize(200,100)
开发者ID:acopar,项目名称:orange-bio,代码行数:54,代码来源:OWApproxProfiles.py

示例7: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager = None):
        OWWidget.__init__(self, parent, signalManager, 'Data Files Selector', wantMainArea = 0, resizingEnabled = 1)

        self.callbackDeposit = []

        self.inputs = [("Structured Data", DataFiles, self.onDataInput)]
        self.outputs = [("Examples", ExampleTable), ("Structured Data", DataFiles)]

        self.dataStructure = None
        self.datasets = None
        self.lastSentIds = []

        # Settings
        self.applyOnChange = 0
        self.loadSettings()

        # GUI
        # info
        box = OWGUI.widgetBox(self.controlArea, "Info", addSpace = True)
        self.infoa = OWGUI.widgetLabel(box, 'No data loaded.')
        self.infob = OWGUI.widgetLabel(box, '')
        self.infoc = OWGUI.widgetLabel(box, '')
            
        # LIST VIEW
        frmListView = OWGUI.widgetBox(self.controlArea, None, addSpace = True)
        self.tree = QTreeWidget(frmListView)
        self.tree.setSelectionMode(QAbstractItemView.MultiSelection)
        self.tree.setHeaderLabel("Directory/Data File")
        frmListView.layout().addWidget(self.tree)
        self.connect(self.tree,SIGNAL('itemSelectionChanged()'),self.selectionChanged)

        # Output
        box = OWGUI.widgetBox(self.controlArea, "Output", addSpace = True)
        OWGUI.checkBox(box, self, 'applyOnChange', 'Commit data on selection change')
        self.commitBtn = OWGUI.button(box, self, "Commit", callback=self.sendData, disabled=1)
        self.resize(300,600)
开发者ID:acopar,项目名称:orange-bio,代码行数:38,代码来源:OWDataFilesSelector.py

示例8: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
 def __init__(self, parent=None, signalManager=None, name="Normalize Expression Array"):
     OWWidget.__init__(self, parent, signalManager, name, wantGraph=True)
     
     self.inputs = [("Expression array", ExampleTable, self.setData)]
     self.outputs = [("Normalized expression array", ExampleTable, Default), ("Filtered expression array", ExampleTable)]
     
     self.selectedGroup = 0
     self.selectedCenterMethod = 0
     self.selectedMergeMethod = 0
     self.zCutoff = 1.96
     self.appendZScore = False
     self.appendRIValues = False
     self.autoCommit = False
     
     self.loadSettings()
     ## GUI
     self.infoBox = OWGUI.widgetLabel(OWGUI.widgetBox(self.controlArea, "Info", addSpace=True),
                                      "No data on input.")
     
     box = OWGUI.widgetBox(self.controlArea, "Split by", addSpace=True)
     self.groupCombo = OWGUI.comboBox(box, self, "selectedGroup", 
                                      callback=self.onGroupSelection
                                      )
     
     self.centerCombo = OWGUI.comboBox(self.controlArea, self, "selectedCenterMethod",
                                       box="Center Fold-change Using",
                                       items=[name for name, _ in self.CENTER_METHODS],
                                       callback=self.onCenterMethodChange,
                                       addSpace=True
                                       )
     
     self.mergeCombo = OWGUI.comboBox(self.controlArea, self, "selectedMergeMethod",
                                      box="Merge Replicates",
                                      items=[name for name, _ in self.MERGE_METHODS],
                                      tooltip="Select the method for replicate merging",
                                      callback=self.onMergeMethodChange,
                                      addSpace=True
                                      )
     
     box = OWGUI.doubleSpin(self.controlArea, self, "zCutoff", 0.0, 3.0, 0.01,
                            box="Z-Score Cutoff",
                            callback=[self.replotMA, self.commitIf])
     
     OWGUI.separator(self.controlArea)
     
     box = OWGUI.widgetBox(self.controlArea, "Ouput")
     OWGUI.checkBox(box, self, "appendZScore", "Append Z-Scores",
                    tooltip="Append calculated Z-Scores to output",
                    callback=self.commitIf
                    )
     
     OWGUI.checkBox(box, self, "appendRIValues", "Append Log Ratio and Intensity values",
                    tooltip="Append calculated Log Ratio and Intensity values to output data",
                    callback=self.commitIf
                    )
     
     cb = OWGUI.checkBox(box, self, "autoCommit", "Commit on change",
                    tooltip="Commit data on any change",
                    callback=self.commitIf
                    )
     
     b = OWGUI.button(box, self, "Commit", callback=self.commit)
     OWGUI.setStopper(self, b, cb, "changedFlag", callback=self.commit)
     
     self.connect(self.graphButton, SIGNAL("clicked()"), self.saveGraph)
     
     OWGUI.rubber(self.controlArea)
     self.graph = OWGraph(self.mainArea)
     self.graph.setAxisTitle(QwtPlot.xBottom, "Intensity: log<sub>10</sub>(R*G)")
     self.graph.setAxisTitle(QwtPlot.yLeft, "Log ratio: log<sub>2</sub>(R/G)")
     self.graph.showFilledSymbols = True
     self.mainArea.layout().addWidget(self.graph)
     self.groups = []
     self.split_data = None, None
     self.merged_splits = None, None
     self.centered = None, None
     self.changedFlag = False
     self.data = None
     
     self.resize(800, 600)
开发者ID:JakaKokosar,项目名称:orange-bio,代码行数:82,代码来源:OWMAPlot.py

示例9: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager=None, name=" GEO Data Sets"):
        OWWidget.__init__(self, parent, signalManager, name)

        self.selectionChanged = False
        self.filterString = ""
        self.datasetName = ""

        ## GUI
        box = gui.widgetBox(self.controlArea, "Info", addSpace=True)
        self.infoBox = gui.widgetLabel(box, "Initializing\n\n")

        box = gui.widgetBox(self.controlArea, "Output", addSpace=True)
        gui.radioButtonsInBox(box, self, "outputRows",
                              ["Genes in rows", "Samples in rows"], "Rows",
                              callback=self.commitIf)

        gui.checkBox(box, self, "mergeSpots", "Merge spots of same gene",
                     callback=self.commitIf)

        gui.separator(box)
        self.nameEdit = gui.lineEdit(
            box, self, "datasetName", "Data set name",
            tooltip="Override the default output data set name",
            callback=self.onNameEdited
        )
        self.nameEdit.setPlaceholderText("")

        if sys.version_info < (3, ):
            box = gui.widgetBox(self.controlArea, "Commit", addSpace=True)
            self.commitButton = gui.button(
                box, self, "Commit", callback=self.commit)
            cb = gui.checkBox(box, self, "autoCommit", "Commit on any change")
            gui.setStopper(self, self.commitButton, cb, "selectionChanged",
                           self.commit)
        else:
            gui.auto_commit(self.controlArea, self, "autoCommit", "Commit",
                            box="Commit")
            self.commitIf = self.commit

        gui.rubber(self.controlArea)

        gui.widgetLabel(self.mainArea, "Filter")
        self.filterLineEdit = QLineEdit(
            textChanged=self.filter
        )
        self.completer = TokenListCompleter(
            self, caseSensitivity=Qt.CaseInsensitive
        )
        self.filterLineEdit.setCompleter(self.completer)

        self.mainArea.layout().addWidget(self.filterLineEdit)

        splitter = QSplitter(Qt.Vertical, self.mainArea)
        self.mainArea.layout().addWidget(splitter)
        self.treeWidget = QTreeView(splitter)

        self.treeWidget.setSelectionMode(QTreeView.SingleSelection)
        self.treeWidget.setRootIsDecorated(False)
        self.treeWidget.setSortingEnabled(True)
        self.treeWidget.setAlternatingRowColors(True)
        self.treeWidget.setUniformRowHeights(True)
        self.treeWidget.setEditTriggers(QTreeView.NoEditTriggers)

        linkdelegate = LinkStyledItemDelegate(self.treeWidget)
        self.treeWidget.setItemDelegateForColumn(1, linkdelegate)
        self.treeWidget.setItemDelegateForColumn(8, linkdelegate)
        self.treeWidget.setItemDelegateForColumn(
            0, gui.IndicatorItemDelegate(self.treeWidget,
                                         role=Qt.DisplayRole))

        proxyModel = MySortFilterProxyModel(self.treeWidget)
        self.treeWidget.setModel(proxyModel)
        self.treeWidget.selectionModel().selectionChanged.connect(
            self.updateSelection
        )
        self.treeWidget.viewport().setMouseTracking(True)

        splitterH = QSplitter(Qt.Horizontal, splitter)

        box = gui.widgetBox(splitterH, "Description")
        self.infoGDS = gui.widgetLabel(box, "")
        self.infoGDS.setWordWrap(True)
        gui.rubber(box)

        box = gui.widgetBox(splitterH, "Sample Annotations")
        self.annotationsTree = QTreeWidget(box)
        self.annotationsTree.setHeaderLabels(
            ["Type (Sample annotations)", "Sample count"]
        )
        self.annotationsTree.setRootIsDecorated(True)
        box.layout().addWidget(self.annotationsTree)
        self.annotationsTree.itemChanged.connect(
            self.annotationSelectionChanged
        )
        self._annotationsUpdating = False
        self.splitters = splitter, splitterH

        for sp, setting in zip(self.splitters, self.splitterSettings):
            sp.splitterMoved.connect(self.splitterMoved)
            sp.restoreState(setting)
#.........这里部分代码省略.........
开发者ID:JakaKokosar,项目名称:orange-bio,代码行数:103,代码来源:OWGEODatasets.py

示例10: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager=None, name="Vulcano Plot"):
        OWWidget.__init__(self, parent, signalManager, name, wantGraph=True)

        self.inputs = [("Examples", ExampleTable, self.setData)]
        self.outputs = [("Examples with selected attributes", ExampleTable)]

        self.genes_in_columns = False

        self.showXTitle = True
        self.showYTitle = True

        self.auto_commit = False
        self.selection_changed_flag = False
        self.target_group = None, []
        self.label_selections = []

        self.graph = VulcanoGraph(self)
        self.connect(self.graph, SIGNAL("selectionChanged()"),
                     self.on_selection_changed)
        self.mainArea.layout().addWidget(self.graph)

        self.loadSettings()

        ## GUI
        box = OWGUI.widgetBox(self.controlArea, "Info")
        self.infoLabel = OWGUI.label(box, self, "")
        self.infoLabel.setText("No data on input")
        self.infoLabel2 = OWGUI.label(box, self, "")
        self.infoLabel2.setText("0 selected genes")
        
        box = OWGUI.widgetBox(self.controlArea, "Target Labels")
        
        self.target_widget = LabelSelectionWidget(self)
        self.connect(self.target_widget,
                     SIGNAL("selection_changed(PyQt_PyObject, PyQt_PyObject)"),
                     self.on_target_changed)
        self.connect(self.target_widget,
                     SIGNAL("label_activated(int)"),
                     self.on_label_activated)
        
        box.layout().addWidget(self.target_widget)
        
        self.genesInColumnsCheck = OWGUI.checkBox(box, self, "genes_in_columns",
                                    "Genes in columns", 
                                    callback=[self.init_from_data, self.plot])

        box = OWGUI.widgetBox(self.controlArea, "Settings")
        OWGUI.hSlider(box, self, "graph.symbolSize", label="Symbol size:   ", minValue=2, maxValue=20, step=1, callback = self.graph.updateSymbolSize)
        OWGUI.checkBox(box, self, "showXTitle", "X axis title", callback=self.setAxesTitles)
        OWGUI.checkBox(box, self, "showYTitle", "Y axis title", callback=self.setAxesTitles)
        
        toolbar = ZoomSelectToolbar(self, self.controlArea, self.graph, buttons=[ZoomSelectToolbar.IconSelect, ZoomSelectToolbar.IconZoom, ZoomSelectToolbar.IconPan])
        
        top_layout = toolbar.layout()
        top_layout.setDirection(QBoxLayout.TopToBottom)
        button_layotu = QHBoxLayout()
        top_layout.insertLayout(0, button_layotu)
        
        for i in range(1, top_layout.count()):
            item = top_layout.itemAt(1)
            top_layout.removeItem(item)
            button_layotu.addItem(item)
        
        OWGUI.checkBox(toolbar, self, "graph.symetricSelections", "Symetric selection", callback=self.graph.reselect)

        box = OWGUI.widgetBox(self.controlArea, "Commit")
        b = OWGUI.button(box, self, "Commit", callback=self.commit, default=True)
        cb = OWGUI.checkBox(box, self, "auto_commit", "Commit automatically")
        OWGUI.setStopper(self, b, cb, "selection_changed_flag", self.commit_if)

        self.connect(self.graphButton, SIGNAL("clicked()"), self.graph.saveToFile)
        
        OWGUI.rubber(self.controlArea)

        self.data = None
        self.target_group = None, []
        self.current_selection = []

        self.graph.reselect(True)
        self.resize(800, 600)
开发者ID:JakaKokosar,项目名称:orange-bio,代码行数:82,代码来源:OWVulcanoPlot.py

示例11: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager=None, title="Expression Profile Distances"):
        OWWidget.__init__(self, parent, signalManager, title)

        self.inputs = [("Example Table", ExampleTable, self.set_data)]
        self.outputs = [("Distances", Orange.core.SymMatrix), ("Sorted Example Table", ExampleTable)]

        self.distance_measure = 0
        self.auto_commit = False
        self.changed_flag = False

        self.loadSettings()

        ########
        # GUI
        ########

        self.info_box = OWGUI.widgetLabel(
            OWGUI.widgetBox(self.controlArea, "Input", addSpace=True), "No data on input\n"
        )

        box = OWGUI.widgetBox(self.controlArea, "Separate By", addSpace=True)
        self.separate_view = QListView()
        self.separate_view.setSelectionMode(QListView.MultiSelection)
        box.layout().addWidget(self.separate_view)

        box = OWGUI.widgetBox(self.controlArea, "Sort By", addSpace=True)
        self.relevant_view = QListView()
        self.relevant_view.setSelectionMode(QListView.MultiSelection)
        box.layout().addWidget(self.relevant_view)

        self.distance_view = OWGUI.comboBox(
            self.controlArea,
            self,
            "distance_measure",
            box="Distance Measure",
            items=[d[0] for d in self.DISTANCE_FUNCTIONS],
        )

        OWGUI.rubber(self.controlArea)

        box = OWGUI.widgetBox(self.controlArea, "Commit")
        cb = OWGUI.checkBox(
            box,
            self,
            "auto_commit",
            "Commit on any change",
            tooltip="Compute and send the distances on any change.",
            callback=self.commit_if,
        )

        b = OWGUI.button(
            box,
            self,
            "Commit",
            tooltip="Compute the distances and send the output signals.",
            callback=self.commit,
            default=True,
        )

        OWGUI.setStopper(self, b, cb, "changed_flag", callback=self.commit)

        self.groups_box = OWGUI.widgetBox(self.mainArea, "Groups")
        self.groups_scroll_area = QScrollArea()
        self.groups_box.layout().addWidget(self.groups_scroll_area)

        self.data = None
        self.partitions = []
        self.matrix = None
        self.split_groups = []
        self._disable_updates = False

        self.resize(800, 600)
开发者ID:pombredanne,项目名称:orange-bio,代码行数:74,代码来源:OWGenotypeDistances.py

示例12: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager=None):
        OWWidget.__init__(self, parent, signalManager, "Parallel Coordinates", True)

        #add a graph widget
        self.graph = OWParallelGraph(self, self.mainArea)
        self.mainArea.layout().addWidget(self.graph)

        self.showAllAttributes = 0

        self.inputs = [("Data", ExampleTable, self.setData, Default),
                       ("Data Subset", ExampleTable, self.setSubsetData),
                       ("Features", AttributeList, self.setShownAttributes)]
        self.outputs = [("Selected Data", ExampleTable),
                        ("Other Data", ExampleTable),
                        ("Features", AttributeList)]

        #set default settings
        self.data = None
        self.subsetData = None
        self.autoSendSelection = 1
        self.attrDiscOrder = "Unordered"
        self.attrContOrder = "Unordered"
        self.projections = None
        self.correlationDict = {}
        self.middleLabels = "Correlations"
        self.attributeSelectionList = None
        self.toolbarSelection = 0
        self.colorSettings = None
        self.selectedSchemaIndex = 0

        self.graph.jitterSize = 10
        self.graph.showDistributions = 1
        self.graph.showStatistics = 0
        self.graph.showAttrValues = 1
        self.graph.useSplines = 0
        self.graph.enabledLegend = 1

        #load settings
        self.loadSettings()

        #GUI
        self.tabs = OWGUI.tabWidget(self.controlArea)
        self.GeneralTab = OWGUI.createTabPage(self.tabs, "Main")
        self.SettingsTab = OWGUI.createTabPage(self.tabs, "Settings")

        self.createShowHiddenLists(self.GeneralTab, callback=self.updateGraph)
        self.connect(self.shownAttribsLB, SIGNAL('itemDoubleClicked(QListWidgetItem*)'), self.flipAttribute)

        self.optimizationDlg = ParallelOptimization(self, signalManager=self.signalManager)
        self.optimizationDlgButton = OWGUI.button(self.GeneralTab, self, "Optimization Dialog",
                                                  callback=self.optimizationDlg.reshow, debuggingEnabled=0)

        self.zoomSelectToolbar = OWToolbars.ZoomSelectToolbar(self, self.GeneralTab, self.graph, self.autoSendSelection,
                                                              buttons=(1, 2, 0, 7, 8))
        self.connect(self.zoomSelectToolbar.buttonSendSelections, SIGNAL("clicked()"), self.sendSelections)

        #connect controls to appropriate functions
        self.connect(self.graphButton, SIGNAL("clicked()"), self.graph.saveToFile)

        # ####################################
        # SETTINGS functionality
        box = OWGUI.widgetBox(self.SettingsTab, "Transparency")
        OWGUI.hSlider(box, self, 'graph.alphaValue', label="Examples: ", minValue=0, maxValue=255, step=10,
                      callback=self.updateGraph, tooltip="Alpha value used for drawing example lines")
        OWGUI.hSlider(box, self, 'graph.alphaValue2', label="Rest:     ", minValue=0, maxValue=255, step=10,
                      callback=self.updateGraph, tooltip="Alpha value used to draw statistics, example subsets, ...")

        box = OWGUI.widgetBox(self.SettingsTab, "Jittering Options")
        OWGUI.comboBox(box, self, "graph.jitterSize", label='Jittering size (% of size):  ', orientation='horizontal',
                       callback=self.setJitteringSize, items=self.jitterSizeNums, sendSelectedValue=1, valueType=float)

        # visual settings
        box = OWGUI.widgetBox(self.SettingsTab, "Visual Settings")

        OWGUI.checkBox(box, self, 'graph.showAttrValues', 'Show attribute values', callback=self.updateGraph)
        OWGUI.checkBox(box, self, 'graph.useAntialiasing', 'Use antialiasing', callback=self.updateGraph)
        OWGUI.checkBox(box, self, 'graph.useSplines', 'Show splines', callback=self.updateGraph,
                       tooltip="Show lines using splines")
        OWGUI.checkBox(box, self, 'graph.enabledLegend', 'Show legend', callback=self.updateGraph)

        box = OWGUI.widgetBox(self.SettingsTab, "Axis Distance")
        resizeColsBox = OWGUI.widgetBox(box, 0, "horizontal", 0)
        OWGUI.label(resizeColsBox, self, "Increase/decrease distance: ")
        OWGUI.toolButton(resizeColsBox, self, "+", callback=self.increaseAxesDistance,
                         tooltip="Increase the distance between the axes", width=30, height=20)
        OWGUI.toolButton(resizeColsBox, self, "-", callback=self.decreaseAxesDistance,
                         tooltip="Decrease the distance between the axes", width=30, height=20)
        OWGUI.rubber(resizeColsBox)
        OWGUI.checkBox(box, self, "graph.autoUpdateAxes", "Auto scale X axis",
                       tooltip="Auto scale X axis to show all visualized attributes", callback=self.updateGraph)

        box = OWGUI.widgetBox(self.SettingsTab, "Statistical Information")
        OWGUI.comboBox(box, self, "graph.showStatistics", label="Statistics: ", orientation="horizontal", labelWidth=90,
                       items=["No statistics", "Means, deviations", "Median, quartiles"], callback=self.updateGraph,
                       sendSelectedValue=0, valueType=int)
        OWGUI.comboBox(box, self, "middleLabels", label="Middle labels: ", orientation="horizontal", labelWidth=90,
                       items=["No labels", "Correlations", "VizRank"], callback=self.updateGraph,
                       tooltip="The information do you wish to view on top in the middle of coordinate axes",
                       sendSelectedValue=1, valueType=str)
        OWGUI.checkBox(box, self, 'graph.showDistributions', 'Show distributions', callback=self.updateGraph,
#.........这里部分代码省略.........
开发者ID:AutumnLight,项目名称:orange,代码行数:103,代码来源:OWParallelCoordinates.py

示例13: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager=None, title="Gene Network"):
        super(OWGeneNetwork, self).__init__(
            parent, signalManager, title, wantMainArea=False,
            resizingEnabled=False
        )

        self.taxid = "9606"
        self.gene_var_index = -1
        self.use_attr_names = False
        self.network_source = 1
        self.include_neighborhood = True
        self.autocommit = False
        self.min_score = 0.9
        self.loadSettings()

        self.taxids = taxonomy.common_taxids()
        self.current_taxid_index = self.taxids.index(self.taxid)

        self.data = None
        self.geneinfo = None
        self.nettask = None
        self._invalidated = False

        box = OWGUI.widgetBox(self.controlArea, "Info")
        self.info = OWGUI.widgetLabel(box, "No data on input\n")

        box = OWGUI.widgetBox(self.controlArea, "Organism")
        self.organism_cb = OWGUI.comboBox(
            box, self, "current_taxid_index",
            items=map(taxonomy.name, self.taxids),
            callback=self._update_organism
        )
        box = OWGUI.widgetBox(self.controlArea, "Genes")
        self.genes_cb = OWGUI.comboBox(
            box, self, "gene_var_index", callback=self._update_query_genes
        )
        self.varmodel = OWItemModels.VariableListModel()
        self.genes_cb.setModel(self.varmodel)

        OWGUI.checkBox(
            box, self, "use_attr_names",
            "Use attribute names",
            callback=self._update_query_genes
        )

        box = OWGUI.widgetBox(self.controlArea, "Network")
        OWGUI.comboBox(
            box, self, "network_source",
            items=[s.name for s in SOURCES],
            callback=self._on_source_db_changed
        )
        OWGUI.checkBox(
            box, self, "include_neighborhood",
            "Include immediate gene neighbors",
            callback=self.invalidate
        )
        self.score_spin = OWGUI.doubleSpin(
            box, self, "min_score", 0.0, 1.0, step=0.001,
            label="Minimal edge score",
            callback=self.invalidate
        )
        self.score_spin.setEnabled(SOURCES[self.network_source].score_filter)

        box = OWGUI.widgetBox(self.controlArea, "Commit")
        OWGUI.button(box, self, "Commit", callback=self.commit, default=True)

        self.executor = ThreadExecutor()
开发者ID:acopar,项目名称:orange-bio,代码行数:69,代码来源:OWGeneNetwork.py

示例14: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager = None, name='GSEA'):
        OWWidget.__init__(self, parent, signalManager, name)

        self.inputs = [("Examples", ExampleTable, self.setData)]
        self.outputs = [("Examples with selected genes only", ExampleTable), ("Results", ExampleTable), ("Distance Matrix", orange.SymMatrix) ]

        self.res = None
        self.dm = None
        
        self.name = 'GSEA'
        self.minSubsetSize = 3
        self.minSubsetSizeC = True
        self.maxSubsetSize = 1000
        self.maxSubsetSizeC = True
        self.minSubsetPart = 10
        self.minSubsetPartC = True
        self.perms = 100
        self.csgm = False
        self.gsgo = False
        self.gskegg = False
        self.buildDistances = False
        self.selectedPhenVar = 0
        self.organismIndex = 0
        self.atLeast = 3

        self.permutationTypes =  [("Phenotype", "p"),("Gene", "g") ]
        self.ptype = 0

        self.correlationTypes = [ ("Signal2Noise", "s2n") ]
        self.ctype = 0
        
        self.data = None
        self.geneSets = {}

        self.tabs = OWGUI.tabWidget(self.controlArea)

        ca = OWGUI.createTabPage(self.tabs, "Basic")

        box = OWGUI.widgetBox(ca, 'Organism')
        #FROM KEGG WIDGET - organism selection
        self.organismTaxids = []
        self.organismComboBox = cb = OWGUI.comboBox(box, self, "organismIndex", items=[], debuggingEnabled=0) #changed
        cb.setMaximumWidth(200)

        #OWGUI.checkBox(box, self, "csgm", "Case sensitive gene matching")

        box2 = OWGUI.widgetBox(ca, "Descriptors")
        self.phenCombo = OWGUI.comboBox(box2, self, "selectedPhenVar", items=[], callback=self.phenComboChange, label="Phenotype:")
        self.geneCombo = OWGUI.comboBox(box2, self, "selectedGeneVar", items=[], label = "Gene:")

        self.allowComboChangeCallback = False

        ma = self.mainArea

        self.listView = QTreeWidget(ma)
        ma.layout().addWidget(self.listView)
        self.listView.setAllColumnsShowFocus(1)
        self.listView.setColumnCount(9)
        self.listView.setHeaderLabels(["Collection", "Geneset", "NES", "ES", "P-value", "FDR", "Size", "Matched Size", "Genes"])
        
        self.listView.header().setStretchLastSection(True)
        self.listView.header().setClickable(True)
        self.listView.header().setSortIndicatorShown(True)
        self.listView.setSortingEnabled(True)
        #self.listView.header().setResizeMode(0, QHeaderView.Stretch)
        
        self.listView.setSelectionMode(QAbstractItemView.NoSelection)
        self.connect(self.listView, SIGNAL("itemSelectionChanged()"), self.newPathwaySelected)

        OWGUI.separator(ca)

        OWGUI.widgetLabel(ca, "Phenotype selection:")
        self.psel = PhenotypesSelection(ca)
        
        self.resize(600,50)
 
        OWGUI.separator(ca)

        OWGUI.checkBox(ca, self, "buildDistances", "Compute geneset distances")

        self.btnApply = OWGUI.button(ca, self, "&Compute", callback = self.compute, disabled=0)
        
        fileBox = OWGUI.widgetBox(ca, orientation='horizontal')
        OWGUI.button(fileBox, self, "Load", callback = self.loadData, disabled=0, debuggingEnabled=0)
        OWGUI.button(fileBox, self, "Save", callback = self.saveData, disabled=0, debuggingEnabled=0)
 
        #ca.layout().addStretch(1)

        ca = OWGUI.createTabPage(self.tabs, "Gene sets")
        
        box = OWGUI.widgetBox(ca)

        self.gridSel = []
        self.geneSel = []  #FIXME temporary disabled - use the same as in new "David" widget
        self.lbgs = OWGUI.listBox(box, self, "gridSel", "geneSel", selectionMode = QListWidget.MultiSelection)
        OWGUI.button(box, self, "From &File", callback = self.addCollection, disabled=0, debuggingEnabled=0)

        box = OWGUI.widgetBox(box, "Additional sources:")
        OWGUI.checkBox(box, self, "gskegg", "KEGG pathways")
        OWGUI.checkBox(box, self, "gsgo", "GO terms")
#.........这里部分代码省略.........
开发者ID:JakaKokosar,项目名称:orange-bio,代码行数:103,代码来源:OWGsea.py

示例15: __init__

# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import button [as 别名]
    def __init__(self, parent=None, signalManager=None,
                 name="Databases update"):
        OWWidget.__init__(self, parent, signalManager, name,
                          wantMainArea=False)

        self.searchString = ""

        fbox = gui.widgetBox(self.controlArea, "Filter")
        self.completer = TokenListCompleter(
            self, caseSensitivity=Qt.CaseInsensitive)
        self.lineEditFilter = QLineEdit(textChanged=self.SearchUpdate)
        self.lineEditFilter.setCompleter(self.completer)

        fbox.layout().addWidget(self.lineEditFilter)

        box = gui.widgetBox(self.controlArea, "Files")

        self.filesView = QTreeWidget(self)
        self.filesView.setHeaderLabels(
            ["", "Data Source", "Update", "Last Updated", "Size"])

        self.filesView.setRootIsDecorated(False)
        self.filesView.setUniformRowHeights(True)
        self.filesView.setSelectionMode(QAbstractItemView.NoSelection)
        self.filesView.setSortingEnabled(True)
        self.filesView.sortItems(1, Qt.AscendingOrder)
        self.filesView.setItemDelegateForColumn(
            0, UpdateOptionsItemDelegate(self.filesView))

        self.filesView.model().layoutChanged.connect(self.SearchUpdate)

        box.layout().addWidget(self.filesView)

        box = gui.widgetBox(self.controlArea, orientation="horizontal")
        self.updateButton = gui.button(
            box, self, "Update all",
            callback=self.UpdateAll,
            tooltip="Update all updatable files",
         )

        self.downloadButton = gui.button(
            box, self, "Download all",
            callback=self.DownloadFiltered,
            tooltip="Download all filtered files shown"
        )

        self.cancelButton = gui.button(
            box, self, "Cancel", callback=self.Cancel,
            tooltip="Cancel scheduled downloads/updates."
        )

        self.retryButton = gui.button(
            box, self, "Reconnect", callback=self.RetrieveFilesList
        )
        self.retryButton.hide()

        gui.rubber(box)
        self.warning(0)

        box = gui.widgetBox(self.controlArea, orientation="horizontal")
        gui.rubber(box)

        self.infoLabel = QLabel()
        self.infoLabel.setAlignment(Qt.AlignCenter)

        self.controlArea.layout().addWidget(self.infoLabel)
        self.infoLabel.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)

        self.updateItems = []

        self.resize(800, 600)

        self.progress = ProgressState(self, maximum=3)
        self.progress.valueChanged.connect(self._updateProgress)
        self.progress.rangeChanged.connect(self._updateProgress)
        self.executor = ThreadExecutor(
            threadPool=QThreadPool(maxThreadCount=2)
        )

        task = Task(self, function=self.RetrieveFilesList)
        task.exceptionReady.connect(self.HandleError)
        task.start()

        self._tasks = []
        self._haveProgress = False
开发者ID:JakaKokosar,项目名称:orange-bio,代码行数:87,代码来源:OWDatabasesUpdate.py


注:本文中的Orange.OrangeWidgets.OWGUI.button方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。