Quantile-quantile plot for observed vs. expected p-values

Description

qqplotter returns a pdf file containing the QQ-plot for a given set of p-values

Usage

1
2
3
  qqplotter(p_values = NULL, res.file = NULL,
    p.num.col = NULL, sep = " ", out.file = "QQplot.pdf",
    title = "")

Arguments

p_values

A vector or a column in a data-set containing p-values to plot. This is an alternative to file.

res.file

File name of the file containing p-values to retrieve. This alternative does not require loading the results and is an alternative to the p_values parameter.

p.num.col

Number indicating which column of the file contains p-values. Specify only if you are using the file option.

sep

File separator to be used when reading file. Default is white space.

title

Title to appear on the plot.

out.file

File name for the output plot.

Details

The function is useful for comparing expected and observed distributions of statistics arising from genome-wide testing. Two different types of input are allowed:

  • an object such as vector or data-frame column, containing p-values;

  • a file name and the column number for retrieving p-values from file. Note that separator is set to white space, can be changed accordingly if needed. The special character "*" is allowed for selecting more than on file (e.g. in case there is one file for each chromosome) but the p-values column position must be the same for all files.

Value

The output will be a pdf file containing the QQplot.