filterTargets {PureCN} | R Documentation

## Remove low quality targets

### Description

This function determines which intervals in the coverage files should be included or excluded in the segmentation. It is called via the `fun.filterTargets` argument of `runAbsoluteCN`. The arguments are passed via `args.filterTargets`.

### Usage

    filterTargets(normal, tumor, log.ratio, seg.file, filter.lowhigh.gc = 0.001,
      min.coverage = 15, min.targeted.base = 5, normalDB = NULL,
      normalDB.min.coverage = 0.25, normalDB.max.missing = 0.03)

### Arguments

`normal` | Coverage data for normal sample.
`tumor` | Coverage data for tumor sample.
`log.ratio` | Copy number log-ratios, one for each target or interval in coverage file.
`seg.file` | If not `NULL`, then do not filter targets, because data is already segmented via the provided segmentation file.
`filter.lowhigh.gc` | Quantile q (defines lower q and upper 1-q) for removing targets with outlier GC profile. Assuming that GC correction might not have been worked on those. Requires `gc.gene.file`.
`min.coverage` | Minimum coverage in both normal and tumor. Targets with lower coverage are ignored. If a `normalDB` is provided, then this database already provides information about low quality targets and the `min.coverage` is set to `min.coverage/10000`.
`min.targeted.base` | Exclude intervals with targeted base (size in bp) smaller than this cutoff. This is useful when the same interval file was used to calculate GC content. For such small targets, the GC content is likely very different from the true GC content of the probes.
`normalDB` | Normal database, created with `createNormalDatabase`.
`normalDB.min.coverage` | Exclude targets with coverage lower than 20 percent of the chromosome median in the pool of normals.
`normalDB.max.missing` | Exclude targets with zero coverage in the specified fraction of normal samples.

### Value

`logical(length(log.ratio))` specifying which targets should be used in segmentation.

### Author(s)

Markus Riester

### 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")
    vcf.file <- system.file("extdata", "example_vcf.vcf",
        package="PureCN")
    gc.gene.file <- system.file("extdata", "example_gc.gene.file.txt",
        package="PureCN")

    # The max.candidate.solutions, max.ploidy and test.purity parameters are set to
    # non-default values to speed-up this example.  This is not a good idea for real
    # samples.
    ret <-runAbsoluteCN(normal.coverage.file=normal.coverage.file,
        tumor.coverage.file=tumor.coverage.file, genome="hg19", vcf.file=vcf.file,
        sampleid="Sample1", gc.gene.file=gc.gene.file, normalDB=normalDB,
        args.filterTargets=list(min.targeted.base=10), max.ploidy=4,
        test.purity=seq(0.3,0.7,by=0.05), max.candidate.solutions=1)

[Package PureCN version 1.8.1 Index]