Description Usage Arguments Details Value Examples
Plot expression values (e.g. normalized counts) for a gene of interest, grouped by experimental group(s) of interest
1 2 3 4 5 6 7 8 9 10 11 12 |
dds |
A |
gene |
Character, specifies the identifier of the feature (gene) to be plotted |
intgroup |
A character vector of names in |
assay |
Character, specifies with assay of the |
annotation_obj |
A |
normalized |
Logical value, whether the expression values should be
normalized by their size factor. Defaults to TRUE, applies when |
transform |
Logical value, corresponding whether to have log scale y-axis or not. Defaults to TRUE. |
labels_repel |
Logical value. Whether to use |
plot_type |
Character, one of "auto", "jitteronly", "boxplot", "violin",
or "sina". Defines the type of |
return_data |
Logical, whether the function should just return the data.frame of expression values and covariates for custom plotting. Defaults to FALSE. |
The result of this function can be fed directly to plotly::ggplotly()
for interactive visualization, instead of the static ggplot
viz.
A ggplot
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | library("macrophage")
library("DESeq2")
library("org.Hs.eg.db")
# dds object
data("gse", package = "macrophage")
dds_macrophage <- DESeqDataSet(gse, design = ~line + condition)
rownames(dds_macrophage) <- substr(rownames(dds_macrophage), 1, 15)
dds_macrophage <- estimateSizeFactors(dds_macrophage)
# annotation object
anno_df <- data.frame(
gene_id = rownames(dds_macrophage),
gene_name = mapIds(org.Hs.eg.db,
keys = rownames(dds_macrophage),
column = "SYMBOL",
keytype = "ENSEMBL"),
stringsAsFactors = FALSE,
row.names = rownames(dds_macrophage)
)
gene_plot(dds_macrophage,
gene = "ENSG00000125347",
intgroup = "condition",
annotation_obj = anno_df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.