createCorrelationMatrix: Create correlation matrix

View source: R/local_correlations.R

createCorrelationMatrixR Documentation

Create correlation matrix

Description

Create correlation matrix based on correlation between pairs of peaks

Usage

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

Arguments

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

Value

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

return sparse symmatric matrix

Examples


data('decorateData')

C = createCorrelationMatrix(simLocation, simData)


GabrielHoffman/decorate documentation built on May 23, 2023, 1:29 a.m.