Last data update: 2014.03.03

R: Plot the estimated profile of copy number data
plotEstProfileR Documentation

Plot the estimated profile of copy number data

Description

Function to plot the estimated profiles of copy number data.

Usage

  plotEstProfile(sampleName='', chr, position, logratio, chrToBePlotted, estPC, maxProbeNumber,
                 legendPosition='bottomleft', regrCurve=NULL, regr=NULL)

Arguments

sampleName

name of the sample, if the user wants to put it in the title of the graph

chr

array containing the name of the chromosome to which each probe belongs. The possible values of the elements of chr are: the integers from 1 to 22, 'X' and 'Y'.

position

array containing the physical position of each probe

logratio

array containing the log2ratio of the raw copy number data

chrToBePlotted

array containing the name of the estimated chromosomes, that the user wants to plot. The possible values of the chromosomes are: the integers from 1 to 22, 'X' and 'Y'.

estPC

array containing the estimated copy number profile as a piecewise constant function. If estPC=NULL, only the estimated Bayesian regression curve is plotted.

maxProbeNumber

maximum number of probes that a chromosome (or arm of a chromosome) can have to be analyzed. The procedure of profile estimation needs the computation of an array of length (length(chromosome)+1)*(length(chromosome)+2)/2. To be sure to have set this parameter correctly, try to create the array A <- array(1, dim=(maxProbeNumber+1)*(maxProbeNumber+2)/2), before starting with the estimation procedure.

legendPosition

string containing the position of the legend in the plot. The possible values are the same used in the function plot.

regrCurve

array containing the estimated regression curve. If regrCurve=NULL, then the estimated Bayesian regression curve is not plotted. If regrCurve!=NULL and also estPC!=NULL both estimated profiles are plotted on the same graph.

regr

choice of the computation of the regression curve. If regr=NULL, then the regression curve was not computed (then the estimated Bayesian regression curve is not plotted), if regr="BRC" the Bayesian Regression Curve was computed (mBRC with K_2), if regr="BRCAk" the Bayesian Regression Curve Averaging over k was computed (BRCAk).

Details

The function plots the estimated profiles of the chromosomes of chrToBePlotted, separately.

Examples

##import the 10K data of cell line REC
data(rec10k)
##estimation of chromosomes 3 and 5
results <- estProfileWithMBPCR(rec10k$SNPname, rec10k$Chromosome, rec10k$PhysicalPosition, rec10k$log2ratio, chrToBeAnalyzed=c(3,5), maxProbeNumber=2000)
##plot the corresponding estimated profiles
plotEstProfile(sampleName='rec10k', rec10k$Chromosome, rec10k$PhysicalPosition, rec10k$log2ratio, chrToBePlotted=c(3,5), results$estPC, maxProbeNumber=2000)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(mBPCR)
Loading required package: oligoClasses
Welcome to oligoClasses version 1.34.0
Loading required package: SNPchip
Welcome to SNPchip version 2.18.0
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/mBPCR/plotEstProfile.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotEstProfile
> ### Title: Plot the estimated profile of copy number data
> ### Aliases: plotEstProfile
> ### Keywords: hplot print
> 
> ### ** Examples
> 
> ##import the 10K data of cell line REC
> data(rec10k)
> ##estimation of chromosomes 3 and 5
> results <- estProfileWithMBPCR(rec10k$SNPname, rec10k$Chromosome, rec10k$PhysicalPosition, rec10k$log2ratio, chrToBeAnalyzed=c(3,5), maxProbeNumber=2000)
Estimation of global  parameters
Estimation of the profile of chromosome 3
Computation of log(A^0)
Computation of left and right recursions
Determination of PC Regression
Estimation of the profile of chromosome 5
Computation of log(A^0)
Computation of left and right recursions
Determination of PC Regression
> ##plot the corresponding estimated profiles
> plotEstProfile(sampleName='rec10k', rec10k$Chromosome, rec10k$PhysicalPosition, rec10k$log2ratio, chrToBePlotted=c(3,5), results$estPC, maxProbeNumber=2000)
> 
> 
> 
> 
> 
> dev.off()
png 
  2 
>