Learn R Programming

beadarrayMSV (version 1.0.3)

manualCall: Interactive calling of genotype for single marker

Description

Function usually called from within callGenotypes.interactive, in order to define clusters by clicking and dragging with the mouse

Usage

manualCall(marker, cntIdeal, classification, gg = NULL, close.gg = TRUE)

Arguments

marker
Data-frame containing the columns Theta, R, and optionally PedCheck and PedigreeID for a single marker. The first two correspond to assayData entries thet
cntIdeal
A numeric vector of the allowed B allele ratios for a specific genotype category (see generatePolyCenters)
classification
Character string denoting genotype category (see generatePolyCenters)
gg
An instance of "ggobi"
close.gg
If TRUE, an updated data-frame marker is returned and gg is closed. Otherwise, gg is returned directly

Value

  • Depending on the value of close.gg, a data-frame or an object of class "ggobi" is returned, containing marker data including a column Call with the B allele ratio for each subject

Details

A GGobi interactive scatter-plot is produced. Round dots with colours purple, pink, red, blue, green and grey denote samples of Theta values 0, 1/4, 1/2, 3/4, 1, and NA, respectively. Orange and brown square dots indicate offspring and parent pedigree errors, respectively. Select (brush) points by moving around the yellow rectangle visible on the screen using the left mouse button. Change the shape of the rectangle using the right mouse button.

If pedigree errors are found after clustering, a warning is issued, and the user is given the choice between un-assigning erroneous offspring, modifying the clusters, or disregarding the errors. Note that by setting erroneous samples to missing, the remaining calls may appear better than they are.

See Also

ggobi, callGenotypes.interactive

Examples

Run this code
#Read 10 markers into an 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],markers=1:10,
    beadInfo=beadInfo)

#Prepare a single marker
ind <- 2
marker <- data.frame(Theta=assayData(BSRed)$theta[ind,],
    R=assayData(BSRed)$intensity[ind,],
    PedigreeID=pData(BSRed)$PedigreeID,
    stringsAsFactors=FALSE)

#Cluster marker from scratch, assuming MSV-5
polyCent <- generatePolyCenters(ploidy="tetra")
iMSV5 <- 7
marker1 <- manualCall(marker,cntIdeal=polyCent$centers[[iMSV5]],
    classification=polyCent$classification[[iMSV5]],close.gg=FALSE)

Run the code above in your browser using DataLab