Commits

Marko Toplak committed 8993be9 Merge

merge

Comments (0)

Files changed (1)

_bioinformatics/widgets/OWHeatMap.py

         data = None
         if self.sorted_data:
             if self.selected_rows:
-                examples = [self.sorted_data[i] for i in self.selected_rows]
+                #bug if merge is used does not return enough genes
+                #examples = [self.sorted_data[i] for i in self.selected_rows]
+
+                #uses Merge parameter, but does not work correctly for data with multiple classes
+                examples = [self.sorted_data[i*self.Merge+j] for i in self.selected_rows for j in range(self.Merge) if i*self.Merge+j < len(self.sorted_data)]
+
                 data = orange.ExampleTable(examples)
             else:
                 data = None