View source: R/easyManhattan.R
easyManhattan | R Documentation |
Interactive labelling of Manhattan plots using 'shiny' and 'plotly' interface.
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,
...
)
data |
The dataset (data.frame or data.table) for the plot. |
chrom |
The column of chomosome values in |
pos |
The column of SNP positions in |
p |
The column of p values in |
labs |
The column of labels in |
startLabels |
Vector of initial labels. With a character vector, labels
are identified in the column specified by |
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 |
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
|
alpha |
Transparency for points. |
labelDir |
Option for label lines. See |
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 |
shapeScheme |
A single symbol for points or a vector of symbols. Passed
to |
size |
Specifies point size. Passed to |
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 |
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 |
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()
.
easylabel()
easyVolcano()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.