plotHelper: Helper function for coverage plots

View source: R/experiment_plots.R

plotHelperR Documentation

Helper function for coverage plots

Description

Should only be used internally

Usage

plotHelper(
  coverage,
  df,
  outdir,
  scores,
  returnCoverage = FALSE,
  title = "coverage metaplot",
  plot.ext = ".pdf",
  colors = c("skyblue4", "orange"),
  plotFunction = "windowCoveragePlot"
)

Arguments

coverage

a data.table containing at least columns (count/score, position), it is possible to have additionals: (genes, fraction, feature)

df

an ORFik experiment

outdir

directory to save to (default: NULL, no saving)

scores

scoring function (default: c("sum", "transcriptNormalized")), see ?coverageScorings for possible scores.

returnCoverage

(defualt: FALSE), return the ggplot object (TRUE) or NULL (FALSE).

title

Title to give plot

plot.ext

character, default: ".pdf". Alternatives: ".png" or ".jpg".

colors

Which colors to use, default auto color from function experiment.colors, new color per library type. Else assign colors yourself.

plotFunction

Which plot function, default: windowCoveragePlot

Value

NULL (or ggplot object if returnCoverage is TRUE)


Roleren/ORFik documentation built on Nov. 13, 2024, 10 p.m.