UMAP Wrapper

plotUMAP()

Short wrapper for UMAP visualization.

plotUMAP(
    gobject,
    dim_reduction_name = "umap",
    default_save_name = "UMAP",
    ...
)

Arguments

gobject

giotto object

dim_reduction_name

name of UMAP

default_save_name

default save name of UMAP plot

Arguments passed on to dimPlot2D()

group_by

create multiple plots based on cell annotation column

group_by_subset

subset the group_by factor column

dim1_to_use

dimension to use on x-axis

dim2_to_use

dimension to use on y-axis

spat_enr_names

names of spatial enrichment results to include

show_NN_network

show underlying NN network

nn_network_to_use

type of NN network to use (kNN vs sNN)

network_name

name of NN network to use, if show_NN_network = TRUE

cell_color

color for cells (see details)

color_as_factor

convert color column to factor

cell_color_code

named vector with colors

cell_color_gradient

vector with 3 colors for numeric data

gradient_midpoint

midpoint for color gradient

gradient_limits

vector with lower and upper limits

select_cell_groups

select subset of cells/clusters based on cell_color parameter

select_cells

select subset of cells based on cell IDs

show_other_cells

display not selected cells

other_cell_color

color of not selected cells

other_point_size

size of not selected cells

show_cluster_center

plot center of selected clusters

show_center_label

plot label of selected clusters

center_point_size

size of center points

center_point_border_col

border color of center points

center_point_border_stroke

border stroke size of center points

label_size

size of labels

label_fontface

font of labels

edge_alpha

column to use for alpha of the edges

point_shape

point with border or not (border or no_border)

point_size

size of point (cell)

point_alpha

transparency of point

point_border_col

color of border around points

point_border_stroke

stroke size of border around points

title

title for plot, defaults to cell_color parameter

show_legend

show legend

legend_text

size of legend text

legend_symbol_size

size of legend symbols

background_color

color of plot background

axis_text

size of axis text

axis_title

size of axis title

cow_n_col

cowplot param: how many columns

cow_rel_h

cowplot param: relative height

cow_rel_w

cowplot param: relative width

cow_align

cowplot param: how to align

show_plot

show plot

return_plot

return ggplot object

save_plot

directly save the plot [boolean]

save_param

list of saving parameters, see showSaveParameters()

Value

A ggplot.

Details

This is a wrapper function to generate a UMAP visualization from read depth normalized expression matrix.

UMAP can accept as input the original gene expression matrix (set dim_reduction_to_use=NULL) or the dimension reduced matrix from PCA (default) (dim_reduction_to_use=”pca”). If principle components are analyzed, then one specifies the dimensions_to_use.

It is possible to further define the number of neighbors (n_neighbors), number of epochs (n_epochs), and min_dist (see UMAP parameter guide here). The options set_seed and seed_number are helpful to fix the random number generation seed so that the same result is returned each time the function is run.

A plot will be returned in the result.

See dimPlot2D() and dimPlot3D() for 3D plot information.

Examples

data(mini_giotto_single_cell)

plotUMAP(mini_giotto_single_cell)
plotUMAP plotUMAP
plotUMAP(mini_giotto_single_cell, cell_color = 'cell_types', point_size = 3)
plotUMAP plotUMAP