Skip to content

Type comparison issue when using read_h5ad in backed mode #650

@jorvis

Description

@jorvis

If I read a file with read_h5ad() and then process with

sc.pp.filter_genes(adata, min_cells=int(foo))
Things work as intended.

But if I change that read line to be read_h5ad(h5_path, backed='r') then when I attempt to filter I get this error instead:

File "/opt/Python-3.7.3/lib/python3.7/site-packages/scanpy/preprocessing/_simple.py", line 228, in filter_genes:
else X > 0, axis=0):
TypeError: '>' not supported between instances of 'SparseDataset' and 'int'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions