manhattanPlot: D3 Manhattan Plot Visualizer

Description Usage Arguments Examples

View source: R/manhattanPlot.R

Description

This generates an interactive manhattan plot using d3.js. Mouse over snps to see name and pvalue. Now you don't have to waste your time writing R code to find significant snp identities.

Usage

1
2
3
manhattanPlot(dataset, width = NULL, height = NULL, snps_col = "SNP",
  pvals_col = "PVal", sigLine = TRUE, animationSpeed = 1000,
  logged = FALSE)

Arguments

dataset

Your data. Contains SNP names and PValues as columns of a dataframe.

width

Set custom width.

height

Set custom height.

snps_col

The name of the column of your dataframe containing the SNP names. Defaults to "SNP".

pvals_col

The name of the column of your dataframe containing the PValues. Defaults to "PVal".

sigLine

Draw a line indicating significance threshold according to a conservative bonferroni correction.

animationSpeed

How fast you want the program to animate in milliseconds. To turn off set to 0.

logged

Have the PValues already been -log10()'d? Defaults to false.

Examples

1
2
3
4
#Load sample dataset from the package.
d = sampleVals
#and plot. It's that easy.
manhattanPlot(d, sigLine = FALSE)

nstrayer/D3ManhattanPlots documentation built on May 24, 2019, 7:51 a.m.