rhoSquare
(i.e. either $\hat{\rho}_1^2$ or $\hat{\rho}^2$) and by default $\hat{\rho}_1^2$ is used.estProfileWithMBPCRforOligoSnpSet(sampleData, sampleToBeAnalyzed, chrToBeAnalyzed, maxProbeNumber, ifLogRatio=1, rhoSquare=NULL, kMax=50, nu=NULL, sigmaSquare=NULL, typeEstRho=1, regr=NULL)
assayData(sampleData)$copyNumber
(it contains the raw copy number values with scale log2 multiplied by 100 and transformed as integers), featureNames(featureData(sampleData))
(it contains the names of the SNPs), featureData(sampleData)$chromosome
(it contains the names of the chromosomes to which each of the SNPs belongs), featureData(sampleData)$position
(it contains the physical positions of the SNPs).A <- array(1, dim=(maxProbeNumber+1)*(maxProbeNumber+2)/2)
, before starting with the estimation procedure.ifLogRatio=1
), otherwise (ifLogRatio=0
) they are transformed in order to be derived from log2ratio data.rhoSquare=NULL
, then the algorithm estimates it on the sample.nu=NULL
, then the algorithm estimates it on the sample.sigmaSquare=NULL
, then the algorithm estimates it on the sample.rhoSquare
. If typeEstRho=1
, then the algorithm estimates rhoSquare
with $\hat{\rho}_1^2$, while if typeEstRho=0
, it estimates rhoSquare
with $\hat{\rho}^2$.regr=NULL
, then the regression curve is not computed,
if regr="BRC"
the Bayesian Regression Curve is computed (BRC with $K_2$), if regr="BRCAk"
the Bayesian
Regression Curve Averaging over k is computed (BRCAk).assayData(estPC)$copyNumber
, which contains the estimated profile with mBPCR in scale log2ratio multiplied by 100assayData(regrCurve)$copyNumber
, which contains the estimated bayesian regression curve in scale log2ratio multiplied by 100. This object is returned only if regr!=NULL
.assayData(estPC)$copyNumber
and assayData(regrCurve)$copyNumber
have the same dimension of assayData(sampleData)$copyNumber
, hence their elements,
corresponding to the not analyzed chromosomes and samples, are equal to NA
.
rhoSquare
, by setting typeEstRho=0
, or to directly set the value of the parameter.
The function gives also the possibility to estimate the profile with a Bayesian regression curve: if regr="BRC"
the Bayesian Regression Curve with $K_2$ is computed (BRC with $K_2$), if regr="BRCAk"
the Bayesian
Regression Curve Averaging over k is computed (BRCAk).
estProfileWithMBPCR
, computeMBPCR
###import an example of oligoSnpSet data
#data(oligoSetExample, package="oligoClasses")
##estimation of chromosome 2 in sample 1
#r <-estProfileWithMBPCRforOligoSnpSet(oligoSet, sampleToBeAnalyzed=1, chrToBeAnalyzed=2, maxProbeNumber=1000, ifLogRatio=0, rhoSquare=0.0889637)
##plot of the estimated chromosomes
#library(SNPchip)
#cc <- r$estPC
#cc1 <- cc[chromosome(cc) == "2",1]
#par(las=1)
#plot(position(cc1), copyNumber(cc1)/100, ylim=c(-0.23, 0.1), ylab="copy number", xaxt="n")
#plotIdiogram(2, build=genomeBuild(oligoSet), ylim=c(-0.225, -0.19), new=FALSE)
Run the code above in your browser using DataLab