Skip to content

sc.pl.rank_genes_groups_dotplot  #502

@rojinsafavi

Description

@rojinsafavi

I get the following error when I tun dotplot:

ValueError                                Traceback (most recent call last)
<ipython-input-54-afab88c299fa> in <module>()
----> 1 sc.pl.rank_genes_groups_dotplot(vitro,['MYL2'], groupby='louvain')

/projects/sysbio/projects/czi/immune/anaconda2/envs/py36/lib/python3.6/site-packages/scanpy/plotting/_tools/__init__.py in rank_genes_groups_dotplot(adata, groups, n_genes, groupby, key, show, save, **kwds)
    409 
    410     _rank_genes_groups_plot(adata, plot_type='dotplot', groups=groups, n_genes=n_genes,
--> 411                             groupby=groupby, key=key, show=show, save=save, **kwds)
    412 
    413 

/projects/sysbio/projects/czi/immune/anaconda2/envs/py36/lib/python3.6/site-packages/scanpy/plotting/_tools/__init__.py in _rank_genes_groups_plot(adata, plot_type, groups, n_genes, groupby, key, show, save, **kwds)
    291 
    292     # sum(list, []) is used to flatten the gene list
--> 293     gene_names = sum([list(adata.uns[key]['names'][x][:n_genes]) for x in group_names], [])
    294 
    295     if plot_type == 'dotplot':

/projects/sysbio/projects/czi/immune/anaconda2/envs/py36/lib/python3.6/site-packages/scanpy/plotting/_tools/__init__.py in <listcomp>(.0)
    291 
    292     # sum(list, []) is used to flatten the gene list
--> 293     gene_names = sum([list(adata.uns[key]['names'][x][:n_genes]) for x in group_names], [])
    294 
    295     if plot_type == 'dotplot':

ValueError: no field of name MYL2

Do we need to store marker genes within the adata object?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions