qq_pval: qq plot given input p values

Description Usage Arguments Author(s)

View source: R/fishhook.R

Description

Generates R or Shiny quantile-quantile (Q-Q) plot given (minimally) an observed vector of p values, plotted their -log1 )quantiles against corresponding -log10 quantiles of the uniform distribution.

Usage

1
2
3
4
5
qq_pval(obs, highlight = c(), exp = NULL, lwd = 1, col = NULL,
  col.bg = "black", pch = 18, cex = 1, conf.lines = TRUE, max = NULL,
  max.x = NULL, max.y = NULL, label = NULL, plotly = FALSE,
  annotations = list(), gradient = list(), titleText = "",
  subsample = NA, key = NULL, ...)

Arguments

obs

vector of pvalues to plot, names of obs can be intepreted as labels

highlight

vector optional arg specifying indices of data points to highlight (i.e. color red) (default = c())

exp

numeric vector, expected distribution. if default (NULL) will plot observed against a uniform distribution Use this if you are expecting a non-uniform distribution. Must be equal in length to obs. (default = NULL)

lwd

integer, optional, specifying thickness of line fit to data (default = 1)

col

a vector of strings (colors) equivalent in length to obs, this is the color that will be used for plotting. This is only if plotly = T (default = NULL)

col.bg

string indicating the color of the background

pch

integer dot type for scatter plot

cex

integer dot size for scatter plot

conf.lines

logical, optional, whether to draw 95 percent confidence interval lines around x-y line

max

numeric, optional, threshold to max the input p values

max.x

numeric, max value for the x axis

max.y

numeric, max value for the y axis

label

character vector, optional specifying which data points to label (obs vector has to be named, for this to work)

plotly

toggles between creating a pdf (FALSE) or an interactive html widget (TRUE)

annotations

named list of vectors containing information to present as hover text (html widget), must be in same order as obs input

gradient

named list that contains one vector that color codes points based on value, must bein same order as obs input

titleText

title for plotly (html) graph only

subsample

numeric (positive integer), number of points to use for plotting, will be taken randomly from the set of obs -> p values

key

a character that is passed to the plotly function that will link each point to a give value. For example, if key is set to gene_name The ploted points are refered to by thier gene_name. This is useful when integrating with shiny or any other tool that can integrate with plotly plots.

Author(s)

Marcin Imielinski, Eran Hodis, Zoran Z. Gajic


mskilab/fish.hook documentation built on Feb. 23, 2018, 7:11 a.m.