View source: R/local_correlations.R

createCorrelationMatrix | R Documentation |

Create correlation matrix based on correlation between pairs of peaks

```
createCorrelationMatrix(
query,
regionQuant,
adjacentCount = 500,
windowSize = 1e+06,
method = "adjacent",
method.corr = c("pearson", "spearman"),
quiet = FALSE,
setNANtoZero = FALSE
)
```

`query` |
GRanges object of intervals to query |

`regionQuant` |
normalized quantifications of regions in query. Rows are features, like in limma |

`adjacentCount` |
number of adjacent entries to compute correlation against |

`windowSize` |
width of window in bp around each interval beyond which weight is zero |

`method` |
'adjacent': compute corr on fixed count sliding window define by adjacentCount. "distance": compute corr for entries within windowSize bp |

`method.corr` |
specify which correlation method: "pearson" or "spearman" |

`quiet` |
suppress messages |

`setNANtoZero` |
replace NAN correlation values with a zero |

for peak i and j with distance d_i,j, M[i,j] = cor( vobj$E[i,], vobj$E[j,] )

return sparse symmatric matrix

```
data('decorateData')
C = createCorrelationMatrix(simLocation, simData)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.