You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of scanpy.
(optional) I have confirmed this bug exists on the main branch of scanpy.
What happened?
I pass a adata.var column header with my gene name that I want displayed, sc.pl.heatmap runs into a key error where my index values are being searched in the genename column
@josenimo Judging by our tests, the var_names argument needs to correspond to gene_symbols i.e., it doesn't come from the adata.var_names. I think that's a failing of the docs more than anything because there is somewhat contradictory documentation:
var_names
[str](https://docs.python.org/3/library/stdtypes.html#str) | [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping)[[str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) | [Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)[[str](https://docs.python.org/3/library/stdtypes.html#str)]]
var_names should be a valid subset of adata.var_names.
and
gene_symbols
[str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) (default: None)
Column name in .var DataFrame that stores gene symbols. By default var_names refer to the index column of the .var DataFrame. Setting this option allows alternative names to be used.
Please make sure these conditions are met
What happened?
I pass a adata.var column header with my gene name that I want displayed, sc.pl.heatmap runs into a key error where my index values are being searched in the genename column
Minimal code sample
Error output
Versions
The text was updated successfully, but these errors were encountered: