[BUG] support float64 .X for cell selection from gene expression histogram.
See original GitHub issueCopying the comment I made here as a fresh issue.
Using the demo data at https://cellxgene-example-data.czi.technology/pbmc3k.h5ad if I run
import scanpy as sc
import numpy as np
import scipy
adata = sc.read('pbmc3k.h5ad')
adata.X = scipy.sparse.csr_matrix(adata.X, dtype=np.float32)
adata.write('pbmc3k_32.h5ad')
adata = sc.read('pbmc3k.h5ad')
adata.X = scipy.sparse.csr_matrix(adata.X, dtype=np.float64)
adata.write('pbmc3k_64.h5ad')
Then the highlighting and selection as a group of cells by selecting a region of the gene expression histogram only works for pbmc3k_32.h5ad in cellxgene v0.17.0
This is a problem because h5ad files produced by SeuratDisk seem to use float.64
Which is probably also the cause of https://github.com/chanzuckerberg/cellxgene/issues/2291 since the Azimuth data h5ad file was likely produced with SeuratDisk and this file looks like:
adata = sc.read('local.h5ad')
adata.X
<982538x77521 sparse matrix of type '<class 'numpy.float64'>'
with 1748651019 stored elements in Compressed Sparse Row format>
Screenshots
Expected behavior cellxgene supports this function for float64 .X matrix
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
gene highlights #2303 - chanzuckerberg/cellxgene - GitHub
One feature of cellxgene is that you can highlight the cells based on the expression of a gene by just clicking on the...
Read more >Scanpy – Single-Cell Analysis in Python — Scanpy 1.9.1 ...
Scanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with anndata. It includes preprocessing, visualization, clustering, ...
Read more >Release notes for Cell Ranger 7.1.0 (December 7, 2022)
The new upper range is 45,000 for single cell gene expression analyses. ... Fixed a 3' Cell Multiplexing t-SNE plot bug where the...
Read more >Chapter 2 How to use Cellxgene VIP
To plot expression of gene among categories of an annotation, e.g., cell type, sex, or batch etc. Step 1. User needs to select...
Read more >Exploratory Cellxgene Workshop - YouTube
This is the workshop held for using Exploratory Cellxgene (ExCellxgene) to interactively analyze and annotate single- cell datasets.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see the same error.
@Jon-bioinfo - thanks for the issue.
Could you take a look at the Browser console and report any error messages you see there?
FYI, I am able to reproduce, and the console shows:
Likely scenario: the back-end is failing to down-cast to float32 correctly (the front-end only accepts float32).