Hello,
I am trying to read the matrix.mtx.gz into an anndata (anndata-0.10.2) object using scanpy (scanpy-1.9.5). The matrix.mtx has the following header -
%%MatrixMarket matrix coordinate real general
60319 2636 10602979
20 1 7.215063
25 1 5
Here’s the code I am using to read -
adata = sc.read_10x_mtx(path=matrix_dir, cache_compression=gzip)
While reading, I am getting the following error. Cant scanpy read “real” number format? In another dataset that has “integer” format, the read works fine. Can you please point me in the right direction to fix this error? Thanks
/usr/local/lib/python3.10/dist-packages/anndata/utils.py in make_index_unique(index, join)
229 while True:
230 counter[v] += 1
→ 231 tentative_new_name = v + join + str(counter[v])
232 if tentative_new_name not in values_set:
233 values_set.add(tentative_new_name)
TypeError: unsupported operand type(s) for +: ‘float’ and ‘str’