getSampleOffsets {Repitools} | R Documentation

## Calculates the sample-specific offsets, using the neutral state

### Description

ABCD-DNA combines CNV offsets with sample specific factors. This function calculates the latter, using a set of neutral regions (and corresponding counts in the count table).

### Usage

    getSampleOffsets(obj, ref = 1, quantile = 0.99, min.n = 100, plot.it = FALSE, force = FALSE, ...)

### Arguments

`obj` | a `QdnaData` object
`ref` | integer index, giving the sample to use as reference
`quantile` | quantile of the A-values to use
`min.n` | minimum number of points to include
`plot.it` | logical, whether to plot an M-A plot for each sample against the reference (default: `FALSE`)
`force` | logical, whether to recalculate the sample-specific offsets (only needed if they are already calculated)
`...` | arguments to pass to the `maPlot` function

### Details

The sample-specific offset is calculated as the median M-value beyond (i.e. to the right) an A-value quantile, using only the copy-number-neutral regions, as specified in the incoming `QdnaData` object.

### Value

returns a `QdnaData` object (copied from the `obj` argument) and populates the `$DGEList$samples$norm.factors` element and sets the `$sample.specific.calculated` to `TRUE`.

### Author(s)

Mark Robinson

### References

http://imlspenticton.uzh.ch/robinson_lab/ABCD-DNA/ABCD-DNA.html

### See Also

`QdnaData`

### Examples

    # library(Repitools)
    # qd <- QdnaData(counts=counts, regions=gb, design=design,
    #               cnv.offsets=cn, neutral=(regs=="L=4 P=2"))
    # qd <- getSampleOffsets(qd,ref=1)

[Package Repitools version 1.26.0 Index]