View source: R/fitSnpNmfArray.R
fitSnpNmfArray | R Documentation |
Allele-specific copy number estimation using non-negative matrix factorization (NMF).
fitSnpNmfArray(Y, ...)
Y |
An Lx2xI |
... |
Additional arguments passed to |
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
.
Returns a list
of class SnpNmfFit
:
Y |
The Lx2xI |
W |
The Kx2 |
H |
A 2xI |
hasConverged |
|
nbrOfIterations |
The number of iteration ran before stopping.
If not applicable, it is |
Internally, the array is stacked into a 2LxI matrix and decomposed
using fitSnpNmf
().
See plot.SnpNmfFit
().
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.