Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize crashes on discrete variable #112

Closed
pavlin-policar opened this issue Feb 19, 2018 · 1 comment
Closed

Normalize crashes on discrete variable #112

pavlin-policar opened this issue Feb 19, 2018 · 1 comment

Comments

@pavlin-policar
Copy link
Collaborator

Single Cell version

0.2.4

Orange version

3.10.0.dev0+558d92d

Steps to reproduce the behavior

SingleCellDatasets (Bone marrow AML Markers) -> Normalize

Additional info (worksheets, data, screenshots, ...)
Exception: AttributeError: 'DiscreteVariable' object has no attribute 'number_of_decimals'
Module: orangecontrib.single_cell.preprocess.scnormalize:37
Widget Name: Normalize
Widget Module: orangecontrib.single_cell.widgets.ownormalization:90
Widget Scheme: /tmp/ows-j_bzx2sk.ows.xml
Version: 3.10.0.dev0+558d92d
Environment: Python 3.6.4 on Linux 4.15.2-2-ARCH #1 SMP PREEMPT Thu Feb 8 18:54:52 UTC 2018 x86_64
Installed Packages: AnyQt==0.0.8, Babel==2.5.1, Bottleneck==1.2.1, CacheControl==0.12.3, CommonMark==0.7.4, Jinja2==2.10, MarkupSafe==1.0, MulticoreTSNE==0.0.1.1, Orange-Spectroscopy==0.3.2, Orange3-DataFusion==0.1.11, Orange3-ImageAnalytics==0.1.15, Orange3-Network==1.3.1, Orange3-Prototypes==0.8.0, Orange3-SingleCell==0.2.4, Orange3==3.10.0.dev0+558d92d, Pillow==5.0.0, PyQt5==5.9.2, Pygments==2.2.0, SecretStorage==2.3.1, Sphinx==1.6.6, alabaster==0.7.10, asn1crypto==0.24.0, astroid==1.6.0, beautifulsoup4==4.6.0, certifi==2017.11.5, cffi==1.11.3, chardet==3.0.4, colorama==0.3.9, colorcet==0.9.1, cryptography==2.1.4, decorator==4.1.2, dill==0.2.7.1, docutils==0.14, flake8-polyfill==1.0.2, flake8==3.5.0, future==0.16.0, h2==2.6.2, h5py==2.7.1, hpack==3.0.0, hyper==0.7.0, hyperframe==3.2.0, idna==2.6, imagesize==0.7.1, ipython-genutils==0.2.0, ipython==6.2.1, isort==4.2.15, jedi==0.11.1, joblib==0.11, jsonschema==2.6.0, jupyter-core==4.4.0, keyring==10.6.0, keyrings.alt==2.3, lap==0.3.0, lazy-object-proxy==1.3.1, lockfile==0.12.2, mando==0.6.4, mccabe==0.6.1, msgpack-python==0.5.1, nbformat==4.4.0, networkx==2.0, numpy==1.14.0, numpydoc==0.7.0, opusFC==1.1.0, pandas==0.22.0, parso==0.1.1, pexpect==4.3.1, pickleshare==0.7.4, pip==9.0.1, plotly==2.2.3, prompt-toolkit==1.0.15, ptyprocess==0.5.2, pycodestyle==2.3.1, pycparser==2.18, pyflakes==1.6.0, pylint==1.8.1, pyqtgraph==0.10.0, python-dateutil==2.6.1, pytz==2017.3, radon==2.2.0, recommonmark==0.4.0, requests==2.18.4, scikit-fusion==0.2.1, scikit-learn==0.19.1, scipy==1.0.0, serverfiles==0.2.1, setuptools==38.4.0, simplegeneric==0.8.1, sip==4.19.6, six==1.11.0, snowballstemmer==1.2.1, spectral==0.19, sphinxcontrib-websupport==1.0.1, traitlets==4.3.2, urllib3==1.22, wcwidth==0.1.7, wheel==0.30.0, wrapt==1.10.11, xlrd==1.1.0
Machine ID: 172461168621546
Stack Trace: Traceback (most recent call last):  File "/home/pavlin/dev/orange3/Orange/canvas/scheme/widgetsscheme.py", line 832, in process_signals_for_widget    handler(*args)  File "/home/pavlin/dev/orange3-single-cell/orangecontrib/single_cell/widgets/ownormalization.py", line 90, in set_data    self.on_changed()  File "/home/pavlin/dev/orange3-single-cell/orangecontrib/single_cell/widgets/ownormalization.py", line 93, in on_changed    self.commit()  File "/home/pavlin/dev/orange3/Orange/widgets/gui.py", line 2001, in unconditional_commit    do_commit()  File "/home/pavlin/dev/orange3/Orange/widgets/gui.py", line 2009, in do_commit    commit()  File "/home/pavlin/dev/orange3-single-cell/orangecontrib/single_cell/widgets/ownormalization.py", line 112, in commit    data = pp(self.data)  File "/home/pavlin/dev/orange3-single-cell/orangecontrib/single_cell/preprocess/scnormalize.py", line 37, in call    var.number_of_decimals = max(3, var.number_of_decimals)AttributeError: 'DiscreteVariable' object has no attribute 'number_of_decimals'
Local Variables: OrderedDict([('Y', None),             ('attributes',              [DiscreteVariable(name='cellType', values=['B-cell', 'Megakaryocyte', 'Monocyte', 'NK-cell', 'T-cell'], compute_value=<orangecontrib.single_cell.preprocess.scnormalize.ScShared object at 0x7feca11a3438>)]),             ('data',              [[Monocyte] {ENSG00000163220, S100A9}, [Megakaryocyte] {ENSG00000163736, PPBP}, [Monocyte] {ENSG00000170458, CD14}, [T-cell] {ENSG00000167286, CD3D}, [T-cell] {ENSG00000010610, CD4}, ...]),             ('proj',              <orangecontrib.single_cell.preprocess.scnormalize.ScNormalizeModel object at 0x7feca11a3240>),             ('self', SCNormalizer()),             ('var',              DiscreteVariable(name='cellType', values=['B-cell', 'Megakaryocyte', 'Monocyte', 'NK-cell', 'T-cell'], compute_value=<orangecontrib.single_cell.preprocess.scnormalize.ScShared object at 0x7feca11a3438>))])
@BlazZupan
Copy link
Contributor

@mstrazar can you please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants