Commits

Blaz Zupan  committed cd7e591

no message

  • Participants
  • Parent commits 0e8684f

Comments (0)

Files changed (4)

File OWChipPostHocANOVA.py

             if getattr(self, self.factors[indx][2]) and self.selection[indx]:
                 self.match = map(lambda a,b: a or b, self.match, self.selection[indx])
         n = self.match.count(1)
-        print self.match
         self.infob.setText('Total of %d %s match criteria' % (n, ['genes', 'gene'][n==1]))
         if self.commitOnChange or commit:
             self.senddata()
         self.progressBarFinished()
 
     def senddata(self):
-        self.send("PostHoc Gene Selection", (selectorName, self.match))
+        self.send("PostHoc Gene Selection", (self.selectorName, self.match))
 
     def setSelectorName(self):
         if self.updateSelectorName:

File OWHeatMap.py

         self.connect(self.fileLB, SIGNAL("selected(int)"), self.setFileReferenceBySelection)
         self.tabs.insertTab(self.filesTab, "Files")
         self.tabs.setTabEnabled(self.filesTab, 0)
-        hbox = QVBox(box)
+        hbox = QHBox(box)
         self.fileUp = OWGUI.button(hbox, self, 'Up', callback=lambda i=-1: self.fileOrderChange(i), disabled=1)
-        self.fileRef = OWGUI.button(hbox, self, 'Reference', self.setFileReference, disabled=1)
+        self.fileRef = OWGUI.button(hbox, self, 'Ref', self.setFileReference, disabled=1)
         self.fileDown = OWGUI.button(hbox, self, 'Down', callback=lambda i=1: self.fileOrderChange(i), disabled=1)
+        for btn in [self.fileUp, self.fileRef, self.fileDown]:
+            btn.setMaximumWidth(45)
+            
 
         OWGUI.checkBox(self.filesTab, self, 'ShowDataFileNames', 'Show data file names', callback=self.drawHeatMap)
         OWGUI.radioButtonsInBox(self.filesTab, self, 'SelectionType', ['Single data set', 'Multiple data sets'], box='Selection')
     # handling of input/output signals
 
     def dataset(self, data, id):
+        print 'GOT', id
         ids = [d.id for d in self.data]
         if not data:
             if id in ids:
-                del self.data[ids.index(id)]
-                self.fileLB.removeItem(id)
+                k = ids.index(id)
+                del self.data[k]
+                self.fileLB.removeItem(k)
+                if self.refFile == k:
+                    self.refFile = 0
+                    if len(self.data):
+                        self.fileLB.changeItem(self.createListItem(self.data[0].name, self.refFile), self.refFile)
         else:
             # check if the same length
             if data.domain.classVar:
         self.canvas.update()
 
     def chipdata(self, data):
+        print 'CHIPDATA'
         self.data = [] # XXX should only remove the data from the same source, use id in this rutine
         if not data:
             for i in self.canvas.allItems():
             self.send("Classified Examples", selectedData)
         else:
             self.send("Classified Examples", None)
-        self.send("Examples", selectedData)
+        self.send("Examples", selectedData, 1)
 
     ##########################################################################
     # callback functions
 ##        self.canvas.update()
 
     def fileSelectionChanged(self, sel):
-        print 'SEL', sel
         # self.fileRef.setDisabled(sel==0)
         self.selectedFile = sel
         self.fileDown.setEnabled(sel < len(self.data)-1)
         self.fileRef.setEnabled(sel <> self.refFile)
 
     def createListItem(self, text, position):
-        print 'MARK', position, self.refFile
         pixmap = QPixmap()
         pixmap.resize(14,13)
         pixmap.fill(Qt.white)

File OWProcessChipData.py

             for (n, d) in data:
                 nfiles += len(d)
             self.infoa.setText("Microarray data, %d strains, total of %d data files" % (len(data), nfiles))
-            print data
             d = data[0][1][0]
             self.infob.setText("Each data file contains %d measurements of %d genes" % (len(d.domain.attributes), len(d)))
 

File OWSelectGenes.py

         if selector:
             self.selectors[id] = list(selector + (1,0))    # the last two items for use and negation
         else:
-            del self.selectors[id]
+            if id in self.selectors.keys(): del self.selectors[id]
         self.infoa.setText('%d selectors on input.' % len(self.selectors))
         self.drawtable()
         self.senddata()