Learn R Programming

RJaCGH (version 1.2.5)

pREC_A: Probabilistic Common Regions for copy number alteration.

Description

This method compute regions of gain/lost copy number with a joint probability of alteration greater than a given threshold.

Usage

pREC_A(obj, p, alteration = "Gain", array.weights = NULL)
## S3 method for class 'RJaCGH':
pREC_A(obj, p, alteration = "Gain", array.weights = NULL)
## S3 method for class 'RJaCGH.Chrom':
pREC_A(obj, p, alteration = "Gain", array.weights = NULL)
## S3 method for class 'RJaCGH.genome':
pREC_A(obj, p, alteration = "Gain", array.weights
= NULL)
## S3 method for class 'RJaCGH.array':
pREC_A(obj, p, alteration = "Gain", array.weights = NULL)

Arguments

obj
An object of class 'RJaCGH', 'RJaCGH.Chrom', 'RJaCGH.genome' or 'RJaCGH.array'.
p
Threshold for the minimum joint probability of alteration of the region.
alteration
Either 'Gain' or 'Lost'
array.weights
When 'obj' contains several arrays, the user can give a weight to each of them according to their reliability or precision.

Value

  • An object of class pREC_A.RJaCGH, pREC_A.RJaCGH.Chrom, pREC_A.RJaCGH.genome, pREC_A.RJaCGH.array, pREC_A.RJaCGH.array.Chrom or pREC_A.RJaCGH.array.genome, as corresponding. They are lists with a sublist for every region encountered and elements:
  • startStart position of the region.
  • indexStartindex position of the start of the region.
  • indexEndindex position of the end of the region.
  • endEnd position of the region.
  • genesNumber of genes in the region.
  • probJoint probability of gain/loss of the region.
  • If there are chromosome information (that is, the object inputed is of class RJaCGH.Chrom, RJaCGH.genome or RJaCGH.array with each array of any of these classes), then this information will be enclosed in a list for each chromosome.

Details

RJaCGH can compute common regions taking into account the probability of every probe to have an altered copy number. The result is a set of probes whose joint probability (not the product of their marginal probabilities, as returned by states or model.averaging) is at least as p or greater.

Please note that if the method returns several sets or regions, the probability of alteration of all of them doesn't have to be over the probability threshold; in other words p is computed for every region, not for all the sequence of regions.

pREC_A calls the function getSequence that creates temporal files in the working directory containing the sequence of hidden states for every MCMC sample, so there should be writing permisssions in that directory. Then it calls repeatedly prob.seq to compute the joint probability of sets of probes over the MCMC samples.

References

Rueda OM, Diaz-Uriarte R. Flexible and Accurate Detection of Genomic Copy-Number Changes from aCGH. PLoS Comput Biol. 2007;3(6):e122

See Also

RJaCGH, states, model.averaging, print.pREC_A getSequence prob.seq pREC_S

Examples

Run this code
## MCR for a single array:
y <- c(rnorm(100, 0, 1), rnorm(10, -3, 1), rnorm(20, 3, 1),
       rnorm(100,0, 1)) 
Pos <- sample(x=1:500, size=230, replace=TRUE)
Pos <- cumsum(Pos)
Chrom <- rep(1:23, rep(10, 23))

jp <- list(sigma.tau.mu=rep(0.05, 4), sigma.tau.sigma.2=rep(0.03, 4),
           sigma.tau.beta=rep(0.07, 4), tau.split.mu=0.1, tau.split.beta=0.1)

fit.genome <- RJaCGH(y=y, Pos=Pos, Chrom=Chrom, model="genome",
burnin=1000, TOT=1000, jump.parameters=jp, k.max = 4)
pREC_A(fit.genome, p=0.8, alteration="Gain")
pREC_A(fit.genome, p=0.8, alteration="Loss")

##MCR for two arrays:
z <- c(rnorm(110, 0, 1), rnorm(20, 3, 1),
       rnorm(100,0, 1)) 
fit.array.genome <- RJaCGH(y=cbind(y,z), Pos=Pos, Chrom=Chrom, model="genome",
burnin=1000, TOT=1000, jump.parameters=jp, k.max = 4)
pREC_A(fit.array.genome, p=0.4, alteration="Gain")
pREC_A(fit.array.genome, p=0.4, alteration="Loss")

Run the code above in your browser using DataLab