drawXYplots | R Documentation |
Draws 6 XY-plots per page for a series of markers; each XY-plot is drawn by function XY_plot
drawXYplots(dat, markers=NA, out, genocol="grey", pch=1, cex=1,
sel.samples=as.character(unique(XYdat$SampleName)), omit.pch=".",
omit.col=c(rep("black", length(genocol)-1), "grey"), sample.groups=list(),
groups.col="black", groups.pch=1, groups.cex=1, groups.rnd=FALSE,
R.col="black", R.lty=1, drawRthresholds=FALSE,
Rthreshold.param=c(0.95, 0.5, 0), ploidy)
dat |
a data.frame with at least columns MarkerName, SampleName, X and Y; column geno (if present) is also used |
markers |
either a vector with names of markers to plot or a data.frame with at least column MarkerName containing the names of the markers to plot; default NA means all markers in dat. If markers is a data.frame that also has a column shift, the geno values in dat will be shifted accordingly. This allows to use (a selection from) the output of checkF1 (with or without parameter shiftmarkers) as input for drawXYplots. |
out |
base for filenames of output, will be extended with _pagenumber.png; may include a path, but the directory where the plot files are to be saved must already exist |
genocol |
a vector of color values to be used for plotting the sel.samples according on their geno (dosage) value; if only one value is given (default) all samples are plotted in that color |
pch |
the plot character to plot the sel.samples; default 1 is an open circle |
cex |
the relative size of the sample symbols |
sel.samples |
character vector (not a factor) with the names of the important samples: those that must be plotted in colors genocol and symbol pch |
omit.pch |
the plot character to use for the other samples, default a dot |
omit.col |
vector of two colors to use for the other samples; the first color is used for sample with a geno (dosage) value, the second color for unscored samples |
sample.groups |
a list specifying samples to be highlighted in a different color and/or symbol and/or size. For each group of sample the list has one vector of sample names; the list may also be empty |
groups.col |
a vector or color values, one for each item (vector of sample names) in sample.groups; recycled if shorter than sample.groups |
groups.pch |
a vector of plot symbols, one for each item in sample.groups; recycled if shorter than sample.groups |
groups.cex |
a vector of relative symbol sizes, one for each item in sample.groups; recycled if shorter than sample.groups |
groups.rnd |
FALSE (default) or TRUE. If FALSE, all samples in sample.groups are drawn in the order in which they appear in XYdat; if TRUE they are drawn in a random order. Note that the samples are never drawns in group order (except if the samples are already in group order in XYdat and groups.rnd=FALSE). |
R.col |
a vector of color values for drawing R thresholds, one for each value of Rthreshold.param; recycled if needed |
R.lty |
a vector of line types for drawing the R thresholds, one for each value of Rthreshold.param; recycled if needed |
drawRthresholds |
FALSE (default) or TRUE: whether R thresholds should be drawn |
Rthreshold.param |
either a list of vectors each of length 3 (for multiple R thresholds) or one vector of length 3 (for one R threshold). Each vector defines one R threshold and is based on a specified quantile of the distribution of R values for the current marker. The first number in each vector is the R quantile, the second is a number to multiply that R quantile with, and the third is the minimum value of the result. The default of c(0.95, 0.5, 0) means that 0.5 * the 95 always higher than 0, the minimum result). This is often a good cut-off value to discard samples, or to signal markers with many samples below that value. |
ploidy |
a single integer specifying the ploidy, only needed if dat contains a column geno |
The function produces a series of pages with plots and returns NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.