fitSnpNmfArray: Allele-specific copy number estimation using non-negative...

Description Usage Arguments Details Value See Also Examples

Description

Allele-specific copy number estimation using non-negative matrix factorization (NMF).

Usage

1

Arguments

Y

An Lx2xI array where L is number of probe pairs, 2 is the number of alleles (A and B), and I is the number of arrays.

maxIter

A positive integer specifying the maximum number of iterations used to calculate the decomposition.

acc

A positive double specifying the converence threshold. For more details on convergence, see below.

Details

The algorithm is considered to have converged when the maximum update of any allele-specific copy number of any array (H) is greater than acc.

Value

Returns a list of class SnpNmfFit:

Y

The Lx2xI array Y.

W

The Kx2 matrix containing allele-specific affinity estimates where K=2L.

H

A 2xI matrix containing allele-specific copy number estimates.

hasConverged

TRUE if the algorithm converged, otherwise FALSE. If not applicable, it is NA.

nbrOfIterations

The number of iteration ran before stopping. If not applicable, it is NA.

See Also

Internally, the array is stacked into a 2LxI matrix and decomposed using fitSnpNmf(). See plot.SnpNmfFit().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# DATA: Lx2xI allele-specific signals for six different SNPs
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
filenames <- sprintf("V%d.Rbin", 1:6)
pathnames <- system.file("extData", filenames, package="ACNE")
Ys <- lapply(pathnames, FUN=function(p) snpMatrixToArray(loadToEnv(p)$V))
names(Ys) <- sprintf("SNP #%d", seq_along(Ys))


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# ACNE fitting of NMF to the six SNPs
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
for (name in names(Ys)) {
  Y <- Ys[[name]]
  fit <- fitSnpNmfArray(Y)
  str(fit)
  plot(fit, lim=c(0,2^14), main=name)
}

ACNE documentation built on May 2, 2019, 1:09 p.m.