ALICOR {encoDnaseI} | R Documentation

## aligned and interpolated correlation for local maximum traces for two scatterplots

### Description

aligned and interpolated correlation for local maximum traces from two scatterplots

### Usage

    alicor(x1, y1, x2, y2, bin = 50000)
    ALICOR(ssr, dns = rawCD4, bin = 50000)

### Arguments

`x1` | domain points for first scatterplot
`y1` | range points for first scatterplot
`x2` | domain points for second scatterplot
`y2` | range points for second scatterplot
`ssr` | an instance of class `snpScreenResult`
`dns` | an instance of class `hg18track`
`bin` | bin size, units are base pairs

### Details

We define a scatterplot to be a pair of vectors (x, y). We are interested in measuring the distance between two scatterplots, focusing on the locations of local peaks and valleys. Two scatterplots are close if their peaks and valleys in y are nearby in x.

We have no restrictions on commonalities between the scatterplots, but this only makes sense if there is reasonable overlap between their x ranges.

The algorithm, implemented in low-level function `alicor`, is as follows. Use parameter `bin` to define a grid in x for each scatterplot, and compute the maximum y value in each x-grid interval. Compute a common domain for the two scatterplots based solely on `x1`. Linearly interpolate the maximal series for each scatterplot on the common domain. Compute the correlation coefficient for the resulting interpolated series.

The higher-level function `ALICOR` adapts this to `snpScreenResult` `plot_mlp` display data and to hg18 annotation track data.

### Value

scalar correlation coefficient

### Note

Many variations on this algorithm are possible, but the code is not very flexible at this time.

### Author(s)

VJ Carey <stvjc@channing.harvard.edu>

### Examples

    data(sOSR2)
    data(c19g)
    juxtaPlot(c19g, sOSR2)
    ALICOR(sOSR2,  c19g)

[Package encoDnaseI version 0.1-0 Index]