-
Notifications
You must be signed in to change notification settings - Fork 579
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
Fix warnings from anndata v0.6.22
#730
Conversation
This should also future proof retrieving colors for always-2d anndata.
Adding support to var_df would probably just involve writing a seperate function.
Additionally, added a test
Great! Don't we want to add Otherwise, happy to make Scanpy |
Sure! I wansn't sure if there were other bugs to fix or PRs to merge before we wanted to make a release. I'd also like to get @fidelram to give this a look over. I think I didn't break anything, but he'd be in a better position to tell if that were the case. |
@ivirshup I checked and now I don't get warnings :) However, I could not plot the layer. In the following example, I make a new layer that is the negative of the default layer. As you see, bot the default and the negative ('test') layer are identical. |
Ah, it looks like Any idea why this didn't trigger this test? Edit: I'm guessing vmin. |
Also, heads up, a bunch of plots break going from |
Fixed. Also added a couple tests. I didn't change the test mentioned above though, which might be a good thing to do. |
@ivirshup Indeed the problem is To avoid this confusion when plotting a layer I think it is better to override
The current logic is around this lines https://github.com/theislab/scanpy/blob/master/scanpy/plotting/_tools/scatterplots.py#L744 PS: the |
@ivirshup I tested and now is working as expected. Thanks for adding the new tests. From my side is ready to go. |
@fidelram I've made sure that only I also get tripped up by |
I've updated the docs a little and am going to go ahead and merge this. Thanks for the feedback @fidelram! |
@falexwolf, realized I didn't change the AnnData dependency. I'm not totally sure what to do with that, since we've already got a requirement on 0.6.22 due to scipy and statsmodels. |
Fixes for deprecation warnings from anndata
v0.6.22
. This is mostly by replacing access to.X
with access via{obs,var}_vector
orsc.get.obs_df
.Supercedes #713, fixes #700 and #690.
Functions changed:
sc.pl.violin
obs_df
, access toadata.X
no longer used.sc.pl.scatter
layer
from"X"
to"None"
."X"
is still supported, but should throw a deprecation warning if it's explicitly used.._get_obs_array
with.obs_vector
sc.pl._tools.scatterplots.plot_scatter
sc.get.obs_df
use_raw