createTargetWeights {PureCN} | R Documentation

## Calculate target weights

### Description

Creates a target weight file useful for segmentation. Requires a set of coverage files from normal samples. A small number of tumor (or other normal) samples is then tested against all normals. Target weights will be set proportional to the inverse of coverage standard deviation across all normals. Targets with high variance in coverage in the pool of normals are thus down-weighted.

### Usage

    createTargetWeights(tumor.coverage.files, normal.coverage.files,
      target.weight.file, plot = FALSE)

### Arguments

`tumor.coverage.files` | A small number (1-3) of tumor or normal coverage samples.
`normal.coverage.files` | A large number of normal coverage samples (>20) to estimate target log-ratio standard deviations. Should not overlap with files in `tumor.coverage.files`.
`target.weight.file` | Output filename.
`plot` | Diagnostics plot, useful to tune parameters.

### Value

A `data.frame` with target weights.

### Author(s)

Markus Riester

### Examples

    target.weight.file <- "target_weights.txt"
    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")

    createTargetWeights(tumor.coverage.file, normal.coverage.files, target.weight.file)

[Package PureCN version 1.8.1 Index]