cp.plot: Plot log-posterior probability for the output of the...

Description Usage Arguments Value Examples

Description

This function uses the colorgram function from the package squash to plot log-posterior probability for the tested combinations of cellularity and ploidy

Usage

1
2
3
4
5
6
7
   cp.plot(cp.table, xlab = "Ploidy", ylab = "Cellularity",
           zlab = "Scaled rank LPP",
           colFn = colorRampPalette(c('white', 'lightblue')), ...)
   cp.plot.contours(cp.table, likThresh = c(0.95), alternative = TRUE,
                    col = palette(), legend.pos = "bottomright", pch = 18,
                    alt.pch = 3, ...)
   get.ci(cp.table, level = 0.95)

Arguments

cp.table

list, as output from baf.model.fit or mufreq.model.fit.

xlab

xlab parameter as in the function colorgram.

ylab

ylab parameter as in the function colorgram.

zlab

zlab parameter as in the function colorgram.

colFn

colFn parameter as in the function colorgram.

likThresh

vector of quantiles to define tresholds for the confindent regions.

alternative

boolean parameter, if TRUE the alternative solutions are computed and plotted.

col

vector of colors.

legend.pos

position for placing the legend.

pch

character used to indicate the point estimate.

alt.pch

if alternative is set to TRUE defines the character to indicate alternative solutions.

...

additional arguments accepted by the function colorgram for cp.plot, or contour for cp.plot.contours.

level

decimal value of the confidence interval

Value

The get.ci function returns a list with 6 items:

values.ploidy

matrix of ploidy values with respective posterior probability.

confint.ploidy

boundaries of the confidence interval of the estimated ploidy.

max.ploidy

point estimate of the ploidy value that has the maximum posterior probability.

values.cellularity

matrix of cellularity values with respective posterior probability.

confint.cellularity

boundaries of the confidence interval of the estimated cellularity.

max.cellularity

point estimate of the cellularity value that has the maximum posterior probability.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(CP.example)
cp.plot(CP.example)
cp.plot.contours(CP.example, add = TRUE)

# Plot more contours
cp.plot(CP.example)
cp.plot.contours(CP.example, likThresh = c(0.95, 0.9999), add = TRUE)

# Return the 95% confidence interval
CP.example.ci <- get.ci(CP.example)
str(CP.example.ci)

sequenza documentation built on May 9, 2019, 5:04 p.m.