scatter_plotly: Locus scatter plotly

View source: R/scatter_plotly.R

scatter_plotlyR Documentation

Locus scatter plotly

Description

Produces a scatter plot from a 'locus' class object using plotly.

Usage

scatter_plotly(
  loc,
  index_snp = loc$index_snp,
  pcutoff = 5e-08,
  scheme = c("grey", "dodgerblue", "red"),
  xlab = NULL,
  ylab = NULL,
  yzero = (loc$yvar == "logP"),
  showLD = TRUE,
  LD_scheme = c("grey", "royalblue", "cyan2", "green3", "orange", "red", "purple"),
  marker_outline = "black",
  marker_size = 7,
  recomb_col = "blue",
  eqtl_gene = NULL,
  beta = NULL,
  add_hover = NULL,
  showlegend = TRUE
)

Arguments

loc

Object of class 'locus' to use for plot. See locus.

index_snp

Specifies index SNP or a vector of SNPs to be shown in a different colour and symbol. Defaults to the SNP with the lowest p-value. Set to NULL to not show this.

pcutoff

Cut-off for p value significance. Defaults to p = 5e-08. Set to NULL to disable.

scheme

Vector of 3 colours if LD is not shown: 1st = normal points, 2nd = colour for significant points, 3rd = index SNP(s).

xlab

x axis title.

ylab

y axis title.

yzero

Logical whether to force y axis limit to include y=0.

showLD

Logical whether to show LD with colours

LD_scheme

Vector of colours for plotting LD. The first colour is for SNPs which lack LD information. The next 5 colours are for r^2 or D' LD results ranging from 0 to 1 in intervals of 0.2. The final colour is for the index SNP.

marker_outline

Specifies colour for outlining points.

marker_size

Value for size of markers in plotly units.

recomb_col

Colour for recombination rate line if recombination rate data is present. Set to NA to hide the line. See link_recomb() to add recombination rate data.

eqtl_gene

Column name in loc$data for eQTL genes.

beta

Optional column name for beta coefficient to display upward triangles for positive beta and downward triangles for negative beta (significant SNPs only).

add_hover

Optional vector of column names in loc$data to add to the plotly hover text for scatter points.

showlegend

Logical whether to show a legend for the scatter points.

Value

A plotly scatter plot.

See Also

locus() locus_plotly()


myles-lewis/locuszoomr documentation built on April 16, 2024, 11:13 p.m.