manhattanly (version 0.2.0)

volcanoly: Creates a plotly volcano plot

Description

Creates an interactive volcano plot with multiple annotation options

Usage

volcanoly(x, col = c("#252525"), point_size = 5, effect_size_line = c(-1,
  1), effect_size_line_color = "grey", effect_size_line_width = 0.5,
  effect_size_line_type = 2, genomewideline = -log10(1e-05),
  genomewideline_color = "grey", genomewideline_width = 0.5,
  genomewideline_type = 2, highlight = NULL, highlight_color = "red",
  xlab = NULL, ylab = "-log10(p)", title = "Volcano Plot", ...)

Arguments

x

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

  • a p-value, must be numeric

  • a measure of the strength of association, typically an odds ratio, regression coefficient or log fold change. Must be numeric

col

A character of length 1 indicating the color of the points. Only the first argument will be used if more than one color is supplied. Can be Hex Codes as well.

point_size

A numeric indicating the size of the points on the plot. Default is 5

effect_size_line

Where to draw a "suggestive" line on the x-axis. Default is -1 and +1. Must be a vector of length 2. If a longer vector is supplied, only the first two elements will be used. First element must be smaller than second element. Set to FALSE to disable.

effect_size_line_color

color of "suggestive" line. Only used if effect_size_line is not set to FALSE. Default is "blue".

effect_size_line_width

Width of effect_size_line. Default is 1.

effect_size_line_type

An integer between 0 and 6 specifying the line type of the effect_size_line. Default is 1 (solid line). See R Cookbook for complete list

genomewideline

Where to draw a "genome-wide sigificant" line. Default -log10(1e-5). Set to FALSE to disable. If more than one element is provided, only the first will be used

genomewideline_color

color of "genome-wide sigificant" line. Only used if genomewideline is not set to FALSE. Default is "red".

genomewideline_width

Width of genomewideline. Default is 1.

genomewideline_type

An integer between 0 and 6 specifying the line type of the genomewideline. Default is 1 (solid line). See R Cookbook for complete list

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 all points that are both beyond genomewideline and effect_size_line are highlighted. Set to FALSE if you don't want any points highlighted.

highlight_color

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

xlab

X-axis label. Default is NULL which means that the label is automatically determined by the volcanor function. Specify here to overwrite the default.

ylab

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

title

Title of the plot. Default is "Volcano Plot"

...

other parameters passed to volcanor

Value

An interactive volcano plot.

See Also

volcanor, HapMap, significantSNP

Examples

Run this code
# NOT RUN {
library(manhattanly)
volcanoly(HapMap)

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

Run the code above in your browser using DataLab