Learn R Programming

beadarrayMSV (version 1.1.0)

plotGenotypes: Plotting of genotyped markers

Description

Produces plots of “intensity” vs. “theta” with clusters coloured according to genotype call. Optional highlighting of specified samples or of pedigree-errors

Usage

plotGenotypes(BSRed, markers = 1:min(nrow(BSRed), 64), indHighlight = NULL, ploidy = "tetra", indicate.SE = FALSE, retFrames = FALSE, nC = NULL, mai = NULL, mNoise = NULL, main = NULL)

Arguments

BSRed
"AlleleSetIllumina" object
markers
Index to markers to plot
indHighlight
Index to samples to highlight with yellow
ploidy
Character string reflecting the ploidy (copy-number) of the markers, defining the appearance of the clusters. Currently, only “tetra” is implemented
indicate.SE
If TRUE, size of points will reflect their precision (1/SE)
retFrames
If TRUE, a list of data-frames containing the coordinates for each marker is returned
nC
Number of columns of plots in the figure
mai
Size of margins. See par
mNoise
The “intensity”-limit below which no samples are called. If NULL, the mean pData(BSRed)$noiseIntensity (across arrays) is used
main
Vector of plot-titles. If NULL, the featureNames are used

Value

The function plotGenotypes is called mainly for its side effects, however if retFrames is TRUE a list of data-frames containing the coordinates for each marker is returned

Details

All specified markers are plotted in subplots on a single device, and no more than 50-100 markers should be plotted at the time. The classified samples are coloured according to their allele-ratio, and non-called samples are represented as black dots. A red line indicates the estimated noise-level.

There are several ways samples may be highlighted. If indicate.SE is TRUE, the size of the dots reflects the precision of the intensity-estimates. Else, the samples indicated with indHighlight are represented as yellow dots. If neither of these are given, pedigree-errors will be highlighted if such information is found in BSRed. Both assayData entries “ped.check.parents” (see validateSingleCall) and “ped.check” (see validateCallsPedigree) are recognised. Yellow circles and crosses indicate parent and offspring errors, respectively.

See Also

validateCallsPedigree, callGenotypes

Examples

Run this code
## Not run: 
# #Read pre-processed data directly into AlleleSetIllumina object
# rPath <- system.file("extdata", package="beadarrayMSV")
# normOpts <- setNormOptions()
# dataFiles <- makeFilenames('testdata',normOpts,rPath)
# beadFile <- paste(rPath,'beadData_testdata.txt',sep='/')
# beadInfo <- read.table(beadFile,sep='\t',header=TRUE,as.is=TRUE)
# BSRed <- createAlleleSetFromFiles(dataFiles[1:4],beadInfo=beadInfo)
# 
# #Genotype calling and plotting
# BSRed <- callGenotypes(BSRed)
# plotGenotypes(BSRed,1:25)
# 
# #Pedigree validation and plotting
# BSRed <- validateCallsPedigree(BSRed)
# plotGenotypes(BSRed,1:25)
# ## End(Not run)

Run the code above in your browser using DataLab