Learn R Programming

beadarrayMSV (version 1.0.3)

countFailedSNP: Calculate ratio of called markers for each array

Description

Not counting markers classified as FAIL or MONO-filt, calculate the ratio of markers that are called for each array

Usage

countFailedSNP(BSRed, inclPedErrors = TRUE)

Arguments

BSRed
"AlleleSetIllumina" object containing an assayData entry call (see callGenotypes)
inclPedErrors
If TRUE, calls violating pedigree count as missing

Value

  • An "AlleleSetIllumina" object with an added phenoData column passRatio. This is a numeric vector holding the ratio of non-missing calls for each array

Details

In order to include pedigree errors, BSRed must have an assayData entry ped.check (see validateCallsPedigree)

See Also

callGenotypes, validateCallsPedigree

Examples

Run this code
#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
BSRed <- callGenotypes(BSRed)
BSRed <- validateCallsPedigree(BSRed)
BSRed <- countFailedSNP(BSRed,inclPedErrors=TRUE)
print(range(pData(BSRed)$passRatio))

#Plot highlighting markers to be discarded
#NB! Such a high passRatio is not recommended
indGoodArrays <- pData(BSRed)$passRatio > 0.6
plotGenotypes(BSRed,indHighlight=which(!indGoodArrays))

Run the code above in your browser using DataLab