simba.pl.umap
- simba.pl.umap(adata, color=None, dict_palette=None, n_components=None, size=8, drawing_order='sorted', dict_drawing_order=None, show_texts=False, texts=None, text_size=10, text_expand=(1.05, 1.2), fig_size=None, fig_ncol=3, fig_legend_ncol=1, fig_legend_order=None, vmin=None, vmax=None, alpha=1, pad=1.08, w_pad=None, h_pad=None, save_fig=None, fig_path=None, fig_name='plot_umap.pdf', plolty=False, **kwargs)[source]
Plot coordinates in UMAP
- Parameters:
data (pd.DataFrame) – Input data structure of shape (n_samples, n_features).
x (str) – Variable in data that specify positions on the x axis.
y (str) – Variable in data that specify positions on the x axis.
color (list, optional (default: None)) – A list of variables that will produce points with different colors. e.g. color = [‘anno1’, ‘anno2’]
dict_palette (dict,optional (default: None)) – A dictionary of palettes for different variables in color. Only valid for categorical/string variables e.g. dict_palette = {‘ann1’: {},’ann2’: {}}
drawing_order (str (default: ‘sorted’)) – The order in which values are plotted, This can be one of the following values - ‘original’: plot points in the same order as in input dataframe - ‘sorted’ : plot points with higher values on top. - ‘random’ : plot points in a random order
dict_drawing_order (dict,optional (default: None)) – A dictionary of drawing_order for different variables in color. Only valid for categorical/string variables e.g. dict_drawing_order = {‘ann1’: ‘original’,’ann2’: ‘sorted’}
size (int (default: 8)) – Point size.
show_texts (bool, optional (default: False)) – If True, text annotation will be shown.
text_size (int, optional (default: 10)) – The text size.
texts (list optional (default: None)) – Point names to plot.
text_expand (tuple, optional (default: (1.05, 1.2))) – Two multipliers (x, y) by which to expand the bounding box of texts when repelling them from each other/points/other objects.
fig_size (tuple, optional (default: None)) – figure size.
fig_ncol (int, optional (default: 3)) – the number of columns of the figure panel
fig_legend_order (dict,optional (default: None)) – Specified order for the appearance of the annotation keys. Only valid for categorical/string variable e.g. fig_legend_order = {‘ann1’:[‘a’,’b’,’c’],’ann2’:[‘aa’,’bb’,’cc’]}
fig_legend_ncol (int, optional (default: 1)) – The number of columns that the legend has.
vmin (float, optional (default: None)) – The min and max values are used to normalize continuous values. If None, the respective min and max of continuous values is used.
vmax (float, optional (default: None)) – The min and max values are used to normalize continuous values. If None, the respective min and max of continuous values is used.
alpha (float, optional (default: 0.8)) – 0.0 transparent through 1.0 opaque
pad (float, optional (default: 1.08)) – Padding between the figure edge and the edges of subplots, as a fraction of the font size.
h_pad (float, optional (default: None)) – Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to pad.
w_pad (float, optional (default: None)) – Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to pad.
save_fig (bool, optional (default: False)) – if True,save the figure.
fig_path (str, optional (default: None)) – If save_fig is True, specify figure path.
fig_name (str, optional (default: ‘plot_umap.pdf’)) – if save_fig is True, specify figure name.
- Return type:
None