plotQTL {polyqtlR} | R Documentation |
Plot the results of QTL scan.
Description
Up to package v.0.0.9, there were three plotting functions for the output of QTLscan
, namely plotQTL
, plotLinearQTL
and plotLinearQTL_list
.
Since release 0.1.0, the functionality of all three functions has been combined into a single general plotting function, named plotQTL
.
The plot layout is now specified by a new argument layout
, allowing the user to plot results for single chromosomes separately, or together either adjacently or in a grid layout.
Results from multiple analyses can be overlaid. Previously, it was possible to call the function plotQTL
multiple times and overlay subsequent plots using the argument overlay = TRUE
.
This approach is no longer supported. Instead, if multiple results are to be overlaid, they can be provided as a list of QTLscan
or singleMarkerRegression
outputs. Note however that this
is only possible using the default layout. If significance thresholds are
present, the default behaviour is to rescale LOD values so that multiple plots can be combined with overlapping signficance thresholds. This rescaling behaviour can also be
disabled (by setting rescale = FALSE
). Note that not all arguments may be appropriate for all layouts.
Usage
plotQTL(
LOD_data,
layout = "l",
inter_chm_gap = 5,
ylimits = NULL,
sig.unit = "LOD",
plot_type = "lines",
colour = c("black", "red", "dodgerblue", "sienna4"),
add_xaxis = TRUE,
add_rug = TRUE,
add_thresh = TRUE,
override_thresh = NULL,
thresh.lty = 3,
thresh.lwd = 2,
thresh.col = "darkred",
return_plotData = FALSE,
show_thresh_CI = FALSE,
use_LG_names = TRUE,
axis_label.cex = 1,
custom_LG_names = NULL,
LGdiv.col = "gray42",
ylab.at = 2.5,
highlight_positions = NULL,
mainTitle = FALSE,
rescale = TRUE,
...
)
plotLinearQTL(
LOD_data,
layout = "l",
inter_chm_gap = 5,
ylimits = NULL,
sig.unit = "LOD",
plot_type = "lines",
colour = c("black", "red", "dodgerblue", "sienna4"),
add_xaxis = TRUE,
add_rug = TRUE,
add_thresh = TRUE,
override_thresh = NULL,
thresh.lty = 3,
thresh.lwd = 2,
thresh.col = "darkred",
return_plotData = FALSE,
show_thresh_CI = FALSE,
use_LG_names = TRUE,
axis_label.cex = 1,
custom_LG_names = NULL,
LGdiv.col = "gray42",
ylab.at = 2.5,
highlight_positions = NULL,
mainTitle = FALSE,
rescale = TRUE,
...
)
plotLinearQTL_list(
LOD_data,
layout = "l",
inter_chm_gap = 5,
ylimits = NULL,
sig.unit = "LOD",
plot_type = "lines",
colour = c("black", "red", "dodgerblue", "sienna4"),
add_xaxis = TRUE,
add_rug = TRUE,
add_thresh = TRUE,
override_thresh = NULL,
thresh.lty = 3,
thresh.lwd = 2,
thresh.col = "darkred",
return_plotData = FALSE,
show_thresh_CI = FALSE,
use_LG_names = TRUE,
axis_label.cex = 1,
custom_LG_names = NULL,
LGdiv.col = "gray42",
ylab.at = 2.5,
highlight_positions = NULL,
mainTitle = FALSE,
rescale = TRUE,
...
)
Arguments
LOD_data |
Output of |
layout |
There are three possible plot layouts - single chromosome plots ("s"), genome-wide plots arranged adjacently in a linear fashion ("l") which is
also the default, and genome-wide plots arranged in a grid ("g"), i.e. a grid of single chromosome plots. In the latter case, a suitable grid dimension will be determined
based on the number of linkage groups detected in |
inter_chm_gap |
The gap size (in units of cM) between successive chromosomes when |
ylimits |
Use to specify ylimits of plot region, though by default |
sig.unit |
Label to use on the y-axis for significance units, by default assumed to be LOD score. |
plot_type |
Plots can be either in line drawings ("lines", default) or scatter plot format ("points"). |
colour |
Vector of colours to be used in the plotting. A default set of 4 colours is provided, the first of which is used when results from a single QTL scan are to be plotted. |
add_xaxis |
Should an x-axis be drawn? If multiple QTL analyses are performed on different traits, specifying this to be |
add_rug |
Logical, by default |
add_thresh |
Logical, by default |
override_thresh |
By default |
thresh.lty |
Gives user control over the line type of the significance threshold to be drawn. Default threshold lty is 3. |
thresh.lwd |
Gives user control over the line width of the significance threshold to be drawn. Default threshold lwd is 2. |
thresh.col |
Gives user control over the line colour of the significance threshold to be drawn. Default threshold colour is dark red. If plotting multiple analyses with |
return_plotData |
Logical, by default |
show_thresh_CI |
Logical, by default |
use_LG_names |
Logical, by default |
axis_label.cex |
Argument to adjust the size of the axis labels. Can be useful if there are many linkage groups to plot |
custom_LG_names |
Option to specify a vector that contains custom linkage group names. By default |
LGdiv.col |
Colour of dividing lines between linkage groups when |
ylab.at |
Distance from the y-axis to place label (by default at 2.5 points) |
highlight_positions |
Option to include a (list of) positions to highlight (e.g. peak QTL positions). Each list element should be a 2-column data.frame with columns giving
the linkage group numbers (numeric) and the corresponding cM positions (numeric) to highlight. If |
mainTitle |
Option to supply vector of plot titles if |
rescale |
If results from multiple analyses are to be overlaid and different significance thresholds are detected, then by default plots will be rescaled so that threshold lines overlap.
This behaviour can be disabled by setting |
... |
Arguments passed to |
Value
The plot data, if return_plotData = TRUE. Otherwise NULL
. Output is returned invisibly
Examples
## Not run:
data("qtl_LODs.4x")
plotQTL(LOD_data = qtl_LODs.4x,layout = "l")
## End(Not run)