differential_interactions.HiCglm: Finds significantly interacting rectangle-like regions.

Description Usage Arguments Value See Also

Description

This function works in 3 steps:

Fitting bilinear model is performed using best_fit_bilinear function, while for connected components search raster package is used. After detection of significantly interacting regions (connected components) one may further filter list to only retain those with number of non zero cells (n.cells column in interacting.regions data frame) larger than some threshold. There are 3 possible ways of selecting significant interactions (cells):

When using option 1 and 3 its recommended to plot the fit (enabled by default). An indication of properly determined significance threshold would be when red vertical line (the significance threshold) is located to the right side of grey vertical line.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'HiCglm'
differential_interactions(
  hic.glm,
  sig.map = NULL,
  plot.models = TRUE,
  pval = 0.05,
  sig.thr.selection = c(1, 2, 3)[1],
  which.significance = c("qvalue", "pvalue")[1],
  cc.direction = c(4, 8)[1]
)

Arguments

hic.glm

object of class HiCglm

plot.models

logical if true then plot bilinear model fit for every matrix in hic.glm object; it will plot bilinear fit for E[Y | X] and E[X | Y] models; if you want to save this results to file open device before calling this function (see for instance pdf) and close device after function call (see dev.off)

pval

numeric, pvalue (or qvalue) cutoff to qualify interaction as significant

sig.thr.selection

numeric, if 3 then only use bilinear model fit to establish p-value cutoff for significant interactions, if 2 then select significant interactions using only pval parameter, if 1 (default) use bilinear model, but if p-value threshold is larger than pval, use pval instead

which.significance

character either "qvalue" or "pvalue" indicating, which of the 2 should be used as a measure of interaction significance

cc.direction

specifies criterium for two cells to be considered as neighbors during connected components search, for details see directions parameter of raster::clump function

Value

list with number of entries equal to hic.glm$names; each entry is a list with 2 elements: interacting.regions - data frame containing rows with rectangle like regions of significant interactions with coordinates n.cells (number of non zero cells inside rectangle), start.x, end.x, start.y, end.y, effect; connected.components list with cells comprising given connected component; connected components list is named list where each entry name is unique id, which can be mapped to row in interacting.regions (its row names); effect column is indicating if interaction refers to Y enrichment (i.e. E[Y | X] model) or X enrichment (i.e. E[X | Y] model)

See Also

best_fit_bilinear for fitting bilinear model, raster and clump for connected components search


rz6/CopulaHiC documentation built on Dec. 31, 2019, 9:19 a.m.