qqmirror: qqmirror

Description Usage Arguments Value Examples

View source: R/qqmirror.R

Description

Create qqplots with an assumed uniform distribution

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
qqmirror(
  top,
  bottom,
  CI = 0.95,
  opacity = 1,
  groupcolors,
  splittop = NULL,
  splitbottom = NULL,
  highlight_p,
  highlight_name,
  annotate_p,
  annotate_name,
  highlighter = "red",
  freey = FALSE,
  tline,
  bline,
  background,
  toptitle = NULL,
  bottomtitle = NULL,
  file = "qqmirror",
  type = "png",
  wi = 6,
  hgt = 8,
  hgtratio = 0.5,
  res = 300
)

Arguments

top

dataframe with at least one column, p-value; Color, Shape, and Name optional

bottom

dataframe with at least one column, p-value; Color, Shape, and Name optional

CI

two-sided confidence interval, default 0.95

opacity

point opacity, default 1

groupcolors

named vector of colors corresponding to data in Group column

splittop

if data contains Color and/or Shape, indicate variable(s) by which the data should be subsetted for calculating CIs

splitbottom

if data contains Color and/or Shape, indicate variable(s) by which the data should be subsetted for calculating CIs

highlight_p

list of pvalue thresholds to highlight in the order of c(p_top, p_bottom)

highlight_name

vector of names to highlight, dataframe must include a Name column

annotate_p

list of pvalue thresholds to annotate in the order of c(p_top, p_bottom)

annotate_name

vector of names to annotate, dataframe must include a Name column to use this option

highlighter

highlighter color

freey

allow y-axes to scale with data

tline

draw a red line at (observed) pvalue threshold in top plot

bline

draw a red line at (observed) pvalue threshold in bottom plot

background

can change to "white"

toptitle

title for top plot

bottomtitle

title for bottom plot

file

filename

type

plot type/extension

wi

width of plot

hgt

height of plot

hgtratio

height ratio for plots

res

resolution of plot

Value

png image

Examples

1
2
3
4
5
data(gwas.t)
qqdat <- data.frame(pvalue=gwas.t$pvalue, Color=rep(c("Additive", "Dominant", "Recessive"), 
length.out=nrow(gwas.t), each=1))
qqmirror(top=qqdat, bottom=qqdat, opacity=0.6, splittop="Color", splitbottom="Color", 
toptitle="Example: Top", bottomtitle="Example: Bottom")

anastasia-lucas/hudson documentation built on Nov. 18, 2021, 5:16 p.m.