plot_correlation_PCA_scExp: Plotting correlation of PCs with a variable of interest

View source: R/plotting_functions.R

plot_correlation_PCA_scExpR Documentation

Plotting correlation of PCs with a variable of interest

Description

Plotting correlation of PCs with a variable of interest

Usage

plot_correlation_PCA_scExp(
  scExp,
  correlation_var = "total_counts",
  color_by = NULL,
  topPC = 10
)

Arguments

scExp

A SingleCellExperiment Object

correlation_var

A string specifying with which numeric variable from colData of scExp to calculate and plot the correlation of each PC with. ('total_counts')

color_by

A string specifying with which categorical variable to color the plot. ('NULL')

topPC

An integer specifying the number of PCs to plot correlation with 10

Value

A ggplot histogram representing the distribution of count per cell

Examples

data("scExp")
plot_correlation_PCA_scExp(scExp, topPC = 25)
plot_correlation_PCA_scExp(scExp, color_by = "cell_cluster")
plot_correlation_PCA_scExp(scExp, color_by = "sample_id")

vallotlab/ChromSCape documentation built on Oct. 15, 2023, 1:47 p.m.