plot_representation: Create PCA/UMAP plot

View source: R/plotting_functions.R

plot_representationR Documentation

Create PCA/UMAP plot

Description

This functions creates a PCA or UMAP plot given a vector of names, x and y coordinates. You can additionally colour according to other vector, add title, label the points, set a different variabel to include and additional parameter (size), and create circles aroung groups of row_names provided.

Usage

plot_representation(
  row_names,
  x_given,
  y_given,
  meta_data_col,
  title,
  label_plot = FALSE,
  size = FALSE,
  size_var = NULL,
  max.overlaps_int = 50,
  encircle = FALSE
)

Arguments

row_names

Identifiers for each sample

x_given

Variable to plot in X axis. It should be numeric and included within data_all_given

y_given

Variable to plot in Y axis. It should be numeric and included within data_all_given

meta_data_col

Vector for colouring

title

Title to add to the plot

label_plot

Add labels to the points

size

TRUE/FALSE to include a numeric variable with different size points

size_var

numeric variable with different size points

max.overlaps_int

Number of overlaps for ggrepel

encircle

Wether to include circles aroung groups of row_names provided


HCGB-IGTP/HCGB.IGTP.DAnalysis documentation built on April 13, 2025, 12:03 a.m.