Closed NikolaiL-dev closed 10 months ago
That’s strange, because I made this change to fix this in some situations.
-gex_rows = [x == "Gene Expression" for x in adata.var["feature_types"]]
+gex_rows = adata.var["feature_types"] == "Gene Expression"
return adata[:, gex_rows].copy()
Seems like this function needs even more work.
Hi I encountered the same issue. It cannot read mtx and features appropriately.
I have the same problem. Didn't expect it is due to the anndata package. Downgrade anndata to 0.10.2 solve this problem.
OK, this is indeed fixed in scanpy master and the bugfix branch (1.9.x). Please try installing the current bugfix branch:
pip install 'scanpy @ git+https://github.com/scverse/scanpy.git@1.9.x'
We will release a new feature version in 3 weeks, so there will probably be no bugfix release before that.
Please make sure these conditions are met
What happened?
The
read_10x_mtx()
function does not work due to the update of the anndata package to 0.10.4 (January 14, 2024) (?Error reading the file features.tsv.gz)The launch was carried out on the following data: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM5733023
You can also download files using my google drive: https://drive.google.com/drive/folders/1p6ilbsJX_cYZb4HG0OSbLHAwQObqmncW?usp=sharing
My actions:
1) I have installed the latest version of
scanpy=1.9.6
using conda:2) I imported the scanpy, seaborn, pandas, numpy and matplotlib libraries. Then I called the
read_10x_mtx()
function. The code is given below.The problem is the error in importing gene names both when using id and when using symbolic labeling. All genes have the same name. if you use
anndata=0.10.3
instead ofanndata=0.10.4
, then everything works correctly.Minimal code sample
Error output
Expected
Versions
import scanpy; scanpy.logging.print_versions()
session with an error
working version