Exemplo n.º 1
0
    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)

        self.searchKeys = [
            "dataset_id", "title", "platform_organism", "description"
        ]

        self.gds = []
        self.gds_info = None

        self.resize(1000, 600)

        self.setBlocking(True)
        self.setEnabled(False)
        self.progressBarInit()

        self._executor = ThreadExecutor()

        func = partial(get_gds_model,
                       methodinvoke(self, "_setProgress", (float, )))
        self._inittask = Task(function=func)
        self._inittask.finished.connect(self._initializemodel)
        self._executor.submit(self._inittask)

        self._datatask = None
Exemplo n.º 2
0
    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)

        self.searchKeys = ["dataset_id", "title", "platform_organism",
                           "description"]

        self.gds = []
        self.gds_info = None

        self.resize(1000, 600)

        self.setBlocking(True)
        self.setEnabled(False)
        self.progressBarInit()

        self._executor = ThreadExecutor()

        func = partial(get_gds_model,
                       methodinvoke(self, "_setProgress", (float,)))
        self._inittask = Task(function=func)
        self._inittask.finished.connect(self._initializemodel)
        self._executor.submit(self._inittask)

        self._datatask = None
Exemplo n.º 3
0
    def __init__(self, parent=None, signalManager=None, name=" GEO Data Sets"):
        OWWidget.__init__(self, parent, signalManager, name)

        self.outputs = [("Expression Data", ExampleTable)]

        ## Settings
        self.selectedAnnotation = 0
        self.includeIf = False
        self.minSamples = 3
        self.autoCommit = False
        self.outputRows = 0
        self.mergeSpots = True
        self.filterString = ""
        self.currentGds = None
        self.selectionChanged = False
        self.autoCommit = False
        self.gdsSelectionStates = {}
        self.splitterSettings = [
            '\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x01\xea\x00\x00\x00\xd7\x01\x00\x00\x00\x07\x01\x00\x00\x00\x02',
            '\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x01\xb5\x00\x00\x02\x10\x01\x00\x00\x00\x07\x01\x00\x00\x00\x01'
        ]
        self.datasetNames = {}
        self.loadSettings()

        self.datasetName = ""

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

        box = OWGUI.widgetBox(self.controlArea, "Output", addSpace=True)
        OWGUI.radioButtonsInBox(box, self, "outputRows",
                                ["Genes or spots", "Samples"], "Rows",
                                callback=self.commitIf)
        OWGUI.checkBox(box, self, "mergeSpots", "Merge spots of same gene",
                       callback=self.commitIf)

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

        box = OWGUI.widgetBox(self.controlArea, "Commit", addSpace=True)
        self.commitButton = OWGUI.button(box, self, "Commit",
                                         callback=self.commit)
        cb = OWGUI.checkBox(box, self, "autoCommit", "Commit on any change")
        OWGUI.setStopper(self, self.commitButton, cb, "selectionChanged",
                         self.commit)
        OWGUI.rubber(self.controlArea)

        self.filterLineEdit = OWGUIEx.lineEditHint(
            self.mainArea, self, "filterString", "Filter",
            caseSensitive=False, matchAnywhere=True,
            callback=self.filter,  delimiters=" ")

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

        self.treeWidget.setSelectionMode(QAbstractItemView.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, OWGUI.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 = OWGUI.widgetBox(splitterH, "Description")
        self.infoGDS = OWGUI.widgetLabel(box, "")
        self.infoGDS.setWordWrap(True)
        OWGUI.rubber(box)

        box = OWGUI.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)

        self.searchKeys = ["dataset_id", "title", "platform_organism",
                           "description"]

        self.gds = []
        self.gds_info = None

        self.resize(1000, 600)

        self.setBlocking(True)
        self.setEnabled(False)
        self.progressBarInit()

        self._executor = ThreadExecutor()

        func = partial(get_gds_model,
                       methodinvoke(self, "_setProgress", (float,)))
        self._inittask = Task(function=func)
        self._inittask.finished.connect(self._initializemodel)
        self._executor.submit(self._inittask)

        self._datatask = None
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
    def __init__(self, parent=None, signalManager=None, name=" GEO Data Sets"):
        OWWidget.__init__(self, parent, signalManager, name)

        self.outputs = [("Expression Data", ExampleTable)]

        ## Settings
        self.selectedAnnotation = 0
        self.includeIf = False
        self.minSamples = 3
        self.autoCommit = False
        self.outputRows = 1
        self.mergeSpots = True
        self.filterString = ""
        self.currentGds = None
        self.selectionChanged = False
        self.autoCommit = False
        self.gdsSelectionStates = {}
        self.splitterSettings = [
            '\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x01\xea\x00\x00\x00\xd7\x01\x00\x00\x00\x07\x01\x00\x00\x00\x02',
            '\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x01\xb5\x00\x00\x02\x10\x01\x00\x00\x00\x07\x01\x00\x00\x00\x01'
        ]
        self.datasetNames = {}
        self.loadSettings()

        self.datasetName = ""

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

        box = OWGUI.widgetBox(self.controlArea, "Output", addSpace=True)
        OWGUI.radioButtonsInBox(box, self, "outputRows",
                                ["Genes in rows", "Samples in rows"], "Rows",
                                callback=self.commitIf)
        OWGUI.checkBox(box, self, "mergeSpots", "Merge spots of same gene",
                       callback=self.commitIf)

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

        box = OWGUI.widgetBox(self.controlArea, "Commit", addSpace=True)
        self.commitButton = OWGUI.button(box, self, "Commit",
                                         callback=self.commit)
        cb = OWGUI.checkBox(box, self, "autoCommit", "Commit on any change")
        OWGUI.setStopper(self, self.commitButton, cb, "selectionChanged",
                         self.commit)
        OWGUI.rubber(self.controlArea)

        self.filterLineEdit = OWGUIEx.lineEditHint(
            self.mainArea, self, "filterString", "Filter",
            caseSensitive=False, matchAnywhere=True,
            callback=self.filter,  delimiters=" ")

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

        self.treeWidget.setSelectionMode(QAbstractItemView.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, OWGUI.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 = OWGUI.widgetBox(splitterH, "Description")
        self.infoGDS = OWGUI.widgetLabel(box, "")
        self.infoGDS.setWordWrap(True)
        OWGUI.rubber(box)

        box = OWGUI.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)

        self.searchKeys = ["dataset_id", "title", "platform_organism",
                           "description"]

        self.gds = []
        self.gds_info = None

        self.resize(1000, 600)

        self.setBlocking(True)
        self.setEnabled(False)
        self.progressBarInit()

        self._executor = ThreadExecutor()

        func = partial(get_gds_model,
                       methodinvoke(self, "_setProgress", (float,)))
        self._inittask = Task(function=func)
        self._inittask.finished.connect(self._initializemodel)
        self._executor.submit(self._inittask)

        self._datatask = None
Exemplo n.º 6
0
    def __init__(self, parent=None, signalManager = None):
#        self.callbackDeposit = [] # deposit for OWGUI callback functions
        OWWidget.__init__(self, parent, signalManager, 'Expression Profiles', 1)

        #set default settings
        self.ShowAverageProfile = 1
        self.ShowSingleProfiles = 0
        self.PointWidth = 2
        self.CurveWidth = 1
        self.AverageCurveWidth = 4
        self.BoxPlotWidth = 2
        self.SelectedClasses = []
        self.Classes = []
        self.autoSendSelected = 0
        self.selectionChangedFlag = False

        self.CutLow = 0; self.CutHigh = 0; self.CutEnabled = 0
        
        self.profileLabel = None

        #load settings
        self.loadSettings()

        # GUI
        self.graph = profilesGraph(self, self.mainArea, "")
        self.mainArea.layout().addWidget(self.graph)
        self.graph.hide()
        self.connect(self.graphButton, SIGNAL("clicked()"), self.graph.saveToFile)

        # GUI definition
        self.tabs = OWGUI.tabWidget(self.space)

        # GRAPH TAB
        GraphTab = OWGUI.createTabPage(self.tabs, "Graph")

        ## display options
        self.infoLabel = OWGUI.widgetLabel(OWGUI.widgetBox(GraphTab, "Info"), "No data on input.")
        displayOptBox = OWGUI.widgetBox(GraphTab, "Display") #QVButtonGroup("Display", GraphTab)
        displayOptButtons = ['Majority Class', 'Majority Class Probability', 'Target Class Probability', 'Number of Instances']
        OWGUI.checkBox(displayOptBox, self, 'ShowSingleProfiles', 'Expression Profiles', tooltip='', callback=self.updateShowSingleProfiles)
        OWGUI.checkBox(displayOptBox, self, 'ShowAverageProfile', 'Box Plot', tooltip='', callback=self.updateShowAverageProfile)

        ## class selection (classQLB)
        self.classQVGB = OWGUI.widgetBox(GraphTab, "Classes") #QVGroupBox(GraphTab)
##        self.classQVGB.setTitle("Classes")
        self.classQLB = OWGUI.listBox(self.classQVGB, self, "SelectedClasses", "Classes", selectionMode=QListWidget.MultiSelection, callback=self.classSelectionChange) #QListBox(self.classQVGB)
##        self.classQLB.setSelectionMode(QListBox.Multi)
        self.unselectAllClassedQLB = OWGUI.button(self.classQVGB, self, "Unselect all", callback=self.SUAclassQLB) #QPushButton("(Un)Select All", self.classQVGB)
##        self.connect(self.unselectAllClassedQLB, SIGNAL("clicked()"), self.SUAclassQLB)
##        self.connect(self.classQLB, SIGNAL("selectionChanged()"), self.classSelectionChange)

        ## show single/average profile
##        self.showAverageQLB = QPushButton("Box Plot", self.classQVGB)
##        self.showAverageQLB.setToggleButton(1)
##        self.showAverageQLB.setOn(self.ShowAverageProfile)
##        self.showSingleQLB = QPushButton("Single Profiles", self.classQVGB)
##        self.showSingleQLB.setToggleButton(1)
##        self.showSingleQLB.setOn(self.ShowSingleProfiles)
##        self.connect(self.showAverageQLB, SIGNAL("toggled(bool)"), self.updateShowAverageProfile)
##        self.connect(self.showSingleQLB, SIGNAL("toggled(bool)"), self.updateShowSingleProfiles)

##        self.tabs.insertTab(GraphTab, "Graph")

        # SETTINGS TAB
        SettingsTab = OWGUI.createTabPage(self.tabs, "Settings") #QVGroupBox(self)

        self.profileLabelComboBox = OWGUI.comboBox(SettingsTab, self, 'profileLabel', 'Profile Labels', sendSelectedValue=True, valueType=str)
        OWGUI.hSlider(SettingsTab, self, 'PointWidth', box='Point Width', minValue=0, maxValue=9, step=1, callback=self.updatePointWidth, ticks=1)
        OWGUI.hSlider(SettingsTab, self, 'CurveWidth', box='Profile Width', minValue=1, maxValue=9, step=1, callback=self.updateCurveWidth, ticks=1)
        OWGUI.hSlider(SettingsTab, self, 'AverageCurveWidth', box='Average Profile Width', minValue=1, maxValue=9, step=1, callback=self.updateAverageCurveWidth, ticks=1)
        OWGUI.hSlider(SettingsTab, self, 'BoxPlotWidth', box='Box Plot Width', minValue=0, maxValue=9, step=1, callback=self.updateBoxPlotWidth, ticks=1)
        OWGUI.checkBox(SettingsTab, self, 'graph.renderAntialiased', "Render antialiased", callback=self.graph.setCurveRenderHints)


    ## graph y scale
        box = OWGUI.widgetBox(SettingsTab, "Threshold/ Values") #QVButtonGroup("Threshol/ Values", SettingsTab)
        OWGUI.checkBox(box, self, 'CutEnabled', "Enabled", callback=self.setCutEnabled)
        self.sliderCutLow = OWGUI.qwtHSlider(box, self, 'CutLow', label='Low:', labelWidth=33, minValue=-20, maxValue=0, step=0.1, precision=1, ticks=0, maxWidth=80, callback=self.updateYaxis)
        self.sliderCutHigh = OWGUI.qwtHSlider(box, self, 'CutHigh', label='High:', labelWidth=33, minValue=0, maxValue=20, step=0.1, precision=1, ticks=0, maxWidth=80, callback=self.updateYaxis)
        if not self.CutEnabled:
            self.sliderCutLow.box.setDisabled(1)
            self.sliderCutHigh.box.setDisabled(1)

##        self.tabs.insertTab(SettingsTab, "Settings")

        self.toolbarSelection = ZoomSelectToolbar(self, self.controlArea, self.graph, self.autoSendSelected, buttons=(ZoomSelectToolbar.IconZoom, ZoomSelectToolbar.IconPan, ZoomSelectToolbar.IconSelect, ZoomSelectToolbar.IconSpace,
                                                                       ZoomSelectToolbar.IconRemoveLast, ZoomSelectToolbar.IconRemoveAll, ZoomSelectToolbar.IconSendSelection))
        cb = OWGUI.checkBox(self.controlArea, self, "autoSendSelected", "Auto send on selection change")
        OWGUI.setStopper(self, self.toolbarSelection.buttonSendSelections, cb, "selectionChangedFlag", self.commit)
        
        # inputs
        # data and graph temp variables
        
        self.inputs = [("Examples", ExampleTable, self.data, Default + Multiple)]
        self.outputs = [("Examples", ExampleTable, Default)]

        # temp variables
        self.MAdata = []
        self.classColor = None
        self.classBrighterColor = None
        self.numberOfClasses  = 0
        self.classValues = []
        self.ctrlPressed = False
        self.attrIcons = self.createAttributeIconDict()

        self.graph.canvas().setMouseTracking(1)

#        self.zoomStack = []
##        self.connect(self.graph,
##                     SIGNAL('plotMousePressed(const QMouseEvent&)'),
##                     self.onMousePressed)
##        self.connect(self.graph,
##                     SIGNAL('plotMouseReleased(const QMouseEvent&)'),
##                     self.onMouseReleased)
        self.resize(800,600)
Exemplo n.º 7
0
    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)
Exemplo n.º 8
0
    def __init__(self, parent=None, signalManager=None, name="Gene selection"):
        OWWidget.__init__(self,
                          parent,
                          signalManager,
                          name,
                          wantGraph=True,
                          showSaveGraph=True)
        self.inputs = [("Examples", ExampleTable, self.set_data)]
        self.outputs = [("Example table with selected genes", ExampleTable),
                        ("Example table with remaining genes", ExampleTable),
                        ("Selected genes", ExampleTable)]

        self.method_index = 0
        self.genes_in_columns = False
        self.compute_null = False
        self.permutations_count = 10
        self.auto_commit = False
        self.selectNBest = 20
        self.selectPValue = 0.01
        self.data_changed_flag = False
        self.add_scores_to_output = True
        self.thresholds = {
            "fold change": (0.5, 2.),
            "log2 fold change": (-1, 1),
            "t-test": (-2, 2),
            "t-test p-value": (0.01, 0.01),
        }

        self.oneTailTestHi = oneTailTestHi = lambda array, low, hi: array >= hi
        self.oneTailTestLow = oneTailTestLow = lambda array, low, hi: array <= low
        self.twoTailTest = twoTailTest = lambda array, low, hi: (
            array >= hi) | (array <= low)
        self.middleTest = middleTest = lambda array, low, hi: (array <= hi) | (
            array >= low)

        self.histType = {
            oneTailTestHi: "hiTail",
            oneTailTestLow: "lowTail",
            twoTailTest: "twoTail",
            middleTest: "middle"
        }

        # [(name, func, tail test, two sample test), ...]
        self.score_methods = [
            ("fold change", ExpressionSignificance_FoldChange, twoTailTest,
             True),
            ("log2 fold change", ExpressionSignificance_Log2FoldChange,
             twoTailTest, True),
            ("t-test", ExpressionSignificance_TTest_T, twoTailTest, True),
            ("t-test p-value", ExpressionSignificance_TTest_PValue,
             oneTailTestLow, True),
            ("anova", ExpressionSignificance_ANOVA_F, oneTailTestHi, False),
            ("anova p-value", ExpressionSignificance_ANOVA_PValue,
             oneTailTestLow, False),
            ("signal to noise ratio", ExpressionSignificance_SignalToNoise,
             twoTailTest, True),
            ("info gain", ExpressionSignificance_Info, oneTailTestHi, True),
            ("chi-square", ExpressionSignificance_ChiSquare, oneTailTestHi,
             True),
            ("mann-whitney", ExpressionSignigicance_MannWhitneyu_U,
             oneTailTestLow, True)
        ]

        boxHistogram = OWGUI.widgetBox(self.mainArea)
        self.histogram = ScoreHist(self, boxHistogram)
        boxHistogram.layout().addWidget(self.histogram)
        self.histogram.show()

        box = OWGUI.widgetBox(self.controlArea, "Info")
        self.dataInfoLabel = OWGUI.widgetLabel(box, "\n\n")
        self.dataInfoLabel.setWordWrap(True)
        self.selectedInfoLabel = OWGUI.widgetLabel(box, "")

        box1 = OWGUI.widgetBox(self.controlArea, "Scoring Method")
        self.testRadioBox = OWGUI.comboBox(
            box1,
            self,
            "method_index",
            items=[sm[0] for sm in self.score_methods],
            callback=[self.on_scoring_method_changed, self.update_scores])

        box = OWGUI.widgetBox(self.controlArea, "Target Labels")
        self.label_selection_widget = LabelSelectionWidget(self)
        self.label_selection_widget.setMaximumHeight(150)
        box.layout().addWidget(self.label_selection_widget)
        self.connect(self.label_selection_widget,
                     SIGNAL("selection_changed()"), self.on_target_changed)

        self.connect(self.label_selection_widget,
                     SIGNAL("label_activated(int)"), self.on_label_activated)

        self.genes_in_columns_check = OWGUI.checkBox(
            box,
            self,
            "genes_in_columns",
            "Genes in columns",
            callback=self.on_genes_in_columns_change)

        box = OWGUI.widgetBox(self.controlArea, "Selection")
        box.layout().setSpacing(0)

        self.upperBoundarySpin = OWGUI.doubleSpin(
            box,
            self,
            "histogram.upperBoundary",
            min=-1e6,
            max=1e6,
            step=1e-6,
            label="Upper threshold:",
            callback=self.update_boundary,
            callbackOnReturn=True)

        self.lowerBoundarySpin = OWGUI.doubleSpin(
            box,
            self,
            "histogram.lowerBoundary",
            min=-1e6,
            max=1e6,
            step=1e-6,
            label="Lower threshold:",
            callback=self.update_boundary,
            callbackOnReturn=True)

        check = OWGUI.checkBox(box,
                               self,
                               "compute_null",
                               "Compute null distribution",
                               callback=self.update_scores)

        check.disables.append(
            OWGUI.spin(box,
                       self,
                       "permutations_count",
                       min=1,
                       max=10,
                       label="Permutations:",
                       callback=self.update_scores,
                       callbackOnReturn=True))

        box1 = OWGUI.widgetBox(box, orientation='horizontal')
        check.disables.append(
            OWGUI.doubleSpin(box1,
                             self,
                             "selectPValue",
                             min=2e-7,
                             max=1.0,
                             step=1e-7,
                             label="P-value:"))
        check.disables.append(
            OWGUI.button(box1, self, "Select", callback=self.select_p_best))
        check.makeConsistent()

        box1 = OWGUI.widgetBox(box, orientation='horizontal')
        OWGUI.spin(box1,
                   self,
                   "selectNBest",
                   0,
                   10000,
                   step=1,
                   label="Best Ranked:")
        OWGUI.button(box1, self, "Select", callback=self.select_n_best)

        box = OWGUI.widgetBox(self.controlArea, "Output")
        b = OWGUI.button(box, self, "&Commit", callback=self.commit)
        cb = OWGUI.checkBox(box, self, "auto_commit", "Commit on change")
        OWGUI.setStopper(self, b, cb, "data_changed_flag", self.commit)
        OWGUI.checkBox(box,
                       self,
                       "add_scores_to_output",
                       "Add gene scores to output",
                       callback=self.commit_if)

        OWGUI.rubber(self.controlArea)

        self.connect(self.graphButton, SIGNAL("clicked()"),
                     self.histogram.saveToFile)

        self.loadSettings()

        self.data = None
        self.discData = None
        self.scoreCache = {}
        self.nullDistCache = {}
        self.cuts = {}
        self.null_dist = []
        self.targets = []
        self.scores = {}
        self.genes_in_columns = True
        self.target_selections = None

        self.on_scoring_method_changed()

        self.resize(800, 600)
Exemplo n.º 9
0
    def __init__(self, parent=None, signalManager=None, name="Gene selection"):
        OWWidget.__init__(self, parent, signalManager, name, wantGraph=True, showSaveGraph=True)
        self.inputs = [("Examples", ExampleTable, self.set_data)]
        self.outputs = [("Example table with selected genes", ExampleTable), ("Example table with remaining genes", ExampleTable), ("Selected genes", ExampleTable)]

        self.method_index = 0
        self.genes_in_columns = False
        self.compute_null = False
        self.permutations_count = 10
        self.auto_commit = False
        self.selectNBest = 20
        self.selectPValue = 0.01
        self.data_changed_flag = False
        self.add_scores_to_output = True
        self.thresholds = {
            "fold change": (0.5, 2.),
            "log2 fold change": (-1, 1),
            "t-test": (-2, 2),
            "t-test p-value": (0.01, 0.01),
        }

        self.oneTailTestHi = oneTailTestHi = lambda array, low, hi: array >= hi
        self.oneTailTestLow = oneTailTestLow = lambda array, low, hi: array <= low
        self.twoTailTest = twoTailTest = lambda array, low, hi: (array >= hi) | (array <= low)
        self.middleTest = middleTest = lambda array, low, hi: (array <= hi) | (array >= low)
        
        self.histType = {oneTailTestHi:"hiTail", oneTailTestLow:"lowTail", twoTailTest:"twoTail", middleTest:"middle"}

        # [(name, func, tail test, two sample test), ...]
        self.score_methods = [("fold change", ExpressionSignificance_FoldChange, twoTailTest, True),
                             ("log2 fold change", ExpressionSignificance_Log2FoldChange, twoTailTest, True),
                             ("t-test", ExpressionSignificance_TTest_T, twoTailTest, True),
                             ("t-test p-value", ExpressionSignificance_TTest_PValue, oneTailTestLow, True),
                             ("anova", ExpressionSignificance_ANOVA_F, oneTailTestHi, False),
                             ("anova p-value", ExpressionSignificance_ANOVA_PValue, oneTailTestLow, False),
                             ("signal to noise ratio", ExpressionSignificance_SignalToNoise, twoTailTest, True),
                             ("info gain", ExpressionSignificance_Info, oneTailTestHi, True),
                             ("chi-square", ExpressionSignificance_ChiSquare, oneTailTestHi, True),
                             ("mann-whitney", ExpressionSignigicance_MannWhitneyu_U, oneTailTestLow, True)]

        boxHistogram = OWGUI.widgetBox(self.mainArea)
        self.histogram = ScoreHist(self, boxHistogram)
        boxHistogram.layout().addWidget(self.histogram)
        self.histogram.show()
        
        box = OWGUI.widgetBox(self.controlArea, "Info")
        self.dataInfoLabel = OWGUI.widgetLabel(box, "\n\n")
        self.dataInfoLabel.setWordWrap(True)
        self.selectedInfoLabel = OWGUI.widgetLabel(box, "")

        box1 = OWGUI.widgetBox(self.controlArea, "Scoring Method")
        self.testRadioBox = OWGUI.comboBox(box1, self, "method_index",
                                    items=[sm[0] for sm in self.score_methods],
                                    callback=[self.on_scoring_method_changed, self.update_scores])
        
        box = OWGUI.widgetBox(self.controlArea, "Target Labels")
        self.label_selection_widget = LabelSelectionWidget(self)
        self.label_selection_widget.setMaximumHeight(150)
        box.layout().addWidget(self.label_selection_widget)
        self.connect(self.label_selection_widget,
                     SIGNAL("selection_changed()"),
                     self.on_target_changed)
        
        self.connect(self.label_selection_widget,
                     SIGNAL("label_activated(int)"),
                     self.on_label_activated)
        
        self.genes_in_columns_check = OWGUI.checkBox(box, self, "genes_in_columns",
                                                  "Genes in columns",
                                                  callback=self.on_genes_in_columns_change)

        box = OWGUI.widgetBox(self.controlArea, "Selection")
        box.layout().setSpacing(0)

        self.upperBoundarySpin = OWGUI.doubleSpin(box, self, "histogram.upperBoundary",
                                                  min=-1e6, max=1e6, step= 1e-6,
                                                  label="Upper threshold:", 
                                                  callback=self.update_boundary, 
                                                  callbackOnReturn=True)
        
        self.lowerBoundarySpin = OWGUI.doubleSpin(box, self, "histogram.lowerBoundary", 
                                                  min=-1e6, max=1e6, step= 1e-6, 
                                                  label="Lower threshold:", 
                                                  callback=self.update_boundary, 
                                                  callbackOnReturn=True)
        
        check = OWGUI.checkBox(box, self, "compute_null", "Compute null distribution",
                               callback=self.update_scores)

        check.disables.append(OWGUI.spin(box, self, "permutations_count", min=1, max=10, 
                                         label="Permutations:", callback=self.update_scores, 
                                         callbackOnReturn=True))

        box1 = OWGUI.widgetBox(box, orientation='horizontal')
        check.disables.append(OWGUI.doubleSpin(box1, self, "selectPValue", 
                                               min=2e-7, max=1.0, step=1e-7, 
                                               label="P-value:"))
        check.disables.append(OWGUI.button(box1, self, "Select", callback=self.select_p_best))
        check.makeConsistent()

        box1 = OWGUI.widgetBox(box, orientation='horizontal')
        OWGUI.spin(box1, self, "selectNBest", 0, 10000, step=1, label="Best Ranked:")
        OWGUI.button(box1, self, "Select", callback=self.select_n_best)

        box = OWGUI.widgetBox(self.controlArea, "Output")
        b = OWGUI.button(box, self, "&Commit", callback=self.commit)
        cb = OWGUI.checkBox(box, self, "auto_commit", "Commit on change")
        OWGUI.setStopper(self, b, cb, "data_changed_flag", self.commit)
        OWGUI.checkBox(box, self, "add_scores_to_output", "Add gene scores to output",
                       callback=self.commit_if) 
        
        OWGUI.rubber(self.controlArea)

        self.connect(self.graphButton, SIGNAL("clicked()"), self.histogram.saveToFile)
        
        self.loadSettings()

        self.data = None
        self.discData = None
        self.scoreCache = {}
        self.nullDistCache = {}
        self.cuts = {}
        self.null_dist = []
        self.targets = []
        self.scores = {}
        self.genes_in_columns = True
        self.target_selections = None
        
        self.on_scoring_method_changed()
        
        self.resize(800, 600)
Exemplo n.º 10
0
    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)
Exemplo n.º 11
0
    def __init__(self, parent=None, signalManager=None, name="Gene Info"):
        OWWidget.__init__(self, parent, signalManager, name)

        self.inputs = [("Examples", Orange.data.Table, self.setData)]
        self.outputs = [("Selected Examples", Orange.data.Table)]

        self.organismIndex = 0
        self.taxid = None
        self.geneAttr = 0
        self.useAttr = False
        self.autoCommit = False
        self.searchString = ""
        self.selectionChangedFlag = False
        self.useAltSource = 0
        self.loadSettings()

        self.__initialized = False
        self.initfuture = None
        self.itemsfuture = None

        self.infoLabel = OWGUI.widgetLabel(
            OWGUI.widgetBox(self.controlArea, "Info", addSpace=True),
            "Initializing\n"
        )

        self.organisms = None
        self.organismBox = OWGUI.widgetBox(
            self.controlArea, "Organism", addSpace=True)

        self.organismComboBox = OWGUI.comboBox(
            self.organismBox, self, "organismIndex",
            callback=self._onSelectedOrganismChanged,
            debuggingEnabled=0)

        # For now only support one alt source, with a checkbox
        # In the future this can be extended to multiple selections
        self.altSourceCheck = OWGUI.checkBox(self.organismBox, self,
                            "useAltSource", "Show information from dictyBase",
                            callback=self.onAltSourceChange,
#                            debuggingEnabled=0,
                            )
        self.altSourceCheck.hide()

        box = OWGUI.widgetBox(self.controlArea, "Gene names", addSpace=True)
        self.geneAttrComboBox = OWGUI.comboBox(
            box, self, "geneAttr",
            "Gene atttibute", callback=self.updateInfoItems
        )
        OWGUI.checkBox(box, self, "useAttr", "Use attribute names",
                       callback=self.updateInfoItems,
                       disables=[(-1, self.geneAttrComboBox)])

        self.geneAttrComboBox.setDisabled(bool(self.useAttr))

        box = OWGUI.widgetBox(self.controlArea, "Commit", addSpace=True)
        b = OWGUI.button(box, self, "Commit", callback=self.commit)
        c = OWGUI.checkBox(box, self, "autoCommit", "Commit on change")
        OWGUI.setStopper(self, b, c, "selectionChangedFlag",
                         callback=self.commit)

        # A label for dictyExpress link
        self.dictyExpressBox = OWGUI.widgetBox(
            self.controlArea, "Dicty Express")
        self.linkLabel = OWGUI.widgetLabel(self.dictyExpressBox, "")
        self.linkLabel.setOpenExternalLinks(False)
        self.connect(self.linkLabel, SIGNAL("linkActivated(QString)"),
                     self.onDictyExpressLink)
        self.dictyExpressBox.hide()

        OWGUI.rubber(self.controlArea)

        OWGUI.lineEdit(self.mainArea, self, "searchString", "Filter",
                       callbackOnType=True, callback=self.searchUpdate)

        self.treeWidget = QTreeView(self.mainArea)
        self.treeWidget.setRootIsDecorated(False)
        self.treeWidget.setSelectionMode(
            QAbstractItemView.ExtendedSelection)
        self.treeWidget.setItemDelegate(
            LinkStyledItemDelegate(self.treeWidget))
        self.treeWidget.setUniformRowHeights(True)
        self.treeWidget.viewport().setMouseTracking(True)
        self.treeWidget.setSortingEnabled(True)
        self.mainArea.layout().addWidget(self.treeWidget)

        box = OWGUI.widgetBox(self.mainArea, "",
                              orientation="horizontal")
        OWGUI.button(box, self, "Select Filtered",
                     callback=self.selectFiltered)
        OWGUI.button(box, self, "Clear Selection",
                     callback=self.treeWidget.clearSelection)

        self.resize(1000, 700)

        self.geneinfo = []
        self.cells = []
        self.row2geneinfo = {}
        self.data = None

        # : (# input genes, # matches genes)
        self.matchedInfo = 0, 0
        self.selectionUpdateInProgress = False

        self.setBlocking(True)
        self.executor = ThreadExecutor(self)

        self.progressBarInit()

        task = Task(
            function=partial(
                taxonomy.ensure_downloaded,
                callback=methodinvoke(self, "advance", ())
            )
        )

        task.resultReady.connect(self.initialize)
        task.exceptionReady.connect(self._onInitializeError)

        self.initfuture = self.executor.submit(task)
Exemplo n.º 12
0
    def __init__(self, parent=None, signalManager=None, name="KEGG Pathways"):
        OWWidget.__init__(self, parent, signalManager, name, wantGraph=True)
        self.inputs = [("Examples", Orange.data.Table, self.SetData),
                       ("Reference", Orange.data.Table, self.SetRefData)]
        self.outputs = [("Selected Examples", Orange.data.Table),
                        ("Unselected Examples", Orange.data.Table)]
        self.organismIndex = 0
        self.geneAttrIndex = 0
        self.autoCommit = False
        self.autoResize = True
        self.useReference = False
        self.useAttrNames = 0
        self.showOrthology = True

        self.loadSettings()

        self.organismCodes = []
        self._changedFlag = False

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

        # Organism selection.
        box = OWGUI.widgetBox(self.controlArea, "Organism")
        self.organismComboBox = OWGUI.comboBox(
            box, self, "organismIndex",
            items=[],
            callback=self.Update,
            addSpace=True,
            debuggingEnabled=0,
            tooltip="Select the organism of the input genes")

        # Selection of genes attribute
        box = OWGUI.widgetBox(self.controlArea, "Gene attribute")
        self.geneAttrCandidates = VariableListModel(parent=self)
        self.geneAttrCombo = OWGUI.comboBox(
            box, self, "geneAttrIndex", callback=self.Update)
        self.geneAttrCombo.setModel(self.geneAttrCandidates)

        OWGUI.checkBox(box, self, "useAttrNames",
                       "Use variable names",
                       disables=[(-1, self.geneAttrCombo)],
                       callback=self.Update)

        self.geneAttrCombo.setDisabled(bool(self.useAttrNames))

        OWGUI.separator(self.controlArea)

        OWGUI.checkBox(self.controlArea, self, "useReference",
                       "From signal",
                       box="Reference",
                       callback=self.Update)

        OWGUI.separator(self.controlArea)

        OWGUI.checkBox(self.controlArea, self, "showOrthology",
                       "Show pathways in full orthology",
                       box="Orthology",
                       callback=self.UpdateListView)

        OWGUI.checkBox(self.controlArea, self, "autoResize",
                       "Resize to fit",
                       box="Image",
                       callback=self.UpdatePathwayViewTransform)

        box = OWGUI.widgetBox(self.controlArea, "Cache Control")

        OWGUI.button(box, self, "Clear cache",
                     callback=self.ClearCache,
                     tooltip="Clear all locally cached KEGG data.")

        OWGUI.separator(self.controlArea)

        box = OWGUI.widgetBox(self.controlArea, "Selection")
        cb = OWGUI.checkBox(box, self, "autoCommit", "Commit on update")
        button = OWGUI.button(box, self, "Commit", callback=self.Commit,
                              default=True)
        OWGUI.setStopper(self, button, cb, "_changedFlag", self.Commit)

        OWGUI.rubber(self.controlArea)

        spliter = QSplitter(Qt.Vertical, self.mainArea)
        self.pathwayView = PathwayView(self, spliter)
        self.pathwayView.scene().selectionChanged.connect(
            self._onSelectionChanged
        )
        self.mainArea.layout().addWidget(spliter)

        self.listView = QTreeWidget(spliter)
        spliter.addWidget(self.listView)

        self.listView.setAllColumnsShowFocus(1)
        self.listView.setColumnCount(4)
        self.listView.setHeaderLabels(["Pathway", "P value",
                                       "Genes", "Reference"])

        self.listView.setSelectionMode(QTreeWidget.SingleSelection)

        self.listView.setSortingEnabled(True)

        self.listView.setMaximumHeight(200)

        self.connect(self.listView,
                     SIGNAL("itemSelectionChanged()"),
                     self.UpdatePathwayView)

        self.connect(self.graphButton,
                     SIGNAL("clicked()"),
                     self.saveGraph)

        select = QAction(
            "Select All", self,
            shortcut=QKeySequence.SelectAll
        )
        select.triggered.connect(self.selectAll)
        self.addAction(select)

        self.data = None
        self.refData = None

        self.resize(800, 600)

        self.connect(self,
                     SIGNAL("widgetStateChanged(QString, int, QString)"),
                     self.onStateChange)

        self.has_new_data = False
        self.has_new_reference_set = False

        self._executor = ThreadExecutor()
        self.setEnabled(False)
        self.setBlocking(True)
        QTimer.singleShot(0, self._initialize)
        self.infoLabel.setText("Fetching organism definitions\n")
Exemplo n.º 13
0
    def __init__(self, parent=None, signalManager=None):
        #        self.callbackDeposit = [] # deposit for OWGUI callback functions
        OWWidget.__init__(self, parent, signalManager, 'Expression Profiles',
                          1)

        #set default settings
        self.ShowAverageProfile = 1
        self.ShowSingleProfiles = 0
        self.PointWidth = 2
        self.CurveWidth = 1
        self.AverageCurveWidth = 4
        self.BoxPlotWidth = 2
        self.SelectedClasses = []
        self.Classes = []
        self.autoSendSelected = 0
        self.selectionChangedFlag = False

        self.CutLow = 0
        self.CutHigh = 0
        self.CutEnabled = 0

        self.profileLabel = None

        #load settings
        self.loadSettings()

        # GUI
        self.graph = profilesGraph(self, self.mainArea, "")
        self.mainArea.layout().addWidget(self.graph)
        self.graph.hide()
        self.connect(self.graphButton, SIGNAL("clicked()"),
                     self.graph.saveToFile)

        # GUI definition
        self.tabs = OWGUI.tabWidget(self.space)

        # GRAPH TAB
        GraphTab = OWGUI.createTabPage(self.tabs, "Graph")

        ## display options
        self.infoLabel = OWGUI.widgetLabel(OWGUI.widgetBox(GraphTab, "Info"),
                                           "No data on input.")
        displayOptBox = OWGUI.widgetBox(
            GraphTab, "Display")  #QVButtonGroup("Display", GraphTab)
        displayOptButtons = [
            'Majority Class', 'Majority Class Probability',
            'Target Class Probability', 'Number of Instances'
        ]
        OWGUI.checkBox(displayOptBox,
                       self,
                       'ShowSingleProfiles',
                       'Expression Profiles',
                       tooltip='',
                       callback=self.updateShowSingleProfiles)
        OWGUI.checkBox(displayOptBox,
                       self,
                       'ShowAverageProfile',
                       'Box Plot',
                       tooltip='',
                       callback=self.updateShowAverageProfile)

        ## class selection (classQLB)
        self.classQVGB = OWGUI.widgetBox(GraphTab,
                                         "Classes")  #QVGroupBox(GraphTab)
        ##        self.classQVGB.setTitle("Classes")
        self.classQLB = OWGUI.listBox(
            self.classQVGB,
            self,
            "SelectedClasses",
            "Classes",
            selectionMode=QListWidget.MultiSelection,
            callback=self.classSelectionChange)  #QListBox(self.classQVGB)
        ##        self.classQLB.setSelectionMode(QListBox.Multi)
        self.unselectAllClassedQLB = OWGUI.button(
            self.classQVGB, self, "Unselect all", callback=self.SUAclassQLB
        )  #QPushButton("(Un)Select All", self.classQVGB)
        ##        self.connect(self.unselectAllClassedQLB, SIGNAL("clicked()"), self.SUAclassQLB)
        ##        self.connect(self.classQLB, SIGNAL("selectionChanged()"), self.classSelectionChange)

        ## show single/average profile
        ##        self.showAverageQLB = QPushButton("Box Plot", self.classQVGB)
        ##        self.showAverageQLB.setToggleButton(1)
        ##        self.showAverageQLB.setOn(self.ShowAverageProfile)
        ##        self.showSingleQLB = QPushButton("Single Profiles", self.classQVGB)
        ##        self.showSingleQLB.setToggleButton(1)
        ##        self.showSingleQLB.setOn(self.ShowSingleProfiles)
        ##        self.connect(self.showAverageQLB, SIGNAL("toggled(bool)"), self.updateShowAverageProfile)
        ##        self.connect(self.showSingleQLB, SIGNAL("toggled(bool)"), self.updateShowSingleProfiles)

        ##        self.tabs.insertTab(GraphTab, "Graph")

        # SETTINGS TAB
        SettingsTab = OWGUI.createTabPage(self.tabs,
                                          "Settings")  #QVGroupBox(self)

        self.profileLabelComboBox = OWGUI.comboBox(SettingsTab,
                                                   self,
                                                   'profileLabel',
                                                   'Profile Labels',
                                                   sendSelectedValue=True,
                                                   valueType=str)
        OWGUI.hSlider(SettingsTab,
                      self,
                      'PointWidth',
                      box='Point Width',
                      minValue=0,
                      maxValue=9,
                      step=1,
                      callback=self.updatePointWidth,
                      ticks=1)
        OWGUI.hSlider(SettingsTab,
                      self,
                      'CurveWidth',
                      box='Profile Width',
                      minValue=1,
                      maxValue=9,
                      step=1,
                      callback=self.updateCurveWidth,
                      ticks=1)
        OWGUI.hSlider(SettingsTab,
                      self,
                      'AverageCurveWidth',
                      box='Average Profile Width',
                      minValue=1,
                      maxValue=9,
                      step=1,
                      callback=self.updateAverageCurveWidth,
                      ticks=1)
        OWGUI.hSlider(SettingsTab,
                      self,
                      'BoxPlotWidth',
                      box='Box Plot Width',
                      minValue=0,
                      maxValue=9,
                      step=1,
                      callback=self.updateBoxPlotWidth,
                      ticks=1)
        OWGUI.checkBox(SettingsTab,
                       self,
                       'graph.renderAntialiased',
                       "Render antialiased",
                       callback=self.graph.setCurveRenderHints)

        ## graph y scale
        box = OWGUI.widgetBox(
            SettingsTab, "Threshold/ Values"
        )  #QVButtonGroup("Threshol/ Values", SettingsTab)
        OWGUI.checkBox(box,
                       self,
                       'CutEnabled',
                       "Enabled",
                       callback=self.setCutEnabled)
        self.sliderCutLow = OWGUI.qwtHSlider(box,
                                             self,
                                             'CutLow',
                                             label='Low:',
                                             labelWidth=33,
                                             minValue=-20,
                                             maxValue=0,
                                             step=0.1,
                                             precision=1,
                                             ticks=0,
                                             maxWidth=80,
                                             callback=self.updateYaxis)
        self.sliderCutHigh = OWGUI.qwtHSlider(box,
                                              self,
                                              'CutHigh',
                                              label='High:',
                                              labelWidth=33,
                                              minValue=0,
                                              maxValue=20,
                                              step=0.1,
                                              precision=1,
                                              ticks=0,
                                              maxWidth=80,
                                              callback=self.updateYaxis)
        if not self.CutEnabled:
            self.sliderCutLow.box.setDisabled(1)
            self.sliderCutHigh.box.setDisabled(1)

##        self.tabs.insertTab(SettingsTab, "Settings")

        self.toolbarSelection = ZoomSelectToolbar(
            self,
            self.controlArea,
            self.graph,
            self.autoSendSelected,
            buttons=(ZoomSelectToolbar.IconZoom, ZoomSelectToolbar.IconPan,
                     ZoomSelectToolbar.IconSelect, ZoomSelectToolbar.IconSpace,
                     ZoomSelectToolbar.IconRemoveLast,
                     ZoomSelectToolbar.IconRemoveAll,
                     ZoomSelectToolbar.IconSendSelection))
        cb = OWGUI.checkBox(self.controlArea, self, "autoSendSelected",
                            "Auto send on selection change")
        OWGUI.setStopper(self, self.toolbarSelection.buttonSendSelections, cb,
                         "selectionChangedFlag", self.commit)

        # inputs
        # data and graph temp variables

        self.inputs = [("Examples", ExampleTable, self.data,
                        Default + Multiple)]
        self.outputs = [("Examples", ExampleTable, Default)]

        # temp variables
        self.MAdata = []
        self.classColor = None
        self.classBrighterColor = None
        self.numberOfClasses = 0
        self.classValues = []
        self.ctrlPressed = False
        self.attrIcons = self.createAttributeIconDict()

        self.graph.canvas().setMouseTracking(1)

        #        self.zoomStack = []
        ##        self.connect(self.graph,
        ##                     SIGNAL('plotMousePressed(const QMouseEvent&)'),
        ##                     self.onMousePressed)
        ##        self.connect(self.graph,
        ##                     SIGNAL('plotMouseReleased(const QMouseEvent&)'),
        ##                     self.onMouseReleased)
        self.resize(800, 600)
Exemplo n.º 14
0
    def __init__(self, parent=None, signalManager=None,
                 title="Venn Diagram"):
        super(OWVennDiagram, self).__init__(parent, signalManager, title,
                                            wantGraph=True)

        self.autocommit = False
        # Selected disjoint subset indices
        self.selection = []

        # Stored input set hints
        # {(index, inputname, attributes): (selectedattrname, itemsettitle)}
        # The 'selectedattrname' can be None
        self.inputhints = {}

        # Use identifier columns for instance matching
        self.useidentifiers = 1

        self.loadSettings()

        # Output changed flag
        self._changed = False
        # Diagram update is in progress
        self._updating = False
        # Input update is in progress
        self._inputUpdate = False
        # All input tables have the same domain.
        self.samedomain = True
        # Input datasets in the order they were 'connected'.
        self.data = OrderedDict()
        # Extracted input item sets in the order they were 'connected'
        self.itemsets = OrderedDict()

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

        self.identifiersBox = OWGUI.radioButtonsInBox(
            self.controlArea, self, "useidentifiers", [],
            box="Data Instance Identifiers",
            callback=self._on_useidentifiersChanged
        )
        self.useequalityButton = OWGUI.appendRadioButton(
            self.identifiersBox, self, "useidentifiers",
            "Use instance equality"
        )
        rb = OWGUI.appendRadioButton(
            self.identifiersBox, self, "useidentifiers",
            "Use identifiers"
        )
        self.inputsBox = OWGUI.indentedBox(
            self.identifiersBox, sep=OWGUI.checkButtonOffsetHint(rb)
        )
        self.inputsBox.setEnabled(self.useidentifiers == 1)

        for i in range(5):
            box = OWGUI.widgetBox(self.inputsBox, "Data set #%i" % (i + 1),
                                  flat=True)
            model = OWItemModels.VariableListModel(parent=self)
            cb = QComboBox()
            cb.setModel(model)
            cb.activated[int].connect(self._on_inputAttrActivated)
            box.setEnabled(False)
            # Store the combo in the box for later use.
            box.combo_box = cb
            box.layout().addWidget(cb)

        OWGUI.rubber(self.controlArea)

        box = OWGUI.widgetBox(self.controlArea, "Output")
        cb = OWGUI.checkBox(box, self, "autocommit", "Commit on any change")
        b = OWGUI.button(box, self, "Commit", callback=self.commit,
                         default=True)
        OWGUI.setStopper(self, b, cb, "_changed", callback=self.commit)

        # Main area view
        self.scene = QGraphicsScene()
        self.view = QGraphicsView(self.scene)
        self.view.setRenderHint(QPainter.Antialiasing)
        self.view.setBackgroundRole(QPalette.Window)
        self.view.setFrameStyle(QGraphicsView.StyledPanel)

        self.mainArea.layout().addWidget(self.view)
        self.vennwidget = VennDiagram()
        self.vennwidget.resize(400, 400)
        self.vennwidget.itemTextEdited.connect(self._on_itemTextEdited)
        self.scene.selectionChanged.connect(self._on_selectionChanged)

        self.scene.addItem(self.vennwidget)

        self.resize(self.controlArea.sizeHint().width() + 550,
                    max(self.controlArea.sizeHint().height(), 550))

        self._queue = []
        self.graphButton.clicked.connect(self.saveImage)
Exemplo n.º 15
0
 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)
Exemplo n.º 16
0
    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)