plot_sm: Make an R plot of the standard median correlation or distance...

View source: R/plot_dotplot.R

plot_smR Documentation

Make an R plot of the standard median correlation or distance among samples.

Description

This was written by a mix of Kwame Okrah <kokrah at gmail dot com>, Laura Dillon <dillonl at umd dot edu>, and Hector Corrada Bravo <hcorrada at umd dot edu> I reimplemented it using ggplot2 and tried to make it a little more flexible. The general idea is to take the pairwise correlations/distances of the samples, then take the medians, and plot them. This version of the plot is no longer actually a dotplot, but a point plot, but who is counting?

Usage

plot_sm(
  data,
  design = NULL,
  colors = NULL,
  method = "pearson",
  plot_legend = FALSE,
  expt_names = NULL,
  label_chars = 10,
  plot_title = NULL,
  dot_size = 5,
  ...
)

Arguments

data

Expt, expressionset, or data frame.

design

Specify metadata if desired.

colors

Color scheme if data is not an expt.

method

Correlation or distance method to use.

plot_legend

Include a legend on the side?

expt_names

Use pretty names for the samples?

label_chars

Maximum number of characters before abbreviating sample names.

plot_title

Title for the graph.

dot_size

How large should the glyphs be?

...

More parameters to make you happy!

Value

ggplot of the standard median something among the samples. This will also write to an open device. The resulting plot measures the median correlation of each sample among its peers. It notes 1.5* the interquartile range among the samples and makes a horizontal line at that correlation coefficient. Any sample which falls below this line is considered for removal because it is much less similar to all of its peers.

See Also

[matrixStats] [ggplot2]

Examples

## Not run: 
 smc_plot = hpgl_smc(expt = expt)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.