beta2genotype {omicsPrint} | R Documentation

## converts beta-values to genotypes (1, 2 and 3)

### Description

convert DNA methylation beta-value to inferred genotypes

### Usage

    beta2genotype(betas, na.rm = TRUE, minSep = 0.25, minSize = 5,
      centers = c(0.2, 0.5, 0.8), assayName = NULL)

### Arguments

`betas` | beta matrix of probes possibly affected SNPs; if this is a SummarizedExperiment or a MultiAssayExperiment assayName must also be specified
`na.rm` | TRUE drop cpg for which no clustering was observed
`minSep` | minimal separation between clusters
`minSize` | size of smallest cluster (in percentage)
`centers` | center of clusters, defaults to 0.2, 0.5, 0.8.
`assayName` | the name of the assay to be used (see betas)

### Details

Using kmeans unsupervised clustering to infer genotypes based on idea's from Leonard Schalkwyk; wateRmelon packages.

'minSep' and 'minSize' ensure good clusters are found. This function is similar to the gaphunter approach implemented in minfi.

### Value

matrix with genotypes

### Author(s)

mvaniterson

### Examples

    set.seed(12345)
    beta <- matrix(runif(100*10, 0,1), nrow=100)
    beta[1:5, 1:5]
    genotype <- beta2genotype(beta)
    genotype[1:5, 1:5]

[Package omicsPrint version 1.7.0 Index]