Filtering cells using scanpy
0
0
Entering edit mode
3.8 years ago

I have to filter cells on basis of gene expression using scanpy. I am using the command

sc.pp.filter_cells(adata, min_genes=0)

But I am getting this error:

File "<stdin>", line 1, in <module> File "/storage/gaurav.ahuja/python2/envs/scenic/lib/python3.6/site-packages/scanpy/preprocessing/_simple.py", line 125, in filter_cells cell_subset, number = materialize_as_ndarray(filter_cells(adata.X, min_counts, min_genes, max_counts, max_genes)) File "/storage/gaurav.ahuja/python2/envs/scenic/lib/python3.6/site-packages/scanpy/preprocessing/_simple.py", line 136, in filter_cells else X > 0, axis=1) TypeError: '>' not supported between instances of 'numpy.ndarray' and 'int'

Before this step, I had just read the expression matrix and made the values unique using var_name_make_unique

Please suggest the solution.

python scanpy gene RNA-Seq sequencing • 1.4k views
ADD COMMENT

Login before adding your answer.

Traffic: 1593 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6