scanpy_plus.pl.plotly_umap module

scanpy_plus.pl.plotly_umap.plotly_umap(data, color_col, obs_cols=None, hover_data_cols=None, write_to_file='umap.html', point_size=3, **kwargs)

Generates a plotly umap

Parameters:
  • data (adata or mdata)

  • color_col (str, data.obs column name)

  • obs_cols ([list], data.obs column names to be added to the umap plot)

  • hover_data_cols ([list], subset of obs_cols that should appear in mouse hover mode)

  • write_to_file (str, write to html file)

  • kwargs (Passed to the plotly.express.scatter function)

  • Example

  • mdata (# Get colors for clusters from the)

  • dict(zip(mdata.obs.annotation.cat.categories (my_colors =)

  • mdata.uns['annotation_colors']))

  • {'3-CD4_T' (my_colors # a dict)

  • plotly_umap(mdata (fig =)

  • 'annotation' (color_col =)

  • ['annotation' (hover_data_cols =)

  • 'celltype']

  • ['annotation'

  • 'celltype']

  • width=1100

  • height=900

  • template="simple_white"

  • my_colors) (color_discrete_map =)