Estimate starting points for clustering

Share:

Description

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

Usage

1
2
3
4
5
6
7
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

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

Value

The function getCenters returns a ranked list with elements

ix

Numeric vector with index to categories returned from generatePolyCenters

centers

List of initial centre points of clusters in “theta”-dimension


The function getSpecificCenters returns a numeric vector of clustering starting values

Note

For ploidy="tetra", the function has been empirically tuned to find good starting point for each marker by calling findClusters repeatedly. Other ploidy has not been implemented, but the function will return non-ranked genotype categories with centre points corresponding to theoretical B allele ratios. A warning will be issued to alert the user that the suggested centre points are not optimized or ranked in any way

Author(s)

Lars Gidskehaug

See Also

findClusters, callGenotypes

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],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])

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.