question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error using rank_genes_groups

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
wangjiawen2013commented, Mar 14, 2019

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

1reaction
falexwolfcommented, Nov 20, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error using rank_genes_groups · Issue #365 · scverse/scanpy
I have a single-cell RNA-seq dataset with cell types. When running rank_genes_groups(adata, groupby="celltype") , I get the following error: ~/.
Read more >
scanpy_05_dge
Differential expression is performed with the function rank_genes_group . The default method to compute differential expression is the t-test_overestim_var ...
Read more >
Preprocessing and clustering 3k PBMCs - Scanpy tutorials
In May 2017, this started out as a demonstration that Scanpy would allow to reproduce most of Seurat's guided clustering tutorial (Satija et...
Read more >
Analysis of single-cell RNA-seq data - Python - kallisto | bustools
If you use the methods in this notebook for your analysis please cite the following ... sc.settings.verbosity = 3 # verbosity: errors (0),...
Read more >
Result of scanpy tools rank_genes_groups - Biostars
Hi @el24,. I have a question for you, I also would like to use scanpy for getting differntially expressed genes between to time-points...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found