PureCN (version 1.0.3)

findBestNormal: Find best normal sample in database

Description

Function to find the best matching normal for a provided tumor sample.

Usage

findBestNormal(gatk.tumor.file, normalDB, pcs = 1:3, 
    num.normals = 1, ignore.sex = FALSE, verbose = TRUE)

Arguments

gatk.tumor.file
GATK coverage file of a tumor sample.
normalDB
Database of normal samples, created with createNormalDatabase().
pcs
Principal components to use for distance calculation.
num.normals
Return the num.normals best normals.
ignore.sex
If FALSE, detects sex of sample and returns best normals with matching sex.
verbose
Verbose output.

Value

  • Filename of the best matching normal.

Examples

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

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

Run the code above in your browser using DataLab