Repository navigation
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.Xwith access via{obs,var}_vectororsc.get.obs_df.Supercedes #713, fixes #700 and #690.
Functions changed:
sc.pl.violinobs_df, access toadata.Xno longer used.sc.pl.scatterlayerfrom"X"to"None"."X"is still supported, but should throw a deprecation warning if it's explicitly used.._get_obs_arraywith.obs_vectorsc.pl._tools.scatterplots.plot_scattersc.get.obs_dfuse_raw