windowCoveragePlot {ORFik}R Documentation

Get coverage window plot of reads

Description

Spanning a region like a transcripts, plot how the reads distribute.

Usage

windowCoveragePlot(coverage, output = NULL, scoring = "zscore",
  colors = c("skyblue4", "orange"), title = "Coverage metaplot",
  type = "transcript")

Arguments

coverage

a data.table, output of scaledWindowCoverage

output

character string (NULL), if set, saves the plot as pdf or png to path given. If no format is given, is save as pdf.

scoring

character vector (zscore), either of zScore, transcriptNormalized, sum, mean, median, NULL. Set NULL if already scored.

colors

character vector colors to use in plot

title

a character (metaplot) (what is the title of plot?)

type

a character (transcript), what should legends say is the whole region? Transcript, gene, non coding rna etc.

Details

If you return this function without assigning it and output is NULL, it will automaticly plot the figure in your session. If output is assigned, no plot will be shown in session.

Value

a ggplot object of the coverage plot, NULL if output is set, then the plot will only be saved to location.

See Also

Other coveragePlot: coverageHeatMap, pSitePlot, savePlot

Examples

library(data.table)
coverage <- data.table(position = seq(20), score = cumsum(seq(20)))
windowCoveragePlot(coverage)
# See vignette for a more practical example


[Package ORFik version 1.4.0 Index]