biolab / orange3-single-cell

🍊🔬 Orange add-on for gene expression of single cell data
https://singlecell.biolab.si/
Other
17 stars 25 forks source link

OWDotMatrix: ValueError: 'None' is not in domain #309

Closed JakaKokosar closed 5 years ago

JakaKokosar commented 6 years ago

https://sentry.io/biolab/orange3-single-cell/issues/742517943/

This happens when input data have no categorical values.

Expected behavior

Warn user and handle this exception properly.

Steps to reproduce the behaviour

Single Cell datasets -> Cell cycle in mouse liver -> Dot Matrix -> Change aggregation option

Additional info (worksheets, data, screenshots, ...)
ValueError:  'None' is not in domain
  Module "Orange.data.domain", line 328, in index

    return self._indices[var]
  Module "Orange.widgets.gui", line 2318, in __call__

    self.func(**kwds)
  Module "orangecontrib.single_cell.widgets.owdotmatrix", line 152, in _calculate_table_values

    for ix in np.unique(self.data.get_column_view(self.cluster_var)[0])]
  Module "Orange.data.table", line 1113, in get_column_view

    index = self.domain.index(index)
  Module "Orange.data.domain", line 330, in index

    raise ValueError("'%s' is not in domain" % var)
JakaKokosar commented 6 years ago

@jurijsteblaj , can you look at this? Thanks!