hic_diff: Detect differences between two jointly normalized Hi-C...

View source: R/hic_diff.R

hic_diffR Documentation

Detect differences between two jointly normalized Hi-C datasets. OLD METHOD; USE hic_compare() instead


Detect differences between two jointly normalized Hi-C datasets. OLD METHOD; USE hic_compare() instead


  diff.thresh = "auto",
  iterations = 10000,
  Plot = FALSE,
  Plot.smooth = TRUE,
  parallel = FALSE,
  BP_param = bpparam()



A hic.table or list of hic.tables output from the hic_loess function. hic.table must be jointly normalized before being entered.


Fold change threshold desired to call a detected difference significant. Set to 'auto' by default to indicate that the difference threshold will be automatically calculated as 2 standard deviations of all the adjusted M values. For no p-value adjustment set diff.thresh = NA. To set your own threshold enter a numeric value i.e. diff.thresh = 1. If set to 'auto' or a numeric value, a check will be made as follows: if permutation p-value < 0.05 AND M < diff.thresh (the log2 fold change for the difference between IF1 and IF2) then the p-value will be set to 0.5.


Number of iterations for the permuation test.


Logical, should the MD plot showing before/after loess normalization be output?


Logical, defaults to TRUE indicating the MD plot will be a smooth scatter plot. Set to FALSE for a scatter plot with discrete points.


Logical, set to TRUE to utilize the parallel package's parallelized computing. Only works on unix operating systems. Only useful if entering a list of hic.tables.


Parameters for BiocParallel. Defaults to bpparam(), see help for BiocParallel for more information http://bioconductor.org/packages/release/bioc/vignettes/BiocParallel/inst/doc/Introduction_To_BiocParallel.pdf


This is the old method for detecting difference. The function is left in for legacy reasons and it is recommended to use the new function, hic_compare(), instead. The function takes in a hic.table or a list of hic.table objects created with the hic_loess function. If you wish to perform difference detection on Hi-C data for multiple chromosomes use a list of hic.tables. The process can be parallelized using the parallel setting. The adjusted IF and adjusted M calculated from hic_loess are used for difference detection. A permutation test is performed to test the significance of the difference between each IF of the two datasets. Permutations are broken in blocks for each unit distance. See methods section of Stansfield & Dozmorov 2017 for more details.


A hic.table with additional columns containing a p-value for the significance of the difference and the raw fold change between the IFs of the two datasets.


# Create hic.table object using included Hi-C data in sparse upper triangular
# matrix format
hic.table <- create.hic.table(HMEC.chr22, NHEK.chr22, chr = 'chr22')
# Plug hic.table into hic_loess()
result <- hic_loess(hic.table, Plot = TRUE)
# perform difference detection
diff.result <- hic_diff(result, diff.thresh = 'auto', Plot = TRUE)

dozmorovlab/HiCcompare documentation built on Nov. 29, 2022, 9:58 a.m.