Plot the -log10 of pvalues

Description

Plot lines connecting the the -log10 of pvalues for a series of tests

Usage

1
2
plotpval(pos, pmat, lty=1, lwd=1, col=1, title="", legend, 
         xlab="Position(cM)", ylab="-log10(pvalue)")

Arguments

pos

an index for the series of tests, usually assuming adjacent tests are correlated.

pmat

matrix of p-values, each column represents a different test, rows correspond to the pos[ition] index

lty

line type, see par()

lwd

line width, see par()

col

line color, see par()

title

title for the top-center of the plot

legend

vector of text strings explaning the tests in each column of pmat

xlab

x axis label

ylab

y axis label

Details

The default height for the y-axis is 3, which corresponds to a p-value of 1e-3. If any p-value is smaller, the height is -log10 of the smallest p-value in pmat.

Value

nothing is returned

Side Effects

none

See Also

par, title, legend

Examples

1
2
plotpval(pos=1:10, pmat=cbind(runif(10)/5, runif(10)/10), 
         lty=c(1,2), col=c(1,2), legend=c("runif/5", "runif/10"))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.