Function to visualize p-values from HiCcompare results

visualize_pvals(hic.table, alpha = NA, adj.p = TRUE)

Arguments

hic.table

A hic.table object that has been normalized and has had differences detected.

alpha

The alpha level at which you will call a p-value significant. If this is set to a numeric value then any p-values >= alpha will be set to 1 for the visualization in the heatmap. Defaults to NA for visualization of all p-values.

adj.p

Logical, Should the multiple testing corrected p-values be used (TRUE) or the raw p-values (FALSE)?

Value

A heatmap

Details

The goal of this function is to visualize where in the Hi-C matrix the differences are occuring between two experimental conditions. The function will produce a heatmap of the -log10(p-values) * sign(adj.M) to visualize where the significant differences between the datasets are occuring on the genome.

Examples

# Create hic.table object using included Hi-C data in sparse upper triangular # matrix format data('HMEC.chr22') data('NHEK.chr22') hic.table <- create.hic.table(HMEC.chr22, NHEK.chr22, chr = 'chr22') # Plug hic.table into hic_loess() result <- hic_loess(hic.table, Plot = TRUE)
#> Span for loess: 0.219052588777294
#> GCV for loess: 0.000118686898199309
#> AIC for loess: -0.212037314500057
# perform difference detection diff.result <- hic_compare(result, Plot = TRUE)
#> Filtering out interactions with A < 23
# visualize p-values visualize_pvals(diff.result)
#> Matrix dimensions: 71x71
#> Matrix dimensions: 71x71