View source: R/plot_metagene.R
plot_metagene | R Documentation |
Plots a metagene object using the raw data generated by score_metagene().
plot_metagene(data, title, xaxis, yaxis, linecol)
data |
list, score_metagene() raw data output |
title |
Output plot title |
xaxis |
Output plot x-axis title |
yaxis |
Output plot y-axis title |
linecol |
Colour for line, auto="red" |
Returns a grob
containing a plot of the input metagene data.
ranks <- getPCRanks(eigen, IDs = c("trt", "ctl"), PC = 1)
DMRs <- Get_Novel_DMRs(ranks, 2940, minCpGs=10)
# Select all significantly hypomethylated DMRs:
hypo_DMRs <- DMRs[DMRs$FDR <= 0.05 & DMRs$DMR_Zscore < 0,]
# select chrom, start, and end of all hyper DMRs
regions_hypo <- hypo_DMRs[c(1:3)]
# return.data = T returns raw data instead of a plot:
hypo_metagene <- score_metagene(ranks, regions_hypo, return.data = TRUE)
plot_metagene(hypo_metagene)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.