| transcriptWindow {ORFik} | R Documentation |
Gives you binned meta coverage plots, either saved seperatly or all in one.
transcriptWindow(
leaders,
cds,
trailers,
df,
outdir = NULL,
scores = c("sum", "zscore"),
allTogether = TRUE,
colors = rep("skyblue4", nrow(df)),
title = "Coverage metaplot",
windowSize = min(100, min(widthPerGroup(leaders, FALSE)), min(widthPerGroup(cds,
FALSE)), min(widthPerGroup(trailers, FALSE))),
returnPlot = is.null(outdir),
dfr = NULL,
idName = "",
format = ".png"
)
leaders |
a |
cds |
a |
trailers |
a |
df |
an ORFik |
outdir |
directory to save to (default: NULL, no saving) |
scores |
scoring function (default: c("sum", "zscore")), see ?coverageScorings for possible scores. |
allTogether |
plot all coverage plots in 1 output? (defualt: TRUE) |
colors |
Which colors to use, default (skyblue4) |
title |
title of ggplot |
windowSize |
size of binned windows, default: 100 |
returnPlot |
return plot from function, default is.null(outdir), so TRUE if outdir is not defined. |
dfr |
an ORFik |
idName |
A character ID to add to saved name of plot, if you make several plots in the same folder, and same experiment, like splitting transcripts in two groups like targets / nontargets etc. (default: "") |
format |
default (".png"), do ".pdf" if you want as pdf |
NULL, or ggplot object if returnPlot is TRUE
# Make ORFik experiment
dir <- system.file("extdata", "", package = "ORFik")
# 2. Pick an experiment name
exper <- "ORFik"
# 3. Pick .gff/.gtf location
txdb <- system.file("extdata", "annotations.gtf", package = "ORFik")
template <- create.experiment(dir = dir, exper, txdb = txdb,
viewTemplate = FALSE)
template$X5[6] <- "heart" # <- fix non unique row
# read experiment
df <- read.experiment(template)
loadRegions(df) # Load leader, cds and trailers as GRangesList
#transcriptWindow(leaders, cds, trailers, df, outdir = "directory_to_save")