Error plotting the markers in sc.pl.rank_genes_groups_dotplot
0
0
Entering edit mode
19 months ago

Hello everyone

I have spatial transcriptome data which was processed in seurat package and saved as loom format for the downstream anaylysis in scanpy. Everything works fine until marker analysis. For the dot plot visiulization, using sc.pl.rank_genes_groups_dotplot in python but it gives error :

adata = sc.read_loom('b_SCT.loom')
#Section 1
adata.var_names_make_unique()
adata.obs['integrated_snn_res.0.3']=adata.obs['integrated_snn_res.0.3'].astype('category')
sc.settings.set_figure_params(dpi = 80)

sc.tl.rank_genes_groups(adata, 'integrated_snn_res.0.3', method='t-test', key_added = "t-test")
sc.pl.rank_genes_groups(adata, n_genes=25, sharey=False, key = "t-test")

sc.settings.set_figure_params(dpi = 80)

sc.tl.rank_genes_groups(adata, 'integrated_snn_res.0.3', method='wilcoxon', key_added = "wilcoxon")
sc.pl.rank_genes_groups(adata, n_genes=25, sharey=False, key="wilcoxon")



sc.pl.rank_genes_groups_dotplot(adata, n_genes=5, key="wilcoxon", groupby="integrated_snn_res.0.3")

TypeError: sequence item 0: expected str instance, int found

I would appreciate all the suggestion to fix this issue.

Thanks in advance

scanpy trasncriptome seurat spatial • 428 views
ADD COMMENT

Login before adding your answer.

Traffic: 1891 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