| calmateByThetaAB.array {calmate} | R Documentation |
Normalize allele-specific copy numbers (CA,CB)
Description
Normalize allele-specific copy numbers (CA,CB).
Usage
## S3 method for class 'array'
calmateByThetaAB(data, references=NULL, ..., truncate=FALSE, refAvgFcn=NULL,
flavor=c("v2", "v1"), verbose=FALSE)
Arguments
data |
An Jx2xI |
references |
An index |
... |
Additional arguments passed to the internal fit function
|
truncate |
If |
refAvgFcn |
(optional) A |
flavor |
A |
verbose |
See |
Value
Returns an Jx2xI numeric array
with the same dimension names as argument data.
Flavors
For backward compatibility, we try to keep all major versions of
the CalMaTe algorithm available. Older versions can be used by
specifying argument flavor.
The default flavor is v2.
For more information about the different flavors,
see fitCalMaTeInternal.
References
[1] M. Ortiz-Estevez, A. Aramburu, H. Bengtsson, P. Neuvial and A. Rubio, CalMaTe: A method and software to improve allele-specific copy number of SNP arrays for downstream segmentation, Bioinformatics, 2012 [PMC3381965].
See Also
To calibrate (total,fracB) data,
see *calmateByTotalAndFracB().
We strongly recommend to always work with (total,fracB) data
instead of (CA,CB) data, because it is much more general.
For further information on the internal fit functions, see
fitCalMaTeInternal.
Examples
# Load example (thetaA,thetaB) signals
path <- system.file("exData", package="calmate");
theta <- loadObject("thetaAB,100x2x40.Rbin", path=path);
# Calculate (CA,CB)
thetaR <- matrixStats::rowMedians(theta[,"A",] + theta[,"B",], na.rm=TRUE);
C <- 2*theta/thetaR;
# Calibrate (CA,CB) by CalMaTe
CC <- calmateByThetaAB(theta);
# Plot two "random" arrays
Clim <- c(0,4);
subplots(4, ncol=2, byrow=FALSE);
for (ii in c(1,5)) {
sampleName <- dimnames(C)[[3]][ii];
sampleLabel <- sprintf("Sample #%d ('%s')", ii, sampleName);
plot(C[,,ii], xlim=Clim, ylim=Clim);
title(main=sampleLabel);
plot(CC[,,ii], xlim=Clim, ylim=Clim);
title(main=sprintf("%s\ncalibrated", sampleLabel));
}