graph_metrics: Make lots of graphs!

View source: R/plot_shared.R

graph_metricsR Documentation

Make lots of graphs!

Description

Plot out a set of metrics describing the state of an experiment including library sizes, # non-zero genes, heatmaps, boxplots, density plots, pca plots, standard median distance/correlation, and qq plots.

Usage

graph_metrics(
  expt,
  cormethod = "pearson",
  distmethod = "euclidean",
  title_suffix = NULL,
  qq = NULL,
  ma = NULL,
  cv = NULL,
  gene_heat = NULL,
  ...
)

Arguments

expt

an expt to process

cormethod

The correlation test for heatmaps.

distmethod

define the distance metric for heatmaps.

title_suffix

Text to add to the titles of the plots.

qq

Include qq plots?

ma

Include pairwise ma plots?

cv

Include coefficient of variance plots? (they are slow)

gene_heat

Include a heatmap of the gene expression data?

...

Extra parameters optionally fed to the various plots

Value

a loooong list of plots including the following:

  1. nonzero = a ggplot2 plot of the non-zero genes vs library size

  2. libsize = a ggplot2 bar plot of the library sizes

  3. boxplot = a ggplot2 boxplot of the raw data

  4. corheat = a recordPlot()ed pairwise correlation heatmap of the raw data

  5. smc = a recordPlot()ed view of the standard median pairwise correlation of the raw data

  6. disheat = a recordPlot()ed pairwise euclidean distance heatmap of the raw data

  7. smd = a recordPlot()ed view of the standard median pairwise distance of the raw data

  8. pcaplot = a recordPlot()ed PCA plot of the raw samples

  9. pcatable = a table describing the relative contribution of condition/batch of the raw data

  10. pcares = a table describing the relative contribution of condition/batch of the raw data

  11. pcavar = a table describing the variance of the raw data

  12. qq = a recordPlotted() view comparing the quantile/quantiles between the mean of all data and every raw sample

  13. density = a ggplot2 view of the density of each raw sample (this is complementary but more fun than a boxplot)

See Also

[plot_nonzero()] [plot_legend()] [plot_libsize()] [plot_disheat()] [plot_corheat()] [plot_topn()] [plot_pca()] [plot_sm()] [plot_boxplot()]

Examples

## Not run: 
 toomany_plots <- graph_metrics(expt)
 toomany_plots$pcaplot
 norm <- normalize_expt(expt, convert = "cpm", batch = TRUE, filter_low = TRUE,
                        transform = "log2", norm = "rle")
 holy_asscrackers <- graph_metrics(norm, qq = TRUE, ma = TRUE)

## End(Not run)

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