| calmateByThetaAB.array | R Documentation |
Normalize allele-specific copy numbers (CA,CB).
## S3 method for class 'array'
calmateByThetaAB(data, references=NULL, ..., truncate=FALSE, refAvgFcn=NULL,
flavor=c("v2", "v1"), verbose=FALSE)
data |
An Jx2xI |
references |
An index |
... |
Additional arguments passed to the internal fit function
|
truncate |
If |
refAvgFcn |
(optional) A |
flavor |
A |
verbose |
See |
Returns an Jx2xI numeric array
with the same dimension names as argument data.
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.
[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].
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.
# 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));
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.