plot_samples: Plots sample comparisons.

View source: R/plot.R

plot_samplesR Documentation

Plots sample comparisons.

Description

Pretty-plots comparisons between two samples in a scatterplot.

Usage

plot_samples(
  df,
  xcol,
  ycol,
  xlab,
  ylab,
  color_col = NULL,
  color_lab = NULL,
  color_values = NULL,
  print_cor = FALSE
)

Arguments

df

Reads or lfc dataframe.

xcol

Name of column containing values to plot on the x-axis.

ycol

Name of column containing values to plot on the y-axis.

xlab

X-axis label.

ylab

Y-axis label.

color_col

Name of column to color points by (optional).

color_lab

Name of color legend (optional, defaults to color_col).

color_values

Named list of discrete values in color_col mapped to their respective colors (defaults to RColorBrewer's Set2 colors with NULL).

print_cor

If true, prints Pearson correlation between columns (default FALSE).

Value

A list of three elements. The first is a ggplot object, the second is the correlation between xcol and ycol, and the third is the Spearman correlation between xcol and ycol.


HenryWard/orthrus documentation built on June 2, 2023, 10:28 p.m.