This function generates bar plots for gene abundance or fold change, normalized by either a reference gene or centered to the mean. The user can also plot the contrast of two conditions.
Usage
rna.plot_bar(
dds,
genes,
type = c("contrast", "centered"),
shrunken.lfc = T,
contrast = NULL,
col.id = "ID",
name_table = NULL,
match.id = "Accession",
match.name = "Name",
convert_name = FALSE,
shape.size = 2.5,
collage = TRUE,
plot = TRUE,
export = TRUE,
export.nm = NULL
)
Arguments
- dds
A DESeqDataSet object containing the data.
- genes
A vector of gene names or IDs.
- type
Type of plot: "centered" or "contrast".
- shrunken.lfc
A logical indicating if shrunken log2 fold changes should be used if
type = "contrast"
. Default is TRUE.- contrast
Name of the contrast for plotting when type is "contrast".
- col.id
Name of the column with gene IDs in
dep
.- name_table
A data frame containing the mapping of gene names to reference names.
- match.id
The name of a column in
name_table
to find matches withcol.id
.- match.name
The name of a column in
name_table
to assign new names based on matches ofcol.id
andmatch.id
.- convert_name
Logical value indicating whether to convert the gene names to reference names based on
name_table
(e.g., gene names).- shape.size
Numeric value defining the (replicate) symbol size in the plot
- collage
A logical indicating if multiple plots for different genes should be combined into collages of up to 8 plots. Default is TRUE.
- plot
wether to return the plot or not.
- export
Logical; whether to export the plot as PDF an PNG files
- export.nm
Name of the output PDF and PNG files if
export = TRUE
.