Description Usage Arguments Details Value Examples
MA-plot from base means and log fold changes, in the ggplot2 framework, with additional support to annotate genes if provided.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
res_obj |
A |
FDR |
Numeric value, the significance level for thresholding adjusted p-values |
point_alpha |
Alpha transparency value for the points (0 = transparent, 1 = opaque) |
sig_color |
Color to use to mark differentially expressed genes. Defaults to red |
annotation_obj |
A |
hlines |
The y coordinate (in absolute value) where to draw horizontal lines, optional |
title |
A title for the plot, optional |
xlab |
X axis label, defaults to "mean of normalized counts - log10 scale" |
ylim |
Vector of two numeric values, Y axis limits to restrict the view |
add_rug |
Logical, whether to add rug plots in the margins |
intgenes |
Vector of genes of interest. Gene symbols if a |
intgenes_color |
The color to use to mark the genes on the main plot. |
labels_intgenes |
Logical, whether to add the gene identifiers/names close to the marked plots |
labels_repel |
Logical, whether to use |
The genes of interest are to be provided as gene symbols if a symbol
column is provided in res_obj
, or else b< using the identifiers specified
in the row names
An object created by ggplot
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 26 | library(airway)
data(airway)
airway
dds_airway <- DESeq2::DESeqDataSetFromMatrix(assay(airway),
colData = colData(airway),
design=~cell+dex)
# subsetting for quicker run, ignore the next two commands if regularly using the function
gene_subset <- c(
"ENSG00000103196", # CRISPLD2
"ENSG00000120129", # DUSP1
"ENSG00000163884", # KLF15
"ENSG00000179094", # PER1
rownames(dds_airway)[rep(c(rep(FALSE,99), TRUE), length.out=nrow(dds_airway))]) # 1% of ids
dds_airway <- dds_airway[gene_subset,]
dds_airway <- DESeq2::DESeq(dds_airway)
res_airway <- DESeq2::results(dds_airway)
plot_ma(res_airway, FDR = 0.05, hlines = 1)
plot_ma(res_airway, FDR = 0.1,
intgenes = c("ENSG00000103196", # CRISPLD2
"ENSG00000120129", # DUSP1
"ENSG00000163884", # KLF15
"ENSG00000179094") # PER1
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.