DEG_plot | R Documentation |
Gives you interactive 1D or 2D DE plots
DEG_plot(
dt,
draw_non_regulated = FALSE,
xlim = ifelse(two_dimensions, "bidir.max", "auto"),
ylim = "bidir.max",
xlab = ifelse(two_dimensions, "RNA fold change (log2)", "Mean counts (log2)"),
ylab = ifelse(two_dimensions, "RFP fold change (log2)", "Fold change (log2)"),
two_dimensions = ifelse("LFC" %in% colnames(dt), FALSE, TRUE),
color.values = c(`No change` = "black", Significant = "red", Buffering = "purple",
`mRNA abundance` = "darkgreen", Expression = "blue", Forwarded = "yellow", Inverse =
"aquamarine", Translation = "orange4")
)
dt |
a data.table with results from a differential
expression run. Normally from: |
draw_non_regulated |
logical, default FALSE. Should non-regulated rows be included in the plot? Will make the plot faster to render if skipped (FALSE) |
xlim |
numeric vector or character preset, default:
|
ylim |
numeric vector or character preset, default: "bidir.max" (Equal in both + / - direction, using max value + 0.5 of LFC(in 1d) / rfp(in 2d) column of dt). If you want ggplot to decide limit, set to "auto". For numeric vector, specify min and max x limit: like c(-5, 5) |
xlab |
character, default:
|
ylab |
character, default:
|
two_dimensions |
logical, default:
|
color.values |
named character vector, default: |
plotly object
# Load experiment
df <- ORFik.template.experiment()
# 1 Dimensional analysis
dt <- DEG.analysis(df[df$libtype == "RNA",])
dt$Regulation[1] <- "Significant" # Fake sig level
DEG_plot(dt, draw_non_regulated = TRUE)
# 2 Dimensional analysis
dt_2d <- DTEG.analysis(df[df$libtype == "RFP",], df[df$libtype == "RNA",],
output.dir = NULL)
dt_2d$Regulation[4] <- "Translation" # Fake sig level
dt_2d$Regulation[5] <- "Buffering" # Fake sig level
DEG_plot(dt_2d, draw_non_regulated = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.