Skip to contents

An S3 generic that accepts a GWASFormatter object, data.frame/tibble, or a raw numeric vector of p-values. For object-based inputs the plot is saved to `output`; for raw vectors the ggplot object is returned invisibly (backward- compatible with the previous signature).

Usage

qqplot(x, output, ...)

# S3 method for class 'GWASFormatter'
qqplot(x, output, width = 5, height = 5, dpi = 300, ...)

# S3 method for class 'tbl_df'
qqplot(x, output, width = 5, height = 5, dpi = 300, ...)

# S3 method for class 'data.frame'
qqplot(x, output, width = 5, height = 5, dpi = 300, ...)

# Default S3 method
qqplot(x, output, ...)

Arguments

x

A GWASFormatter object, data.frame/tibble with a `PVALUE` column, or a numeric vector (or list of numeric vectors) of p-values.

output

Path for the saved plot file (required for object methods).

...

Additional arguments passed to the underlying `.make_qqplot()` (e.g. `should.thin`, `draw.conf`, `point.color`).

width

Plot width in inches. Default 5.

height

Plot height in inches. Default 5.

dpi

Plot resolution. Default 300.

Value

Invisibly returns the ggplot object.

Methods (by class)

  • qqplot(GWASFormatter): Method for GWASFormatter objects

  • qqplot(tbl_df): Method for tibble objects

  • qqplot(data.frame): Method for data.frame objects

  • qqplot(default): Default method for numeric vectors or lists of numeric vectors