plotPeriodicityResults: Plot the output of getPeriodicity()

Description Usage Arguments Value Examples

View source: R/plot.R

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

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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
)

periodicDNA documentation built on Nov. 8, 2020, 5:48 p.m.