poolCoverage {PureCN} | R Documentation

## Pool coverage from multiple samples

### Description

Averages the coverage of a list of samples.

### Usage

    poolCoverage(all.data, remove.chrs = c(), w = NULL)

### Arguments

`all.data` | List of normals, read with `readCoverageFile`.
`remove.chrs` | Remove these chromosomes from the pool.
`w` | `numeric(length(all.data))` vector of weights. If `NULL`, weight all samples equally.

### Value

A `data.frame` with the averaged coverage over all normals.

### Author(s)

Markus Riester

### See Also

`readCoverageFile`

### 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)
    tumor.coverage.file <- system.file("extdata", "example_tumor.txt",
        package="PureCN")

    normalDB <- createNormalDatabase(normal.coverage.files)

    # get the best 2 normals and average them
    best.normal.coverage.files <- findBestNormal(tumor.coverage.file, normalDB,
        num.normals=2)
    pool <- poolCoverage(lapply(best.normal.coverage.files, readCoverageFile),
         remove.chrs=c("chrX", "chrY"))

[Package PureCN version 1.8.1 Index]