single_gene_plot: Single Gene Plot

Description Usage Arguments

View source: R/rnaseq_helpers.R

Description

Make a plot of a single gene. If more genes are provided will facet by gene. Generally useful for less than about 30 genes

Usage

1
2
3
single_gene_plot(genes, dds, xaxis, fill, normalized = TRUE,
  transform = FALSE, gene_key = NULL, palette = "Set1",
  type = c("box", "dot"), facet_scale = "free_y")

Arguments

genes

character vector of gene identifers that you wish to plot. ID type must match gene ids in the dds object.

dds

valid DESeq2 object used to extract the gene expression values. Uses the plotCounts function from DESeq2 to extract the expression values.

xaxis

character, name of the sample column to put on the x-axis, must be a column in colData(dds).

fill

character, name of the sample column to use for colouring the plot, must be a column in colData(dds).

normalized

whether the counts should be normalized by size factor (default is TRUE). Passed to plotCounts

transform

whether to present log2 counts (TRUE) or to present the counts on the log scale (FALSE, default). Passed to plotCounts.

gene_key

an optional named list of gene symbols with the gene ids as names. Used as a lookup key to replace gene ids with symbols in the plot

palette

character, name of RColorBrewer palette to use. Default is "Set1"

type

character, type of plot to make. Defaults to boxplot.

facet_scale

character, passed to facet_wrap.


mworkentine/mattsUtils documentation built on May 23, 2019, 11:58 a.m.