getBackgroundPeaks {chromVAR} | R Documentation

## getBackgroundPeaks

### Description

Function to get a set of background peaks for each peak based on GC content and # of fragments across all samples

### Usage

    getBackgroundPeaks(object, ...)

    ## S4 method for signature 'SummarizedExperiment'
    getBackgroundPeaks(object,
      bias = rowData(object)$bias, niterations = 50, w = 0.1, bs = 50)

    ## S4 method for signature 'RangedSummarizedExperiment'
    getBackgroundPeaks(object,
      bias = rowRanges(object)$bias, niterations = 50, w = 0.1, bs = 50)

    ## S4 method for signature 'MatrixOrmatrix'
    getBackgroundPeaks(object, bias, niterations = 50,
      w = 0.1, bs = 50)

### Arguments

`object` | fragment counts as SummarizedExperiment, RangedSummarized, Matrix, or matrix
`...` | addtional arguments
`bias` | vector of values for some bias signal for each row of object
`niterations` | number of background peaks to sample
`w` | parameter controlling similarity of background peaks
`bs` | bin size parameter

### Details

Background peaks are chosen by sampling peaks based on similarity in GC content and # of fragments across samples using the Mahalanobis distance. The w paramter controls how similar background peaks should be. The bs parameter controls the precision with which the similarity is computed; increasing bs will make the function run slower. Sensible default parameters are chosen for both.

### Value

matrix with one row per peak and one column per iteration. values in a row represent indices of background peaks for the peak with that index

### Methods (by class)

- `SummarizedExperiment`: method for SummarizedExperiment

- `RangedSummarizedExperiment`: method for RangedSummarizedExperiment

- `MatrixOrmatrix`: method for Matrix or matrix

### Examples

    # Load very small example counts (already filtered)
    data(mini_counts, package = "chromVAR")

    # get background peaks
    bgpeaks <- getBackgroundPeaks(mini_counts)

[Package chromVAR version 1.9.0 Index]