easyManhattan: Interactive Manhattan plot labels

View source: R/easyManhattan.R

easyManhattanR Documentation

Interactive Manhattan plot labels

Description

Interactive labelling of Manhattan plots using 'shiny' and 'plotly' interface.

Usage

easyManhattan(
  data,
  chrom = "chrom",
  pos = "pos",
  p = "p",
  labs = "rsid",
  startLabels = NULL,
  pcutoff = 5e-08,
  chromGap = NULL,
  chromCols = c("royalblue", "skyblue"),
  sigCol = "red",
  alpha = 0.7,
  labelDir = "horiz",
  xlab = "Chromosome position",
  ylab = expression("-log"[10] ~ "P"),
  xlim = NULL,
  ylim = NULL,
  outline_col = NA,
  shapeScheme = 16,
  size = 6,
  width = ifelse(transpose, 600, 1000),
  height = ifelse(transpose, 800, 600),
  lineLength = 60,
  npoints = max(c(nrow(data)/5, 1e+06)),
  nplotly = 1e+05,
  npeaks = NULL,
  span = 2e+07,
  transpose = FALSE,
  filename = NULL,
  ...
)

Arguments

data

The dataset (data.frame or data.table) for the plot.

chrom

The column of chomosome values in data.

pos

The column of SNP positions in data.

p

The column of p values in data.

labs

The column of labels in data.

startLabels

Vector of initial labels. With a character vector, labels are identified in the column specified by labs. With a numeric vector, points to be labelled are referred to by row number.

pcutoff

Cut-off for p value significance. Defaults to 5E-08.

chromGap

Size of gap between chromosomes along the x axis in base pairs. If NULL this is automatically calculated dependent on the size of the genome. Default is around 3E07 for a human genome, and smaller for smaller genomes.

chromCols

A vector of colours for points by chromosome. Colours are recycled dependent on the length of the vector.

sigCol

Colour for statistically significant points. Ignored if set to NA.

alpha

Transparency for points.

labelDir

Option for label lines. See easylabel().

xlab

x axis title. Accepts expressions.

ylab

y axis title. Accepts expressions.

xlim

The x limits (x1, x2) of the plot.

ylim

The y limits of the plot.

outline_col

Colour of symbol outlines. Passed to easylabel().

shapeScheme

A single symbol for points or a vector of symbols. Passed to easylabel().

size

Specifies point size. Passed to easylabel().

width

Width of the plot in pixels. Saving to pdf scales 100 pixels to 1 inch.

height

Height of the plot in pixels.

lineLength

Initial length of label lines in pixels.

npoints

Maximum number of points to plot when saving the final plot to pdf. By default plots with >1 million points are thinned to speed up plotting. Setting a value of NA will plot all points.

nplotly

Maximum number of points to display via plotly. We recommend the default setting of 100,000 points (or fewer).

npeaks

Number of peaks to label initially.

span

a peak is defined as the most significant SNP within a window of width span centred at that SNP.

transpose

Logical whether to transpose the plot.

filename

Filename for saving to pdf.

...

Other arguments passed to easylabel().

Value

By default no return value. If output_shiny = FALSE or the shiny button 'Export plotly & exit' is pressed, a plotly figure is returned. See easylabel().

See Also

easylabel() easyVolcano()


easylabel documentation built on May 29, 2024, noon