We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Following the pbmc3k tutorial I get an error: KeyError: 'base' when executing the following cmd:
sc.tl.rank_genes_groups(adata, 'leiden', groups=['0'], reference='1', method='wilcoxon')
I run python 3.8 in a venv on Ubuntu 20.04 (VM)
scanpy==1.9.3
More error details (notebook cell's output):
ranking genes --------------------------------------------------------------------------- KeyError Traceback (most recent call last) Cell In[47], line 1 ----> 1 sc.tl.rank_genes_groups(adata, 'leiden', groups=['0'], reference='1', method='wilcoxon') 2 sc.pl.rank_genes_groups(adata, groups=['0'], n_genes=20) File .../lib/python3.8/site-packages/scanpy/tools/_rank_genes_groups.py:590, in rank_genes_groups(adata, groupby, use_raw, groups, reference, n_genes, rankby_abs, pts, key_added, copy, method, corr_method, tie_correct, layer, **kwds) 580 adata.uns[key_added] = {} 581 adata.uns[key_added]['params'] = dict( 582 groupby=groupby, 583 reference=reference, (...) 587 corr_method=corr_method, 588 ) --> 590 test_obj = _RankGenes(adata, groups_order, groupby, reference, use_raw, layer, pts) 592 if check_nonnegative_integers(test_obj.X) and method != 'logreg': 593 logg.warning( 594 "It seems you use rank_genes_groups on the raw count data. " 595 "Please logarithmize your data before calling rank_genes_groups." 596 ) File .../lib/python3.8/site-packages/scanpy/tools/_rank_genes_groups.py:93, in _RankGenes.__init__(self, adata, groups, groupby, reference, use_raw, layer, comp_pts) 82 def __init__( 83 self, 84 adata, (...) 90 comp_pts=False, 91 ): ---> 93 if 'log1p' in adata.uns_keys() and adata.uns['log1p']['base'] is not None: 94 self.expm1_func = lambda x: np.expm1(x * np.log(adata.uns['log1p']['base'])) 95 else: KeyError: 'base'
The text was updated successfully, but these errors were encountered:
Duplicate of scverse/anndata#673
I’ll close this one, as the other one has a more complete description
Sorry, something went wrong.
.write
None
Successfully merging a pull request may close this issue.
Following the pbmc3k tutorial I get an error: KeyError: 'base'
when executing the following cmd:
I run python 3.8 in a venv on Ubuntu 20.04 (VM)
scanpy==1.9.3
More error details (notebook cell's output):
The text was updated successfully, but these errors were encountered: