relativeCN: Calculate and Segment Relative Copy Number From Sequencing...

relativeCNR Documentation

Calculate and Segment Relative Copy Number From Sequencing Counts

Description

This function uses the GCadjustCopy function to convert a matrix of count data into absolute copy number estimates, then calculates the log2 fold change ratio and segments these values.

Usage

  ## S4 method for signature 'data.frame,matrix'
relativeCN(input.windows, input.counts, gc.params = NULL,
                                          ..., verbose = TRUE)
  ## S4 method for signature 'GRanges,matrix'
relativeCN(input.windows, input.counts, gc.params = NULL,
                                        ..., verbose = TRUE)

Arguments

input.windows

A data.frame with (at least) columns chr, start, and end, or a GRanges object.

input.counts

A matrix of counts. The first column must be for the control state, and the second column must be for the treatment state.

gc.params

A GCAdjustParams object, holding parameters related to mappability and GC content correction of read counts, or NULL, if GC content correction is not desired.

...

Further parameters passed to segment function in DNAcopy package, and also the segment.sqrt parameter to absoluteCN.

verbose

Whether to print the progess of processing.

Details

The algorithm used to call the copy number regions is Circular Binary Segmentation (Olshen et al. 2004). Weights for each window, that are the inverse of the variance, calculated with the delta method, are always used. Windows or regions that were not in the segmentation result are given the value NA.

If gc.params is NULL, then no correction for mappability or GC content is done. This can be done when the bias in both treatment and control samples is assumed to be equal. If gc.params is specified, then absolute copy numbers are estimated with GCadjustCopy for each condition, which corrects for mappability and then GC content, before estimating absolute copy numbers. The ratio of estimated absolute copy numbers is segmented, to calculate relative copy numbers.

Value

If gc.params was given, then a AdjustedCopyEstimate object. Otherwise, a CopyEstimate object. The copy number ratios are on the linear scale, not log2.

Author(s)

Dario Strbenac

References

Olshen, A. B., Venkatraman, E. S., Lucito, R., and Wigler, M. (2004). Circular binary segmentation for the analysis of array-based DNA copy number data. Biostatistics 5: 557-572

Examples

  inputs <- data.frame(chr = c("chr1", "chr1", "chr1", "chr2", "chr2"),
                     start = c(1, 50001, 100001, 1, 10001),
                       end = c(50000, 100000, 150000, 10000, 20000))
  counts <- matrix(c(25, 39, 3, 10, 22, 29, 38, 5, 19, 31), nrow = 5)
  colnames(counts) <- c("Control", "Treatment")
  relativeCN(inputs, input.counts = counts, p.method = "perm")

markrobinsonuzh/Repitools documentation built on March 20, 2024, 6:04 a.m.