Learn R Programming

beadarrayMSV (version 1.1.0)

getCenters: Estimate starting points for clustering

Description

One or several starting points for one or more genotype categories are estimated, given genotype data for a single marker

Usage

getCenters(theta, gO = setGenoOptions(),
    breaks = seq(-0.25, 1.25, gO$binWidth),
    polyCent = generatePolyCenters(ploidy = gO$ploidy))

getSpecificCenters(theta, classification, gO = setGenoOptions(), breaks = seq(-0.25, 1.25, gO$binWidth), polyCent = generatePolyCenters(ploidy = gO$ploidy))

Arguments

theta
Numeric vector of theta-values for a marker, as given in the assayData slot of "AlleleSetIllumina" objects
gO
List of genotype calling options. See setGenoOptions
breaks
Histogram breakpoints. See hist
polyCent
List of all possible genotype categories with initial centre points for the clustering. See generatePolyCenters
classification
Character string with a single genotype category

Value

  • The function getCenters returns a ranked list with elements
  • ixNumeric vector with index to categories returned from generatePolyCenters
  • centersList of initial centre points of clusters in theta-dimension
  • The function getSpecificCenters returns a numeric vector of clustering starting values

Details

Usually called from within other functions. The purpose of getCenters is to suggest a few of the most likely cluster categories and corresponding starting points in ranked order. The function getSpecificCenters returns starting points for a given genotype category

See Also

findClusters, callGenotypes

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],markers=1:10,beadInfo=beadInfo)

#Generate list of marker categories
gO <- setGenoOptions()
polyCent <- generatePolyCenters(ploidy=gO$ploidy)
print(polyCent)

#Suggest some candidate categories with initial centre points
ind <- 2
sConf <- getCenters(assayData(BSRed)$theta[ind,],gO=gO,polyCent=polyCent))
print(sConf)
print(polyCent$classification[sConf$ix])

Run the code above in your browser using DataLab