compareToReference {QDNAseq} | R Documentation

## Divide binned read counts with those of reference samples

### Description

Divide binned read counts with those of reference samples.

### Usage

    compareToReference(object, references, force=FALSE)

### Arguments

`object` | An object of class `QDNAseqCopyNumbers`.
`references` | A numeric vector of indexes of the reference sample. Must be the same length as there are samples in object. When `NA`, the sample will be kept as is. When `FALSE`, the sample will be removed from the output. As an example, object contains three samples: tumor1, tumor2, and normal2. There is no reference for tumor1, but normal2 is a matched normal sample from the same patient as tumor2. The keep tumor1 as is, but to divide tumor2 with normal2, argument references should be `c(NA, 3, FALSE)`.
`force` | Whether to force the operation even when downstream data will be lost.

### Value

Returns a `QDNAseqCopyNumbers` object with the desired samples divided by the signal of their reference samples.

### Author(s)

Ilari Scheinin

### Examples

    data(LGG150)
    readCounts <- LGG150
    readCountsFiltered <- applyFilters(readCounts)
    readCountsFiltered <- estimateCorrection(readCountsFiltered)
    copyNumbers <- correctBins(readCountsFiltered)
    copyNumbersNormalized <- normalizeBins(copyNumbers)
    copyNumbersSmooth <- smoothOutlierBins(copyNumbersNormalized)
    # Note: the following command will compare the sample to itself, which
    # does not really make sense:
    tumorVsNormal <- compareToReference(copyNumbersSmooth, c(1))

[Package QDNAseq version 1.16.0 Index]