Skip to content
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

sc.pp.scale and sc.pp.regress_out error on first run of copied object #731

Closed
tessadgreen opened this issue Jul 8, 2019 · 3 comments
Closed
Labels

Comments

@tessadgreen
Copy link

sc.pp.scale is giving me an error when I run it for the first time, then running fine on the second. This occurs when I run on an object generated using .copy()

Screen Shot 2019-07-08 at 10 55 34 AM

In terms of the numbers at the end--I have 2176 cells and 1600 highly variable genes.

If I run on an object not generated using copy, I get "Trying to set attribute .obs of view, making a copy." but it finishes on first run.

If I try to regress out counts first, I get

Screen Shot 2019-07-08 at 11 12 57 AM

One additional oddity--if I run sc.pphighly_variable_genes with flavor = 'seurat' instead of flavor = 'cell_ranger' and call sc.pp.regress_out(Bcell, 'n_counts') prior to running sc.pp.scale(Bcell, max_value = 10) I don't get any error. If I don't run regress_counts but have the 'seurat' flavor I get
Screen Shot 2019-07-08 at 11 22 04 AM

Really not sure what's happening but figured I should let you know.

Thanks!

sc.settings.verbosity = 3

scanpy==1.4.3 anndata==0.6.21 umap==0.3.9 numpy==1.16.4 scipy==1.2.1 pandas==0.24.2 scikit-learn==0.21.2 statsmodels==0.9.0 python-igraph==0.7.1 louvain==0.6.1

@ivirshup
Copy link
Member

ivirshup commented Jul 9, 2019

Thanks for the bug report! I think we've just fixed the first and third issue in #729, but I'm not to sure about the second. Could you try updating to the newest release of AnnData and letting us know if the error still occurs?

Would you mind also letting us know if this error occurs when you use one of the built in datasets, like sc.datasets.pbmc3k()?

@tessadgreen
Copy link
Author

Sorry for the delay on this! I upgraded to "scanpy==1.4.3+115.g1aecabf anndata==0.6.22.post1 umap==0.3.9 numpy==1.16.4 scipy==1.3.0 pandas==0.24.2 scikit-learn==0.21.2 statsmodels==0.10.0" and the issue is gone.

The pre-built dataset also works with the upgraded version.

@ivirshup
Copy link
Member

ivirshup commented Jul 20, 2019

Glad to hear it! We've just released v1.4.4 which has this fix in it, so you can use that if you don't want to be on the development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants