createNormalDatabase {PureCN} | R Documentation

## Create database of normal samples

### Description

Function to create a database of normal samples, used to normalize tumor coverages.

### Usage

    createNormalDatabase(normal.coverage.files, sex = NULL,
      max.mean.coverage = NULL, coverage.outliers = c(0.25, 4),
      min.coverage = 0.25, max.missing = 0.03, low.coverage = 15, ...)

### Arguments

`normal.coverage.files` | Vector with file names pointing to coverage files of normal samples.
`sex` | `character(length(normal.coverage.files))` with sex for all files. `F` for female, `M` for male. If all chromosomes are diploid, specify `diploid`. If `NULL`, determine from coverage.
`max.mean.coverage` | Assume that coverages above this value do not necessarily improve copy number normalization. Internally, samples with coverage higher than this value will be normalized to have mean coverage equal to this value. If `NULL`, use the 80 percentile as cutoff. If `NA`, does not use a maximum value.
`coverage.outliers` | Exclude samples with coverages below or above the specified cutoffs (fractions of the normal sample coverages median). Only for databases with more than 5 samples.
`min.coverage` | Exclude targets with coverage lower than the specified fraction of the chromosome median in the pool of normals.
`max.missing` | Exclude targets with zero coverage in the specified fraction of normal samples.
`low.coverage` | Specifies the maximum number of total reads (NOT average coverage) to call a target low coverage.
`...` | Arguments passed to the `prcomp` function.

### Value

A normal database that can be used in the `calculateTangentNormal` function to retrieve a coverage normalization sample for a given tumor sample.

### Author(s)

Markus Riester

### See Also

`calculateTangentNormal`

### 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)

[Package PureCN version 1.10.0 Index]