Closed matthewspeir closed 5 years ago
Oh darn, I spent quite a while trying to track this down, then had lunch and only then had the idea of googling it. It's a known problem of your version combination.
https://github.com/theislab/scanpy/issues/450
It's working on my machine and I just saw that my version of pandas is pandas==0.22.0.
This problem has just been fixed in Scanpy. So there are at least two options for you:
Closing this as it's another scanpy problem.
got the same issue, tried to downgrade pandas as you suggested, still there:
cbScanpy -e filtered_gene_bc_matrices/hg19/matrix.mtx -o scanpyOut -n pbmc3k INFO:root:Loading Scanpy libraries INFO:numexpr.utils:NumExpr defaulting to 8 threads. INFO:get_version:dirname: Trying to get version of get_version from dirname /home/cotedivoir/.local/lib/python3.6/site-packages INFO:getversion:dirname: Failed; Does not match re.compile('get[-]version-([\d.]+?)(?:\.dev(\d+))?(?:_+-)?$') INFO:get_version:git: Trying to get version from git in directory /home/cotedivoir/.local/lib/python3.6/site-packages INFO:get_version:git: Failed; The top-level directory of the current Git repository is not the same as the root directory of the distribution INFO:get_version:metadata: Trying to get version for get_version in dir /home/cotedivoir/.local/lib/python3.6/site-packages INFO:get_version:metadata: Succeeded INFO:get_version:dirname: Trying to get version of legacy_api_wrap from dirname /home/cotedivoir/.local/lib/python3.6/site-packages INFO:getversion:dirname: Failed; Does not match re.compile('legacy[-]api[-]wrap-([\d.]+?)(?:\.dev(\d+))?(?:[+-]([0-9a-zA-Z.]+))?$') INFO:get_version:git: Trying to get version from git in directory /home/cotedivoir/.local/lib/python3.6/site-packages INFO:get_version:git: Failed; The top-level directory of the current Git repository is not the same as the root directory of the distribution INFO:get_version:metadata: Trying to get version for legacy_api_wrap in dir /home/cotedivoir/.local/lib/python3.6/site-packages INFO:get_version:metadata: Succeeded INFO:root:cbScanpy $Id$ INFO:root:Input file: filtered_gene_bc_matrices/hg19/matrix.mtx INFO:root:Restricting OPENBLAS to 4 threads INFO:root:Start time: 2020-01-28 16:40:36.219846 scanpy==1.4.5.post2 anndata==0.7.1 umap==0.3.10 numpy==1.18.1 scipy==1.4.1 pandas==0.22.0 scikit-learn==0.22.1 statsmodels==0.11.0 INFO:root:Loading expression matrix: mtx format INFO:root:Data has 2700 samples/observations INFO:root:Data has 32738 genes/variables INFO:root:Basic filtering: keep only cells with min 200 genes Variable names are not unique. To make them unique, call
.var_names_make_unique
. Variable names are not unique. To make them unique, call.var_names_make_unique
. INFO:root:Basic filtering: keep only gene with min 3 cells Variable names are not unique. To make them unique, call.var_names_make_unique
. Variable names are not unique. To make them unique, call.var_names_make_unique
. INFO:root:After filtering: Data has 2700 samples/observations and 13714 genes/variables INFO:root:'geneIdType' is not specified in config file or set to 'auto'. INFO:root:Auto-detected gene IDs type: symbols INFO:root:Remove cells with more than 0.050000 percent of mitochondrial genes INFO:root:Computing percentage of mitochondrial genes Traceback (most recent call last): File "/home/cotedivoir/.local/bin/cbScanpy", line 11, insys.exit(cbScanpyCli()) File "/home/cotedivoir/.local/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 5390, in cbScanpyCli adata, params = cbScanpy(matrixFname, metaFname, inCluster, confFname, figDir, logFname) File "/home/cotedivoir/.local/lib/python3.6/site-packages/cellbrowser/cellbrowser.py", line 5040, in cbScanpy adata.obs['percent_mito'] = np.sum(adata[:, mito_genes].X, axis=1) / np.sum(adata.X, axis=1) File "/home/cotedivoir/.local/lib/python3.6/site-packages/anndata/_core/anndata.py", line 1049, in getitem oidx, vidx = self._normalize_indices(index) File "/home/cotedivoir/.local/lib/python3.6/site-packages/anndata/_core/anndata.py", line 1030, in _normalize_indices return _normalize_indices(index, self.obs_names, self.var_names) File "/home/cotedivoir/.local/lib/python3.6/site-packages/anndata/_core/index.py", line 34, in _normalize_indices ax1 = _normalize_index(ax1, names1) File "/home/cotedivoir/.local/lib/python3.6/site-packages/anndata/_core/index.py", line 89, in _normalize_index positions = index.get_indexer(indexer) File "/home/cotedivoir/.local/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 2687, in get_indexer raise InvalidIndexError('Reindexing only valid with uniquely' pandas.core.indexes.base.InvalidIndexError: Reindexing only valid with uniquely valued Index objects
It looks like this is scanpy==1.4.5.post2 anndata==0.7.1 umap==0.3.10 numpy==1.18.1 scipy==1.4.1 pandas==0.22.0 scikit-learn==0.22.1 statsmodels==0.11.0
How did you install sacnpy?
overall, it doesn't look like this is an issue with the cellbrowser, but rather with your scanpy installation?
how did you install the cellbrowser and which version?
Thank you for the reply!
version: cellbrowser (0.7.7) how installed: pip3 install
Thanks! How did you install scanpy? With conda?
On Wed 29 Jan 2020 at 18:11, Anastasia notifications@github.com wrote:
Thank you for the reply!
version: cellbrowser (0.7.7) how installed: pip3 install
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/66?email_source=notifications&email_token=AACL4TIBQ6ZK7WO5SE27UYTRAG2DVA5CNFSM4GTEI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKH7YSY#issuecomment-579861579, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TN7HGM5SRIKNE5CKSTRAG2DVANCNFSM4GTEI3KQ .
no, same way - pip3
Thanks! How did you install scanpy? With conda? … On Wed 29 Jan 2020 at 18:11, Anastasia @.***> wrote: Thank you for the reply! version: cellbrowser (0.7.7) how installed: pip3 install — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#66?email_source=notifications&email_token=AACL4TIBQ6ZK7WO5SE27UYTRAG2DVA5CNFSM4GTEI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKH7YSY#issuecomment-579861579>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TN7HGM5SRIKNE5CKSTRAG2DVANCNFSM4GTEI3KQ .
Hm, I can't reproduce this... is this on OSX or Linux? If yes, which linux version?
This doesn't seem to be a cellbrowser problem, but something with your scanpy install... did you ask the scanpy people?
On Thu, Jan 30, 2020 at 12:36 AM Anastasia notifications@github.com wrote:
no, same way - pip3
Thanks! How did you install scanpy? With conda? … <#m1705389014784748423> On Wed 29 Jan 2020 at 18:11, Anastasia @.***> wrote: Thank you for the reply! version: cellbrowser (0.7.7) how installed: pip3 install — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#66 https://github.com/maximilianh/cellBrowser/issues/66?email_source=notifications&email_token=AACL4TIBQ6ZK7WO5SE27UYTRAG2DVA5CNFSM4GTEI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKH7YSY#issuecomment-579861579>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TN7HGM5SRIKNE5CKSTRAG2DVANCNFSM4GTEI3KQ .
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/66?email_source=notifications&email_token=AACL4TLTJDFD4NAQXDGOPJDRAIHGDA5CNFSM4GTEI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKJFBXQ#issuecomment-580014302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TIA2BBEGCYHATKI2GDRAIHGDANCNFSM4GTEI3KQ .
think i should have started with this: i use WSL for windows with Ubuntu distribution
Urgs. OK, I don't really want to dig into this. It's a problem with scanpy, partially due to them constantly making breaking changes. Can you ask them? I don't know about about scanpy. You can probably easily reproduce this problem by running a standard scanpy tutorial.
Can I ask why you're using the scanpy pipeline of cellbrowser? Do you have your own results or is this part of a term project and cbScanpy has a ready-made pipeline for single cell analysis?
On Fri, Jan 31, 2020 at 11:37 PM Anastasia notifications@github.com wrote:
think i should have started with this: i use WSL for windows with Ubuntu distribution
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/66?email_source=notifications&email_token=AACL4TI5ZLU4SQLK33WVBH3RASR3TA5CNFSM4GTEI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQHPUI#issuecomment-580941777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TO5SNSUNIKRXJH6TZ3RASR3TANCNFSM4GTEI3KQ .
ok, sorry for bothering, i'm just trying to learn more about single cell data analysis. not much structured information around. so i found cellbrowser, and as you say cbScanpy has already prebuild pipeline so i decided that would be a way to start
It usually is but only if your scanpy works. The recommended way to install scanpy is conda, it has a ton of dependencies.
On Sun 2 Feb 2020 at 02:28, Anastasia notifications@github.com wrote:
ok, sorry for bothering, i'm just trying to learn more about single cell data analysis. not much structured information around. so i found cellbrowser, and as you say cbScanpy has already prebuild pipeline so i decided that would be a way to start
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/66?email_source=notifications&email_token=AACL4TIL3YXBFAUAFW4Z26DRAYOS5A5CNFSM4GTEI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRLALI#issuecomment-581087277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TMRGCHPOECMC7CPX5TRAYOS5ANCNFSM4GTEI3KQ .
Oh that would be the reason by the way: install scanpy with conda! I don’t think the pip way is recommended anymore. Try conda as let me know if it works then.
On Sun 2 Feb 2020 at 20:22, Maximilian Haeussler maximilianh@gmail.com wrote:
It usually is but only if your scanpy works. The recommended way to install scanpy is conda, it has a ton of dependencies.
On Sun 2 Feb 2020 at 02:28, Anastasia notifications@github.com wrote:
ok, sorry for bothering, i'm just trying to learn more about single cell data analysis. not much structured information around. so i found cellbrowser, and as you say cbScanpy has already prebuild pipeline so i decided that would be a way to start
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/maximilianh/cellBrowser/issues/66?email_source=notifications&email_token=AACL4TIL3YXBFAUAFW4Z26DRAYOS5A5CNFSM4GTEI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRLALI#issuecomment-581087277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACL4TMRGCHPOECMC7CPX5TRAYOS5ANCNFSM4GTEI3KQ .
Hi! Installed scanpy via conda, still get the same error
@ivirshup We think this might be an issue with scanpy (or maybe just their install of scanpy). Do you have insights into the issues this user is seeing?
Command, cbScanpy output and error at the bottom:
This is using the 'Raw Counts Matrix - Cord Blood' h5 file is from 'Census of Immune Cells' data set here: https://preview.data.humancellatlas.org/.