diff --git a/examples/CoalSeamGas/coal.metadata.single_column_test.tsv b/examples/CoalSeamGas/coal.metadata.single_column_test.tsv new file mode 100644 index 0000000..fe14e0a --- /dev/null +++ b/examples/CoalSeamGas/coal.metadata.single_column_test.tsv @@ -0,0 +1,45 @@ +Sample Id +573857 +573852 +573861 +573859 +573862 +573860 +573855 +573858 +619007 +619006 +573863 +573864 +573865 +573866 +573867 +573868 +573869 +573870 +573871 +573880 +573882 +573877 +573878 +573879 +573886 +573887 +573874 +573875 +573876 +573890 +573891 +573888 +573889 +573895 +573898 +573899 +573900 +573892 +573901 +573893 +573894 +573896 +573897 +573902 diff --git a/stamp/STAMP.py b/stamp/STAMP.py index b37a212..0af7ed0 100644 --- a/stamp/STAMP.py +++ b/stamp/STAMP.py @@ -23,8 +23,8 @@ __copyright__ = 'Copyright 2013' __credits__ = ['Donovan Parks'] __license__ = 'GPL3' -__version__ = '2.1.1' -__date__ = 'June 7, 2015' +__version__ = '2.1.2' +__date__ = 'June 15, 2015' __maintainer__ = 'Donovan Parks' __email__ = 'donovan.parks@gmail.com' __status__ = 'Development' @@ -790,7 +790,7 @@ def loadProfile(self): self.ui.cboProfileLevel.setCurrentIndex(0) # setup group legend - if self.metadata != None: + if self.metadata != None and len(self.metadata.getFeatures()) != 0: self.groupLegendDlg.initLegend(self.profileTree, self.metadata, self.metadata.getFeatures()[0]) self.preferences['Group colours'] = self.groupLegendDlg.groupColourDict diff --git a/stamp/plugins/groups/plots/ExtendedErrorBar.py b/stamp/plugins/groups/plots/ExtendedErrorBar.py index 6eed0f3..339bc92 100644 --- a/stamp/plugins/groups/plots/ExtendedErrorBar.py +++ b/stamp/plugins/groups/plots/ExtendedErrorBar.py @@ -134,7 +134,8 @@ def plot(self, profile, statsResults): if self.bShowCorrectedPvalues: pValueLabels = statsResults.getColumnAsStr('pValuesCorrected') - pValueTitle += ' (corrected)' + if statsResults.multCompCorrection.method != 'No correction': + pValueTitle += ' (corrected)' else: pValueLabels = statsResults.getColumnAsStr('pValues') @@ -369,6 +370,9 @@ def plot(self, profile, statsResults): a.tick1On=False a.tick2On=False + for loc, spine in axRight.spines.iteritems(): + spine.set_color('none') + # *** Legend if self.legendPos != -1: legend1 = Rectangle((0, 0), 1, 1, fc=group1Colour) diff --git a/stamp/plugins/groups/plots/HeatmapPlot.py b/stamp/plugins/groups/plots/HeatmapPlot.py index 958d609..6b67420 100644 --- a/stamp/plugins/groups/plots/HeatmapPlot.py +++ b/stamp/plugins/groups/plots/HeatmapPlot.py @@ -220,10 +220,10 @@ def plot(self, profile, statsResults): longestColLabel = colHeaders[i] # *** Check sorting method and adjust dendrogram parameters appropriately - if self.sortRowMethod == 'Alphabetical order': + if self.sortRowMethod == 'Alphabetical order' or self.sortRowMethod == 'Mean abundance': self.bShowRowDendrogram = False - if self.sortColMethod == 'Alphabetical order': + if self.sortColMethod == 'Alphabetical order' or self.sortColMethod == 'Mean abundance': self.bShowColDendrogram = False # *** Set figure size @@ -294,17 +294,21 @@ def plot(self, profile, statsResults): legendY = heatmapY + heatmapH + (1.5*yLabelBounds.height) + 0.1/self.figWidth # plot dendrograms - if self.sortRowMethod != 'Alphabetical order': + if self.sortRowMethod == 'Alphabetical order': + leafIndex1 = numpy.argsort(rowHeaders)[::-1] + elif self.sortRowMethod == 'Mean abundance': + leafIndex1 = numpy.argsort(numpy.mean(matrix, axis=1)) + else: axisRowDendrogram = self.fig.add_axes([rowDendrogramX, rowDendrogramY, rowDendrogramW, rowDendrogramH], frame_on=False) ind1, leafIndex1 = self.plotDendrogram(matrix, axisRowDendrogram, self.sortRowMethod, self.clusteringRowThreshold, 'right', bPlot = self.bShowRowDendrogram) - else: - leafIndex1 = numpy.argsort(rowHeaders)[::-1] - if self.sortColMethod != 'Alphabetical order': + if self.sortColMethod == 'Alphabetical order': + leafIndex2 = numpy.argsort(colHeaders) + elif self.sortColMethod == 'Mean abundance': + leafIndex2 = numpy.argsort(numpy.mean(matrix, axis=0)) + else: axisColDendrogram = self.fig.add_axes([colDendrogramX, colDendrogramY, colDendrogramW, colDendrogramH], frame_on=False) ind2, leafIndex2 = self.plotDendrogram(matrix.T, axisColDendrogram, self.sortColMethod, self.clusteringColThreshold, 'top', bPlot = self.bShowColDendrogram) - else: - leafIndex2 = numpy.argsort(colHeaders) # *** Handle mouse events xCell = [] diff --git a/stamp/plugins/groups/plots/configGUI/HeatmapPlot.ui b/stamp/plugins/groups/plots/configGUI/HeatmapPlot.ui index 0ca58d9..cc83a80 100644 --- a/stamp/plugins/groups/plots/configGUI/HeatmapPlot.ui +++ b/stamp/plugins/groups/plots/configGUI/HeatmapPlot.ui @@ -280,6 +280,11 @@ Alphabetical order + + + Mean abundance + + Average neighbour (UPGMA) diff --git a/stamp/plugins/groups/plots/configGUI/HeatmapPlotUI.py b/stamp/plugins/groups/plots/configGUI/HeatmapPlotUI.py index 5d6346b..ad09ed7 100644 --- a/stamp/plugins/groups/plots/configGUI/HeatmapPlotUI.py +++ b/stamp/plugins/groups/plots/configGUI/HeatmapPlotUI.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'HeatmapPlot.ui' # -# Created: Fri Nov 07 10:43:39 2014 +# Created: Fri Jun 12 15:15:44 2015 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! @@ -149,6 +149,7 @@ def setupUi(self, HeatmapPlotDialog): self.cboRowSortMethod.addItem(_fromUtf8("")) self.cboRowSortMethod.addItem(_fromUtf8("")) self.cboRowSortMethod.addItem(_fromUtf8("")) + self.cboRowSortMethod.addItem(_fromUtf8("")) self.horizontalLayout_5.addWidget(self.cboRowSortMethod) self.verticalLayout_2.addLayout(self.horizontalLayout_5) self.horizontalLayout_2 = QtGui.QHBoxLayout() @@ -343,11 +344,12 @@ def retranslateUi(self, HeatmapPlotDialog): self.groupBox.setTitle(_translate("HeatmapPlotDialog", "Sort rows", None)) self.lblDendrogramMethod.setText(_translate("HeatmapPlotDialog", "Methods:", None)) self.cboRowSortMethod.setItemText(0, _translate("HeatmapPlotDialog", "Alphabetical order", None)) - self.cboRowSortMethod.setItemText(1, _translate("HeatmapPlotDialog", "Average neighbour (UPGMA)", None)) - self.cboRowSortMethod.setItemText(2, _translate("HeatmapPlotDialog", "Centroid", None)) - self.cboRowSortMethod.setItemText(3, _translate("HeatmapPlotDialog", "Furthest neighbour", None)) - self.cboRowSortMethod.setItemText(4, _translate("HeatmapPlotDialog", "Nearest neighbour", None)) - self.cboRowSortMethod.setItemText(5, _translate("HeatmapPlotDialog", "Ward", None)) + self.cboRowSortMethod.setItemText(1, _translate("HeatmapPlotDialog", "Mean abundance", None)) + self.cboRowSortMethod.setItemText(2, _translate("HeatmapPlotDialog", "Average neighbour (UPGMA)", None)) + self.cboRowSortMethod.setItemText(3, _translate("HeatmapPlotDialog", "Centroid", None)) + self.cboRowSortMethod.setItemText(4, _translate("HeatmapPlotDialog", "Furthest neighbour", None)) + self.cboRowSortMethod.setItemText(5, _translate("HeatmapPlotDialog", "Nearest neighbour", None)) + self.cboRowSortMethod.setItemText(6, _translate("HeatmapPlotDialog", "Ward", None)) self.lblClusteringThreshold.setText(_translate("HeatmapPlotDialog", "Dendrogram clustering threshold:", None)) self.chkShowRowDendrogram.setText(_translate("HeatmapPlotDialog", "Show dendrogram", None)) self.lblDendrogramWidth.setText(_translate("HeatmapPlotDialog", "Width (inches):", None)) diff --git a/stamp/plugins/groups/plots/pcaPlot.py b/stamp/plugins/groups/plots/pcaPlot.py index d91b3f3..765ca7d 100644 --- a/stamp/plugins/groups/plots/pcaPlot.py +++ b/stamp/plugins/groups/plots/pcaPlot.py @@ -131,7 +131,7 @@ def plot(self, profile, statsResults): axesExpandPercentage = 0.1 - border = 0.25 # inches + border = 0.4 # inches plotSpacing = 0.15 xLabelOffset = 0.5 yLabelOffset = 0.2 @@ -416,7 +416,7 @@ def configure(self, profile, statsResults): self.bShowPC1vsPC3 = configDlg.ui.chkPC1vsPC3.isChecked() self.bShowPC3vsPC2 = configDlg.ui.chkPC3vsPC2.isChecked() - # legend position + # legend position if configDlg.ui.radioLegendPosUpperLeft.isChecked() == True: self.legendPos = 2 elif configDlg.ui.radioLegendPosLowerLeft.isChecked() == True: diff --git a/stamp/plugins/multiGroups/plots/HeatmapPlot.py b/stamp/plugins/multiGroups/plots/HeatmapPlot.py index af84cf0..dda4f46 100644 --- a/stamp/plugins/multiGroups/plots/HeatmapPlot.py +++ b/stamp/plugins/multiGroups/plots/HeatmapPlot.py @@ -223,10 +223,10 @@ def plot(self, profile, statsResults): longestColLabel = colHeaders[i] # *** Check sorting method and adjust dendrogram parameters appropriately - if self.sortRowMethod == 'Alphabetical order': + if self.sortRowMethod == 'Alphabetical order' or self.sortRowMethod == 'Mean abundance': self.bShowRowDendrogram = False - if self.sortColMethod == 'Alphabetical order': + if self.sortColMethod == 'Alphabetical order' or self.sortColMethod == 'Mean abundance': self.bShowColDendrogram = False # *** Set figure size @@ -297,17 +297,21 @@ def plot(self, profile, statsResults): legendY = heatmapY + heatmapH + (1.5*yLabelBounds.height) + 0.1/self.figWidth # plot dendrograms - if self.sortRowMethod != 'Alphabetical order': + if self.sortRowMethod == 'Alphabetical order': + leafIndex1 = numpy.argsort(rowHeaders)[::-1] + elif self.sortRowMethod == 'Mean abundance': + leafIndex1 = numpy.argsort(numpy.mean(matrix, axis=1)) + else: axisRowDendrogram = self.fig.add_axes([rowDendrogramX, rowDendrogramY, rowDendrogramW, rowDendrogramH], frame_on=False) ind1, leafIndex1 = self.plotDendrogram(matrix, axisRowDendrogram, self.sortRowMethod, self.clusteringRowThreshold, 'right', bPlot = self.bShowRowDendrogram) - else: - leafIndex1 = numpy.argsort(rowHeaders)[::-1] - if self.sortColMethod != 'Alphabetical order': + if self.sortColMethod == 'Alphabetical order': + leafIndex2 = numpy.argsort(colHeaders) + elif self.sortColMethod == 'Mean abundance': + leafIndex2 = numpy.argsort(numpy.mean(matrix, axis=0)) + else: axisColDendrogram = self.fig.add_axes([colDendrogramX, colDendrogramY, colDendrogramW, colDendrogramH], frame_on=False) ind2, leafIndex2 = self.plotDendrogram(matrix.T, axisColDendrogram, self.sortColMethod, self.clusteringColThreshold, 'top', bPlot = self.bShowColDendrogram) - else: - leafIndex2 = numpy.argsort(colHeaders) # *** Handle mouse events xCell = [] diff --git a/stamp/plugins/multiGroups/plots/PostHocPlot.py b/stamp/plugins/multiGroups/plots/PostHocPlot.py index e4e59f7..4c00fe8 100644 --- a/stamp/plugins/multiGroups/plots/PostHocPlot.py +++ b/stamp/plugins/multiGroups/plots/PostHocPlot.py @@ -390,6 +390,9 @@ def plot(self, profile, statsResults): for a in axRight.yaxis.majorTicks: a.tick1On=False a.tick2On=False + + for loc, spine in axRight.spines.iteritems(): + spine.set_color('none') self.updateGeometry() self.draw() diff --git a/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlot.ui b/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlot.ui index 0ca58d9..cc83a80 100644 --- a/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlot.ui +++ b/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlot.ui @@ -280,6 +280,11 @@ Alphabetical order + + + Mean abundance + + Average neighbour (UPGMA) diff --git a/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlotUI.py b/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlotUI.py index dfb346c..7dad351 100644 --- a/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlotUI.py +++ b/stamp/plugins/multiGroups/plots/configGUI/HeatmapPlotUI.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'HeatmapPlot.ui' # -# Created: Fri Nov 07 11:02:38 2014 +# Created: Fri Jun 12 15:14:54 2015 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! @@ -149,6 +149,7 @@ def setupUi(self, HeatmapPlotDialog): self.cboRowSortMethod.addItem(_fromUtf8("")) self.cboRowSortMethod.addItem(_fromUtf8("")) self.cboRowSortMethod.addItem(_fromUtf8("")) + self.cboRowSortMethod.addItem(_fromUtf8("")) self.horizontalLayout_5.addWidget(self.cboRowSortMethod) self.verticalLayout_2.addLayout(self.horizontalLayout_5) self.horizontalLayout_2 = QtGui.QHBoxLayout() @@ -343,11 +344,12 @@ def retranslateUi(self, HeatmapPlotDialog): self.groupBox.setTitle(_translate("HeatmapPlotDialog", "Sort rows", None)) self.lblDendrogramMethod.setText(_translate("HeatmapPlotDialog", "Methods:", None)) self.cboRowSortMethod.setItemText(0, _translate("HeatmapPlotDialog", "Alphabetical order", None)) - self.cboRowSortMethod.setItemText(1, _translate("HeatmapPlotDialog", "Average neighbour (UPGMA)", None)) - self.cboRowSortMethod.setItemText(2, _translate("HeatmapPlotDialog", "Centroid", None)) - self.cboRowSortMethod.setItemText(3, _translate("HeatmapPlotDialog", "Furthest neighbour", None)) - self.cboRowSortMethod.setItemText(4, _translate("HeatmapPlotDialog", "Nearest neighbour", None)) - self.cboRowSortMethod.setItemText(5, _translate("HeatmapPlotDialog", "Ward", None)) + self.cboRowSortMethod.setItemText(1, _translate("HeatmapPlotDialog", "Mean abundance", None)) + self.cboRowSortMethod.setItemText(2, _translate("HeatmapPlotDialog", "Average neighbour (UPGMA)", None)) + self.cboRowSortMethod.setItemText(3, _translate("HeatmapPlotDialog", "Centroid", None)) + self.cboRowSortMethod.setItemText(4, _translate("HeatmapPlotDialog", "Furthest neighbour", None)) + self.cboRowSortMethod.setItemText(5, _translate("HeatmapPlotDialog", "Nearest neighbour", None)) + self.cboRowSortMethod.setItemText(6, _translate("HeatmapPlotDialog", "Ward", None)) self.lblClusteringThreshold.setText(_translate("HeatmapPlotDialog", "Dendrogram clustering threshold:", None)) self.chkShowRowDendrogram.setText(_translate("HeatmapPlotDialog", "Show dendrogram", None)) self.lblDendrogramWidth.setText(_translate("HeatmapPlotDialog", "Width (inches):", None)) diff --git a/stamp/plugins/multiGroups/plots/configGUI/pcaPlot.ui b/stamp/plugins/multiGroups/plots/configGUI/pcaPlot.ui index e201b72..914b17b 100644 --- a/stamp/plugins/multiGroups/plots/configGUI/pcaPlot.ui +++ b/stamp/plugins/multiGroups/plots/configGUI/pcaPlot.ui @@ -7,7 +7,7 @@ 0 0 334 - 306 + 450 @@ -23,7 +23,7 @@ ../../../../../icons/programIcon.png../../../../../icons/programIcon.png - + @@ -177,68 +177,139 @@ - + - + + + Legend position + + + + + + None + + + + + + + Upper left + + + true + + + + + + + Upper centre + + + + + + + Upper right + + + + + + + Lower left + + + + + + + Lower right + + + + + + + + + + + + + + Marker size: + + + + + + + 1 + + + 100 + + + 30 + + + + + - + - Marker size: + Assign unique shapes + + + true - - - 1 - - - 100 + + + Rotate PC3 labels - - 30 + + true - + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 20 + 40 - - - - Rotate PC3 labels - - - true - - - - - - - Assign unique shapes - - - true - - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + diff --git a/stamp/plugins/multiGroups/plots/configGUI/pcaPlotUI.py b/stamp/plugins/multiGroups/plots/configGUI/pcaPlotUI.py index 9d4a657..aeee208 100644 --- a/stamp/plugins/multiGroups/plots/configGUI/pcaPlotUI.py +++ b/stamp/plugins/multiGroups/plots/configGUI/pcaPlotUI.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'pcaPlot.ui' # -# Created: Fri Nov 30 12:51:51 2012 -# by: PyQt4 UI code generator 4.9.5 +# Created: Mon Jun 15 08:29:04 2015 +# by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! @@ -12,22 +12,31 @@ try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: - _fromUtf8 = lambda s: s + def _fromUtf8(s): + return s + +try: + _encoding = QtGui.QApplication.UnicodeUTF8 + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig, _encoding) +except AttributeError: + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig) class Ui_PcaPlotDialog(object): def setupUi(self, PcaPlotDialog): PcaPlotDialog.setObjectName(_fromUtf8("PcaPlotDialog")) - PcaPlotDialog.resize(334, 306) + PcaPlotDialog.resize(334, 450) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(PcaPlotDialog.sizePolicy().hasHeightForWidth()) PcaPlotDialog.setSizePolicy(sizePolicy) icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/programIcon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(_fromUtf8("../../../../../icons/programIcon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) PcaPlotDialog.setWindowIcon(icon) - self.verticalLayout_3 = QtGui.QVBoxLayout(PcaPlotDialog) - self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) + self.verticalLayout_4 = QtGui.QVBoxLayout(PcaPlotDialog) + self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) self.groupBox_3 = QtGui.QGroupBox(PcaPlotDialog) self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) self.verticalLayout = QtGui.QVBoxLayout(self.groupBox_3) @@ -73,7 +82,7 @@ def setupUi(self, PcaPlotDialog): spacerItem = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.verticalLayout.addLayout(self.horizontalLayout) - self.verticalLayout_3.addWidget(self.groupBox_3) + self.verticalLayout_4.addWidget(self.groupBox_3) self.groupBox = QtGui.QGroupBox(PcaPlotDialog) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox) @@ -96,41 +105,70 @@ def setupUi(self, PcaPlotDialog): self.chkPC1vsPC3.setObjectName(_fromUtf8("chkPC1vsPC3")) self.gridLayout.addWidget(self.chkPC1vsPC3, 1, 0, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout) - self.verticalLayout_3.addWidget(self.groupBox) - self.verticalLayout_4 = QtGui.QVBoxLayout() - self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) - self.horizontalLayout_5 = QtGui.QHBoxLayout() - self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) + self.verticalLayout_4.addWidget(self.groupBox) + self.horizontalLayout_4 = QtGui.QHBoxLayout() + self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) + self.groupBox_6 = QtGui.QGroupBox(PcaPlotDialog) + self.groupBox_6.setObjectName(_fromUtf8("groupBox_6")) + self.verticalLayout_9 = QtGui.QVBoxLayout(self.groupBox_6) + self.verticalLayout_9.setObjectName(_fromUtf8("verticalLayout_9")) + self.radioLegendPosNone = QtGui.QRadioButton(self.groupBox_6) + self.radioLegendPosNone.setObjectName(_fromUtf8("radioLegendPosNone")) + self.verticalLayout_9.addWidget(self.radioLegendPosNone) + self.radioLegendPosUpperLeft = QtGui.QRadioButton(self.groupBox_6) + self.radioLegendPosUpperLeft.setChecked(True) + self.radioLegendPosUpperLeft.setObjectName(_fromUtf8("radioLegendPosUpperLeft")) + self.verticalLayout_9.addWidget(self.radioLegendPosUpperLeft) + self.radioLegendPosUpperCentre = QtGui.QRadioButton(self.groupBox_6) + self.radioLegendPosUpperCentre.setObjectName(_fromUtf8("radioLegendPosUpperCentre")) + self.verticalLayout_9.addWidget(self.radioLegendPosUpperCentre) + self.radioLegendPosUpperRight = QtGui.QRadioButton(self.groupBox_6) + self.radioLegendPosUpperRight.setObjectName(_fromUtf8("radioLegendPosUpperRight")) + self.verticalLayout_9.addWidget(self.radioLegendPosUpperRight) + self.radioLegendPosLowerLeft = QtGui.QRadioButton(self.groupBox_6) + self.radioLegendPosLowerLeft.setObjectName(_fromUtf8("radioLegendPosLowerLeft")) + self.verticalLayout_9.addWidget(self.radioLegendPosLowerLeft) + self.radioLegendPosLowerRight = QtGui.QRadioButton(self.groupBox_6) + self.radioLegendPosLowerRight.setObjectName(_fromUtf8("radioLegendPosLowerRight")) + self.verticalLayout_9.addWidget(self.radioLegendPosLowerRight) + self.horizontalLayout_4.addWidget(self.groupBox_6) + self.verticalLayout_3 = QtGui.QVBoxLayout() + self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) + self.horizontalLayout_2 = QtGui.QHBoxLayout() + self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.label_5 = QtGui.QLabel(PcaPlotDialog) self.label_5.setObjectName(_fromUtf8("label_5")) - self.horizontalLayout_5.addWidget(self.label_5) + self.horizontalLayout_2.addWidget(self.label_5) self.spinMarkerSize = QtGui.QSpinBox(PcaPlotDialog) self.spinMarkerSize.setMinimum(1) self.spinMarkerSize.setMaximum(100) self.spinMarkerSize.setProperty("value", 30) self.spinMarkerSize.setObjectName(_fromUtf8("spinMarkerSize")) - self.horizontalLayout_5.addWidget(self.spinMarkerSize) - spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.horizontalLayout_5.addItem(spacerItem1) - self.chkRotateLabels = QtGui.QCheckBox(PcaPlotDialog) - self.chkRotateLabels.setChecked(True) - self.chkRotateLabels.setObjectName(_fromUtf8("chkRotateLabels")) - self.horizontalLayout_5.addWidget(self.chkRotateLabels) - self.verticalLayout_4.addLayout(self.horizontalLayout_5) + self.horizontalLayout_2.addWidget(self.spinMarkerSize) + self.verticalLayout_3.addLayout(self.horizontalLayout_2) self.chkUniqueShapes = QtGui.QCheckBox(PcaPlotDialog) self.chkUniqueShapes.setChecked(True) self.chkUniqueShapes.setObjectName(_fromUtf8("chkUniqueShapes")) - self.verticalLayout_4.addWidget(self.chkUniqueShapes) - self.verticalLayout_3.addLayout(self.verticalLayout_4) + self.verticalLayout_3.addWidget(self.chkUniqueShapes) + self.chkRotateLabels = QtGui.QCheckBox(PcaPlotDialog) + self.chkRotateLabels.setChecked(True) + self.chkRotateLabels.setObjectName(_fromUtf8("chkRotateLabels")) + self.verticalLayout_3.addWidget(self.chkRotateLabels) + spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.verticalLayout_3.addItem(spacerItem1) + self.horizontalLayout_4.addLayout(self.verticalLayout_3) + self.verticalLayout_4.addLayout(self.horizontalLayout_4) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) + spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.horizontalLayout_3.addItem(spacerItem2) self.buttonBox = QtGui.QDialogButtonBox(PcaPlotDialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) self.buttonBox.setCenterButtons(False) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.horizontalLayout_3.addWidget(self.buttonBox) - self.verticalLayout_3.addLayout(self.horizontalLayout_3) + self.verticalLayout_4.addLayout(self.horizontalLayout_3) self.retranslateUi(PcaPlotDialog) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), PcaPlotDialog.accept) @@ -139,16 +177,23 @@ def setupUi(self, PcaPlotDialog): QtCore.QMetaObject.connectSlotsByName(PcaPlotDialog) def retranslateUi(self, PcaPlotDialog): - PcaPlotDialog.setWindowTitle(QtGui.QApplication.translate("PcaPlotDialog", "PCA plot", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox_3.setTitle(QtGui.QApplication.translate("PcaPlotDialog", "Figure size", None, QtGui.QApplication.UnicodeUTF8)) - self.chkFixedPixelsPerUnitDistance.setText(QtGui.QApplication.translate("PcaPlotDialog", "Fixed pixels per unit distance (recommended)", None, QtGui.QApplication.UnicodeUTF8)) - self.lblFigureWidth.setText(QtGui.QApplication.translate("PcaPlotDialog", "Width:", None, QtGui.QApplication.UnicodeUTF8)) - self.lblFigureHeight.setText(QtGui.QApplication.translate("PcaPlotDialog", "Height:", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox.setTitle(QtGui.QApplication.translate("PcaPlotDialog", "Plots to show", None, QtGui.QApplication.UnicodeUTF8)) - self.checkBox.setText(QtGui.QApplication.translate("PcaPlotDialog", "PC1 vs. PC2", None, QtGui.QApplication.UnicodeUTF8)) - self.chkPC3vsPC2.setText(QtGui.QApplication.translate("PcaPlotDialog", "PC3 vs. PC2", None, QtGui.QApplication.UnicodeUTF8)) - self.chkPC1vsPC3.setText(QtGui.QApplication.translate("PcaPlotDialog", "PC1 vs. PC3", None, QtGui.QApplication.UnicodeUTF8)) - self.label_5.setText(QtGui.QApplication.translate("PcaPlotDialog", "Marker size:", None, QtGui.QApplication.UnicodeUTF8)) - self.chkRotateLabels.setText(QtGui.QApplication.translate("PcaPlotDialog", "Rotate PC3 labels", None, QtGui.QApplication.UnicodeUTF8)) - self.chkUniqueShapes.setText(QtGui.QApplication.translate("PcaPlotDialog", "Assign unique shapes", None, QtGui.QApplication.UnicodeUTF8)) + PcaPlotDialog.setWindowTitle(_translate("PcaPlotDialog", "PCA plot", None)) + self.groupBox_3.setTitle(_translate("PcaPlotDialog", "Figure size", None)) + self.chkFixedPixelsPerUnitDistance.setText(_translate("PcaPlotDialog", "Fixed pixels per unit distance (recommended)", None)) + self.lblFigureWidth.setText(_translate("PcaPlotDialog", "Width:", None)) + self.lblFigureHeight.setText(_translate("PcaPlotDialog", "Height:", None)) + self.groupBox.setTitle(_translate("PcaPlotDialog", "Plots to show", None)) + self.checkBox.setText(_translate("PcaPlotDialog", "PC1 vs. PC2", None)) + self.chkPC3vsPC2.setText(_translate("PcaPlotDialog", "PC3 vs. PC2", None)) + self.chkPC1vsPC3.setText(_translate("PcaPlotDialog", "PC1 vs. PC3", None)) + self.groupBox_6.setTitle(_translate("PcaPlotDialog", "Legend position", None)) + self.radioLegendPosNone.setText(_translate("PcaPlotDialog", "None", None)) + self.radioLegendPosUpperLeft.setText(_translate("PcaPlotDialog", "Upper left", None)) + self.radioLegendPosUpperCentre.setText(_translate("PcaPlotDialog", "Upper centre", None)) + self.radioLegendPosUpperRight.setText(_translate("PcaPlotDialog", "Upper right", None)) + self.radioLegendPosLowerLeft.setText(_translate("PcaPlotDialog", "Lower left", None)) + self.radioLegendPosLowerRight.setText(_translate("PcaPlotDialog", "Lower right", None)) + self.label_5.setText(_translate("PcaPlotDialog", "Marker size:", None)) + self.chkUniqueShapes.setText(_translate("PcaPlotDialog", "Assign unique shapes", None)) + self.chkRotateLabels.setText(_translate("PcaPlotDialog", "Rotate PC3 labels", None)) diff --git a/stamp/plugins/multiGroups/plots/pcaPlot.py b/stamp/plugins/multiGroups/plots/pcaPlot.py index b2db4b2..c5f03b1 100644 --- a/stamp/plugins/multiGroups/plots/pcaPlot.py +++ b/stamp/plugins/multiGroups/plots/pcaPlot.py @@ -37,6 +37,8 @@ from matplotlib.ticker import NullFormatter from matplotlib import collections +from matplotlib.patches import Rectangle + from matplotlib.mlab import PCA from numpy.linalg import LinAlgError @@ -62,7 +64,8 @@ def __init__(self, preferences, parent=None): self.bRotateLabels = self.settings.value('multiple group: ' + self.name + '/rotate pc3 labels', True).toBool() self.bShowPC1vsPC3 = self.settings.value('multiple group: ' + self.name + '/showPC1vsPC3', True).toBool() self.bShowPC3vsPC2 = self.settings.value('multiple group: ' + self.name + '/showPC3vsPC2', True).toBool() - self.bUniqueShapes = self.settings.value('group: ' + self.name + '/unique shapes', True).toBool() + self.legendPos = self.settings.value('multiple group: ' + self.name + '/legend position', -1).toInt()[0] + self.bUniqueShapes = self.settings.value('multiple group: ' + self.name + '/unique shapes', True).toBool() def mirrorProperties(self, plotToCopy): self.name = plotToCopy.name @@ -79,6 +82,8 @@ def mirrorProperties(self, plotToCopy): self.bShowPC1vsPC3 = plotToCopy.bShowPC1vsPC3 self.bShowPC3vsPC2 = plotToCopy.bShowPC3vsPC2 + self.legendPos = plotToCopy.legendPos + self.bUniqueShapes = plotToCopy.bUniqueShapes def plot(self, profile, statsResults): @@ -130,7 +135,7 @@ def plot(self, profile, statsResults): axesExpandPercentage = 0.1 - border = 0.2 # inches + border = 0.6 # inches plotSpacing = 0.15 xLabelOffset = 0.5 yLabelOffset = 0.2 @@ -369,6 +374,7 @@ def plot(self, profile, statsResults): else: spine.set_color(axesColour) + # *** Handle mouse events tooltips = [] for i in xrange(0, len(profile.activeSamplesInGroups)): @@ -379,6 +385,22 @@ def plot(self, profile, statsResults): self.plotEventHandler = MultiPlotEventHandler(xData, yData, scatterPlotAxes, tooltips) self.mouseEventCallback(self.plotEventHandler) + # *** Legend + if self.legendPos != -1: + legendItems = [] + groupNames = [] + for i in xrange(0, len(profile.activeSamplesInGroups)): + legendItem = Rectangle((0, 0), 1, 1, fc=str(self.preferences['Group colours'][profile.activeGroupNames[i]].name())) + legendItems.append(legendItem) + groupNames.append(profile.activeGroupNames[i]) + + numCols = 3 + if len(groupNames) <= 4: + numCols = len(groupNames) + + legend = self.fig.legend(legendItems, groupNames, loc=self.legendPos, ncol=numCols) + legend.get_frame().set_linewidth(0) + self.updateGeometry() self.draw() @@ -399,6 +421,19 @@ def configure(self, profile, statsResults): 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: @@ -414,6 +449,20 @@ def configure(self, profile, statsResults): 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('multiple group: ' + self.name + '/width', self.figWidth) @@ -423,7 +472,8 @@ def configure(self, profile, statsResults): self.settings.setValue('multiple group: ' + self.name + '/rotate pc3 labels', self.bRotateLabels) self.settings.setValue('multiple group: ' + self.name + '/showPC1vsPC3', self.bShowPC1vsPC3) self.settings.setValue('multiple group: ' + self.name + '/showPC3vsPC2', self.bShowPC3vsPC2) - self.settings.setValue('group: ' + self.name + '/unique shapes', self.bUniqueShapes) + self.settings.setValue('multiple group: ' + self.name + '/legend position', self.legendPos) + self.settings.setValue('multiple group: ' + self.name + '/unique shapes', self.bUniqueShapes) self.plot(profile, statsResults) diff --git a/stamp/plugins/samples/plots/Bar.py b/stamp/plugins/samples/plots/Bar.py index 8d7ccd1..960ba3f 100644 --- a/stamp/plugins/samples/plots/Bar.py +++ b/stamp/plugins/samples/plots/Bar.py @@ -60,7 +60,7 @@ def mirrorProperties(self, plotToCopy): def plot(self, profile, statsResults): if len(statsResults.activeData) <= 0: - self.emptyAxis() + self.emptyAxis() return features = statsResults.getColumn('Features') @@ -71,7 +71,7 @@ def plot(self, profile, statsResults): 'Do you wish to continue?', QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) QtGui.QApplication.instance().restoreOverrideCursor() if reply == QtGui.QMessageBox.No: - self.emptyAxis() + self.emptyAxis() return # *** Colour of plot elements diff --git a/stamp/plugins/samples/plots/ExtendedErrorBar.py b/stamp/plugins/samples/plots/ExtendedErrorBar.py index 3cb67d6..39d3d8d 100644 --- a/stamp/plugins/samples/plots/ExtendedErrorBar.py +++ b/stamp/plugins/samples/plots/ExtendedErrorBar.py @@ -83,7 +83,7 @@ def mirrorProperties(self, plotToCopy): def plot(self, profile, statsResults): # *** Check if there is sufficient data to generate the plot if len(statsResults.activeData) <= 0: - self.emptyAxis() + self.emptyAxis() return features = statsResults.getColumn('Features') @@ -129,7 +129,8 @@ def plot(self, profile, statsResults): if self.bShowCorrectedPvalues: pValueLabels = statsResults.getColumnAsStr('pValuesCorrected') - pValueTitle += ' (corrected)' + if statsResults.multCompCorrection.method != 'No correction': + pValueTitle += ' (corrected)' else: pValueLabels = statsResults.getColumnAsStr('pValues') @@ -229,11 +230,11 @@ def plot(self, profile, statsResults): widthErrorBarPlot = widthPlotFigSpace*self.imageWidth - widthNumSeqPlot - spacingBetweenPlots - axInitAxis = self.fig.add_axes([xPlotOffsetFigSpace,yPlotOffsetFigSpace,widthPlotFigSpace,heightPlotFigSpace]) - divider = make_axes_locatable(axInitAxis) + axInitAxis = self.fig.add_axes([xPlotOffsetFigSpace,yPlotOffsetFigSpace,widthPlotFigSpace,heightPlotFigSpace]) + divider = make_axes_locatable(axInitAxis) divider.get_vertical()[0] = Size.Fixed(len(features)*self.figHeightPerRow) - if self.bShowBarPlot == True: + if self.bShowBarPlot == True: divider.get_horizontal()[0] = Size.Fixed(widthNumSeqPlot) axErrorbar = divider.new_horizontal(widthErrorBarPlot, pad=spacingBetweenPlots, sharey=axInitAxis) self.fig.add_axes(axErrorbar) @@ -368,6 +369,9 @@ def plot(self, profile, statsResults): for a in axRight.yaxis.majorTicks: a.tick1On=False a.tick2On=False + + for loc, spine in axRight.spines.iteritems(): + spine.set_color('none') # *** Legend # *** Legend diff --git a/stamp/plugins/samples/plots/ProfileBarPlots.py b/stamp/plugins/samples/plots/ProfileBarPlots.py index bab43e5..cb2346d 100644 --- a/stamp/plugins/samples/plots/ProfileBarPlots.py +++ b/stamp/plugins/samples/plots/ProfileBarPlots.py @@ -37,6 +37,7 @@ class ProfileBarPlots(AbstractSamplePlotPlugin): ''' Profile bar plots. ''' + def __init__(self, preferences, parent=None): AbstractSamplePlotPlugin.__init__(self, preferences, parent) self.preferences = preferences @@ -55,6 +56,7 @@ def __init__(self, preferences, parent=None): self.barWidth = self.settings.value(self.name + '/bar width (%)', 80).toDouble()[0] self.bShowPvalue = self.settings.value(self.name + '/show p-value', True).toBool() self.pValueThreshold = self.settings.value(self.name + '/p-value threshold', 0.05).toDouble()[0] + self.bOnlyActiveFeatures = self.settings.value(self.name + '/only active features', True).toBool() def mirrorProperties(self, plotToCopy): self.name = plotToCopy.name @@ -67,6 +69,7 @@ def mirrorProperties(self, plotToCopy): self.numFeaturesToShow = plotToCopy.numFeaturesToShow self.bShowPvalue = plotToCopy.bShowPvalue self.pValueThreshold = plotToCopy.pValueThreshold + self.bOnlyActiveFeatures = plotToCopy.bOnlyActiveFeatures def plot(self, profile, statsResults): if len(profile.profileDict) <= 0: @@ -85,9 +88,16 @@ def plot(self, profile, statsResults): parentField1 = [] parentField2 = [] + if self.bOnlyActiveFeatures: + activeFeatures = set([d[0] for d in statsResults.activeData]) + tables = profile.getLabeledTables() for table in tables: feature, seq1, seq2, parentSeq1, parentSeq2 = table + + if self.bOnlyActiveFeatures and feature not in activeFeatures: + continue + field1.append(seq1) field2.append(seq2) parentField1.append(parentSeq1) @@ -254,7 +264,7 @@ def configure(self, profile, statsResults): configDlg.ui.spinEndCapSize.setEnabled(self.bShowCIs) configDlg.ui.spinPvalueThreshold.setEnabled(self.bShowPvalue) - # set current values + # set current values configDlg.ui.cboFieldToPlot.setCurrentIndex(configDlg.ui.cboFieldToPlot.findText(self.fieldToPlot)) configDlg.ui.spinFigColWidth.setValue(self.figColWidth) @@ -265,6 +275,8 @@ def configure(self, profile, statsResults): configDlg.ui.spinFeaturesToShow.setValue(self.numFeaturesToShow) + configDlg.ui.chkOnlyActiveFeatures.setChecked(self.bOnlyActiveFeatures) + # legend position if self.legendPos == 0: configDlg.ui.radioLegendPosBest.setDown(True) @@ -297,9 +309,11 @@ def configure(self, profile, statsResults): self.bShowCIs = configDlg.ui.chkShowCIs.isChecked() self.endCapSize = configDlg.ui.spinEndCapSize.value() - self.numFeaturesToShow = configDlg.ui.spinFeaturesToShow.value(); + self.numFeaturesToShow = configDlg.ui.spinFeaturesToShow.value() + + self.bOnlyActiveFeatures = configDlg.ui.chkOnlyActiveFeatures.isChecked() - # legend position + # legend position if configDlg.ui.radioLegendPosBest.isChecked() == True: self.legendPos = 0 elif configDlg.ui.radioLegendPosUpperRight.isChecked() == True: @@ -332,6 +346,7 @@ def configure(self, profile, statsResults): 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.settings.setValue(self.name + '/only active features', self.bOnlyActiveFeatures) self.plot(profile, statsResults) diff --git a/stamp/plugins/samples/plots/configGUI/profileBarPlot.ui b/stamp/plugins/samples/plots/configGUI/profileBarPlot.ui index 8e68b76..df34aed 100644 --- a/stamp/plugins/samples/plots/configGUI/profileBarPlot.ui +++ b/stamp/plugins/samples/plots/configGUI/profileBarPlot.ui @@ -7,7 +7,7 @@ 0 0 418 - 277 + 300 @@ -286,6 +286,13 @@ + + + + Only show active features + + + diff --git a/stamp/plugins/samples/plots/configGUI/profileBarPlotUI.py b/stamp/plugins/samples/plots/configGUI/profileBarPlotUI.py index 6b1e52a..a46dfc5 100644 --- a/stamp/plugins/samples/plots/configGUI/profileBarPlotUI.py +++ b/stamp/plugins/samples/plots/configGUI/profileBarPlotUI.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'profileBarPlot.ui' # -# Created: Thu Aug 11 10:42:25 2011 -# by: PyQt4 UI code generator 4.8.4 +# Created: Fri Jun 12 15:44:48 2015 +# by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! @@ -12,19 +12,28 @@ try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: - _fromUtf8 = lambda s: s + def _fromUtf8(s): + return s + +try: + _encoding = QtGui.QApplication.UnicodeUTF8 + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig, _encoding) +except AttributeError: + def _translate(context, text, disambig): + return QtGui.QApplication.translate(context, text, disambig) class Ui_ProfileBarPlotDialog(object): def setupUi(self, ProfileBarPlotDialog): ProfileBarPlotDialog.setObjectName(_fromUtf8("ProfileBarPlotDialog")) - ProfileBarPlotDialog.resize(418, 277) + ProfileBarPlotDialog.resize(418, 300) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(ProfileBarPlotDialog.sizePolicy().hasHeightForWidth()) ProfileBarPlotDialog.setSizePolicy(sizePolicy) icon = QtGui.QIcon() - icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/programIcon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon.addPixmap(QtGui.QPixmap(_fromUtf8("../../../../../icons/programIcon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) ProfileBarPlotDialog.setWindowIcon(icon) self.verticalLayout_5 = QtGui.QVBoxLayout(ProfileBarPlotDialog) self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) @@ -62,7 +71,7 @@ def setupUi(self, ProfileBarPlotDialog): self.spinFigColWidth.setMinimum(0.01) self.spinFigColWidth.setMaximum(10.0) self.spinFigColWidth.setSingleStep(0.01) - self.spinFigColWidth.setProperty(_fromUtf8("value"), 0.5) + self.spinFigColWidth.setProperty("value", 0.5) self.spinFigColWidth.setObjectName(_fromUtf8("spinFigColWidth")) self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.spinFigColWidth) self.lblFigureHeight = QtGui.QLabel(self.groupBox_3) @@ -72,7 +81,7 @@ def setupUi(self, ProfileBarPlotDialog): self.spinFigHeight.setMinimum(0.1) self.spinFigHeight.setMaximum(20.0) self.spinFigHeight.setSingleStep(0.05) - self.spinFigHeight.setProperty(_fromUtf8("value"), 6.0) + self.spinFigHeight.setProperty("value", 6.0) self.spinFigHeight.setObjectName(_fromUtf8("spinFigHeight")) self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.spinFigHeight) self.lblFigureWidth = QtGui.QLabel(self.groupBox_3) @@ -84,7 +93,7 @@ def setupUi(self, ProfileBarPlotDialog): self.spinBarWidth = QtGui.QSpinBox(self.groupBox_3) self.spinBarWidth.setMaximum(100) self.spinBarWidth.setSingleStep(5) - self.spinBarWidth.setProperty(_fromUtf8("value"), 80) + self.spinBarWidth.setProperty("value", 80) self.spinBarWidth.setObjectName(_fromUtf8("spinBarWidth")) self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.spinBarWidth) self.verticalLayout_6.addLayout(self.formLayout_2) @@ -124,7 +133,7 @@ def setupUi(self, ProfileBarPlotDialog): self.spinPvalueThreshold.setDecimals(4) self.spinPvalueThreshold.setMaximum(1.0) self.spinPvalueThreshold.setSingleStep(0.0001) - self.spinPvalueThreshold.setProperty(_fromUtf8("value"), 0.05) + self.spinPvalueThreshold.setProperty("value", 0.05) self.spinPvalueThreshold.setObjectName(_fromUtf8("spinPvalueThreshold")) self.horizontalLayout_4.addWidget(self.spinPvalueThreshold) spacerItem1 = QtGui.QSpacerItem(1, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) @@ -138,12 +147,15 @@ def setupUi(self, ProfileBarPlotDialog): self.spinFeaturesToShow = QtGui.QSpinBox(ProfileBarPlotDialog) self.spinFeaturesToShow.setMinimum(1) self.spinFeaturesToShow.setMaximum(1000) - self.spinFeaturesToShow.setProperty(_fromUtf8("value"), 50) + self.spinFeaturesToShow.setProperty("value", 50) self.spinFeaturesToShow.setObjectName(_fromUtf8("spinFeaturesToShow")) self.horizontalLayout_3.addWidget(self.spinFeaturesToShow) spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem2) self.verticalLayout_4.addLayout(self.horizontalLayout_3) + self.chkOnlyActiveFeatures = QtGui.QCheckBox(ProfileBarPlotDialog) + self.chkOnlyActiveFeatures.setObjectName(_fromUtf8("chkOnlyActiveFeatures")) + self.verticalLayout_4.addWidget(self.chkOnlyActiveFeatures) self.horizontalLayout_7.addLayout(self.verticalLayout_4) self.groupBox = QtGui.QGroupBox(ProfileBarPlotDialog) self.groupBox.setObjectName(_fromUtf8("groupBox")) @@ -199,27 +211,28 @@ def setupUi(self, ProfileBarPlotDialog): QtCore.QMetaObject.connectSlotsByName(ProfileBarPlotDialog) def retranslateUi(self, ProfileBarPlotDialog): - ProfileBarPlotDialog.setWindowTitle(QtGui.QApplication.translate("ProfileBarPlotDialog", "Profile bar plot", None, QtGui.QApplication.UnicodeUTF8)) - self.lblFieldToPlot.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Field to plot:", None, QtGui.QApplication.UnicodeUTF8)) - self.cboFieldToPlot.setItemText(0, QtGui.QApplication.translate("ProfileBarPlotDialog", "Number of sequences", None, QtGui.QApplication.UnicodeUTF8)) - self.cboFieldToPlot.setItemText(1, QtGui.QApplication.translate("ProfileBarPlotDialog", "Proportion of sequences (%)", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox_3.setTitle(QtGui.QApplication.translate("ProfileBarPlotDialog", "Figure size", None, QtGui.QApplication.UnicodeUTF8)) - self.lblFigureHeight.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Height:", None, QtGui.QApplication.UnicodeUTF8)) - self.lblFigureWidth.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Column width:", None, QtGui.QApplication.UnicodeUTF8)) - self.label_3.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Bar width (%):", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox_4.setTitle(QtGui.QApplication.translate("ProfileBarPlotDialog", "Confidence Intervals", None, QtGui.QApplication.UnicodeUTF8)) - self.chkShowCIs.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Show CIs", None, QtGui.QApplication.UnicodeUTF8)) - self.label.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "End cap size:", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox_5.setTitle(QtGui.QApplication.translate("ProfileBarPlotDialog", "Mark significant features", None, QtGui.QApplication.UnicodeUTF8)) - self.chkShowPvalue.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Mark features with a p-value <=", None, QtGui.QApplication.UnicodeUTF8)) - self.label_2.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Maximum # features to show:", None, QtGui.QApplication.UnicodeUTF8)) - self.groupBox.setTitle(QtGui.QApplication.translate("ProfileBarPlotDialog", "Legend position", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosNone.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "None", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosBest.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Best", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosUpperRight.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Upper right", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosCentreRight.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Centre right", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosLowerRight.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Lower right", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosUpperLeft.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Upper left", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosCentreLeft.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Centre left", None, QtGui.QApplication.UnicodeUTF8)) - self.radioLegendPosLowerLeft.setText(QtGui.QApplication.translate("ProfileBarPlotDialog", "Lower left", None, QtGui.QApplication.UnicodeUTF8)) + ProfileBarPlotDialog.setWindowTitle(_translate("ProfileBarPlotDialog", "Profile bar plot", None)) + self.lblFieldToPlot.setText(_translate("ProfileBarPlotDialog", "Field to plot:", None)) + self.cboFieldToPlot.setItemText(0, _translate("ProfileBarPlotDialog", "Number of sequences", None)) + self.cboFieldToPlot.setItemText(1, _translate("ProfileBarPlotDialog", "Proportion of sequences (%)", None)) + self.groupBox_3.setTitle(_translate("ProfileBarPlotDialog", "Figure size", None)) + self.lblFigureHeight.setText(_translate("ProfileBarPlotDialog", "Height:", None)) + self.lblFigureWidth.setText(_translate("ProfileBarPlotDialog", "Column width:", None)) + self.label_3.setText(_translate("ProfileBarPlotDialog", "Bar width (%):", None)) + self.groupBox_4.setTitle(_translate("ProfileBarPlotDialog", "Confidence Intervals", None)) + self.chkShowCIs.setText(_translate("ProfileBarPlotDialog", "Show CIs", None)) + self.label.setText(_translate("ProfileBarPlotDialog", "End cap size:", None)) + self.groupBox_5.setTitle(_translate("ProfileBarPlotDialog", "Mark significant features", None)) + self.chkShowPvalue.setText(_translate("ProfileBarPlotDialog", "Mark features with a p-value <=", None)) + self.label_2.setText(_translate("ProfileBarPlotDialog", "Maximum # features to show:", None)) + self.chkOnlyActiveFeatures.setText(_translate("ProfileBarPlotDialog", "Only show active features", None)) + self.groupBox.setTitle(_translate("ProfileBarPlotDialog", "Legend position", None)) + self.radioLegendPosNone.setText(_translate("ProfileBarPlotDialog", "None", None)) + self.radioLegendPosBest.setText(_translate("ProfileBarPlotDialog", "Best", None)) + self.radioLegendPosUpperRight.setText(_translate("ProfileBarPlotDialog", "Upper right", None)) + self.radioLegendPosCentreRight.setText(_translate("ProfileBarPlotDialog", "Centre right", None)) + self.radioLegendPosLowerRight.setText(_translate("ProfileBarPlotDialog", "Lower right", None)) + self.radioLegendPosUpperLeft.setText(_translate("ProfileBarPlotDialog", "Upper left", None)) + self.radioLegendPosCentreLeft.setText(_translate("ProfileBarPlotDialog", "Centre left", None)) + self.radioLegendPosLowerLeft.setText(_translate("ProfileBarPlotDialog", "Lower left", None)) diff --git a/windows/STAMP_Setup.iss b/windows/STAMP_Setup.iss index 8f5241d..4c98691 100644 --- a/windows/STAMP_Setup.iss +++ b/windows/STAMP_Setup.iss @@ -7,7 +7,7 @@ ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{058AA4B2-FB5A-4D89-9134-D6E06AB9E894} AppName=STAMP -AppVerName=STAMP v2.1.1 +AppVerName=STAMP v2.1.2 AppPublisher=Donovan Parks and Robert Beiko AppPublisherURL=http://kiwi.cs.dal.ca/Software/STAMP AppSupportURL=http://kiwi.cs.dal.ca/Software/STAMP @@ -18,7 +18,7 @@ AllowNoIcons=yes LicenseFile=..\dist\LICENSE.txt InfoBeforeFile=..\dist\readme.txt OutputDir=.\install -OutputBaseFilename=STAMP_2_1_1 +OutputBaseFilename=STAMP_2_1_2 SetupIconFile=..\dist\icons\stamp.ico Compression=lzma SolidCompression=yes