barGene | R Documentation |
This function will accept a list of genes and counts to produce a bar plot of gene expression in different conditions
barGene(
genes,
counts,
conditions,
title = "Gene expression",
norm = NULL,
eb = "sd",
returnDat = FALSE,
col = "Dark2",
ord = NULL,
con = NULL,
stat.test = "t.test",
hide.ns = TRUE,
retGP = FALSE
)
genes |
character vector of genes to plot. Must match rownames(counts) |
counts |
count matrix of gene expression, where rows are genes and columns are samples |
conditions |
character vector of length ncol(counts) describing the condition of each sampmle in counts |
title |
character describing the title of the plot |
norm |
character describing the condition to use as a reference for relative gene expression. Each gene's expression will be set relative to this condition. Leave 'NULL' if plotting raw values. |
eb |
character describing the style of error bar. "sd" = standard deviation, "se" = standard error of the mean. Use '0' if no error bars to be plotted. Default is 'sd'. |
returnDat |
Boolean indicating if list of raw and summarized data should be returned for further analysis. Default is FALSE. |
col |
character indicating the RColorBrewer palette name or list of colours (hex, name, rgb()) to be used. Default is "Dark2" |
ord |
character indicating the order in which the samples should appear (overrides any ordering from using 'norm' argument). Default is NULL. |
con |
character indicating control condition if pairswise t-tests are to be performed. Leave NULL to not include stats. Set to 'show.all' to show all pairwise comparisons within each gene. |
stat.test |
character indicating either "t.test" or "wilcox" for stats when 'con' is defined. Default is "t.test" |
hide.ns |
logical value. If TRUE, hide ns symbol when displaying significance levels. |
retGP |
logical indicating if ggplot object should be returned. Default is FALSE. |
Bar plot of gene expression and list of length 2 containing 'rawData' and 'Summary' of gene expression data if 'returnDat' is TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.