VAFclusterEM: Gaussian mixture model clustering for VAF data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/VAFclusterEM.R

Description

Parameter estimation and cluster assignment is performed using the EM algorithm, implemented by VAFclusterEM.

Usage

1
VAFclusterEM(dataVec, coverage, kclust, startseed=100, nIterations=40, verbose=FALSE)

Arguments

dataVec

A vector of mutation frequencies, or a matrix or dataframe with each row corresponding to a bulk sample.

coverage

Average coverage of the sequencing data

kclust

Number of clusters

startseed

Offset for the seed for the random number generator

nIterations

Maximum number of iterations

verbose

Whether to report on results for each iteration

Value

Returns a list with these elements:

AIC

Minimum AIC over all iterations

bestseed

Seed with the minimum AIC

kclust

The number of clusters

relativeweights

The relative weights of each sample to be in all groups. Maximum value is chosen for group assignment.

newclustermembership

Group membership for each sample

Author(s)

Jack Kuipers

See Also

flexmix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
coverage <- 1e4
kclust <- 3
freqs<-c(0.25,0.32,0.36)
nos <- c(5,3,1)
datas <- c()
for(ii in 1:length(nos)){
  datas<-c(datas,rnorm(nos[ii],mean=freqs[ii],sd=VAFclusterEM:::sdfromcoverage(freqs[ii],coverage)))
}

VAFclusterEM(datas, coverage, kclust)

junseonghwan/ScRNACloneEvaluation documentation built on Aug. 18, 2020, 8:53 p.m.