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,
...
)
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()
.
The dataset (data.frame or data.table) for the plot.
The column of chomosome values in data
.
The column of SNP positions in data
.
The column of p values in data
.
The column of labels in data
.
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.
Cut-off for p value significance. Defaults to 5E-08.
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.
A vector of colours for points by chromosome. Colours are recycled dependent on the length of the vector.
Colour for statistically significant points. Ignored if set to
NA
.
Transparency for points.
Option for label lines. See easylabel()
.
x axis title. Accepts expressions.
y axis title. Accepts expressions.
The x limits (x1, x2) of the plot.
The y limits of the plot.
Colour of symbol outlines. Passed to easylabel()
.
A single symbol for points or a vector of symbols. Passed
to easylabel()
.
Specifies point size. Passed to easylabel()
.
Width of the plot in pixels. Saving to pdf scales 100 pixels to 1 inch.
Height of the plot in pixels.
Initial length of label lines in pixels.
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.
Maximum number of points to display via plotly. We recommend the default setting of 100,000 points (or fewer).
Number of peaks to label initially.
a peak is defined as the most significant SNP within a window of width span centred at that SNP.
Logical whether to transpose the plot.
Filename for saving to pdf.
Other arguments passed to easylabel()
.
easylabel()
easyVolcano()