SCCAF / sccaf

Single-Cell Clustering Assessment Framework
MIT License
85 stars 18 forks source link

SCCAF cli should exit with an error when no UMAP or tSNE embeddings are available #22

Open pcm32 opened 4 years ago

pcm32 commented 4 years ago

SCCAF expects the AnnData object passed to have tSNE or UMAP embeddings; if they are not available, SCCAF cli should exit with an error code.

INFO:root:Read ann data file: DONE
INFO:root:First assesment: DONE
INFO:root:Run louvain for starting point: DONE
... storing 'L1_Round0_self-projection' as categorical
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/scanpy/plotting/_anndata.py", line 312, in _scatter_obs
    Y = adata.obsm['X_' + basis][:, components]
  File "/usr/local/lib/python3.7/site-packages/anndata/core/alignedmapping.py", line 159, in __getitem__
    return self._data[key]
KeyError: 'X_umap'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/sccaf", line 129, in <module>
    low_res=args.undercluster_boundary, mplotlib_backend=backend, c_iter=args.conf_sampling_iterations)
  File "/usr/local/lib/python3.7/site-packages/SCCAF/__init__.py", line 647, in SCCAF_optimize_all
    *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/SCCAF/__init__.py", line 804, in SCCAF_optimize
    color_map="RdYlBu_r", legend_loc='on data', frameon=False)
  File "/usr/local/lib/python3.7/site-packages/scanpy/plotting/_anndata.py", line 118, in scatter
    ax=ax)
  File "/usr/local/lib/python3.7/site-packages/scanpy/plotting/_anndata.py", line 317, in _scatter_obs
    .format(basis))
KeyError: 'compute coordinates using visualization tool umap first'
cat: can't open 'rounds.txt': No such file or directory