plot.permTestResults: Function for plotting the results from a 'permTestResults'...

View source: R/plot.permTestResults.R

plot.permTestResultsR Documentation

Function for plotting the results from a permTestResults object.

Description

Function for plotting the results from a permTestResults object.

Usage

## S3 method for class 'permTestResults'
plot(
  x,
  pvalthres = 0.05,
  plotType = "Tailed",
  main = "",
  xlab = NULL,
  ylab = "",
  ylim = NULL,
  xlim = NULL,
  ...
)

Arguments

x

an object of class permTestResults.

pvalthres

p-value threshold for significance. Default is 0.05.

plotType

the type of plot to display. This must be one of "Area" or "Tailed". Default is "Area".

main

a character specifying the title of the plot. Defaults to "".

xlab

a character specifying the label of the x axis. Defaults to NULL, which produces a plot with the evaluation function name as the x axis label.

ylab

a character specifying the label of the y axis. Defaults to "".

ylim

defines the y limits of the plot. Passed to the underlying plot call.

xlim

defines the x limits of the plot. Passed to the underlying plot call.

...

further arguments to be passed to or from methods.

Value

A plot is created on the current graphics device.

See Also

permTest

Examples


genome <- filterChromosomes(getGenome("hg19"), keep.chr="chr1")
A <- createRandomRegions(nregions=20, length.mean=10000000, length.sd=20000, genome=genome, non.overlapping=FALSE) 
B <- c(A, createRandomRegions(nregions=10, length.mean=10000, length.sd=20000, genome=genome, non.overlapping=FALSE))

pt <- overlapPermTest(A=A, B=B, ntimes=10, genome=genome, non.overlapping=FALSE)
summary(pt)
plot(pt)
plot(pt, plotType="Tailed")  
 
pt2 <- permTest(A=A, B=B, ntimes=10, alternative="auto", genome=genome, evaluate.function=meanDistance, randomize.function=randomizeRegions, non.overlapping=FALSE)
summary(pt2)
plot(pt2)
plot(pt2, plotType="Tailed")


bernatgel/regioneR documentation built on Sept. 10, 2023, 12:03 a.m.