Closed giovp closed 3 years ago
Thanks @giovp, I think simple subsetting to a specified column does not require iloc
. What do you have in df[cluster][:5]
- how is it possible that it returns more than 20 vals?
For the coloring, have you annotated your obs['clusters']
or computed tl.louvain
?
Thanks for quick reply @VolkerBergen !!! again, really minor thing. So in df[cluster][:5]
I have all the highvar genes (for whichI computed diff kinetics).
For obs['clusters']
of course yes have annotated and colors are uns. I get the correct behaviour by setting color
scv.pl.scatter(
adata,
df[str(cluster)].iloc[:5],
ylabel=cluster,
frameon=False,
color="leiden_1.0",
)
Hm interesting. @giovp, did you use the pancreas dataset or your own? Just ran the notebook in a fresh environment and everything worked as expected.
As @VolkerBergen already mentioned, df[cluster][:5]
shouldn't cause an issue. Double checked on a couple of examples and it returns the same result as df[cluster].iloc[:5]
.
Regarding the missing color in the scatter plot: Did you, by any chance, set the figure params, e.g., also in scanpy? I previously encountered problems / inconsistencies when setting both.
Hm interesting. @giovp, did you use the pancreas dataset or your own? Just ran the notebook in a fresh environment and everything worked as expected. As @VolkerBergen already mentioned,
df[cluster][:5]
shouldn't cause an issue. Double checked on a couple of examples and it returns the same result asdf[cluster].iloc[:5]
. Regarding the missing color in the scatter plot: Did you, by any chance, set the figure params, e.g., also in scanpy? I previously encountered problems / inconsistencies when setting both.
@giovp, do you have an update on this so that we can investigate what exactly caused the error?
Hi @WeilerP , sorry for being late. Actually I did not manage to nail it down and could have most likely been an issue with anndata on my side. I will close this for now and re open it if I encounter it again. SOrry for not following it up. Thank you!
Hi,
I'm working through this notebook and noticed several things that are not consistent anymore: https://scvelo.readthedocs.io/DynamicalModeling.html
For instance, line 15 through an error(rightly so)
Details
``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last)df.iloc
should be used. Can't really judge which pandas version cause logging doesn't show.Also, the same figure looks something like this:![image](https://user-images.githubusercontent.com/25887487/107974937-9a199c00-6fb7-11eb-9ca2-3f83fad2554b.png)
and not with the prettycoloring per cluster. This despite setting:
Versions:
scanpy==1.7.0rc2.dev26+gdd50040a anndata==0.7.5 umap==0.4.6 numpy==1.20.1 scipy==1.6.0 pandas==1.2.2 scikit-learn==0.24.1 statsmodels==0.12.2 python-igraph==0.8.3 leidenalg==0.8.3
Running scvelo 0.2.3 (python 3.8.6) on 2021-02-15 18:01.
this is really a minor thing but just wanted to report it.
Also, the parallel recover_dynamics is S I C K !