hic_glm: Function to perform GLM differential analysis on Hi-C...

View source: R/glm.R

hic_glmR Documentation

Function to perform GLM differential analysis on Hi-C experiment


Function to perform GLM differential analysis on Hi-C experiment


  contrast = NA,
  coef = NA,
  method = "QLFTest",
  M = 1,
  p.method = "fdr",
  parallel = FALSE,
  max.pool = 0.7



A hicexp object,


A design matrix for the GLM.


Numeric vector or matrix specifying one or more contrasts of the linear model coefficients to be tested equal to zero.


integer or character index vector indicating which coefficients of the linear model are to be tested equal to zero.


The test method to be performed. Should be one of "QLFTest", "LRTest", or "Treat".


The log2 fold change value for a TREAT analysis.


p-value adjustment method to be used. Defaults to "fdr". See ?p.adjust for other adjustment options.


Logical, Should parallel processing be used?


The proportion of unit distances after which all further distances will be pooled. Distances before this value will be progressively pooled and any distances after this value will be combined into a single pool. Defaults to 0.7. Warning: do not adjust this value from the default unless you are getting errors related to the lfproc function or due to sparsity in fastlo normalization. If these errors occur it is due to either sparsity or low variance and max.pool will need to be lowered; typically to 0.5 or 0.6.


This function performs the specified edgeR GLM based test on a per distance basis on the Hi-C data. Distances groups are pooled using "progressive pooling". There are 3 options for the type of GLM based test to be used which is specified with the method option.
QLFTest will use edgeR's glmQLFit and glmQLFTest functions which makes use of quasi-likelihood methods described in Lund et al (2012).
LRTest uses edgeR's glmFit and glmLRT functions which uses a interaction-wise negative binomial general linear model. This method uses a likelihood ratio test for the coefficients specified in the model.
Treat uses edgeR's glmTreat function which performs a test for differential expression with a minimum required fold-change threshold imposed. It tests whether the absolute value of the log2 fold change is greater than the value specified as the M option.


A hicexp object with a filled in comparison slot.


## Not run: 
d <- model.matrix(~factor(meta(hicexp_diff)$group) + factor(c(1,2,1,2)))
hicexp_diff <- hic_glm(hicexp_diff, design = d, coef = 2)
## End(Not run)

dozmorovlab/multHiCcompare documentation built on April 30, 2022, 3:02 p.m.