countFailedSNP: Calculate ratio of called markers for each array

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

View source: R/beadarrayMSV.R

Description

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

Usage

1
countFailedSNP(BSRed, inclPedErrors = TRUE)

Arguments

BSRed

"AlleleSetIllumina" object containing an assayData entry “call” (see callGenotypes)

inclPedErrors

If TRUE, calls violating pedigree count as missing

Details

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

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

Note

This function may be used to discard arrays with a low number of called markers. Note however that an array may be valuable even if the sample falls just outside the cluster borders for many markers (e.g. for a high intensity array). Should therefore be used with caution

Author(s)

Lars Gidskehaug

See Also

callGenotypes, validateCallsPedigree

Examples

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

## End(Not run)

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