biolab / orange-bio

Other
9 stars 32 forks source link

[FIX] Volcano Plot: Fix an error when one of the groups is empty #110

Closed ales-erjavec closed 7 years ago

ales-erjavec commented 7 years ago

When one of the test groups is empty Volcano Plot widget raises an error

E.G.:

File (geo-gds360.tab) -> Data Table (select first 10 rows) -> Volcano Plot

---------------------------- IndexError Exception -----------------------------
Traceback (most recent call last):
  File "/Users/aleserjavec/workspace/orange-bio/orangecontrib/bio/widgets3/OWVulcanoPlot.py", line 657, in on_target_changed
    self._update_plot()
  File "/Users/aleserjavec/workspace/orange-bio/orangecontrib/bio/widgets3/OWVulcanoPlot.py", line 665, in _update_plot
    self.plot()
  File "/Users/aleserjavec/workspace/orange-bio/orangecontrib/bio/widgets3/OWVulcanoPlot.py", line 722, in plot
    self.graph.setPlotData(numpy.array([fold[mask], -logP[mask]]).T)
IndexError: invalid index to scalar variable.
-------------------------------------------------------------------------------