Closed ywen1407 closed 4 years ago
Please check this issue: #456
Your data in adata.raw
are probably np.matrix
. You can either format to np.ndarray
or to scipy.sparse.csr_matrix()
to solve this. Note you are using adata.raw.X
and not adata.X
in rank_genes_groups()
by default. So your proposed line of code will not solve your error. Please instead use for example:
adata.raw.X = scipy.sparse.csr_matrix(adata.raw.X)
Hi all, I am wondering if anyone has had similar situation as mine. After data normalization, batch correction with combat, and work through the pipeline on my own data, I was having issues generating rank gene groups. The error is as below. I understand that there are issues with using highly_variable_genes after combat, and this can be resolved after converting raw data back to sparse matrix using " adata.X = scipy.sparse.csr_matrix(adata.X) ", but this method does not address my error.
Look forward to your response, thanks a lot!
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Minimal code sample (that we can copy&paste without having any data)
Versions