plotPeriodicityResults: Plot the output of getPeriodicity()

View source: R/plot.R

plotPeriodicityResultsR Documentation

Plot the output of getPeriodicity()

Description

This function plots some results from the result of getPeriodicity(). It plots the raw distogram, the distance-decay normalized distogram and the resulting PSD values. If a shuffled control has been performed by getPeriodicity(), it also displays it.

Usage

plotPeriodicityResults(
  results,
  periods = c(2, 20),
  filter_periods = TRUE,
  facet_control = TRUE,
  xlim = NULL,
  fdr_threshold = 0.05,
  ...
)

Arguments

results

The output of getPeriodicity function.

periods

Vector a numerical vector of length 2, to specify the x-axis limits

filter_periods

Boolean Should the x-axis be constrained to the periods?

facet_control

Boolean should the shuffling plots be faceted?

xlim

Integer x axis upper limit in raw and norm. distograms

fdr_threshold

Float, significance threshold

...

Additional theme arguments passed to theme_ggplot2()

Value

list A list containing four ggplots

Examples

data(ce11_TSSs)
periodicity_result <- getPeriodicity(
    ce11_TSSs[['Ubiq.']][1:100],
    genome = 'BSgenome.Celegans.UCSC.ce11',
    motif = 'TT', 
    BPPARAM = setUpBPPARAM(1)
)
head(periodicity_result$PSD)
plotPeriodicityResults(periodicity_result)
plotPeriodicityResults(periodicity_result, xlim = 150)
plotPeriodicityResults(
    periodicity_result, xlim = 150, filter_periods = FALSE
)
plotPeriodicityResults(
    periodicity_result, xlim = 150, facet_control = FALSE
)

js2264/periodicDNA documentation built on Nov. 3, 2022, 10:47 p.m.