def configure(self, profile, statsResults): self.configDlg = ConfigureDialog(Ui_MultCompCorrectionDialog) self.connect(self.configDlg.ui.btnXmaxFig1, QtCore.SIGNAL('clicked()'), self.setXaxisMax1) self.connect(self.configDlg.ui.btnXmaxFig2, QtCore.SIGNAL('clicked()'), self.setXaxisMax2) self.connect(self.configDlg.ui.btnXmaxFig3, QtCore.SIGNAL('clicked()'), self.setXaxisMax3) self.configDlg.ui.spinFigWidth.setValue(self.figWidth) self.configDlg.ui.spinFigHeight.setValue(self.figHeight) self.configDlg.ui.spinBinWidth.setValue(self.binWidth) self.configDlg.ui.chkLogScale.setChecked(self.yAxisLogScale) self.configDlg.ui.spinXlimitFig1.setValue(self.xLimitFig1) self.configDlg.ui.spinXlimitFig2.setValue(self.xLimitFig2) self.configDlg.ui.spinXlimitFig3.setValue(self.xLimitFig3) if self.configDlg.exec_() == QtGui.QDialog.Accepted: self.figWidth = self.configDlg.ui.spinFigWidth.value() self.figHeight = self.configDlg.ui.spinFigHeight.value() self.binWidth = self.configDlg.ui.spinBinWidth.value() self.yAxisLogScale = self.configDlg.ui.chkLogScale.isChecked() self.xLimitFig1 = self.configDlg.ui.spinXlimitFig1.value() self.xLimitFig2 = self.configDlg.ui.spinXlimitFig2.value() self.xLimitFig3 = self.configDlg.ui.spinXlimitFig3.value() self.settings.setValue(self.name + '/width', self.figWidth) self.settings.setValue(self.name + '/height', self.figHeight) self.settings.setValue(self.name + '/histogram log scale', self.yAxisLogScale) self.settings.setValue(self.name + '/bin width', self.binWidth) self.settings.setValue(self.name + '/histogram x-axis limit', self.xLimitFig1) self.settings.setValue(self.name + '/correction plot x-axis limit', self.xLimitFig2) self.settings.setValue( self.name + '/significant features x-axis limit', self.xLimitFig3) self.plot(profile, statsResults)
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.chkShowCIs.setChecked(self.bShowCIs) 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.bShowCIs = configDlg.ui.chkShowCIs.isChecked() 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(self.name + '/width', self.figWidth) self.settings.setValue(self.name + '/height', self.figHeight) self.settings.setValue(self.name + '/show CIs', self.bShowCIs) self.settings.setValue(self.name + '/bin', self.numBins) self.settings.setValue(self.name + '/bin size', self.histogramSize) self.settings.setValue(self.name + '/show histograms', self.bShowHistograms) self.settings.setValue(self.name + '/marker size', self.markerSize) self.settings.setValue(self.name + '/show R2', self.bShowR2) self.plot(profile, statsResults)
def configure(self, profile, statsResults): self.statsResults = statsResults self.configDlg = ConfigureDialog(Ui_ExtendedErrorBarDialog) # set enabled state of controls self.configDlg.ui.cboPercentageOrSeqCount.setEnabled(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.cboPercentageOrSeqCount.setCurrentIndex( self.configDlg.ui.cboPercentageOrSeqCount.findText( self.percentageOrSeqCount)) 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.percentageOrSeqCount = self.configDlg.ui.cboPercentageOrSeqCount.currentText( ) # 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(self.name + '/width', self.figWidth) self.settings.setValue(self.name + '/row height', self.figHeightPerRow) self.settings.setValue(self.name + '/field', self.sortingField) self.settings.setValue(self.name + '/sequences subplot', self.bShowBarPlot) self.settings.setValue(self.name + '/p-value labels', self.bShowPValueLabels) self.settings.setValue(self.name + '/show corrected p-values', self.bShowCorrectedPvalues) self.settings.setValue(self.name + 'use custom limits', self.bCustomLimits) self.settings.setValue(self.name + '/minimum', self.minX) self.settings.setValue(self.name + '/maximum', self.maxX) self.settings.setValue(self.name + '/marker size', self.markerSize) self.settings.setValue(self.name + '/percentage or seq count', self.percentageOrSeqCount) self.settings.setValue(self.name + '/legend position', self.legendPos) self.plot(profile, statsResults) QtGui.QApplication.instance().restoreOverrideCursor()
def configure(self, profile, statsResults): configDlg = ConfigureDialog(Ui_ProfileBarPlotDialog) # set enabled state of widgets configDlg.ui.spinEndCapSize.setEnabled(self.bShowCIs) configDlg.ui.spinPvalueThreshold.setEnabled(self.bShowPvalue) # set current values configDlg.ui.cboFieldToPlot.setCurrentIndex( configDlg.ui.cboFieldToPlot.findText(self.fieldToPlot)) configDlg.ui.spinFigColWidth.setValue(self.figColWidth) configDlg.ui.spinFigHeight.setValue(self.figHeight) configDlg.ui.chkShowCIs.setChecked(self.bShowCIs) configDlg.ui.spinEndCapSize.setValue(self.endCapSize) configDlg.ui.spinFeaturesToShow.setValue(self.numFeaturesToShow) # 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.spinBarWidth.setValue(self.barWidth) configDlg.ui.chkShowPvalue.setChecked(self.bShowPvalue) configDlg.ui.spinPvalueThreshold.setValue(self.pValueThreshold) 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.bShowCIs = configDlg.ui.chkShowCIs.isChecked() self.endCapSize = configDlg.ui.spinEndCapSize.value() self.numFeaturesToShow = configDlg.ui.spinFeaturesToShow.value() # 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.barWidth = configDlg.ui.spinBarWidth.value() self.bShowPvalue = configDlg.ui.chkShowPvalue.isChecked() self.pValueThreshold = configDlg.ui.spinPvalueThreshold.value() self.settings.setValue(self.name + '/column width', self.figColWidth) self.settings.setValue(self.name + '/height', self.figHeight) self.settings.setValue(self.name + '/field to plot', self.fieldToPlot) self.settings.setValue(self.name + '/legend position', self.legendPos) self.settings.setValue(self.name + '/show cis', self.bShowCIs) self.settings.setValue(self.name + '/end cap size', self.endCapSize) self.settings.setValue(self.name + '/features to show', self.numFeaturesToShow) self.settings.setValue(self.name + '/bar width (%)', self.barWidth) self.settings.setValue(self.name + '/show p-value', self.bShowPvalue) self.settings.setValue(self.name + '/p-value threshold', self.pValueThreshold) self.plot(profile, statsResults)
def configure(self, profile, statsResults): self.statsResults = statsResults configDlg = ConfigureDialog(Ui_BarConfigDialog) configDlg.ui.cboFieldToPlot.clear() configDlg.ui.cboFieldToPlot.addItem('Effect size') configDlg.ui.cboFieldToPlot.addItem('Number of sequences') configDlg.ui.cboFieldToPlot.addItem('Number of parental sequences') configDlg.ui.cboFieldToPlot.addItem('p-values') configDlg.ui.cboFieldToPlot.addItem('p-values (corrected)') configDlg.ui.cboFieldToPlot.addItem('Proportion of sequences (%)') configDlg.ui.cboFieldToPlot.setCurrentIndex( configDlg.ui.cboFieldToPlot.findText(self.fieldToPlot)) configDlg.ui.chkSort.setChecked(self.bSortFeatures) configDlg.ui.spinFigWidth.setValue(self.figWidth) configDlg.ui.spinFigRowHeight.setValue(self.figHeightPerRow) # legend position if self.legendPos == 0: configDlg.ui.radioLegendPosBest.setChecked(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) if configDlg.exec_() == QtGui.QDialog.Accepted: self.fieldToPlot = str(configDlg.ui.cboFieldToPlot.currentText()) self.bSortFeatures = configDlg.ui.chkSort.isChecked() self.figWidth = configDlg.ui.spinFigWidth.value() self.figHeightPerRow = configDlg.ui.spinFigRowHeight.value() # legend position self.bShowLegend = True 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.settings.setValue(self.name + '/width', self.figWidth) self.settings.setValue(self.name + '/row height', self.figHeightPerRow) self.settings.setValue(self.name + '/field to plot', self.fieldToPlot) self.settings.setValue(self.name + '/legend position', self.legendPos) self.settings.setValue(self.name + '/sort values', self.bSortFeatures) self.plot(profile, statsResults)
def configure(self, profile, statsResults): self.profile = profile self.configDlg = ConfigureDialog(Ui_SeqHistogramDialog) self.connect(self.configDlg.ui.chkCustomBinWidth, QtCore.SIGNAL('toggled(bool)'), self.changeCustomBinWidth) self.connect(self.configDlg.ui.chkCustomXaxis, QtCore.SIGNAL('toggled(bool)'), self.changeCustomXaxis) self.connect(self.configDlg.ui.btnXmin, QtCore.SIGNAL('clicked()'), self.setXaxisMin) self.connect(self.configDlg.ui.btnXmax, QtCore.SIGNAL('clicked()'), self.setXaxisMax) self.configDlg.ui.spinFigWidth.setValue(self.figWidth) self.configDlg.ui.spinFigHeight.setValue(self.figHeight) self.configDlg.ui.chkCustomBinWidth.setChecked(self.bCustomBinWidth) self.configDlg.ui.spinBinWidth.setValue(self.binWidth) self.configDlg.ui.chkLogScale.setChecked(self.yAxisLogScale) self.configDlg.ui.chkCustomXaxis.setChecked(self.bCustomXaxis) self.configDlg.ui.spinXmin.setValue(self.xLimitLeft) self.configDlg.ui.spinXmax.setValue(self.xLimitRight) self.changeCustomBinWidth() self.changeCustomXaxis() # legend position if self.legendPos == 0: self.configDlg.ui.radioLegendPosBest.setDown(True) elif self.legendPos == 1: self.configDlg.ui.radioLegendPosUpperRight.setChecked(True) elif self.legendPos == 7: self.configDlg.ui.radioLegendPosCentreRight.setChecked(True) elif self.legendPos == 4: self.configDlg.ui.radioLegendPosLowerRight.setChecked(True) elif self.legendPos == 2: self.configDlg.ui.radioLegendPosUpperLeft.setChecked(True) elif self.legendPos == 6: self.configDlg.ui.radioLegendPosCentreLeft.setChecked(True) elif self.legendPos == 3: self.configDlg.ui.radioLegendPosLowerLeft.setChecked(True) else: self.configDlg.ui.radioLegendPosNone.setChecked(True) if self.configDlg.exec_() == QtGui.QDialog.Accepted: self.figWidth = self.configDlg.ui.spinFigWidth.value() self.figHeight = self.configDlg.ui.spinFigHeight.value() self.bCustomBinWidth = self.configDlg.ui.chkCustomBinWidth.isChecked( ) self.binWidth = self.configDlg.ui.spinBinWidth.value() self.yAxisLogScale = self.configDlg.ui.chkLogScale.isChecked() self.bCustomXaxis = self.configDlg.ui.chkCustomXaxis.isChecked() self.xLimitLeft = self.configDlg.ui.spinXmin.value() self.xLimitRight = self.configDlg.ui.spinXmax.value() # legend position if self.configDlg.ui.radioLegendPosBest.isChecked() == True: self.legendPos = 0 elif self.configDlg.ui.radioLegendPosUpperRight.isChecked( ) == True: self.legendPos = 1 elif self.configDlg.ui.radioLegendPosCentreRight.isChecked( ) == True: self.legendPos = 7 elif self.configDlg.ui.radioLegendPosLowerRight.isChecked( ) == True: self.legendPos = 4 elif self.configDlg.ui.radioLegendPosUpperLeft.isChecked() == True: self.legendPos = 2 elif self.configDlg.ui.radioLegendPosCentreLeft.isChecked( ) == True: self.legendPos = 6 elif self.configDlg.ui.radioLegendPosLowerLeft.isChecked() == True: self.legendPos = 3 else: self.legendPos = -1 self.settings.setValue(self.name + '/width', self.figWidth) self.settings.setValue(self.name + '/height', self.figHeight) self.settings.setValue(self.name + '/custom bin width', self.bCustomBinWidth) self.settings.setValue(self.name + '/bin width', self.binWidth) self.settings.setValue(self.name + '/log scale', self.yAxisLogScale) self.settings.setValue(self.name + '/custom x-axis extents', self.bCustomXaxis) self.settings.setValue(self.name + '/min value', self.xLimitLeft) self.settings.setValue(self.name + '/max value', self.xLimitRight) self.settings.setValue(self.name + '/legend position', self.legendPos) self.plot(profile, statsResults)
def configure(self, profile, statsResults): self.statsResults = statsResults self.configDlg = ConfigureDialog(Ui_pValueHistogramDialog) self.connect(self.configDlg.ui.btnXmax, QtCore.SIGNAL('clicked()'), self.setXaxisMax) self.configDlg.ui.cboFieldToPlot.setCurrentIndex( self.configDlg.ui.cboFieldToPlot.findText(self.fieldToPlot)) self.configDlg.ui.spinFigWidth.setValue(self.figWidth) self.configDlg.ui.spinFigHeight.setValue(self.figHeight) self.configDlg.ui.spinBinWidth.setValue(self.binWidth) self.configDlg.ui.chkLogScale.setChecked(self.yAxisLogScale) self.configDlg.ui.chkShowInset.setChecked(self.bShowInset) self.configDlg.ui.spinInsetWidth.setValue(self.insetWidth) self.configDlg.ui.spinInsetHeight.setValue(self.insetHeight) self.configDlg.ui.spinInsetBinWidth.setValue(self.insetBinWidth) self.configDlg.ui.spinXlimit.setValue(self.xLimit) self.configDlg.ui.chkInsetLogScale.setChecked(self.insetLogScale) if self.configDlg.exec_() == QtGui.QDialog.Accepted: self.figWidth = self.configDlg.ui.spinFigWidth.value() self.figHeight = self.configDlg.ui.spinFigHeight.value() self.binWidth = self.configDlg.ui.spinBinWidth.value() self.yAxisLogScale = self.configDlg.ui.chkLogScale.isChecked() self.fieldToPlot = self.configDlg.ui.cboFieldToPlot.currentText() self.bShowInset = self.configDlg.ui.chkShowInset.isChecked() self.insetWidth = self.configDlg.ui.spinInsetWidth.value() self.insetHeight = self.configDlg.ui.spinInsetHeight.value() self.insetBinWidth = self.configDlg.ui.spinInsetBinWidth.value() self.xLimit = self.configDlg.ui.spinXlimit.value() self.insetLogScale = self.configDlg.ui.chkInsetLogScale.isChecked() self.settings.setValue(self.name + '/width', self.figWidth) self.settings.setValue(self.name + '/height', self.figHeight) self.settings.setValue(self.name + '/field to plot', self.fieldToPlot) self.settings.setValue(self.name + '/histogram log scale', self.yAxisLogScale) self.settings.setValue(self.name + '/histogram bin width', self.binWidth) self.settings.setValue(self.name + '/show inset', self.bShowInset) self.settings.setValue(self.name + '/inset width %', self.insetWidth) self.settings.setValue(self.name + '/inset height %', self.insetHeight) self.settings.setValue(self.name + '/inset log scale', self.insetLogScale) self.settings.setValue(self.name + '/inset bin width', self.insetBinWidth) self.settings.setValue(self.name + '/inset x-axis limit', self.xLimit) self.plot(profile, statsResults)