beta2genotype {omicsPrint} | R Documentation |
convert DNA methylation beta-value to inferred genotypes
beta2genotype(betas, na.rm = TRUE, minSep = 0.25, minSize = 5, centers = c(0.2, 0.5, 0.8), assayName = NULL)
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) |
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.
matrix with genotypes
mvaniterson
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]