qqly: Creates a plotly Q-Q plot

Description Usage Arguments Value See Also Examples

View source: R/qqly.R

Description

Creates an interactive Q-Q plot with multiple annotation options

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
qqly(
  x,
  ...,
  col = "#252525",
  size = 5,
  type = 20,
  abline_col = "red",
  abline_size = 1,
  abline_type = "solid",
  highlight = NULL,
  highlight_color = "#00FF00",
  xlab = "Expected -log10(p)",
  ylab = "Observed -log10(p)",
  title = "Q-Q Plot"
)

Arguments

x

Can be an object of class qqr produced by the qqr function or a data.frame which must contain at least the following column:

  • a p-value, must be numeric

...

other parameters passed to qqr

col

A character indicating the color of the points. Can be Hex Codes as well.

size

A numeric specifying the size of the points. Default is 1

type

An integer between 0 and 25 specifying the point shape. Default is 20 (filled circle). Deprecated.

abline_col

A character indicating the color of the 45 degree diagonal line. Can be Hex Codes as well. Default is "red".

abline_size

A numeric indicating the size of the 45 degree diagonal line. Default is 0.5.

abline_type

Sets the line type of the 45 degree line. Set to a dash type character among "solid", "dot", "dash", "longdash", "dashdot", or "longdashdot", or a dash length list in px (eg "5px","10px","2px"). Can also be a positive numeric value (e.g 5, 10, 2). Default is "dash". See plotly help page on layouts for complete list and more details

highlight

A character vector of SNPs in your dataset to highlight. These SNPs should all be in your dataset. Default is NULL which means that nothing is highlighted.

highlight_color

Color used to highlight points. Only used if highlight argument has been specified

xlab

X-axis label. Default is "Expected -log10(p)"

ylab

Y-axis label. Default is "Observed -log10(p)"

title

Title of the plot. Default is "Q-Q Plot"

Value

An interactive Q-Q plot.

See Also

qqr, HapMap, significantSNP

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(manhattanly)
qqly(HapMap)

# highlight SNPs of interest
# 'signigicantSNP' is a character vector of SNPs included in this package
qqly(HapMap, snp = "SNP", highlight = significantSNP)

## End(Not run)

manhattanly documentation built on April 26, 2021, 9:05 a.m.