Version: | 0.9.1 |
Depends: | R (≥ 3.0.0), aroma.affymetrix (≥ 2.14.0) |
Imports: | MASS, R.methodsS3 (≥ 1.7.0), R.oo (≥ 1.23.0), R.utils (≥ 2.1.0), matrixStats (≥ 0.50.0), R.filesets (≥ 2.9.0), aroma.core (≥ 2.14.0) |
Suggests: | DNAcopy |
Title: | Affymetrix SNP Probe-Summarization using Non-Negative Matrix Factorization |
Description: | A summarization method to estimate allele-specific copy number signals for Affymetrix SNP microarrays using non-negative matrix factorization (NMF). |
License: | LGPL-2.1 | LGPL-3 [expanded from: LGPL (≥ 2.1)] |
URL: | https://github.com/HenrikBengtsson/ACNE |
BugReports: | https://github.com/HenrikBengtsson/ACNE/issues |
LazyLoad: | TRUE |
biocViews: | aCGH, CopyNumberVariants, SNP, Microarray, OneChannel, TwoChannel, Genetics |
NeedsCompilation: | no |
Packaged: | 2024-02-17 20:36:57 UTC; henrik |
Author: | Maria Ortiz [aut], Henrik Bengtsson [aut, cre, cph], Angel Rubio [aut] |
Maintainer: | Henrik Bengtsson <henrikb@braju.com> |
Repository: | CRAN |
Date/Publication: | 2024-02-17 21:10:22 UTC |
Package ACNE
Description
A summarization method to estimate allele-specific copy number signals for Affymetrix SNP microarrays using non-negative matrix factorization (NMF).
Installation and updates
This package requires the aroma.affymetrix package.
To install this package, do:
install.packages("ACNE")
To get started
License
LGPL (>= 2.1)
Author(s)
Maria Ortiz, Henrik Bengtsson, Angel Rubio
References
[1] M. Ortiz-Estevez, H. Bengtsson, A. Rubio, ACNE: a summarization method to estimate allele-specific copy numbers for Affymetrix SNP arrays, Bioinformatics, 2010 [PMC2913655].
The NmfPlm class
Description
Package: ACNE
Class NmfPlm
Object
~~|
~~+--
ParametersInterface
~~~~~~~|
~~~~~~~+--
Model
~~~~~~~~~~~~|
~~~~~~~~~~~~+--
UnitModel
~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~+--
MultiArrayUnitModel
~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~+--
ProbeLevelModel
~~~~~~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~~~~~~+--
NmfPlm
Directly known subclasses:
NmfSnpPlm
public abstract static class NmfPlm
extends ProbeLevelModel
This class represents the NMF model of [REF].
Usage
NmfPlm(..., maxIter=10L, maxIterRlm=20L, refs=NULL, flavor=c("v4", "v3", "v2", "v1"))
Arguments
... |
Arguments passed to |
maxIter |
The maximum number of iteration in the NMF step. |
maxIterRlm |
A positive |
refs |
An index |
flavor |
(Internal/developmental only)
A |
Fields and Methods
Methods:
getAsteriskTags | - | |
Methods inherited from ProbeLevelModel:
calculateResidualSet, calculateWeights, fit, getAsteriskTags, getCalculateResidualsFunction, getChipEffectSet, getProbeAffinityFile, getResidualSet, getRootPath, getWeightsSet
Methods inherited from MultiArrayUnitModel:
getListOfPriors, setListOfPriors, validate
Methods inherited from UnitModel:
findUnitsTodo, getAsteriskTags, getFitSingleCellUnitFunction, getParameters
Methods inherited from Model:
as.character, fit, getAlias, getAsteriskTags, getDataSet, getFullName, getName, getPath, getRootPath, getTags, setAlias, setTags
Methods inherited from ParametersInterface:
getParameterSets, getParameters, getParametersAsString
Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, names, objectSize, print, save, asThis
Author(s)
Henrik Bengtsson
References
[1] M. Ortiz-Estevez, H. Bengtsson, A. Rubio, ACNE: a summarization method to estimate allele-specific copy numbers for Affymetrix SNP arrays, Bioinformatics, 2010 [PMC2913655].
See Also
Internally, for each SNP the NMF model is fitted using the
fitSnpNmf
() function.
The NmfSnpPlm class
Description
Package: ACNE
Class NmfSnpPlm
Object
~~|
~~+--
ParametersInterface
~~~~~~~|
~~~~~~~+--
Model
~~~~~~~~~~~~|
~~~~~~~~~~~~+--
UnitModel
~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~+--
MultiArrayUnitModel
~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~+--
ProbeLevelModel
~~~~~~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~~~~~~+--
NmfPlm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--
SnpPlm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--
NmfSnpPlm
Directly known subclasses:
public abstract static class NmfSnpPlm
extends SnpPlm
Usage
NmfSnpPlm(..., mergeStrands=FALSE)
Arguments
... |
Arguments passed to |
mergeStrands |
If |
Fields and Methods
Methods:
No methods defined.
Methods inherited from SnpPlm:
getCellIndices, getChipEffectSet, getMergeStrands, getParameters, getProbeAffinityFile, setMergeStrands
Methods inherited from NmfPlm:
getAsteriskTags
Methods inherited from ProbeLevelModel:
calculateResidualSet, calculateWeights, fit, getAsteriskTags, getCalculateResidualsFunction, getChipEffectSet, getProbeAffinityFile, getResidualSet, getRootPath, getWeightsSet
Methods inherited from MultiArrayUnitModel:
getListOfPriors, setListOfPriors, validate
Methods inherited from UnitModel:
findUnitsTodo, getAsteriskTags, getFitSingleCellUnitFunction, getParameters
Methods inherited from Model:
as.character, fit, getAlias, getAsteriskTags, getDataSet, getFullName, getName, getPath, getRootPath, getTags, setAlias, setTags
Methods inherited from ParametersInterface:
getParameterSets, getParameters, getParametersAsString
Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, names, objectSize, print, save, asThis
Author(s)
Henrik Bengtsson
Non-documented objects
Description
This page contains aliases for all "non-documented" objects that
R CMD check
detects in this package.
Almost all of them are generic functions that have specific
document for the corresponding method coupled to a specific class.
Other functions are re-defined by setMethodS3()
to
default methods. Neither of these two classes are non-documented
in reality.
The rest are deprecated methods.
Author(s)
Henrik Bengtsson
Initialization of the W and H matrices
Description
Initialization of the W and H matrices.
Usage
WHInit(V, ...)
Arguments
V |
An KxI |
... |
Not used. |
Details
The allele-specific copy number estimates are estimated using a naive genotyping algorithm. The probe-affinities are estimated using a pseudo inverse.
Value
Returns a list
:
W |
A Kx2 |
H |
A 2xI |
status |
An |
(ACNE)
Description
(ACNE) based on [1]. The algorithm is processed in bounded memory, meaning virtually any number of arrays can be analyzed on also very limited computer systems.
Usage
## S3 method for class 'AffymetrixCelSet'
doACNE(csR, fln=FALSE, drop=TRUE, verbose=FALSE, ...)
## Default S3 method:
doACNE(dataSet, ..., verbose=FALSE)
Arguments
csR , dataSet |
An |
fln |
If |
drop |
If |
verbose |
See |
... |
Additional arguments used to set up |
Value
Returns a named list
, iff drop == FALSE
, otherwise
a named list
of AromaUnitTotalCnBinarySet
and AromaUnitFracBCnBinarySet
.
Author(s)
Henrik Bengtsson
References
[1] M. Ortiz-Estevez, H. Bengtsson, A. Rubio, ACNE: a summarization method to estimate allele-specific copy numbers for Affymetrix SNP arrays, Bioinformatics, 2010 [PMC2913655].
Non-negative matrix factorization (NMF) of a matrix containing SNP probe signals
Description
Non-negative matrix factorization (NMF) of a matrix containing SNP probe signals.
Usage
fitSnpNmf(V, acc=0.02, maxIter=10, maxIterRlm=20, refs=NULL)
Arguments
V |
An KxI |
acc |
A positive |
maxIter |
A positive |
maxIterRlm |
A positive |
refs |
An index |
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
:
W |
The Kx2 |
H |
A 2xI |
hasConverged |
|
nbrOfIterations |
The number of iteration ran before stopping.
If not applicable, it is |
See Also
WHInit
(), robustWInit
(), robustHInit
(), and
removeOutliers
().
Allele-specific copy number estimation using non-negative matrix factorization (NMF)
Description
Allele-specific copy number estimation using non-negative matrix factorization (NMF).
Usage
fitSnpNmfArray(Y, ...)
Arguments
Y |
An Lx2xI |
... |
Additional arguments passed to |
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 |
W |
The Kx2 |
H |
A 2xI |
hasConverged |
|
nbrOfIterations |
The number of iteration ran before stopping.
If not applicable, it is |
See Also
Internally, the array is stacked into a 2LxI matrix and decomposed
using fitSnpNmf
().
See plot.SnpNmfFit
().
Examples
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# 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)
}
Generates a multi-panel plot summarizing the NMF SNP fit
Description
Generates a multi-panel plot summarizing the NMF SNP fit.
Usage
## S3 method for class 'SnpNmfFit'
plot(x, lim=c(0, 2^16), cnLim=c(0, 4), epsLim=c(-1, 1) * 2^12, main=NULL, ...)
Arguments
lim , cnLim , epsLim |
The plot ranges for the probe data, the CN estimates, and the probe-affinity estimates. |
main |
A |
... |
Not used. |
Value
Return nothing.
See Also
See fitSnpNmfArray
().
Calculates the pseudo inverse of a matrix
Description
Calculates the pseudo inverse of a matrix.
Usage
pseudoinverse(X, ...)
Arguments
X |
|
... |
Not used. |
Value
Returns a matrix
.
See Also
Internally svd
() is used.
Removes outliers in matrix containing SNP signals
Description
Removes outliers in matrix containing SNP signals by identifying outlier elements. The values of the
elements that are outliers are substituted by corresponding values
predicted values Yest=W*H
from the current affinity (W
)
and copy number (H
) estimates.
Usage
removeOutliers(Y, W, H, tau=10, ...)
Arguments
Y |
An IxK |
W |
A Kx2 |
H |
A 2xI |
tau |
A scalar specifying the threshold for identifying outliers. |
... |
Not used. |
Value
Returns an IxK matrix
where outliers have been "pruned".
Outliers are substituted by the corresponding value of Yest
.
Robust initialization of the H (copy number) matrix
Description
Robust initialization of the H (copy number) matrix.
Usage
robustHInit(V, W, maxIter=5L, ...)
Arguments
V |
An KxI |
W |
A Kx2 |
maxIter |
The maximum number of iteration. |
... |
Not used. |
Details
This function utilized a random number generator.
Value
Returns a 2xI matrix
of robustified allele-specific copy-number estimates.
Robust initialization of the W (affinity) matrix
Description
Robust initialization of the W (affinity) matrix.
Usage
robustWInit(V, H, maxIter=50L, ...)
Arguments
V |
An KxI |
H |
A 2xI |
maxIter |
The maximum number of iterations. |
... |
Not used. |
Details
This function utilized a random number generator.
Value
Returns a Kx2 matrix
of robustified probe-affinity estimates.
Reshapes SNP data in matrix form to array form and vice versa
Description
Reshapes SNP data in matrix form to array form and vice versa.
Usage
snpArrayToMatrix(Y, dropNames=TRUE, ...)
Arguments
Y |
A 2LxI |
dropNames |
If |
... |
Not used. |
Value
Returns a Lx2xI array
or a 2LxI matrix.
Examples
Y <- matrix(rnorm(200), nrow=20, ncol=10)
str(Y)
V <- snpMatrixToArray(Y)
str(V)
Y2 <- snpArrayToMatrix(V)
str(Y2)
stopifnot(identical(Y2, Y))