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

error while processing raw.h5ad #4986

Closed
dmator opened this issue Dec 19, 2019 · 3 comments
Closed

error while processing raw.h5ad #4986

dmator opened this issue Dec 19, 2019 · 3 comments

Comments

@dmator
Copy link

dmator commented Dec 19, 2019

Hi, this is my first time reporting an issue on Github so please bear with me.
Please let me know if you need more information from me to address this issue:

  • OS: windows 10
  • Anaconda is added to PATH
  • I use MobaXterm instead of Anaconda Prompt
  • executed the following command some time ago so that MobaXterm will default to python3 that is installed by Anaconda:
echo "alias python=python.exe" >> ~/.bashrc
source ~/.bashrc
echo "if [[ -f ~/.bashrc ]]; then source ~/.bashrc; fi" > ~/.bash_profile
  • In order to install cell x gene, I did:
    pip install cellxgene[prepare] and got an error message ("get an Environment error with a suggestion to add --user at the end"). So I did pip install cellxgene[prepare] --user, found out that cellxgene is not added to PATH. So I manually added it to PATH by following the instructions on https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

Okay, that's the background.

On python, I converted mtx file to h5ad file by doing:

import scanpy as sc

adata = sc.read_10x_mtx(
'./filtered_feature_bc_matrix/',  # the directory with the `.mtx` file
var_names='gene_symbols',              
cache=True)                               
adata.write('write/10x_mHep_raw.h5ad', compression='gzip')

Then I used the following command on MobaXTerm to process the raw file:

cellxgene prepare 10x_mHep_raw.h5ad --output=10x_mHep_processed.h5ad

I got a very long error message (please see the attached txt file)
The error message ended with this:


numba.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
Operands must be the same type, got (i64, i32)

File "..\..\..\..\..\..\..\..\programdata\anaconda3\lib\site-packages\scanpy\preprocessing\_qc.py", line 392:
def _top_segment_proportions_sparse_csr(data, indptr, ns):
    <source elided>
    # Just to keep it simple, as a dense matrix
    partitioned = np.zeros((indptr.size - 1, maxidx), dtype=data.dtype)
    ^

[1] During: lowering "$0.43 = call $0.33($0.39, func=$0.33, args=[Var($0.39, c:\programdata\anaconda3\lib\site-pa                       ckages\scanpy\preprocessing\_qc.py (392))], kws=[('dtype', Var($0.41, c:\programdata\anaconda3\lib\site-packages\                       scanpy\preprocessing\_qc.py (392)))], vararg=None)" at c:\programdata\anaconda3\lib\site-packages\scanpy\preproce                       ssing\_qc.py (392)
-------------------------------------------------------------------------------
This should not have happened, a problem has occurred in Numba's internals.
You are currently using Numba version 0.45.1.

Please report the error message and traceback, along with a minimal reproducer
at: https://github.com/numba/numba/issues/new

If more help is needed please feel free to speak to the Numba core developers
directly at: https://gitter.im/numba/numba

Thanks in advance for your help in improving Numba!
[numba error.txt](https://github.com/numba/numba/files/3982574/numba.error.txt)

@dmator
Copy link
Author

dmator commented Dec 19, 2019

Thank you in advance for your help!

@stuartarchibald
Copy link
Contributor

Thanks for the report, this will be fixed by #4729 (the issue is np.zeros() getting an int64 type and an int32 type as arguments which is currently not working).

@stuartarchibald
Copy link
Contributor

Closing this issue as it seems to be resolved by #4729. If this is not the case please re-open with a comment about any item that appears to be unresolved. Many thanks.

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

No branches or pull requests

2 participants