plotprocessing | R Documentation |
metaplot
and mmetaplot
Process the metagene results from metaplot
and mmetaplot
and
remove the extremely large FPM outliers in the original metagene plots.
plotprocessing(
fwdlist,
revlist,
groupnames,
lineposes,
labels,
title,
cutoff = 0.01,
titlesize = 17,
textsize = 16
)
fwdlist |
A list containing the metagene FPM values from the function
|
revlist |
A list containing the metagene FPM values from the function
|
groupnames |
A vector with elements as strings to show the different
elements' experimental conditions in |
lineposes |
A vector with elements as integers to show the coordinates of the TSS and/or TTS points in the metagene. These coordinates use the beginning of the metagene x-coordinate as 1. |
labels |
A vector with elements as strings to show the x-axis labels
for the beginning and end of the metagene's x-axis and for the positions
indicated by the parameter |
title |
The title for the metagene plot. |
cutoff |
To remove the extremely large FPM outliers from the original metagene plot, this parameter needs to be set. The default value is 0.01, which means the 1 - 1% (0.01) = 99% quantile of the metagene FPMs will be defined as their maximum, and any larger ones will be reduced. |
titlesize |
The font size for the plot title. Default is 17. |
textsize |
The font size for the plot texts. Default is 16. |
The processed metagene plot with the FPM outliers removed.
library(proRate)
wt0file <- system.file("extdata", "wt0.bam", package = "proRate")
ko0file <- system.file("extdata", "ko0.bam", package = "proRate")
metareslist <- mmetaplot(metafiles = c(wt0file, ko0file),
labels = c("WT", "KO"),
tssradius = c(1000, 500),
ttsradius = c(1000),
genebodylen = 2000,
strandmethod = 1,
genomename = "mm10",
genelencutoff = 40000,
fpkmcutoff = 1)
combinefwdlist <- list()
combinerevlist <- list()
for(i in seq(1, 2, 1)){
groupname <- c("WT", "KO")[i]
combinefwdlist[[i]] <- metareslist[[groupname]]$combinefwdFPMmeans
combinerevlist[[i]] <- metareslist[[groupname]]$combinerevFPMmeans
}
plotprocessing(fwdlist = combinefwdlist,
revlist = combinerevlist,
cutoff = 0.01,
groupnames = c("WT", "KO"),
labels = c("-1000", "TSS", "TTS", "+1000"),
lineposes = c(1001, 3000),
title = "WT_KO metagene from -1000bp of TSS to +1000bp of TTS",
titlesize = 17,
textsize = 16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.