View source: R/extended_geneplot.R
prepare_plot_params | R Documentation |
Use after calc_geneplot_spdfs and before plot_geneplot_spdfs.
prepare_plot_params(
logprob,
refpopnames,
logten = TRUE,
colvec = NA,
shapevec = NA,
line_widths = NULL,
cexpts = 1,
orderpop = NULL,
axispop = NULL,
display_names = NULL,
axis_labels = NULL,
short_axis_labels = FALSE,
xyrange = NULL,
ylim_input = NULL,
geneplot_multiplier = 3,
mark_impute = TRUE,
grayscale_quantiles = FALSE
)
logprob |
Log-Genotype Probabilities for individual genotypes with respect to each of the reference populations. Required for GenePlot, available as an output from calc_geneplot_spdfs. |
refpopnames |
Character vector of reference population names, that must
match two values in the 'pop' column of |
logten |
(default TRUE) Boolean, indicates whether to use base 10 for the logarithms, or base e (i.e. natural logarithms). logten=TRUE is default because it's easier to recalculate the original non-log numbers in your head when looking at the plots. Use FALSE for natural logarithms. |
colvec |
(Optional) Vector of colours for the populations, starting with
the reference populations in the order |
shapevec |
(Optional) Vector of shapes for the populations plotted on the central GenePlot. These are named shapes from the following list: "Circle", "Square", "Diamond", "TriangleUp", "TriangleDown", "OpenSquare", "OpenCircle", "OpenTriangleUp", "Plus", "Cross", "OpenDiamond", "OpenTriangleDown", "Asterisk" which correspond to the following pch values for R plots: 21, 22, 23, 24, 25, 0, 1, 2, 3, 4, 5, 6, 8. Do not use the numbers, use the words, which will be automatically converted within plot_logprob into the appropriate codes. |
line_widths |
(Optional) Vector of line widths for all the populations for the genetic distribution side plots. Default widths are 4. Length must be the number of reference populations plus the number of additional included populations. |
cexpts |
(Optional) Point size for points in the central GenePlot (default is 1). |
orderpop |
(Optional) Vector of names of the reference populations and
include populations, to indicate the order their points should be plotted
within the GenePlot. The first will be plotted first and so will appear to
be "beneath" all the other populations, and the last will be plotted last
and so will appear to be "above" all the the other populations. Use if you
have a particular population whose individuals you are interested in and
need to see on top of the rest: put this population last in
|
axispop |
(Optional) Vector of reference populations, indicating which
to plot as the baseline on the x-axis and which on the y-axis. The default
is that the first entry in |
display_names |
(default |
axis_labels |
(Optional) Vector of axis labels. Defaults are constructed
depending on whether the |
short_axis_labels |
(Optional) Default is FALSE, If TRUE, a shortened version of the default axis labels is used e.g. Log-Genotype Probability is shortened to LGP. Use this if you want to display a small plot without space for the full axis labels. |
xyrange |
(Optional) Numerical limits for the GenePlot axes, which also form the x-axes of the two side plots. The plot is always symmetrical, so the same limits will be used for the x and the y axes. This is to ensure that comparisons between the two reference populations are fair. The values are a range of Log-Genotype Probability values so the maximum is 0. Default is slightly wider than the range of the calculated Log-Genotype Probabilities for all individuals in the plot. |
ylim_input |
(Optional) Numerical limits for the y-axes of the two side plots. Has no effect on the central GenePlot. Run with the defaults first to see what the range of values is for the given populations. |
geneplot_multiplier |
(default 3) Ratio of width of GenePlot to sideplots. Default is 3, i.e. the GenePlot height will be three times the height of the bottom plot and the GenePlot width will be three times the width of the left-hand plot. |
mark_impute |
(default FALSE) Boolean, indicates whether to mark individuals with missing data using asterisks on the GenePlot. |
grayscale_quantiles |
(default FALSE) Used for plots with 2 reference pops. FALSE (default) plots the quantile lines using colvec colours TRUE plots the quantile lines in gray (as the default colours can be quite pale, the grayscale quantile lines can be easier to see than the default coloured ones). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.