Ejemplo n.º 1
0
    def configure(self, profile, statsResults):
        configDlg = ConfigureDialog(Ui_BoxPlotDialog)

        configDlg.ui.cboFieldToPlot.setCurrentIndex(
            configDlg.ui.cboFieldToPlot.findText(self.fieldToPlot))

        configDlg.ui.spinFigWidth.setValue(self.figWidth)
        configDlg.ui.spinFigHeight.setValue(self.figHeight)

        configDlg.ui.chkShowAverage.setChecked(self.bShowAverages)

        configDlg.ui.chkShowPvalue.setChecked(self.bShowPvalue)

        if configDlg.exec_() == QtGui.QDialog.Accepted:
            self.fieldToPlot = str(configDlg.ui.cboFieldToPlot.currentText())

            self.figWidth = configDlg.ui.spinFigWidth.value()
            self.figHeight = configDlg.ui.spinFigHeight.value()

            self.bShowAverages = configDlg.ui.chkShowAverage.isChecked()

            self.bShowPvalue = configDlg.ui.chkShowPvalue.isChecked()

            self.settings.setValue('group: ' + self.name + '/column width',
                                   self.figWidth)
            self.settings.setValue('group: ' + self.name + '/height',
                                   self.figHeight)
            self.settings.setValue('group: ' + self.name + '/field to plot',
                                   self.fieldToPlot)
            self.settings.setValue('group: ' + self.name + '/show averages',
                                   self.bShowAverages)
            self.settings.setValue('group: ' + self.name + '/show p-value',
                                   self.bShowPvalue)

            self.plot(profile, statsResults)
Ejemplo n.º 2
0
    def configure(self, profile, statsResults):
        configDlg = ConfigureDialog(Ui_ScatterPlotDialog)

        configDlg.ui.spinNumBins.setEnabled(self.bShowHistograms)
        configDlg.ui.spinHistogramSize.setEnabled(self.bShowHistograms)

        configDlg.ui.spinFigWidth.setValue(self.figWidth)
        configDlg.ui.spinFigHeight.setValue(self.figHeight)

        configDlg.ui.cboSpreadMethod.setCurrentIndex(
            configDlg.ui.cboSpreadMethod.findText(self.spreadMethod))

        configDlg.ui.spinNumBins.setValue(self.numBins)
        configDlg.ui.spinHistogramSize.setValue(self.histogramSize)
        configDlg.ui.chkShowHistogram.setChecked(self.bShowHistograms)

        configDlg.ui.spinMarkerSize.setValue(self.markerSize)

        configDlg.ui.chkShowR2.setChecked(self.bShowR2)

        if configDlg.exec_() == QtGui.QDialog.Accepted:
            self.figWidth = configDlg.ui.spinFigWidth.value()
            self.figHeight = configDlg.ui.spinFigHeight.value()

            self.spreadMethod = configDlg.ui.cboSpreadMethod.currentText()

            self.numBins = configDlg.ui.spinNumBins.value()
            self.histogramSize = configDlg.ui.spinHistogramSize.value()
            self.bShowHistograms = configDlg.ui.chkShowHistogram.isChecked()

            self.markerSize = configDlg.ui.spinMarkerSize.value()

            self.bShowR2 = configDlg.ui.chkShowR2.isChecked()

            self.settings.setValue('group: ' + self.name + '/width',
                                   self.figWidth)
            self.settings.setValue('group: ' + self.name + '/height',
                                   self.figHeight)
            self.settings.setValue('group: ' + self.name + '/spread method',
                                   self.spreadMethod)
            self.settings.setValue('group: ' + self.name + '/bin',
                                   self.numBins)
            self.settings.setValue('group: ' + self.name + '/bin size',
                                   self.histogramSize)
            self.settings.setValue('group: ' + self.name + '/show histograms',
                                   self.bShowHistograms)
            self.settings.setValue('group: ' + self.name + '/marker size',
                                   self.markerSize)
            self.settings.setValue('group: ' + self.name + '/show R2',
                                   self.bShowR2)

            self.plot(profile, statsResults)
Ejemplo n.º 3
0
	def configure(self, profile, statsResults):
		self.statsResults = statsResults
		
		self.configDlg = ConfigureDialog(Ui_ExtendedErrorBarDialog)
		
		# set enabled state of controls
		self.configDlg.ui.chkShowStdDev.setChecked(self.bShowBarPlot)
		self.configDlg.ui.spinEndCapSize.setValue(self.bShowBarPlot)
		self.configDlg.ui.spinMinimumX.setEnabled(self.bCustomLimits)
		self.configDlg.ui.spinMaximumX.setEnabled(self.bCustomLimits)

		# set current value of controls
		self.configDlg.ui.cboSortingField.setCurrentIndex(self.configDlg.ui.cboSortingField.findText(self.sortingField))
		
		self.configDlg.ui.spinFigWidth.setValue(self.figWidth)
		self.configDlg.ui.spinFigRowHeight.setValue(self.figHeightPerRow)
		
		self.configDlg.ui.chkShowBarPlot.setChecked(self.bShowBarPlot)
		self.configDlg.ui.chkPValueLabels.setChecked(self.bShowPValueLabels)
		
		self.configDlg.ui.chkCorrectedPvalues.setChecked(self.bShowCorrectedPvalues)
		
		self.configDlg.ui.chkCustomLimits.setChecked(self.bCustomLimits)
		self.configDlg.ui.spinMinimumX.setValue(self.minX)
		self.configDlg.ui.spinMaximumX.setValue(self.maxX)
		
		self.configDlg.ui.spinMarkerSize.setValue(self.markerSize)
		
		self.configDlg.ui.chkShowStdDev.setChecked(self.bShowStdDev)
		self.configDlg.ui.spinEndCapSize.setValue(self.endCapSize)
		
		if self.legendPos == 2:
			self.configDlg.ui.radioLegendPosUpperLeft.setChecked(True)
		elif self.legendPos == 3:
			self.configDlg.ui.radioLegendPosLowerLeft.setChecked(True)
		elif self.legendPos == 4:
			self.configDlg.ui.radioLegendPosLowerRight.setChecked(True)
		elif self.legendPos == 8:
			self.configDlg.ui.radioLegendPosLowerCentre.setChecked(True)
		else:
			self.configDlg.ui.radioLegendPosNone.setChecked(True)
				
		if self.configDlg.exec_() == QtGui.QDialog.Accepted:
			QtGui.QApplication.instance().setOverrideCursor(QtGui.QCursor(QtCore.Qt.WaitCursor))
			
			self.sortingField = str(self.configDlg.ui.cboSortingField.currentText())
			
			self.figWidth = self.configDlg.ui.spinFigWidth.value()
			self.figHeightPerRow = self.configDlg.ui.spinFigRowHeight.value()
			
			self.bShowBarPlot = self.configDlg.ui.chkShowBarPlot.isChecked()
			self.bShowPValueLabels = self.configDlg.ui.chkPValueLabels.isChecked()			
			self.bShowCorrectedPvalues = self.configDlg.ui.chkCorrectedPvalues.isChecked()
			
			self.bCustomLimits = self.configDlg.ui.chkCustomLimits.isChecked()
			self.minX = self.configDlg.ui.spinMinimumX.value()
			self.maxX = self.configDlg.ui.spinMaximumX.value()
			
			self.markerSize = self.configDlg.ui.spinMarkerSize.value()
			
			self.bShowStdDev = self.configDlg.ui.chkShowStdDev.isChecked()
			self.endCapSize = self.configDlg.ui.spinEndCapSize.value()
			
			# legend position			
			if self.configDlg.ui.radioLegendPosUpperLeft.isChecked() == True:
				self.legendPos = 2
			elif self.configDlg.ui.radioLegendPosLowerLeft.isChecked() == True:
				self.legendPos = 3
			elif self.configDlg.ui.radioLegendPosLowerCentre.isChecked() == True:
				self.legendPos = 8
			elif self.configDlg.ui.radioLegendPosLowerRight.isChecked() == True:
				self.legendPos = 4
			else:
				self.legendPos = -1
			
			self.settings.setValue('group: ' + self.name + '/width', self.figWidth)
			self.settings.setValue('group: ' + self.name + '/row height', self.figHeightPerRow)
			self.settings.setValue('group: ' + self.name + '/field', self.sortingField)
			self.settings.setValue('group: ' + self.name + '/sequences subplot', self.bShowBarPlot)
			self.settings.setValue('group: ' + self.name + '/p-value labels', self.bShowPValueLabels)
			self.settings.setValue('group: ' + self.name + '/show corrected p-values', self.bShowCorrectedPvalues)
			self.settings.setValue('group: ' + self.name + '/use custom limits', self.bCustomLimits)
			self.settings.setValue('group: ' + self.name + '/minimum', self.minX)
			self.settings.setValue('group: ' + self.name + '/maximum', self.maxX)
			self.settings.setValue('group: ' + self.name + '/marker size', self.markerSize)
			self.settings.setValue('group: ' + self.name + '/show std. dev.', self.bShowStdDev)
			self.settings.setValue('group: ' + self.name + '/end cap size', self.endCapSize)
			self.settings.setValue('group: ' + self.name + '/legend position', self.legendPos)

			self.plot(profile, statsResults)
			
			QtGui.QApplication.instance().restoreOverrideCursor()	 
Ejemplo n.º 4
0
    def configure(self, profile, statsResults):
        configDlg = ConfigureDialog(Ui_HeatmapPlotDialog)

        configDlg.ui.cboFieldToPlot.setCurrentIndex(
            configDlg.ui.cboFieldToPlot.findText(self.fieldToPlot))
        configDlg.ui.chkPlotOnlyActiveFeatures.setChecked(
            self.bPlotOnlyActiveFeatures)

        configDlg.ui.spinFigWidth.setValue(self.figWidth)
        configDlg.ui.spinFigHeight.setValue(self.figHeight)

        configDlg.ui.cboColSortMethod.setCurrentIndex(
            configDlg.ui.cboColSortMethod.findText(self.sortColMethod))
        configDlg.ui.cboRowSortMethod.setCurrentIndex(
            configDlg.ui.cboRowSortMethod.findText(self.sortRowMethod))

        configDlg.ui.chkShowColDendrogram.setChecked(self.bShowColDendrogram)
        configDlg.ui.chkShowRowDendrogram.setChecked(self.bShowRowDendrogram)

        configDlg.ui.cboColourMap.setCurrentIndex(
            configDlg.ui.cboColourMap.findText(self.colourmap))

        # legend position
        if self.legendPos == 1:
            configDlg.ui.radioLegendPosUpperRight.setChecked(True)
        elif self.legendPos == 4:
            configDlg.ui.radioLegendPosLowerRight.setChecked(True)
        elif self.legendPos == 2:
            configDlg.ui.radioLegendPosUpperLeft.setChecked(True)
        elif self.legendPos == 3:
            configDlg.ui.radioLegendPosLowerLeft.setChecked(True)
        else:
            configDlg.ui.radioLegendPosNone.setChecked(True)

        configDlg.ui.spinColClusteringThreshold.setValue(
            self.clusteringColThreshold)
        configDlg.ui.spinRowClusteringThreshold.setValue(
            self.clusteringRowThreshold)

        configDlg.ui.spinDendrogramColHeight.setValue(self.dendrogramHeight)
        configDlg.ui.spinDendrogramRowWidth.setValue(self.dendrogramWidth)

        if configDlg.exec_() == QtGui.QDialog.Accepted:
            self.fieldToPlot = str(configDlg.ui.cboFieldToPlot.currentText())
            self.bPlotOnlyActiveFeatures = configDlg.ui.chkPlotOnlyActiveFeatures.isChecked(
            )

            self.figWidth = configDlg.ui.spinFigWidth.value()
            self.figHeight = configDlg.ui.spinFigHeight.value()

            self.sortColMethod = str(
                configDlg.ui.cboColSortMethod.currentText())
            self.sortRowMethod = str(
                configDlg.ui.cboRowSortMethod.currentText())

            self.bShowColDendrogram = configDlg.ui.chkShowColDendrogram.isChecked(
            )
            self.bShowRowDendrogram = configDlg.ui.chkShowRowDendrogram.isChecked(
            )

            self.colourmap = str(configDlg.ui.cboColourMap.currentText())

            # legend position
            if configDlg.ui.radioLegendPosUpperRight.isChecked() == True:
                self.legendPos = 1
            elif configDlg.ui.radioLegendPosLowerRight.isChecked() == True:
                self.legendPos = 4
            elif configDlg.ui.radioLegendPosUpperLeft.isChecked() == True:
                self.legendPos = 2
            elif configDlg.ui.radioLegendPosLowerLeft.isChecked() == True:
                self.legendPos = 3
            else:
                self.legendPos = -1

            self.clusteringColThreshold = configDlg.ui.spinColClusteringThreshold.value(
            )
            self.clusteringRowThreshold = configDlg.ui.spinRowClusteringThreshold.value(
            )

            self.dendrogramHeight = configDlg.ui.spinDendrogramColHeight.value(
            )
            self.dendrogramWidth = configDlg.ui.spinDendrogramRowWidth.value()

            self.settings.setValue('group: ' + self.name + '/field to plot',
                                   self.fieldToPlot)
            self.settings.setValue(
                'group: ' + self.name + '/plot only active features',
                self.bPlotOnlyActiveFeatures)
            self.settings.setValue('group: ' + self.name + '/width',
                                   self.figWidth)
            self.settings.setValue('group: ' + self.name + '/height',
                                   self.figHeight)
            self.settings.setValue('group: ' + self.name + '/sort col method',
                                   self.sortColMethod)
            self.settings.setValue('group: ' + self.name + '/sort row method',
                                   self.sortRowMethod)
            self.settings.setValue(
                'group: ' + self.name + '/show col dendrogram',
                self.bShowColDendrogram)
            self.settings.setValue(
                'group: ' + self.name + '/show row dendrogram',
                self.bShowRowDendrogram)
            self.settings.setValue('group: ' + self.name + '/colourmap',
                                   self.colourmap)
            self.settings.setValue('group: ' + self.name + '/legend position',
                                   self.legendPos)
            self.settings.setValue(
                'group: ' + self.name + '/clustering col threshold',
                self.clusteringColThreshold)
            self.settings.setValue(
                'group: ' + self.name + '/clustering row threshold',
                self.clusteringRowThreshold)
            self.settings.setValue(
                'group: ' + self.name + '/dendrogram col height',
                self.dendrogramHeight)
            self.settings.setValue(
                'group: ' + self.name + '/dendrogram row width',
                self.dendrogramWidth)

            self.plot(profile, statsResults)
Ejemplo n.º 5
0
	def configure(self, profile, statsResults):
		configDlg = ConfigureDialog(Ui_BarPlotDialog)
		
		configDlg.ui.cboFieldToPlot.setCurrentIndex(configDlg.ui.cboFieldToPlot.findText(self.fieldToPlot))
				
		configDlg.ui.spinFigColWidth.setValue(self.figColWidth)
		configDlg.ui.spinFigHeight.setValue(self.figHeight)
		
		configDlg.ui.chkShowAverage.setChecked(self.bShowAverages)
		
		# legend position
		if self.legendPos == 0:
			configDlg.ui.radioLegendPosBest.setDown(True)
		elif self.legendPos == 1:
			configDlg.ui.radioLegendPosUpperRight.setChecked(True)
		elif self.legendPos == 7:
			configDlg.ui.radioLegendPosCentreRight.setChecked(True)
		elif self.legendPos == 4:
			configDlg.ui.radioLegendPosLowerRight.setChecked(True)
		elif self.legendPos == 2:
			configDlg.ui.radioLegendPosUpperLeft.setChecked(True)
		elif self.legendPos == 6:
			configDlg.ui.radioLegendPosCentreLeft.setChecked(True)
		elif self.legendPos == 3:
			configDlg.ui.radioLegendPosLowerLeft.setChecked(True)
		else:
			configDlg.ui.radioLegendPosNone.setChecked(True)
			
		configDlg.ui.chkShowPvalue.setChecked(self.bShowPvalue)
		
		if configDlg.exec_() == QtGui.QDialog.Accepted:	 
			self.fieldToPlot = str(configDlg.ui.cboFieldToPlot.currentText())
			
			self.figColWidth = configDlg.ui.spinFigColWidth.value()
			self.figHeight = configDlg.ui.spinFigHeight.value()
			
			self.bShowAverages = configDlg.ui.chkShowAverage.isChecked()
			
			# legend position			
			if configDlg.ui.radioLegendPosBest.isChecked() == True:
				self.legendPos = 0
			elif configDlg.ui.radioLegendPosUpperRight.isChecked() == True:
				self.legendPos = 1
			elif configDlg.ui.radioLegendPosCentreRight.isChecked() == True:
				self.legendPos = 7
			elif configDlg.ui.radioLegendPosLowerRight.isChecked() == True:
				self.legendPos = 4
			elif configDlg.ui.radioLegendPosUpperLeft.isChecked() == True:
				self.legendPos = 2
			elif configDlg.ui.radioLegendPosCentreLeft.isChecked() == True:
				self.legendPos = 6
			elif configDlg.ui.radioLegendPosLowerLeft.isChecked() == True:
				self.legendPos = 3
			else:
				self.legendPos = -1
				
			self.bShowPvalue = configDlg.ui.chkShowPvalue.isChecked()
				
			self.settings.setValue('group: ' + self.name + '/column width', self.figColWidth)
			self.settings.setValue('group: ' + self.name + '/height', self.figHeight)
			self.settings.setValue('group: ' + self.name + '/field to plot', self.fieldToPlot)
			self.settings.setValue('group: ' + self.name + '/show averages', self.bShowAverages)
			self.settings.setValue('group: ' + self.name + '/legend position', self.legendPos)
			self.settings.setValue('group: ' + self.name + '/show p-value', self.bShowPvalue)
			
			self.plot(profile, statsResults)
Ejemplo n.º 6
0
    def configure(self, profile, statsResults):
        configDlg = ConfigureDialog(Ui_PcaPlotDialog)

        configDlg.ui.spinFigWidth.setValue(self.figWidth)
        configDlg.ui.spinFigHeight.setValue(self.figHeight)

        configDlg.ui.chkFixedPixelsPerUnitDistance.setChecked(
            self.bFixedPixelsPerUnitDistance)

        configDlg.ui.spinFigHeight.setDisabled(
            configDlg.ui.chkFixedPixelsPerUnitDistance.isChecked())

        configDlg.ui.spinMarkerSize.setValue(self.markerSize)

        configDlg.ui.chkRotateLabels.setChecked(self.bRotateLabels)

        configDlg.ui.chkPC1vsPC3.setChecked(self.bShowPC1vsPC3)
        configDlg.ui.chkPC3vsPC2.setChecked(self.bShowPC3vsPC2)

        if self.legendPos == 2:
            configDlg.ui.radioLegendPosUpperLeft.setChecked(True)
        elif self.legendPos == 3:
            configDlg.ui.radioLegendPosLowerLeft.setChecked(True)
        elif self.legendPos == 4:
            configDlg.ui.radioLegendPosLowerRight.setChecked(True)
        elif self.legendPos == 9:
            configDlg.ui.radioLegendPosUpperCentre.setChecked(True)
        elif self.legendPos == 1:
            configDlg.ui.radioLegendPosUpperRight.setChecked(True)
        else:
            configDlg.ui.radioLegendPosNone.setChecked(True)

        configDlg.ui.chkUniqueShapes.setChecked(self.bUniqueShapes)

        if configDlg.exec_() == QtGui.QDialog.Accepted:
            self.figWidth = configDlg.ui.spinFigWidth.value()
            self.figHeight = configDlg.ui.spinFigHeight.value()

            self.bFixedPixelsPerUnitDistance = configDlg.ui.chkFixedPixelsPerUnitDistance.isChecked(
            )

            self.markerSize = configDlg.ui.spinMarkerSize.value()

            self.bRotateLabels = configDlg.ui.chkRotateLabels.isChecked()

            self.bShowPC1vsPC3 = configDlg.ui.chkPC1vsPC3.isChecked()
            self.bShowPC3vsPC2 = configDlg.ui.chkPC3vsPC2.isChecked()

            # legend position
            if configDlg.ui.radioLegendPosUpperLeft.isChecked() == True:
                self.legendPos = 2
            elif configDlg.ui.radioLegendPosLowerLeft.isChecked() == True:
                self.legendPos = 3
            elif configDlg.ui.radioLegendPosUpperCentre.isChecked() == True:
                self.legendPos = 9
            elif configDlg.ui.radioLegendPosLowerRight.isChecked() == True:
                self.legendPos = 4
            elif configDlg.ui.radioLegendPosUpperRight.isChecked() == True:
                self.legendPos = 1
            else:
                self.legendPos = -1

            self.bUniqueShapes = configDlg.ui.chkUniqueShapes.isChecked()

            self.settings.setValue('group: ' + self.name + '/width',
                                   self.figWidth)
            self.settings.setValue('group: ' + self.name + '/height',
                                   self.figHeight)
            self.settings.setValue(
                'group: ' + self.name + '/fixed pixels per unit distance',
                self.bFixedPixelsPerUnitDistance)
            self.settings.setValue('group: ' + self.name + '/marker size',
                                   self.markerSize)
            self.settings.setValue(
                'group: ' + self.name + '/rotate pc3 labels',
                self.bRotateLabels)
            self.settings.setValue('group: ' + self.name + '/showPC1vsPC3',
                                   self.bShowPC1vsPC3)
            self.settings.setValue('group: ' + self.name + '/showPC3vsPC2',
                                   self.bShowPC3vsPC2)
            self.settings.setValue('group: ' + self.name + '/legend position',
                                   self.legendPos)
            self.settings.setValue('group: ' + self.name + '/unique shapes',
                                   self.bUniqueShapes)

            self.plot(profile, statsResults)