scanpy: Error using rank_genes_groups

Hi,

I have been Scanpy for a short time and I find it really great! However, I tried recently to use it for differential expression using rank_genes_groups and I could not make it work. I have a single-cell RNA-seq dataset with cell types. When running rank_genes_groups(adata, groupby="celltype"), I get the following error:

~/.py3Env/lib/python3.5/site-packages/scanpy/tools/rank_genes_groups.py` in rank_genes_groups(adata, groupby, use_raw, groups, reference, n_genes, rankby_abs, key_added, copy, method, corr_method, **kwds)
    374     adata.uns[key_added]['names'] = np.rec.fromarrays(
    375         [n for n in rankings_gene_names],
--> 376         dtype=[(rn, 'U50') for rn in groups_order_save])
    377
    378     if method in {'t-test', 't-test_overestim_var', 'wilcoxon'}:

~/.py3Env/lib/python3.5/site-packages/numpy/core/records.py in fromarrays(arrayList, dtype, shape, formats, names, titles, aligned, byteorder)
    632     # populate the record array (makes a copy)
    633     for i in range(len(arrayList)):
--> 634         _array[_names[i]] = arrayList[i]
    635
    636     return _array

ValueError: setting an array element with a sequence

Do you have any idea of what could cause this error?

Thank you

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

do you have any references on t-test_overestim_var ? I cannot find papers on this test method. what’s the difference from t-test ? @falexwolf

Your observations index contains tuples, which is, kind of weird: image Let me look further…