plotBestNormal {PureCN}R Documentation

Plot the PCA of tumor and its best normal(s)

Description

This function can be used to understand how a best normal is chosen by the findBestNormal function. It can be also used to tune the best normal selection by finding good parameter values for num.normals and pcs.

Usage

plotBestNormal(normal.coverage.files, tumor.coverage.file, normalDB, x = 1,
  y = 2, col.tumor = "red", col.best.normal = "blue",
  col.other.normals = "black", ...)

Arguments

normal.coverage.files

Coverage file names of normal samples, typically identified via findBestNormal.

tumor.coverage.file

Coverage file or data of a tumor sample.

normalDB

Database of normal samples, created with createNormalDatabase.

x

Principal component (PC) to be plotted on x-axis.

y

PC to be plotted on y-axis.

col.tumor

Color of tumor in plot.

col.best.normal

Color of best normals in plot.

col.other.normals

Color of other normals in plot.

...

Arguments passed to the plot function.

Value

Returns NULL.

Author(s)

Markus Riester

See Also

createNormalDatabase findBestNormal

Examples


normal.coverage.file <- system.file("extdata", "example_normal.txt", 
    package="PureCN")
normal2.coverage.file <- system.file("extdata", "example_normal2.txt",
     package="PureCN")
normal.coverage.files <- c(normal.coverage.file, normal2.coverage.file)
normalDB <- createNormalDatabase(normal.coverage.files)

tumor.coverage.file <- system.file("extdata", "example_tumor.txt", 
    package="PureCN")
best.normal.coverage.file <- findBestNormal(tumor.coverage.file, normalDB)
plotBestNormal(best.normal.coverage.file, tumor.coverage.file, normalDB)

# Display sample sex. The first point in the plot is always tumor.
plotBestNormal(best.normal.coverage.file, tumor.coverage.file, normalDB,  
    pch=c(1,ifelse(normalDB$sex=="F", 1, 2)))


[Package PureCN version 1.8.1 Index]