manualCall: Interactive calling of genotype for single marker

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/beadarrayMSV.R

Description

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

Usage

1
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 “theta” and “intensity” of an "AlleleSetIllumina" object. The “PedCheck” column corresponds to the output from validateSingleCall. The “PedigreeID” consists of strings <p><mmm><fff><oo>, where “p”, “mmm”, “fff”, and “oo” are unique identifiers for population, mother, father, and individual within full-sib group, respectively. “000” means founding parent, whereas “999” means unknown parent. May also include a vector of B allele ratios “Call” with results from a previous clustering, in which case this is used as starting values

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

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.

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

Author(s)

Lars Gidskehaug

See Also

ggobi, callGenotypes.interactive

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
#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)

## End(Not run)

beadarrayMSV documentation built on May 1, 2019, 6:33 p.m.