View source: R/score_metagene.R
score_metagene | R Documentation |
Uses mean binned PC scores across a set of regions to draw a metagene.
score_metagene(ranks, regions, bin, title, xaxis, yaxis,
chromDictObj, return.data, linecol)
ranks |
getPCRanks output data.frame |
regions |
A three-column data.frame containing a set of regions to test. Columns = chrom, start, end. |
bin |
integer, number of bins to use in metagenes. Default=100. |
title |
Output plot title |
xaxis |
Output plot x-axis title |
yaxis |
Output plot y-axis title |
chromDictObj |
Optional chromDictObject made from chromDict(), runs internally if set to NULL (default). Scripts that run this function multiple times will be sped up by setting this option. |
return.data |
T/F, whether to return a plot, or data that can be run with plot_metagene() or multiple_metagenes(). |
linecol |
Colour for line, auto="red" |
If return.data=F
, returns a grob
containing a metagene plot. Otherwise, returns a list
of two data.frames
containing metagene and metagene standard error plotting information.
ranks <- getPCRanks(eigen, IDs = c("trt", "ctl"), PC = 1)
DMRs <- Get_Novel_DMRs(ranks, 2940, minCpGs=10)
# select chrom, start, and end of all hyper DMRs:
hyper_DMRs <- DMRs[DMRs$FDR <= 0.05 & DMRs$DMR_Zscore > 0,]
regions_hyper <- hyper_DMRs[c(1:3)]
score_metagene(ranks, regions_hyper)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.