transcriptWindow: Make 100 bases size meta window for all libraries in...

Description Usage Arguments Value See Also Examples

View source: R/experiment_plots.R

Description

Gives you binned meta coverage plots, either saved seperatly or all in one.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
transcriptWindow(
  leaders,
  cds,
  trailers,
  df,
  outdir = NULL,
  scores = c("sum", "zscore"),
  allTogether = TRUE,
  colors = experiment.colors(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",
  type = "ofst",
  is.sorted = FALSE,
  BPPARAM = bpparam()
)

Arguments

leaders

a GRangesList of leaders (5' UTRs)

cds

a GRangesList of coding sequences

trailers

a GRangesList of trailers (3' UTRs)

df

an ORFik experiment

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 auto color from function experiment.colors, new color per library type. Else assign colors yourself.

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 experiment of RNA-seq to normalize against. Will add RNA normalized to plot name if this is done.

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

type

a character(default: "bedoc"), load files in experiment or some precomputed variant, either "bedo", "bedoc", "pshifted" or default. These are made with ORFik:::simpleLibs(), shiftFootprintsByExperiment().. Will load default if bedoc is not found

is.sorted

logical (FALSE), is grl sorted. That is + strand groups in increasing ranges (1,2,3), and - strand groups in decreasing ranges (3,2,1)

BPPARAM

how many cores/threads to use? default: bpparam()

Value

NULL, or ggplot object if returnPlot is TRUE

See Also

Other experiment plots: transcriptWindow1(), transcriptWindowPer()

Examples

1
2
3
df <- ORFik.template.experiment()[3,] # Only third library
loadRegions(df) # Load leader, cds and trailers as GRangesList
#transcriptWindow(leaders, cds, trailers, df, outdir = "directory/to/save")

ORFik documentation built on March 27, 2021, 6 p.m.