Learn R Programming

regioneR (version 1.4.0)

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

Description

Function for plotting the results from a permTestResults object.

Usage

"plot"(x, pvalthres = 0.05, plotType = "Tailed", main = "", xlab = NULL, ylab = "", ...)

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 "".
...
further arguments to be passed to or from methods.

Value

A plot is created on the current graphics device.

See Also

permTest

Examples

Run this code

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")

Run the code above in your browser using DataLab